Skip to content

Instantly share code, notes, and snippets.

@nikhilm
Created February 22, 2011 20:40
Show Gist options
  • Save nikhilm/839345 to your computer and use it in GitHub Desktop.
Save nikhilm/839345 to your computer and use it in GitHub Desktop.
initial cmake support for HUpnp
#toplevel in herqq/
project(HUpnp)
set(HUpnp_MAJOR_VERSION 0)
set(HUpnp_MINOR_VERSION 9)
set(HUpnp_PATCH_VERSION 0)
find_package(Qt4 COMPONENTS QtCore QtXml QtNetwork REQUIRED)
add_subdirectory(hupnp)
if(KDE4_BUILD_TESTS)
add_subdirectory(apps)
endif(KDE4_BUILD_TESTS)
#herqq/hupnp
add_subdirectory(lib/qtsoap-2.7-opensource/buildlib)
add_subdirectory(src/hupnp_core)
#herqq/hupnp/lib/qtsoap-2.7-opensource/buildlib/CMakeLists.txt
set(QtSoap_SRCS
../src/qtsoap.cpp
)
qt4_wrap_cpp(QtSoap_MOC_SRCS ../src/qtsoap.h)
add_library(QtSolutions_SOAP-2.7 SHARED ${QtSoap_SRCS} ${QtSoap_MOC_SRCS})
set_target_properties(QtSolutions_SOAP-2.7 PROPERTIES
VERSION "1.0.0"
SOVERSION "1.0.0"
)
target_link_libraries(QtSolutions_SOAP-2.7
${QT_LIBRARIES}
)
install(TARGETS QtSolutions_SOAP-2.7
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib COMPONENT Devel)
#herqq/hupnp/src/hupnp_core/CMakeLists.txt
set(HUpnp_SRCS
dataelements/hactioninfo.cpp
dataelements/hdeviceinfo.cpp
dataelements/hserviceinfo.cpp
dataelements/hserviceid.cpp
dataelements/hudn.cpp
dataelements/hresourcetype.cpp
dataelements/hproduct_tokens.cpp
dataelements/hdiscoverytype.cpp
dataelements/hstatevariableinfo.cpp
dataelements/hvaluerange_p.cpp
devicehosting/hdevicestorage_p.cpp
devicehosting/hddoc_parser_p.cpp
devicehosting/hmodelcreation_p.cpp
devicehosting/messages/hcontrol_messages_p.cpp
devicehosting/messages/hevent_messages_p.cpp
devicehosting/messages/hnt_p.cpp
devicehosting/messages/hsid_p.cpp
devicehosting/messages/htimeout_p.cpp
devicehosting/controlpoint/hcontrolpoint.cpp
devicehosting/controlpoint/hclientmodel_creator_p.cpp
devicehosting/controlpoint/hdevicebuild_p.cpp
devicehosting/controlpoint/hcontrolpoint_configuration.cpp
devicehosting/controlpoint/hcontrolpoint_dataretriever_p.cpp
devicehosting/controlpoint/hevent_subscription_p.cpp
devicehosting/controlpoint/hevent_subscriptionmanager_p.cpp
devicehosting/devicehost/hdevicehost.cpp
devicehosting/devicehost/hservermodel_creator_p.cpp
devicehosting/devicehost/hdevicehost_dataretriever_p.cpp
devicehosting/devicehost/hevent_notifier_p.cpp
devicehosting/devicehost/hdevicehost_configuration.cpp
devicehosting/devicehost/hdevicehost_ssdp_handler_p.cpp
devicehosting/devicehost/hdevicehost_http_server_p.cpp
devicehosting/devicehost/hevent_subscriber_p.cpp
devicemodel/hactions_setupdata.cpp
devicemodel/hasyncop.cpp
devicemodel/hexecargs.cpp
devicemodel/hactionarguments.cpp
devicemodel/hdevices_setupdata.cpp
devicemodel/hservices_setupdata.cpp
devicemodel/hstatevariable_event.cpp
devicemodel/hstatevariables_setupdata.cpp
devicemodel/hdevicemodel_infoprovider.cpp
devicemodel/client/hclientdevice.cpp
devicemodel/client/hclientaction.cpp
devicemodel/client/hclientactionop.cpp
devicemodel/client/hclientservice.cpp
devicemodel/client/hclientstatevariable.cpp
devicemodel/server/hserveraction.cpp
devicemodel/server/hserverdevice.cpp
devicemodel/server/hserverservice.cpp
devicemodel/server/hserverstatevariable.cpp
devicemodel/server/hdevicemodelcreator.cpp
general/hupnp_global.cpp
general/hclonable.cpp
general/hlogger_p.cpp
general/hupnpinfo.cpp
general/hupnp_datatypes.cpp
http/hhttp_utils_p.cpp
http/hhttp_header_p.cpp
http/hhttp_server_p.cpp
http/hhttp_asynchandler_p.cpp
http/hhttp_messaginginfo_p.cpp
http/hhttp_messagecreator_p.cpp
socket/hendpoint.cpp
socket/hmulticast_socket.cpp
ssdp/hssdp.cpp
ssdp/hdiscovery_messages.cpp
ssdp/hssdp_messagecreator_p.cpp
../utils/hmisc_utils_p.cpp
../utils/hsysutils_p.cpp
../utils/hthreadpool_p.cpp
http/hhttp_utils_p.cpp
http/hhttp_header_p.cpp
http/hhttp_server_p.cpp
http/hhttp_asynchandler_p.cpp
http/hhttp_messaginginfo_p.cpp
http/hhttp_messagecreator_p.cpp
)
set(HUpnp_MOC_HDRS
../utils/hthreadpool_p.h
devicemodel/server/hserverservice.h
devicemodel/server/hserveraction.h
devicemodel/server/hserverdevice.h
devicemodel/server/hserverstatevariable.h
devicemodel/client/hclientservice.h
devicemodel/client/hdefault_clientdevice_p.h
devicemodel/client/hclientaction_p.h
devicemodel/client/hclientstatevariable.h
devicemodel/client/hclientaction.h
devicemodel/client/hclientdevice.h
http/hhttp_asynchandler_p.h
http/hhttp_server_p.h
ssdp/hssdp.h
devicehosting/devicehost/hdevicehost_p.h
devicehosting/devicehost/hserverdevicecontroller_p.h
devicehosting/devicehost/hevent_subscriber_p.h
devicehosting/devicehost/hevent_notifier_p.h
devicehosting/devicehost/hdevicehost_ssdp_handler_p.h
devicehosting/devicehost/hdevicehost_http_server_p.h
devicehosting/devicehost/hdevicehost.h
devicehosting/controlpoint/hdevicebuild_p.h
devicehosting/controlpoint/hcontrolpoint.h
devicehosting/controlpoint/hcontrolpoint_dataretriever_p.h
devicehosting/controlpoint/hcontrolpoint_p.h
devicehosting/controlpoint/hevent_subscriptionmanager_p.h
devicehosting/controlpoint/hevent_subscription_p.h
)
qt4_wrap_cpp(HUpnp_MOC_SRCS ${HUpnp_MOC_HDRS})
file(GLOB HUpnp_INDIRECT_HEADERS ${CMAKE_SOURCE_DIR}/hupnp/include/HUpnpCore/H*)
file(GLOB HUpnp_PUBLIC_HEADERS ${CMAKE_SOURCE_DIR}/hupnp/include/HUpnpCore/H*)
set(HUpnp_PUBLIC_HEADERS
devicemodel/server/hserverservice.h
devicemodel/server/hdevicemodelcreator.h
devicemodel/server/hserveraction.h
devicemodel/server/hserverdevice.h
devicemodel/server/hserverstatevariable.h
devicemodel/hactioninvoke.h
devicemodel/hstatevariable_event.h
devicemodel/hservices_setupdata.h
devicemodel/client/hclientservice.h
devicemodel/client/hclientstatevariable.h
devicemodel/client/hclientaction.h
devicemodel/client/hclientdevice.h
devicemodel/client/hclientactionop.h
devicemodel/hactions_setupdata.h
devicemodel/hasyncop.h
devicemodel/hdevicemodel_infoprovider.h
devicemodel/hexecargs.h
devicemodel/hdevices_setupdata.h
devicemodel/hactionarguments.h
devicemodel/hactioninvoke_callback.h
devicemodel/hdevicestatus.h
devicemodel/hstatevariables_setupdata.h
general/hupnpinfo.h
general/hupnp_defs.h
general/hclonable.h
general/hupnp_fwd.h
general/hupnp_datatypes.h
general/hupnp_global.h
dataelements/hserviceinfo.h
dataelements/hserviceid.h
dataelements/hproduct_tokens.h
dataelements/hdeviceinfo.h
dataelements/hudn.h
dataelements/hstatevariableinfo.h
dataelements/hdiscoverytype.h
dataelements/hresourcetype.h
dataelements/hactioninfo.h
socket/hendpoint.h
socket/hmulticast_socket.h
ssdp/hssdp.h
ssdp/hdiscovery_messages.h
devicehosting/devicehost/hdevicehost_configuration.h
devicehosting/devicehost/hdevicehost.h
devicehosting/controlpoint/hcontrolpoint.h
devicehosting/controlpoint/hcontrolpoint_configuration.h
../utils/hfunctor.h
../utils/hglobal.h
)
add_library(HUpnp SHARED ${HUpnp_SRCS} ${HUpnp_MOC_SRCS})
set_target_properties(HUpnp PROPERTIES
VERSION "${HUpnp_MAJOR_VERSION}.${HUpnp_MINOR_VERSION}.${HUpnp_PATCH_VERSION}"
SOVERSION "${HUpnp_MAJOR_VERSION}.${HUpnp_MINOR_VERSION}.${HUpnp_PATCH_VERSION}"
)
include_directories( ${CMAKE_SOURCE_DIR}/hupnp/lib/qtsoap-2.7-opensource/src )
include_directories( ${CMAKE_SOURCE_DIR}/hupnp/include )
include(${QT_USE_FILE})
find_library(QT_SOAP_LIBRARIES QtSolutions_SOAP-2.7)
target_link_libraries(HUpnp
${QT_SOAP_LIBRARIES}
${QT_LIBRARIES}
)
install(TARGETS HUpnp
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib COMPONENT Devel)
install(FILES ${HUpnp_INDIRECT_HEADERS}
DESTINATION include/HUpnpCore
COMPONENT Devel
)
install(FILES ${HUpnp_PUBLIC_HEADERS}
DESTINATION include/HUpnpCore/public
COMPONENT Devel
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment