From 0ef4ca6d362d2a6d8a3821e2f47a7d141fbcd3a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Thu, 3 Jan 2019 03:54:42 +0100 Subject: Migration to standard TDE CMake build system. Add common cmake module. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- lib/CMakeLists.txt | 109 ++++++++++++++++------------------------------------- 1 file changed, 33 insertions(+), 76 deletions(-) (limited to 'lib') diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 226a83e..f340d80 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,90 +1,47 @@ -include(CheckIncludeFiles) -include(CheckFunctionExists) -check_include_files( stdint.h HAVE_STDINT_H ) -check_include_files( alloca.h HAVE_ALLOCA_H ) -check_include_files( "sys/time.h" HAVE_SYS_TIME_H ) -check_include_files( "sys/stat.h" HAVE_SYS_STAT_H ) -check_function_exists( cfsetspeed HAVE_CFSETSPEED ) -check_function_exists( strdup HAVE_STRDUP ) -check_function_exists( setenv HAVE_SETENV ) -check_function_exists( unsetenv HAVE_UNSETENV ) -check_function_exists( usleep HAVE_USLEEP ) -check_function_exists( random HAVE_RANDOM ) -check_function_exists( putenv HAVE_PUTENV ) -check_function_exists( seteuid HAVE_SETEUID ) -check_function_exists( mkstemps HAVE_MKSTEMPS ) -check_function_exists( mkstemp HAVE_MKSTEMP ) -check_function_exists( mkdtemp HAVE_MKDTEMP ) -check_function_exists( revoke HAVE_REVOKE ) -check_function_exists( strlcpy HAVE_STRLCPY ) -check_function_exists( strlcat HAVE_STRLCAT ) -check_function_exists( inet_aton HAVE_INET_ATON ) +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) -configure_file( - ${CMAKE_SOURCE_DIR}/config.h.cmake - ${CMAKE_CURRENT_BINARY_DIR}/config.h +link_directories( + ${TQT_LIBRARY_DIRS} ) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) +tde_import( libkmime ) +tde_import( ktnef ) +tde_import( libkcal ) -set(lib_SRCS - options.cc - plugin.cc - syncAction.cc - actions.cc - actionQueue.cc - idmapping.cc - idmapperxml.cc - idmapper.cc - kpilotlink.cc - kpilotdevicelink.cc - kpilotlocallink.cc - pilot.cc - pilotAppInfo.cc - pilotRecord.cc - pilotDatabase.cc - pilotLocalDatabase.cc - pilotSerialDatabase.cc - pilotMemo.cc - pilotAddress.cc - pilotDateEntry.cc - pilotTodoEntry.cc -) -trinity_automoc(${lib_SRCS}) -kde3_add_kcfg_files(lib_SRCS kpilotlibSettings.kcfgc) -add_library(kpilot SHARED ${lib_SRCS}) -target_link_libraries(kpilot ${PILOTLINK_LIBRARY} ${TQT_LIBRARIES} tdeui tdeio) -kpilot_rpath(kpilot) +##### kpilot (shared) ########################### -#---------- INSTALL -----------------------* -set(kpilotinclude_HEADERS - kpilotlink.h - kpilotdevicelink.h - kpilotlocallink.h - pilot.h - pilotDatabase.h - pilotLinkVersion.h - pilotLocalDatabase.h - pilotRecord.h - pilotSerialDatabase.h - plugin.h - pluginfactory.h - syncAction.h +tde_add_library( kpilot SHARED AUTOMOC + SOURCES kpilotlibSettings.kcfgc options.cc plugin.cc syncAction.cc + kpilotlink.cc kpilotdevicelink.cc kpilotlocallink.cc actions.cc + actionQueue.cc pilot.cc pilotAppInfo.cc pilotRecord.cc pilotDatabase.cc + pilotLocalDatabase.cc pilotSerialDatabase.cc pilotMemo.cc pilotAddress.cc + pilotDateEntry.cc pilotTodoEntry.cc + LINK tdeui-shared tdecore-shared tdeio-shared tdeabc-shared kcal-shared + ${PILOTLINK_LIBRARIES} + VERSION 0.0.0 + DESTINATION ${LIB_INSTALL_DIR} ) -install( - TARGETS kpilot - LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib -) -install( - FILES ${kpilotinclude_HEADERS} - DESTINATION ${CMAKE_INSTALL_PREFIX}/include/kpilot +##### other data ################################ + +install( FILES kpilotlib.kcfg + DESTINATION ${KCFG_INSTALL_DIR} ) install( - FILES kpilotlib.kcfg DESTINATION ${KDE3_KCFG_DIR} + FILES + kpilotlink.h kpilotlocallink.h kpilotdevicelink.h pilot.h pilotDatabase.h + pilotLinkVersion.h pilotLocalDatabase.h pilotRecord.h pilotSerialDatabase.h + plugin.h pluginfactory.h syncAction.h + DESTINATION + ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME} ) - -- cgit v1.2.1