Added CMake to TelldusCenter
This commit is contained in:
parent
4b2044dfd6
commit
9e0d294085
4 changed files with 147 additions and 0 deletions
|
@ -10,8 +10,13 @@ SET(PACKAGE_VERSION 2)
|
|||
SET(PACKAGE_SOVERSION 2.0.0)
|
||||
|
||||
SET(BUILD_LIBTELLDUS-GUI TRUE CACHE BOOL "Build libtelldus-gui")
|
||||
SET(BUILD_TELLDUS-CENTER TRUE CACHE BOOL "Build TelldusCenter")
|
||||
|
||||
if(BUILD_LIBTELLDUS-GUI)
|
||||
ADD_SUBDIRECTORY(TelldusGui)
|
||||
endif(BUILD_LIBTELLDUS-GUI)
|
||||
|
||||
IF (BUILD_TELLDUS-CENTER)
|
||||
ADD_SUBDIRECTORY(TelldusCenter)
|
||||
ADD_SUBDIRECTORY(Plugins)
|
||||
ENDIF (BUILD_TELLDUS-CENTER)
|
||||
|
|
11
telldus-gui/Plugins/CMakeLists.txt
Normal file
11
telldus-gui/Plugins/CMakeLists.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
CMAKE_MINIMUM_REQUIRED( VERSION 2.4.0 )
|
||||
|
||||
IF (BUILD_LIBTELLDUS-GUI)
|
||||
SET(BUILD_PLUGIN_DEVICES TRUE CACHE BOOL "Build plugin 'Devices'")
|
||||
ENDIF (BUILD_LIBTELLDUS-GUI)
|
||||
|
||||
IF(BUILD_PLUGIN_DEVICES)
|
||||
ADD_SUBDIRECTORY(Devices)
|
||||
ENDIF(BUILD_PLUGIN_DEVICES)
|
||||
|
56
telldus-gui/Plugins/Devices/CMakeLists.txt
Normal file
56
telldus-gui/Plugins/Devices/CMakeLists.txt
Normal file
|
@ -0,0 +1,56 @@
|
|||
FIND_PACKAGE( Qt4 REQUIRED )
|
||||
INCLUDE( ${QT_USE_FILE} )
|
||||
|
||||
if(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
endif(COMMAND cmake_policy)
|
||||
|
||||
######## Non configurable options ########
|
||||
SET( Devices_SRCS
|
||||
devicesplugin.cpp
|
||||
)
|
||||
|
||||
SET( Devices_HDRS
|
||||
)
|
||||
|
||||
SET( Devices_MOC_HDRS
|
||||
devicesplugin.h
|
||||
)
|
||||
|
||||
QT4_WRAP_CPP( Devices_MOC_SRCS ${Devices_MOC_HDRS} )
|
||||
QT4_AUTOMOC ( ${Devices_SRCS} )
|
||||
|
||||
FIND_LIBRARY( TELLDUSGUI_LIBRARY telldus-gui )
|
||||
|
||||
SET( Devices_LIBRARIES
|
||||
${QT_LIBRARIES}
|
||||
${TELLDUSGUI_LIBRARY}
|
||||
)
|
||||
|
||||
ADD_DEFINITIONS(${QT_DEFINITIONS})
|
||||
ADD_DEFINITIONS(-DQT_PLUGIN)
|
||||
ADD_DEFINITIONS(-DQT_NO_DEBUG)
|
||||
ADD_DEFINITIONS(-DQT_SHARED)
|
||||
|
||||
######## Configurable options for the platform ########
|
||||
|
||||
|
||||
######## Platforms-specific, non configurable ########
|
||||
|
||||
|
||||
######## Configuring ########
|
||||
|
||||
ADD_LIBRARY(Devices SHARED
|
||||
${Devices_SRCS}
|
||||
${Devices_HDRS}
|
||||
${Devices_MOC_SRCS}
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES( Devices ${Devices_LIBRARIES} )
|
||||
|
||||
SET_PROPERTY(TARGET Devices
|
||||
PROPERTY VERSION ${PACKAGE_VERSION}
|
||||
)
|
||||
SET_PROPERTY(TARGET Devices
|
||||
PROPERTY SOVERSION ${PACKAGE_SOVERSION}
|
||||
)
|
75
telldus-gui/TelldusCenter/CMakeLists.txt
Normal file
75
telldus-gui/TelldusCenter/CMakeLists.txt
Normal file
|
@ -0,0 +1,75 @@
|
|||
FIND_PACKAGE( Qt4 REQUIRED )
|
||||
SET(QT_USE_QTSCRIPT 1)
|
||||
INCLUDE( ${QT_USE_FILE} )
|
||||
|
||||
if(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
endif(COMMAND cmake_policy)
|
||||
|
||||
######## Non configurable options ########
|
||||
SET( telldus-center_SRCS
|
||||
main.cpp
|
||||
mainwindow.cpp
|
||||
tellduscenterapplication.cpp
|
||||
AutoUpdater.cpp
|
||||
message.cpp
|
||||
plugintree.cpp
|
||||
)
|
||||
|
||||
SET( telldus-center_HDRS
|
||||
AutoUpdater.h
|
||||
CocoaInitializer.h
|
||||
tellduscenterplugin.h
|
||||
plugintree.h
|
||||
)
|
||||
|
||||
SET( telldus-center_MOC_HDRS
|
||||
mainwindow.h
|
||||
tellduscenterapplication.h
|
||||
message.h
|
||||
)
|
||||
|
||||
QT4_WRAP_CPP( telldus-center_MOC_SRCS ${telldus-center_MOC_HDRS} )
|
||||
QT4_AUTOMOC ( ${telldus-center_SRCS} )
|
||||
QT4_ADD_RESOURCES (telldus-center_RSRCS resource.qrc )
|
||||
|
||||
FIND_LIBRARY( TELLDUSCORE_LIBRARY telldus-core )
|
||||
|
||||
SET( telldus-center_LIBRARIES
|
||||
${QT_LIBRARIES}
|
||||
${TELLDUSCORE_LIBRARY}
|
||||
)
|
||||
|
||||
######## Configurable options for the platform ########
|
||||
|
||||
|
||||
|
||||
######## Platforms-specific, non configurable ########
|
||||
|
||||
SET( telldus-center_TARGET TelldusCenter )
|
||||
|
||||
IF (APPLE) #### Mac OS X ####
|
||||
|
||||
ELSEIF (WIN32) #### Windows ####
|
||||
|
||||
ELSE (APPLE) #### Linux ####
|
||||
|
||||
ENDIF (APPLE)
|
||||
|
||||
|
||||
######## Configuring ########
|
||||
|
||||
ADD_EXECUTABLE(${telldus-center_TARGET}
|
||||
${telldus-center_SRCS}
|
||||
${telldus-center_MOC_SRCS}
|
||||
${telldus-center_RSRCS}
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES( ${telldus-center_TARGET} ${telldus-center_LIBRARIES} )
|
||||
|
||||
SET_PROPERTY(TARGET ${telldus-center_TARGET}
|
||||
PROPERTY VERSION ${PACKAGE_VERSION}
|
||||
)
|
||||
SET_PROPERTY(TARGET ${telldus-center_TARGET}
|
||||
PROPERTY SOVERSION ${PACKAGE_SOVERSION}
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue