Added a better way to find TelldusCore
This commit is contained in:
parent
5bdc62fdee
commit
3aa67a39dd
5 changed files with 45 additions and 14 deletions
|
@ -6,7 +6,7 @@ if(COMMAND cmake_policy)
|
|||
cmake_policy(SET CMP0003 NEW)
|
||||
endif(COMMAND cmake_policy)
|
||||
|
||||
SET(PACKAGE_VERSION 2.0.900)
|
||||
SET(PACKAGE_VERSION 2.0.100)
|
||||
SET(PACKAGE_SOVERSION 2)
|
||||
SET(DISPLAYED_VERSION ${PACKAGE_VERSION})
|
||||
|
||||
|
@ -16,6 +16,8 @@ SET(LANGUAGES sv)
|
|||
SET(BUILD_LIBTELLDUS-GUI TRUE CACHE BOOL "Build libtelldus-gui")
|
||||
SET(BUILD_TELLDUS-CENTER TRUE CACHE BOOL "Build TelldusCenter")
|
||||
|
||||
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||
|
||||
IF (WIN32)
|
||||
SET(TELLDUSCORE_INCLUDE_DIR "" CACHE PATH "Path to the directory which contains telldus-core.h")
|
||||
ENDIF (WIN32)
|
||||
|
|
|
@ -13,9 +13,18 @@ SET( Plugin_MOC_HDRS
|
|||
|
||||
SET( Plugin_PATH "com.telldus.gui" )
|
||||
|
||||
SET( Plugin_LIBRARIES
|
||||
${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/TelldusGui.lib
|
||||
)
|
||||
IF (WINDOWS)
|
||||
SET( Plugin_LIBRARIES
|
||||
${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/TelldusGui.lib
|
||||
)
|
||||
ELSE (WINDOWS)
|
||||
FIND_PACKAGE(TelldusCore REQUIRED)
|
||||
FIND_LIBRARY( TELLDUSGUI_LIBRARY telldus-gui )
|
||||
|
||||
SET( Plugin_LIBRARIES
|
||||
${TELLDUSGUI_LIBRARY}
|
||||
)
|
||||
ENDIF (WINDOWS)
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
${TELLDUSCORE_INCLUDE_DIR}
|
||||
|
|
|
@ -13,12 +13,8 @@ SET( Plugin_MOC_HDRS
|
|||
tellduscoreobject.h
|
||||
)
|
||||
|
||||
SET( Plugin_LIBRARIES
|
||||
${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/TelldusCore.lib
|
||||
)
|
||||
FIND_PACKAGE(TelldusCore REQUIRED)
|
||||
SET( Plugin_LIBRARIES ${TELLDUSCORE_LIBRARY} )
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
${TELLDUSCORE_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
INCLUDE( ../TelldusCenterPlugin.cmake NO_POLICY_SCOPE )
|
|
@ -16,7 +16,7 @@ SET( telldus-gui_SRCS
|
|||
vendordevicemodel.cpp
|
||||
vendordevicetreeitem.cpp
|
||||
devicesettingarctechselflearning.cpp
|
||||
devicesettingbrateck.cpp
|
||||
devicesettingbrateck.cpp
|
||||
devicesettinggao.cpp
|
||||
devicesettingikea.cpp
|
||||
devicesettingnexa.cpp
|
||||
|
@ -41,7 +41,7 @@ SET( telldus-gui_MOC_HDRS
|
|||
editgroupdialog.h
|
||||
vendordevicemodel.h
|
||||
devicesettingarctechselflearning.h
|
||||
devicesettingbrateck.h
|
||||
devicesettingbrateck.h
|
||||
devicesettinggao.h
|
||||
devicesettingikea.h
|
||||
devicesettingnexa.h
|
||||
|
@ -58,12 +58,13 @@ QT4_WRAP_CPP( telldus-gui_MOC_SRCS ${telldus-gui_MOC_HDRS} )
|
|||
QT4_AUTOMOC ( ${telldus-gui_SRCS} )
|
||||
QT4_ADD_RESOURCES (telldus-gui_RSRCS telldusgui.qrc )
|
||||
|
||||
|
||||
SET( telldus-gui_LIBRARIES
|
||||
${QT_LIBRARIES}
|
||||
${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/TelldusCore.lib
|
||||
)
|
||||
|
||||
FIND_PACKAGE(TelldusCore REQUIRED)
|
||||
list(APPEND telldus-gui_LIBRARIES ${TELLDUSCORE_LIBRARY} )
|
||||
|
||||
######## Configurable options for the platform ########
|
||||
|
||||
|
||||
|
@ -76,6 +77,10 @@ IF (APPLE)
|
|||
ADD_DEFINITIONS(
|
||||
-D_MACOSX
|
||||
)
|
||||
INCLUDE_DIRECTORIES(
|
||||
/usr/local/include
|
||||
)
|
||||
|
||||
ELSEIF (WIN32)
|
||||
#### Windows ####
|
||||
SET( telldus-gui_TARGET TelldusGui )
|
||||
|
|
19
telldus-gui/cmake/FindTelldusCore.cmake
Normal file
19
telldus-gui/cmake/FindTelldusCore.cmake
Normal file
|
@ -0,0 +1,19 @@
|
|||
|
||||
IF (APPLE)
|
||||
FIND_LIBRARY( TELLDUSCORE_LIBRARY TelldusCore )
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
${TELLDUSCORE_LIBRARY}/Headers
|
||||
)
|
||||
|
||||
ELSEIF (WINDOWS)
|
||||
SET(TELLDUSCORE_LIBRARY ${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/TelldusCore.lib)
|
||||
|
||||
|
||||
ELSE (APPLE)
|
||||
FIND_LIBRARY( TELLDUSCORE_LIBRARY telldus-core )
|
||||
|
||||
|
||||
ENDIF(APPLE)
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue