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)
|
||||
|
||||
cmake_policy(SET CMP0005 NEW)
|
||||
|
||||
|
||||
SET(tdtool_SRCS
|
||||
main.cpp
|
||||
)
|
||||
|
||||
ADD_EXECUTABLE(tdtool
|
||||
${tdtool_SRCS}
|
||||
)
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/driver
|
||||
)
|
||||
|
||||
ADD_DEFINITIONS( -DVERSION="${DISPLAYED_VERSION}" )
|
||||
|
||||
IF (APPLE)
|
||||
TARGET_LINK_LIBRARIES(tdtool
|
||||
TelldusCore
|
||||
)
|
||||
ELSE (APPLE)
|
||||
TARGET_LINK_LIBRARIES(tdtool
|
||||
telldus-core
|
||||
)
|
||||
ENDIF (APPLE)
|
||||
|
||||
IF (UNIX)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET tdtool
|
||||
POST_BUILD
|
||||
COMMAND help2man ./tdtool > tdtool.1
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
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)
|
||||
PROJECT(tdtool)
|
||||
|
||||
cmake_policy(SET CMP0005 NEW)
|
||||
|
||||
|
||||
SET(tdtool_SRCS
|
||||
main.cpp
|
||||
)
|
||||
|
||||
ADD_EXECUTABLE(tdtool
|
||||
${tdtool_SRCS}
|
||||
)
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/driver
|
||||
)
|
||||
|
||||
ADD_DEFINITIONS( -DVERSION="${DISPLAYED_VERSION}" )
|
||||
|
||||
IF (WIN32)
|
||||
FIND_LIBRARY(TELLDUSCORE_LIBRARY TelldusCore)
|
||||
TARGET_LINK_LIBRARIES(tdtool
|
||||
${TELLDUSCORE_LIBRARY}
|
||||
)
|
||||
ELSEIF (APPLE)
|
||||
TARGET_LINK_LIBRARIES(tdtool
|
||||
TelldusCore
|
||||
)
|
||||
ELSE (WIN32)
|
||||
TARGET_LINK_LIBRARIES(tdtool
|
||||
telldus-core
|
||||
)
|
||||
ENDIF (WIN32)
|
||||
|
||||
IF (UNIX)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET tdtool
|
||||
POST_BUILD
|
||||
COMMAND help2man ./tdtool > tdtool.1
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
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