CMakeLists.txt 1.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
cmake_minimum_required(VERSION 2.8.12)

project(followupreminder)

if(${CMAKE_SOURCE_DIR} STREQUAL ${kdepim-apps-lib_SOURCE_DIR})

ecm_setup_version(${KDEPIM_LIB_VERSION} VARIABLE_PREFIX FOLLOWUPREMINDER
                        VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/followupreminder_version.h"
                        PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5FollowupReminderConfigVersion.cmake"
                        SOVERSION 5
)

########### Targets ###########

add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII")

########### CMake Config Files ###########
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5FollowupReminder")

ecm_configure_package_config_file(
  "${CMAKE_CURRENT_SOURCE_DIR}/KF5FollowupReminderConfig.cmake.in"
  "${CMAKE_CURRENT_BINARY_DIR}/KF5FollowupReminderConfig.cmake"
  INSTALL_DESTINATION  ${CMAKECONFIG_INSTALL_DIR}
)

install(FILES
  "${CMAKE_CURRENT_BINARY_DIR}/KF5FollowupReminderConfig.cmake"
  "${CMAKE_CURRENT_BINARY_DIR}/KF5FollowupReminderConfigVersion.cmake"
  DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
  COMPONENT Devel
)

install(EXPORT KF5FollowupReminderTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5FollowupReminderTargets.cmake NAMESPACE KF5::)

install(FILES
   ${CMAKE_CURRENT_BINARY_DIR}/followupreminder_version.h
  DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel
)


else()
ecm_setup_version(${KDEPIM_LIB_VERSION} VARIABLE_PREFIX FOLLOWUPREMINDER
                        VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/followupreminder_version.h"
                        PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5FollowupReminderConfigVersion.cmake"
                        SOVERSION 5
)
endif()

add_subdirectory(src)