diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2021-10-18 23:39:52 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-10-18 23:39:52 +0200 |
commit | 06e967574741ce2f3b29ba4ed4d5e2629c47553c (patch) | |
tree | b62f6bba0b55c430cddfdffcdc88e570ebaa6952 /tqt/CMakeLists.txt | |
parent | cf4061c954ce48076a356dafd9d75aa14d330f7e (diff) | |
download | kgtk-qt3-06e967574741ce2f3b29ba4ed4d5e2629c47553c.tar.gz kgtk-qt3-06e967574741ce2f3b29ba4ed4d5e2629c47553c.zip |
Housekeeping in CMake rules:
+ Removed detailed DL library detection - the results were not used.
+ Added test whether the DL library contains _dl_sym function.
+ GTK presence test moved to ConfigureChecks.cmake.
+ Added GTHREAD presence test.
+ Used tde_add_library macro.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'tqt/CMakeLists.txt')
-rw-r--r-- | tqt/CMakeLists.txt | 52 |
1 files changed, 40 insertions, 12 deletions
diff --git a/tqt/CMakeLists.txt b/tqt/CMakeLists.txt index f366481..04f8279 100644 --- a/tqt/CMakeLists.txt +++ b/tqt/CMakeLists.txt @@ -21,19 +21,47 @@ link_directories( ${TQT_LIBRARY_DIRS} ) -message("** INFORMATION: Qt3 LD_PRELOAD library will be built.") -# set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" ) -set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE) +add_definitions( -DTQT_THREAD_SUPPORT ) -ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mangled.h - COMMAND ${CMAKE_SOURCE_DIR}/mangled.sh ${CMAKE_CXX_COMPILER} ${CMAKE_CURRENT_BINARY_DIR}/mangled.h) -set(kqt3_SRCS kqt3.cpp mangled.h) -add_definitions(${QT_DEFINITIONS} -DTQT_THREAD_SUPPORT) -add_library(kqt3 SHARED ${kqt3_SRCS}) -target_link_libraries(kqt3 ${TQT_LIBRARIES} -lc -ldl) -install(TARGETS kqt3 LIBRARY DESTINATION ${LIB_INSTALL_DIR}/kgtk) +##### generate mangled.h -configure_file (kqt3-wrapper.cmake ${CMAKE_CURRENT_BINARY_DIR}/kqt3-wrapper @ONLY) -install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/kqt3-wrapper DESTINATION ${BIN_INSTALL_DIR})
\ No newline at end of file +add_custom_target( + mangled_header + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/mangled.h +) + +add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mangled.h + COMMAND + ${CMAKE_SOURCE_DIR}/mangled.sh + ${CMAKE_CXX_COMPILER} + ${CMAKE_CURRENT_BINARY_DIR}/mangled.h +) + + +##### kqt3 (shared) + +tde_add_library( kqt3 SHARED NO_LIBTOOL_FILE + SOURCES + kqt3.cpp + + LINK + ${TQT_LIBRARIES} + ${CMAKE_DL_LIBS} + + DESTINATION ${LIB_INSTALL_DIR}/kgtk + + DEPENDENCIES mangled_header +) + + +##### other data + +configure_file( kqt3-wrapper.cmake kqt3-wrapper @ONLY ) + +install( + PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/kqt3-wrapper + DESTINATION ${BIN_INSTALL_DIR} +) |