Since tdtool is not build with VC++ on Windows but with MinGW it is not compiled in our normal TelldusCore-build. We must use FIND_LIBRARY as any other 3rd-party application to find TelldusCore.dll
This commit is contained in:
parent
0baf24b6a7
commit
7bfd7bd57e
1 changed files with 47 additions and 42 deletions
|
@ -1,42 +1,47 @@
|
||||||
PROJECT(tdtool)
|
PROJECT(tdtool)
|
||||||
|
|
||||||
cmake_policy(SET CMP0005 NEW)
|
cmake_policy(SET CMP0005 NEW)
|
||||||
|
|
||||||
|
|
||||||
SET(tdtool_SRCS
|
SET(tdtool_SRCS
|
||||||
main.cpp
|
main.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_EXECUTABLE(tdtool
|
ADD_EXECUTABLE(tdtool
|
||||||
${tdtool_SRCS}
|
${tdtool_SRCS}
|
||||||
)
|
)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(
|
INCLUDE_DIRECTORIES(
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
${CMAKE_SOURCE_DIR}/driver
|
${CMAKE_SOURCE_DIR}/driver
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_DEFINITIONS( -DVERSION="${DISPLAYED_VERSION}" )
|
ADD_DEFINITIONS( -DVERSION="${DISPLAYED_VERSION}" )
|
||||||
|
|
||||||
IF (APPLE)
|
IF (WIN32)
|
||||||
TARGET_LINK_LIBRARIES(tdtool
|
FIND_LIBRARY(TELLDUSCORE_LIBRARY TelldusCore)
|
||||||
TelldusCore
|
TARGET_LINK_LIBRARIES(tdtool
|
||||||
)
|
${TELLDUSCORE_LIBRARY}
|
||||||
ELSE (APPLE)
|
)
|
||||||
TARGET_LINK_LIBRARIES(tdtool
|
ELSEIF (APPLE)
|
||||||
telldus-core
|
TARGET_LINK_LIBRARIES(tdtool
|
||||||
)
|
TelldusCore
|
||||||
ENDIF (APPLE)
|
)
|
||||||
|
ELSE (WIN32)
|
||||||
IF (UNIX)
|
TARGET_LINK_LIBRARIES(tdtool
|
||||||
ADD_CUSTOM_COMMAND(
|
telldus-core
|
||||||
TARGET tdtool
|
)
|
||||||
POST_BUILD
|
ENDIF (WIN32)
|
||||||
COMMAND help2man ./tdtool > tdtool.1
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
IF (UNIX)
|
||||||
COMMENT "Generating man file tdtool.1"
|
ADD_CUSTOM_COMMAND(
|
||||||
)
|
TARGET tdtool
|
||||||
ENDIF (UNIX)
|
POST_BUILD
|
||||||
|
COMMAND help2man ./tdtool > tdtool.1
|
||||||
INSTALL(TARGETS tdtool RUNTIME DESTINATION bin)
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/tdtool.1 DESTINATION share/man/man1)
|
COMMENT "Generating man file tdtool.1"
|
||||||
|
)
|
||||||
|
ENDIF (UNIX)
|
||||||
|
|
||||||
|
INSTALL(TARGETS tdtool RUNTIME DESTINATION bin)
|
||||||
|
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/tdtool.1 DESTINATION share/man/man1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue