Warning, /kdevelop/kdevelop-pg-qt/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 3.0)
0002 
0003 project(kdevelop-pg-qt VERSION 2.2.1)
0004 
0005 find_package(ECM 5.14.0 REQUIRED NO_MODULE)
0006 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
0007 
0008 include(KDEInstallDirs)
0009 include(KDECMakeSettings)
0010 include(KDECompilerSettings NO_POLICY_SCOPE)
0011 include(ECMAddTests)
0012 include(ECMMarkNonGuiExecutable)
0013 include(ECMSetupVersion)
0014 
0015 include(FeatureSummary)
0016 include(WriteBasicConfigVersionFile)
0017 include(CMakePackageConfigHelpers)
0018 
0019 set(CMAKECONFIG_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/KDevelop-PG-Qt)
0020 configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/KDevelop-PG-QtConfig.cmake.in"
0021                               "${CMAKE_CURRENT_BINARY_DIR}/KDevelop-PG-QtConfig.cmake"
0022                               INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
0023 )
0024 ecm_setup_version(${kdevelop-pg-qt_VERSION_MAJOR}.${kdevelop-pg-qt_VERSION_MINOR}.${kdevelop-pg-qt_VERSION_PATCH}
0025                   VARIABLE_PREFIX KDEVELOP_PG_QT
0026                   VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kdevelop-pg-qt_version.h"
0027                   PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KDevelop-PG-QtConfigVersion.cmake"
0028                   SOVERSION ${KDEVELOP_PG_QT_LIB_SOVERSION}
0029 )
0030 install(FILES
0031         "${CMAKE_CURRENT_BINARY_DIR}/kdevelop-pg-qt_version.h"
0032         DESTINATION "${KDE_INSTALL_INCLUDEDIR}/kdevelop-pg-qt")
0033 install(FILES
0034         "${CMAKE_CURRENT_BINARY_DIR}/KDevelop-PG-QtConfig.cmake"
0035         "${CMAKE_CURRENT_BINARY_DIR}/KDevelop-PG-QtConfigVersion.cmake"
0036         DESTINATION "${CMAKECONFIG_INSTALL_DIR}" )
0037 
0038 if(BUILD_TESTING)
0039   set(REQUIRED_QT_TESTCOMPONENTS Test)
0040 endif()
0041 set(REQUIRED_QT_VERSION 5.5.0)
0042 find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED
0043   COMPONENTS
0044     Core
0045     ${REQUIRED_QT_TESTCOMPONENTS}
0046 )
0047 
0048 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
0049 
0050 find_program(FLEX_EXECUTABLE
0051   NAMES flex
0052   PATHS /usr/bin
0053   DOC "Flex executable")
0054 
0055 find_program(BISON_EXECUTABLE
0056   NAMES bison
0057   PATHS /usr/bin
0058   DOC "bison executable")
0059 
0060 add_definitions(
0061     -DQT_DEPRECATED_WARNINGS
0062     -DQT_DISABLE_DEPRECATED_BEFORE=0x050500
0063     -DQT_NO_SIGNALS_SLOTS_KEYWORDS
0064     -DQT_STRICT_ITERATORS
0065     -DQT_USE_QSTRINGBUILDER
0066     -DQT_NO_URL_CAST_FROM_STRING
0067     -DQT_NO_CAST_FROM_BYTEARRAY
0068     -DQT_NO_CAST_TO_ASCII
0069 )
0070 
0071 # Silence a few warnings
0072 if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
0073     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-field-initializers -Wno-unused-local-typedefs")
0074 endif()
0075 
0076 add_subdirectory(include)
0077 add_subdirectory(kdev-pg)
0078 add_subdirectory(examples EXCLUDE_FROM_ALL)
0079 
0080 if(BUILD_TESTING)
0081   add_subdirectory(tests)
0082 endif()
0083 
0084 include(CTest)
0085 
0086 # CTestCustom.cmake has to be in the CTEST_BINARY_DIR.
0087 # in the KDE build system, this is the same as CMAKE_BINARY_DIR.
0088 configure_file(${CMAKE_SOURCE_DIR}/CTestCustom.cmake ${CMAKE_BINARY_DIR}/CTestCustom.cmake)
0089 
0090 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)