diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 58 |
1 files changed, 14 insertions, 44 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index fc3526b0f..aebddb2fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,6 +36,13 @@ option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) +##### user requested modules + +option( BUILD_ALL "Build all" OFF ) +option( BUILD_EXAMPLES "Build examples" ${BUILD_ALL} ) +option( BUILD_TESTS "Builds unit tests" ${BUILD_ALL} ) + + ##### configure checks ########################## include( ConfigureChecks.cmake ) @@ -48,6 +55,8 @@ tde_setup_install_path( BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" ) tde_setup_install_path( LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" ) tde_setup_install_path( INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/${CMAKE_PROJECT_NAME}" ) tde_setup_install_path( PKGCONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig" ) +tde_setup_install_path( SHARE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share" ) +tde_setup_install_path( DATA_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/apps" ) ##### write pkgconfig file ###################### @@ -80,10 +89,11 @@ add_definitions( ##### source directories ######################## -add_subdirectory(core) -add_subdirectory(gui) -add_subdirectory(agent) -add_subdirectory(tests) +add_subdirectory( core ) +add_subdirectory( gui ) +add_subdirectory( agent ) +tde_conditional_add_subdirectory( BUILD_EXAMPLES examples ) +tde_conditional_add_subdirectory( BUILD_TESTS tests ) ##### install files #### ######################## @@ -125,23 +135,6 @@ install( ${INCLUDE_INSTALL_DIR} ) ## -## include (${TQT_USE_FILE}) -## include (InstallSettings) -## include (MacroWriteBasicCMakeVersionFile) -## include (CheckFunctionExists) -## -## include_directories( -## ${CMAKE_CURRENT_BINARY_DIR} -## ${POLKIT_AGENT_INCLUDE_DIR} -## ${GLIB2_INCLUDE_DIR} -## ${GOBJECT_INCLUDE_DIR} -## ${GIO_INCLUDE_DIR} -## ${CMAKE_CURRENT_SOURCE_DIR} -## ${CMAKE_CURRENT_SOURCE_DIR}/core -## ${CMAKE_CURRENT_SOURCE_DIR}/includes -## ${TQT_TQTXML_INCLUDE_DIR} -## ) -## ## if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.6.2) ## option(USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR "Prefer to install the <package>Config.cmake files to lib/cmake/<package> instead of lib/<package>/cmake" TRUE) ## endif(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.6.2) @@ -153,18 +146,6 @@ install( ## ## configure_file(polkittqt1-version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/polkittqt1-version.h) ## -## install(FILES -## -## agent/polkittqt1-agent-listener.h -## agent/polkittqt1-agent-session.h -## -## ${CMAKE_CURRENT_BINARY_DIR}/polkittqt1-version.h -## polkit-tqt-export.h -## -## DESTINATION -## ${INCLUDE_INSTALL_DIR}/polkit-qt-1 ) -## -## ## # CMake Config files ## configure_file(PolkitTQt-1Config.cmake.in "${CMAKE_BINARY_DIR}/PolkitTQt-1Config.cmake" @ONLY) ## @@ -182,15 +163,4 @@ install( ## ${CMAKE_BINARY_DIR}/PolkitTQt-1Config.cmake ## DESTINATION ${_PolkitTQt-1Config_INSTALL_DIR} ) ## -## option(BUILD_EXAMPLES "Builds a set of examples for polkit-qt-1" OFF) -## if (BUILD_EXAMPLES) -## add_subdirectory(examples) -## endif (BUILD_EXAMPLES) -## -## add_subdirectory(cmake) -## -## option(BUILD_TEST "Builds unit tests for polkit-qt-1" OFF) -## if (BUILD_TEST) -## add_subdirectory(test) -## endif (BUILD_TEST) |