diff options
author | Christophe Giboudeaux <christophe@krop.fr> | 2021-03-29 20:28:58 +0200 |
---|---|---|
committer | Christophe Giboudeaux <christophe@krop.fr> | 2021-04-06 19:59:17 +0000 |
commit | 272352969834598cfd20f3e8b15916aa3ccebbbb (patch) | |
tree | d0d831203f0816ee2d4edecb526cdbdec64ea3d4 | |
parent | d88db6a1469bdcb48e64f265d35a6f7867767b54 (diff) | |
download | extra-cmake-modules-272352969834598cfd20f3e8b15916aa3ccebbbb.tar.gz extra-cmake-modules-272352969834598cfd20f3e8b15916aa3ccebbbb.tar.bz2 |
Clean ECM's attic
95 files changed, 0 insertions, 6135 deletions
diff --git a/attic/modules-tests/AGG/CMakeLists.txt b/attic/modules-tests/AGG/CMakeLists.txt deleted file mode 100644 index 3d0e7b90..00000000 --- a/attic/modules-tests/AGG/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") - -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) - -test_find_package(AGG AGG INCLUDE_DIR LIBRARIES DEFINITIONS) diff --git a/attic/modules-tests/BlueZ/CMakeLists.txt b/attic/modules-tests/BlueZ/CMakeLists.txt deleted file mode 100644 index bfc17709..00000000 --- a/attic/modules-tests/BlueZ/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") - -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) - -test_find_package(BlueZ BLUEZ INCLUDE_DIR LIBRARIES DEFINITIONS) diff --git a/attic/modules-tests/ENCHANT/CMakeLists.txt b/attic/modules-tests/ENCHANT/CMakeLists.txt deleted file mode 100644 index 6ed9e51f..00000000 --- a/attic/modules-tests/ENCHANT/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") - -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) - -test_find_package(ENCHANT ENCHANT INCLUDE_DIR LIBRARIES DEFINITIONS) diff --git a/attic/modules-tests/FFmpeg/CMakeLists.txt b/attic/modules-tests/FFmpeg/CMakeLists.txt deleted file mode 100644 index 4c93079b..00000000 --- a/attic/modules-tests/FFmpeg/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") - -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) - -test_find_package(FFmpeg FFMPEG INCLUDE_DIR LIBRARIES DEFINITIONS) diff --git a/attic/modules-tests/Flac/CMakeLists.txt b/attic/modules-tests/Flac/CMakeLists.txt deleted file mode 100644 index 604f2dd6..00000000 --- a/attic/modules-tests/Flac/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") - -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) - -test_find_package(Flac FLAC INCLUDE_DIR LIBRARIES OGGFLAC_LIBRARIES) diff --git a/attic/modules-tests/GObject/CMakeLists.txt b/attic/modules-tests/GObject/CMakeLists.txt deleted file mode 100644 index 971a20be..00000000 --- a/attic/modules-tests/GObject/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") - -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) - -test_find_package(GObject GOBJECT INCLUDE_DIR LIBRARIES DEFINITIONS) diff --git a/attic/modules-tests/LibArt/CMakeLists.txt b/attic/modules-tests/LibArt/CMakeLists.txt deleted file mode 100644 index e64d2310..00000000 --- a/attic/modules-tests/LibArt/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") - -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) - -test_find_package(LibArt LIBART INCLUDE_DIR LIBRARIES) diff --git a/attic/modules-tests/PCRE/CMakeLists.txt b/attic/modules-tests/PCRE/CMakeLists.txt deleted file mode 100644 index 928806da..00000000 --- a/attic/modules-tests/PCRE/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") - -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) - -test_find_package(PCRE PCRE INCLUDE_DIR LIBRARIES) diff --git a/attic/modules-tests/QCA2/CMakeLists.txt b/attic/modules-tests/QCA2/CMakeLists.txt deleted file mode 100644 index 46f617ed..00000000 --- a/attic/modules-tests/QCA2/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") - -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) - -test_find_package(QCA2 QCA2 INCLUDE_DIR LIBRARIES DEFINITIONS) diff --git a/attic/modules-tests/QImageBlitz/CMakeLists.txt b/attic/modules-tests/QImageBlitz/CMakeLists.txt deleted file mode 100644 index 12edb3f7..00000000 --- a/attic/modules-tests/QImageBlitz/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") - -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) - -test_find_package(QImageBlitz QIMAGEBLITZ INCLUDES LIBRARIES) diff --git a/attic/modules-tests/RunAllModuleTests.cmake b/attic/modules-tests/RunAllModuleTests.cmake deleted file mode 100644 index b233bb34..00000000 --- a/attic/modules-tests/RunAllModuleTests.cmake +++ /dev/null @@ -1,52 +0,0 @@ -# Run this script via "cmake -P RunAllModuletests.cmake" to -# execute all module tests in one go. -# Run this script with "cmake -DMODULE=foo -P RunAllModuletests.cmake" to -# test only the one specified module. -# To see only the results and not the other cmake output, -# you can grep for "::". -# To have it delete the previous test build dirs, run it with -DCLEAN_DIRS=TRUE - -get_filename_component(currentDir "${CMAKE_CURRENT_LIST_FILE}" PATH) - -function(execute_one_test name) - set(workingDir "${currentDir}/${name}/build") - if(CLEAN_DIRS) - file(REMOVE_RECURSE "${workingDir}") - endif() - file(MAKE_DIRECTORY "${workingDir}") - execute_process(COMMAND ${CMAKE_COMMAND} "${currentDir}/${name}" - WORKING_DIRECTORY "${workingDir}") - # now the same with pkg-config disabled - set(workingDir "${currentDir}/${name}/build-no-pkgconfig") - if(CLEAN_DIRS) - file(REMOVE_RECURSE "${workingDir}") - endif() - file(MAKE_DIRECTORY "${workingDir}") - execute_process(COMMAND ${CMAKE_COMMAND} -DPKG_CONFIG_EXECUTABLE=echo "${currentDir}/${name}" - WORKING_DIRECTORY "${workingDir}") -endfunction(execute_one_test) - -if(DEFINED MODULE) - set(modulesToTest ${MODULE}) -else() - set(modulesToTest AGG - BlueZ - ENCHANT - FFmpeg - Flac - GObject - LibArt - PCRE - QCA2 - QImageBlitz - Sqlite - Strigi - USB - Xine - Xmms) -endif() - -foreach(currentModule ${modulesToTest}) - execute_one_test(${currentModule}) -endforeach(currentModule ${modulesToTest}) - diff --git a/attic/modules-tests/Sqlite/CMakeLists.txt b/attic/modules-tests/Sqlite/CMakeLists.txt deleted file mode 100644 index 000be428..00000000 --- a/attic/modules-tests/Sqlite/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") - -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) - -test_find_package(Sqlite SQLITE INCLUDE_DIR LIBRARIES DEFINITIONS) diff --git a/attic/modules-tests/Strigi/CMakeLists.txt b/attic/modules-tests/Strigi/CMakeLists.txt deleted file mode 100644 index bbe1e23f..00000000 --- a/attic/modules-tests/Strigi/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") - -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) - -set(STRIGI_MIN_VERSION 0.6.0) - -#find_package(Strigi 1.2.3) - -test_find_package(Strigi STRIGI VERSION - INCLUDE_DIR - STREAMANALYZER_LIBRARY - STREAMS_LIBRARY - STRIGIQTDBUSCLIENT_LIBRARY - NEEDS_SIGNED_CHAR - NEEDS_CHAR - LINE_ANALYZER_PREFIX - THROUGH_ANALYZER_PREFIX ) diff --git a/attic/modules-tests/TestFindPackage.cmake b/attic/modules-tests/TestFindPackage.cmake deleted file mode 100644 index 24e70f5c..00000000 --- a/attic/modules-tests/TestFindPackage.cmake +++ /dev/null @@ -1,44 +0,0 @@ -# This module provides the macro TEST_FIND_PACKAGE() -# -# TEST_FIND_PACKAGE(package prefix var1 .. varN ) -# It can be used to test a CMake Find-module. -# It executes FIND_PACKAGE(<package>) and then prints some results. -# <package> is the same as for FIND_PACKAGE() and -# prefix should be the prefix which is used in that module for -# all variables. -# It checks <prefix>_FOUND to decide whether the module was successful or not. -# -# Example: -# test_find_package(Xine XINE VERSION INCLUDE_DIR LIBRARY) -# -# This will check XINE_FOUND and then print the variables XINE_VERSION, XINE_INCLUDE_DIR and XINE_LIBRARY. - -cmake_minimum_required(VERSION 2.6.2) -cmake_policy(SET CMP0000 OLD) - -macro(TEST_FIND_PACKAGE package prefix ) - # if PKG_CONFIG_EXECUTABLE is set to "echo", FindPkgConfig.cmake - # will not search again for the real pkg-config, as it would if it was set to NOTFOUND - # and still the execute_process(${PKG_CONFIG_EXECUTABLE} ) calls will work - # but never return success. - if("${PKG_CONFIG_EXECUTABLE}" STREQUAL "echo") - message(STATUS ":: ***** Testing Find${package}.cmake, with pkg-config disabled *****") - else() - message(STATUS ":: ***** Testing Find${package}.cmake *****") - endif() - - find_package(${package}) - message(STATUS ":: ***** Results from Find${package}.cmake *****") - - if ( ${prefix}_FOUND) - message(STATUS ":: Find${package}.cmake: ${package} has been found") - else ( ${prefix}_FOUND) - message(STATUS ":: Find${package}.cmake: ${package} has NOT been found !") - endif ( ${prefix}_FOUND) - - message(STATUS ":: ${prefix}_FOUND: \"${${prefix}_FOUND}\"") - foreach(var ${ARGN}) - message(STATUS ":: ${prefix}_${var}: \"${${prefix}_${var}}\"") - endforeach(var) - message(STATUS "::") -endmacro(TEST_FIND_PACKAGE package) diff --git a/attic/modules-tests/USB/CMakeLists.txt b/attic/modules-tests/USB/CMakeLists.txt deleted file mode 100644 index 37f9dd2c..00000000 --- a/attic/modules-tests/USB/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") - -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) - -test_find_package(USB LIBUSB INCLUDE_DIR LIBRARIES) diff --git a/attic/modules-tests/Xine/CMakeLists.txt b/attic/modules-tests/Xine/CMakeLists.txt deleted file mode 100644 index 8c2ac6e6..00000000 --- a/attic/modules-tests/Xine/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") - -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) - -test_find_package(Xine XINE VERSION BUGFIX_VERSION INCLUDE_DIR LIBRARY XCB_FOUND) diff --git a/attic/modules-tests/Xmms/CMakeLists.txt b/attic/modules-tests/Xmms/CMakeLists.txt deleted file mode 100644 index c55e6a44..00000000 --- a/attic/modules-tests/Xmms/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") - -set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) - -test_find_package(Xmms XMMS INCLUDE_DIR LIBRARIES ) diff --git a/attic/modules-tests/readme.txt b/attic/modules-tests/readme.txt deleted file mode 100644 index 2fabc9bf..00000000 --- a/attic/modules-tests/readme.txt +++ /dev/null @@ -1,6 +0,0 @@ -in each of the subdirs here is a simple CMakeLists.txt which does a very -basic test for one of the cmake modules in the modules/ directory. -To run them, create a build directory, run cmake and check the output. -(yes, this can of course be enhanced, but it's better than nothing). - -Alex diff --git a/attic/modules/COPYING-CMAKE-SCRIPTS b/attic/modules/COPYING-CMAKE-SCRIPTS deleted file mode 100644 index 4b417765..00000000 --- a/attic/modules/COPYING-CMAKE-SCRIPTS +++ /dev/null @@ -1,22 +0,0 @@ -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/attic/modules/CheckCXXSourceCompiles.cmake b/attic/modules/CheckCXXSourceCompiles.cmake deleted file mode 100644 index bdf58585..00000000 --- a/attic/modules/CheckCXXSourceCompiles.cmake +++ /dev/null @@ -1,86 +0,0 @@ -# - Check if given C++ source compiles and links into an executable -# CHECK_CXX_SOURCE_COMPILES(<code> <var> [FAIL_REGEX <fail-regex>]) -# <code> - source code to try to compile, must define 'main' -# <var> - variable to store whether the source code compiled -# <fail-regex> - fail if test output matches this regex -# The following variables may be set before calling this macro to -# modify the way the check is run: -# -# CMAKE_REQUIRED_FLAGS = string of compile command line flags -# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) -# CMAKE_REQUIRED_INCLUDES = list of include directories -# CMAKE_REQUIRED_LIBRARIES = list of libraries to link - -GET_FILENAME_COMPONENT(_CHECK_CXX_SOURCE_COMPILES_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) -INCLUDE(${_CHECK_CXX_SOURCE_COMPILES_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake) - - -MACRO(CHECK_CXX_SOURCE_COMPILES SOURCE VAR) - IF("${VAR}" MATCHES "^${VAR}$") - SET(_FAIL_REGEX) - SET(_key) - FOREACH(arg ${ARGN}) - IF("${arg}" MATCHES "^(FAIL_REGEX)$") - SET(_key "${arg}") - ELSEIF(_key) - LIST(APPEND _${_key} "${arg}") - ELSE() - MESSAGE(FATAL_ERROR "Unknown argument:\n ${arg}\n") - ENDIF() - ENDFOREACH() - - SET(MACRO_CHECK_FUNCTION_DEFINITIONS - "-D${VAR} ${CMAKE_REQUIRED_FLAGS}") - IF(CMAKE_REQUIRED_LIBRARIES) - # this one translates potentially used imported library targets to their files on disk - HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_CHECK_CXX_SOURCE_COMPILES_CMAKE_REQUIRED_LIBRARES) - - SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES - "-DLINK_LIBRARIES:STRING=${_CHECK_CXX_SOURCE_COMPILES_CMAKE_REQUIRED_LIBRARES}") -# "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") - ELSE(CMAKE_REQUIRED_LIBRARIES) - SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES) - ENDIF(CMAKE_REQUIRED_LIBRARIES) - IF(CMAKE_REQUIRED_INCLUDES) - SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES - "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") - ELSE(CMAKE_REQUIRED_INCLUDES) - SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES) - ENDIF(CMAKE_REQUIRED_INCLUDES) - FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx" - "${SOURCE}\n") - - MESSAGE(STATUS "Performing Test ${VAR}") - TRY_COMPILE(${VAR} - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx - COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} - CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} - "${CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES}" - "${CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES}" - OUTPUT_VARIABLE OUTPUT) - - FOREACH(_regex ${_FAIL_REGEX}) - IF("${OUTPUT}" MATCHES "${_regex}") - SET(${VAR} 0) - ENDIF() - ENDFOREACH() - - IF(${VAR}) - SET(${VAR} 1 CACHE INTERNAL "Test ${VAR}") - MESSAGE(STATUS "Performing Test ${VAR} - Success") - FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Performing C++ SOURCE FILE Test ${VAR} succeeded with the following output:\n" - "${OUTPUT}\n" - "Source file was:\n${SOURCE}\n") - ELSE(${VAR}) - MESSAGE(STATUS "Performing Test ${VAR} - Failed") - SET(${VAR} "" CACHE INTERNAL "Test ${VAR}") - FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Performing C++ SOURCE FILE Test ${VAR} failed with the following output:\n" - "${OUTPUT}\n" - "Source file was:\n${SOURCE}\n") - ENDIF(${VAR}) - ENDIF("${VAR}" MATCHES "^${VAR}$") -ENDMACRO(CHECK_CXX_SOURCE_COMPILES) - diff --git a/attic/modules/CheckCXXSourceRuns.cmake b/attic/modules/CheckCXXSourceRuns.cmake deleted file mode 100644 index a06afc90..00000000 --- a/attic/modules/CheckCXXSourceRuns.cmake +++ /dev/null @@ -1,80 +0,0 @@ -# - Check if the given C++ source code compiles and runs. -# CHECK_CXX_SOURCE_RUNS(<code> <var>) -# <code> - source code to try to compile -# <var> - variable to store the result -# (1 for success, empty for failure) -# The following variables may be set before calling this macro to -# modify the way the check is run: -# -# CMAKE_REQUIRED_FLAGS = string of compile command line flags -# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) -# CMAKE_REQUIRED_INCLUDES = list of include directories -# CMAKE_REQUIRED_LIBRARIES = list of libraries to link - -GET_FILENAME_COMPONENT(_CHECK_CXX_SOURCE_RUNS_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) -INCLUDE(${_CHECK_CXX_SOURCE_RUNS_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake) - -MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR) - IF("${VAR}" MATCHES "^${VAR}$") - SET(MACRO_CHECK_FUNCTION_DEFINITIONS - "-D${VAR} ${CMAKE_REQUIRED_FLAGS}") - IF(CMAKE_REQUIRED_LIBRARIES) - # this one translates potentially used imported library targets to their files on disk - HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_CHECK_CXX_SOURCE_RUNS_CMAKE_REQUIRED_LIBRARES) - - SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES - "-DLINK_LIBRARIES:STRING=${_CHECK_CXX_SOURCE_RUNS_CMAKE_REQUIRED_LIBRARES}") -# "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") - ELSE(CMAKE_REQUIRED_LIBRARIES) - SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES) - ENDIF(CMAKE_REQUIRED_LIBRARIES) - IF(CMAKE_REQUIRED_INCLUDES) - SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES - "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") - ELSE(CMAKE_REQUIRED_INCLUDES) - SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES) - ENDIF(CMAKE_REQUIRED_INCLUDES) - FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx" - "${SOURCE}\n") - - MESSAGE(STATUS "Performing Test ${VAR}") - TRY_RUN(${VAR}_EXITCODE ${VAR}_COMPILED - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx - COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} - CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} - -DCMAKE_SKIP_RPATH:BOOL=${CMAKE_SKIP_RPATH} - "${CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES}" - "${CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES}" - COMPILE_OUTPUT_VARIABLE OUTPUT) - - # if it did not compile make the return value fail code of 1 - IF(NOT ${VAR}_COMPILED) - SET(${VAR}_EXITCODE 1) - ENDIF(NOT ${VAR}_COMPILED) - # if the return value was 0 then it worked - IF("${${VAR}_EXITCODE}" EQUAL 0) - SET(${VAR} 1 CACHE INTERNAL "Test ${VAR}") - MESSAGE(STATUS "Performing Test ${VAR} - Success") - FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Performing C++ SOURCE FILE Test ${VAR} succeeded with the following output:\n" - "${OUTPUT}\n" - "Return value: ${${VAR}}\n" - "Source file was:\n${SOURCE}\n") - ELSE("${${VAR}_EXITCODE}" EQUAL 0) - IF(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN") - SET(${VAR} "${${VAR}_EXITCODE}") - ELSE(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN") - SET(${VAR} "" CACHE INTERNAL "Test ${VAR}") - ENDIF(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN") - - MESSAGE(STATUS "Performing Test ${VAR} - Failed") - FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Performing C++ SOURCE FILE Test ${VAR} failed with the following output:\n" - "${OUTPUT}\n" - "Return value: ${${VAR}_EXITCODE}\n" - "Source file was:\n${SOURCE}\n") - ENDIF("${${VAR}_EXITCODE}" EQUAL 0) - ENDIF("${VAR}" MATCHES "^${VAR}$") -ENDMACRO(CHECK_CXX_SOURCE_RUNS) - diff --git a/attic/modules/CheckPointerMember.cmake b/attic/modules/CheckPointerMember.cmake deleted file mode 100644 index b6ea5441..00000000 --- a/attic/modules/CheckPointerMember.cmake +++ /dev/null @@ -1,42 +0,0 @@ -# - Check if the given struct or class has the specified member variable -# CHECK_POINTER_MEMBER (POINTER MEMBER HEADER VARIABLE) -# -# POINTER - the name of the struct or class you are interested in -# MEMBER - the member which existence you want to check -# HEADER - the header(s) where the prototype should be declared -# VARIABLE - variable to store the result -# -# The following variables may be set before calling this macro to -# modify the way the check is run: -# -# CMAKE_REQUIRED_FLAGS = string of compile command line flags -# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) -# CMAKE_REQUIRED_INCLUDES = list of include directories - -# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -INCLUDE(CheckCXXSourceCompiles) - -MACRO (CHECK_POINTER_MEMBER _STRUCT _MEMBER _HEADER _RESULT) - SET(_INCLUDE_FILES) - FOREACH (it ${_HEADER}) - SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n") - ENDFOREACH (it) - - SET(_CHECK_POINTER_MEMBER_SOURCE_CODE " -${_INCLUDE_FILES} -int main() -{ - ${_STRUCT} tmp; - tmp->${_MEMBER}; - return 0; -} -") - CHECK_CXX_SOURCE_COMPILES("${_CHECK_POINTER_MEMBER_SOURCE_CODE}" ${_RESULT}) - -ENDMACRO (CHECK_POINTER_MEMBER) - diff --git a/attic/modules/CheckPrototypeExists.cmake b/attic/modules/CheckPrototypeExists.cmake deleted file mode 100644 index 811d6489..00000000 --- a/attic/modules/CheckPrototypeExists.cmake +++ /dev/null @@ -1,41 +0,0 @@ -# - Check if the prototype for a function exists. -# CHECK_PROTOTYPE_EXISTS (FUNCTION HEADER VARIABLE) -# -# FUNCTION - the name of the function you are looking for -# HEADER - the header(s) where the prototype should be declared -# VARIABLE - variable to store the result -# -# The following variables may be set before calling this macro to -# modify the way the check is run: -# -# CMAKE_REQUIRED_FLAGS = string of compile command line flags -# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) -# CMAKE_REQUIRED_INCLUDES = list of include directories - -# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -INCLUDE(CheckCXXSourceCompiles) - -MACRO (CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT) - SET(_INCLUDE_FILES) - FOREACH (it ${_HEADER}) - SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n") - ENDFOREACH (it) - - SET(_CHECK_PROTO_EXISTS_SOURCE_CODE " -${_INCLUDE_FILES} -int main() -{ -#ifndef ${_SYMBOL} - int i = sizeof(&${_SYMBOL}); -#endif - return 0; -} -") - CHECK_CXX_SOURCE_COMPILES("${_CHECK_PROTO_EXISTS_SOURCE_CODE}" ${_RESULT}) -ENDMACRO (CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT) - diff --git a/attic/modules/CheckStructMember.cmake b/attic/modules/CheckStructMember.cmake deleted file mode 100644 index eeb1b65c..00000000 --- a/attic/modules/CheckStructMember.cmake +++ /dev/null @@ -1,42 +0,0 @@ -# - Check if the given struct or class has the specified member variable -# CHECK_STRUCT_MEMBER (STRUCT MEMBER HEADER VARIABLE) -# -# STRUCT - the name of the struct or class you are interested in -# MEMBER - the member which existence you want to check -# HEADER - the header(s) where the prototype should be declared -# VARIABLE - variable to store the result -# -# The following variables may be set before calling this macro to -# modify the way the check is run: -# -# CMAKE_REQUIRED_FLAGS = string of compile command line flags -# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) -# CMAKE_REQUIRED_INCLUDES = list of include directories - -# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -INCLUDE(CheckCXXSourceCompiles) - -MACRO (CHECK_STRUCT_MEMBER _STRUCT _MEMBER _HEADER _RESULT) - SET(_INCLUDE_FILES) - FOREACH (it ${_HEADER}) - SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n") - ENDFOREACH (it) - - SET(_CHECK_STRUCT_MEMBER_SOURCE_CODE " -${_INCLUDE_FILES} -int main() -{ - ${_STRUCT}* tmp; - tmp->${_MEMBER}; - return 0; -} -") - CHECK_CXX_SOURCE_COMPILES("${_CHECK_STRUCT_MEMBER_SOURCE_CODE}" ${_RESULT}) - -ENDMACRO (CHECK_STRUCT_MEMBER) - diff --git a/attic/modules/FindACL.cmake b/attic/modules/FindACL.cmake deleted file mode 100644 index 7d3fa14f..00000000 --- a/attic/modules/FindACL.cmake +++ /dev/null @@ -1,36 +0,0 @@ -# - Try to find the ACL library -# Once done this will define -# -# ACL_FOUND - system has the ACL library -# ACL_LIBS - The libraries needed to use ACL - -# Copyright (c) 2006, Pino Toscano, <toscano.pino@tiscali.it> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -include(CheckIncludeFiles) - -check_include_files(attr/libattr.h HAVE_ATTR_LIBATTR_H) -check_include_files(sys/xattr.h HAVE_SYS_XATTR_H) -check_include_files(sys/acl.h HAVE_SYS_ACL_H) -check_include_files(acl/libacl.h HAVE_ACL_LIBACL_H) - -if (HAVE_ATTR_LIBATTR_H AND HAVE_SYS_XATTR_H AND HAVE_SYS_ACL_H AND HAVE_ACL_LIBACL_H) - set(ACL_HEADERS_FOUND TRUE) -endif (HAVE_ATTR_LIBATTR_H AND HAVE_SYS_XATTR_H AND HAVE_SYS_ACL_H AND HAVE_ACL_LIBACL_H) - -if (ACL_HEADERS_FOUND) - find_library(ACL_LIBS NAMES acl ) - - find_library(ATTR_LIBS NAMES attr ) -endif (ACL_HEADERS_FOUND) - -if (ACL_HEADERS_FOUND AND ACL_LIBS AND ATTR_LIBS) - set(ACL_FOUND TRUE) - set(ACL_LIBS ${ACL_LIBS} ${ATTR_LIBS}) - message(STATUS "Found ACL support: ${ACL_LIBS}") -endif (ACL_HEADERS_FOUND AND ACL_LIBS AND ATTR_LIBS) - -mark_as_advanced(ACL_LIBS ATTR_LIBS) - diff --git a/attic/modules/FindAGG.cmake b/attic/modules/FindAGG.cmake deleted file mode 100644 index 86d5618a..00000000 --- a/attic/modules/FindAGG.cmake +++ /dev/null @@ -1,53 +0,0 @@ -# - Try to find the AGG graphics library -# Once done this will define -# -# AGG_FOUND - system has AGG -# AGG_INCLUDE_DIR - the AGG include directory -# AGG_LIBRARIES - Link these to use AGG -# AGG_DEFINITIONS - Compiler switches required for using AGG - -# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -if (AGG_INCLUDE_DIR AND AGG_LIBRARIES) - - # in cache already - set(AGG_FOUND TRUE) - -else (AGG_INCLUDE_DIR AND AGG_LIBRARIES) - if (NOT WIN32) - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - find_package(PkgConfig) - pkg_check_modules(PC_AGG QUIET libagg) - - set(AGG_DEFINITIONS ${PC_AGG_CFLAGS_OTHER}) - endif (NOT WIN32) - - find_path(AGG_INCLUDE_DIR agg2/agg_pixfmt_gray.h - PATHS ${PC_AGG_INCLUDEDIR} ${PC_AGG_INCLUDE_DIRS} - ) - - find_library(AGG_LIBRARIES NAMES agg - PATHS ${PC_AGG_LIBDIR} ${PC_AGG_LIBRARY_DIRS} - ) - - if (AGG_INCLUDE_DIR AND AGG_LIBRARIES) - set(AGG_FOUND TRUE) - endif (AGG_INCLUDE_DIR AND AGG_LIBRARIES) - - if (AGG_FOUND) - if (NOT AGG_FIND_QUIETLY) - message(STATUS "Found AGG: ${AGG_LIBRARIES}") - endif (NOT AGG_FIND_QUIETLY) - else (AGG_FOUND) - if (AGG_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find AGG") - endif (AGG_FIND_REQUIRED) - endif (AGG_FOUND) - - mark_as_advanced(AGG_INCLUDE_DIR AGG_LIBRARIES) - -endif (AGG_INCLUDE_DIR AND AGG_LIBRARIES) diff --git a/attic/modules/FindAvahi.cmake b/attic/modules/FindAvahi.cmake deleted file mode 100644 index c6e055f0..00000000 --- a/attic/modules/FindAvahi.cmake +++ /dev/null @@ -1,15 +0,0 @@ -# Find Avahi. Only avahi-common/defs.h is really needed - -# Copyright (c) 2007, Jakub Stachowski, <qbast@go2.pl> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -find_path(AVAHI_INCLUDE_DIR avahi-common/defs.h) -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Avahi DEFAULT_MSG - AVAHI_INCLUDE_DIR) - -mark_as_advanced(AVAHI_INCLUDE_DIR) - diff --git a/attic/modules/FindBerkeleyDB.cmake b/attic/modules/FindBerkeleyDB.cmake deleted file mode 100644 index 021d9428..00000000 --- a/attic/modules/FindBerkeleyDB.cmake +++ /dev/null @@ -1,25 +0,0 @@ -# - Try to find Berkeley DB -# Once done this will define -# -# BERKELEY_DB_FOUND - system has Berkeley DB -# BERKELEY_DB_INCLUDE_DIR - the Berkeley DB include directory -# BERKELEY_DB_LIBRARIES - Link these to use Berkeley DB -# BERKELEY_DB_DEFINITIONS - Compiler switches required for using Berkeley DB - -# Copyright (c) 2006, Alexander Dymo, <adymo@kdevelop.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -find_path(BERKELEY_DB_INCLUDE_DIR db.h - /usr/include/db4 - /usr/local/include/db4 -) - -find_library(BERKELEY_DB_LIBRARIES NAMES db ) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Berkeley "Could not find Berkeley DB >= 4.1" BERKELEY_DB_INCLUDE_DIR BERKELEY_DB_LIBRARIES) -# show the BERKELEY_DB_INCLUDE_DIR and BERKELEY_DB_LIBRARIES variables only in the advanced view -mark_as_advanced(BERKELEY_DB_INCLUDE_DIR BERKELEY_DB_LIBRARIES ) - diff --git a/attic/modules/FindBlueZ.cmake b/attic/modules/FindBlueZ.cmake deleted file mode 100644 index 3cfdc083..00000000 --- a/attic/modules/FindBlueZ.cmake +++ /dev/null @@ -1,48 +0,0 @@ -# - Try to find BlueZ bluetooth library. -# Once done this will define -# -# BLUEZ_FOUND - system has BlueZ -# BLUEZ_INCLUDE_DIR - the BlueZ include directory -# BLUEZ_LIBRARIES - Link these to use BlueZ -# BLUEZ_DEFINITIONS - Compiler switches required for using BlueZ -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# - -# Copyright (c) 2008, Daniel Gollub, <dgollub@suse.de> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -# use pkg-config to get the directories and then use these values -# in the FIND_PATH() and FIND_LIBRARY() calls -find_package(PkgConfig) -pkg_check_modules(PC_BLUEZ QUIET bluez) - -set(BLUEZ_DEFINITIONS ${PC_BLUEZ_CFLAGS_OTHER}) - -find_path(BLUEZ_INCLUDE_DIR NAMES bluetooth/bluetooth.h - PATHS - ${PC_BLUEZ_INCLUDEDIR} - ${PC_BLUEZ_INCLUDE_DIRS} - /usr/X11/include -) - -find_library(BLUEZ_LIBRARY NAMES bluetooth - PATHS - ${PC_BLUEZ_LIBDIR} - ${PC_BLUEZ_LIBRARY_DIRS} -) - -set(BLUEZ_LIBRARIES ${BLUEZ_LIBRARY}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(BlueZ DEFAULT_MSG BLUEZ_LIBRARY BLUEZ_INCLUDE_DIR) - -include(FeatureSummary) -set_package_properties(BlueZ PROPERTIES URL http://www.bluez.org/ - DESCRIPTION "Official Linux Bluetooth protocol stack") - -# show the BLUEZ_INCLUDE_DIR and BLUEZ_LIBRARY variables only in the advanced view -mark_as_advanced(BLUEZ_INCLUDE_DIR BLUEZ_LIBRARY) diff --git a/attic/modules/FindCarbon.cmake b/attic/modules/FindCarbon.cmake deleted file mode 100644 index 2b0d979e..00000000 --- a/attic/modules/FindCarbon.cmake +++ /dev/null @@ -1,22 +0,0 @@ -# - Find Carbon on Mac -# -# CARBON_LIBRARY - the library to use Carbon -# CARBON_FOUND - true if Carbon has been found - -# Copyright (c) 2006, Benjamin Reed, <ranger@befunk.com> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -include(CMakeFindFrameworks) - -cmake_find_frameworks(Carbon) - -if (Carbon_FRAMEWORKS) - set(CARBON_LIBRARY "-framework Carbon" CACHE FILEPATH "Carbon framework" FORCE) - set(CARBON_FOUND 1) -endif (Carbon_FRAMEWORKS) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Carbon DEFAULT_MSG CARBON_LIBRARY) - diff --git a/attic/modules/FindDBusMenuQt.cmake b/attic/modules/FindDBusMenuQt.cmake deleted file mode 100644 index 10e14dc3..00000000 --- a/attic/modules/FindDBusMenuQt.cmake +++ /dev/null @@ -1,94 +0,0 @@ -# - Try to find dbusmenu-qt -# This module helps finding an installation of the DBusMenuQt library (see https://launchpad.net/libdbusmenu-qt/) -# Once done this will define -# -# DBUSMENUQT_FOUND - system has dbusmenu-qt -# DBUSMENUQT_INCLUDE_DIR - the dbusmenu-qt include directory -# DBUSMENUQT_LIBRARIES - the libraries needed to use dbusmenu-qt -# DBUSMENUQT_DEFINITIONS - Compiler switches required for using dbusmenu-qt -# -# The minimum required version of DBusMenuQt can be specified using the -# standard syntax, e.g. find_package(DBusMenuQt 0.6) -# -# WARNING: versions below 0.4.0 cannot be checked for. -# So if you want to have a version check, require at least 0.4.0 of dbusmenuqt. - -# Copyright (c) 2009, Canonical Ltd. -# - Author: Aurélien Gâteau <aurelien.gateau@canonical.com> -# -# Based on FindQCA2.cmake -# Copyright (c) 2006, Michael Larouche, <michael.larouche@kdemail.net> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -include(FindPackageHandleStandardArgs) - -find_package(PkgConfig) -pkg_check_modules(PC_DBUSMENUQT QUIET dbusmenu-qt) - - -set(DBUSMENUQT_DEFINITIONS ${PC_DBUSMENUQT_CFLAGS_OTHER}) - -find_library(DBUSMENUQT_LIBRARIES - NAMES dbusmenu-qt dbusmenu-qtd - HINTS ${PC_DBUSMENUQT_LIBDIR} ${PC_DBUSMENUQT_LIBRARY_DIRS} - ) - -find_path(DBUSMENUQT_INCLUDE_DIR dbusmenuexporter.h - HINTS ${PC_DBUSMENUQT_INCLUDEDIR} ${PC_DBUSMENUQT_INCLUDE_DIRS} - PATH_SUFFIXES dbusmenu-qt - ) - - -# dbusmenu_version.h is installed since 0.4.0, fail if a version below this is required: -if ((DBusMenuQt_FIND_VERSION) AND ("${DBusMenuQt_FIND_VERSION}" VERSION_LESS "0.4.0")) - message(FATAL_ERROR "Cannot check reliably for a DBusMenuQt version below 0.4.0 (${DBusMenuQt_FIND_VERSION} was requested)") -endif ((DBusMenuQt_FIND_VERSION) AND ("${DBusMenuQt_FIND_VERSION}" VERSION_LESS "0.4.0")) - - -# find the version number from dbusmenu_version.h and store it in the cache -if(DBUSMENUQT_INCLUDE_DIR AND NOT DBUSMENUQT_VERSION) - # parse the version number out from dbusmenu_version: - if(EXISTS ${DBUSMENUQT_INCLUDE_DIR}/dbusmenu_version.h) - file(READ "${DBUSMENUQT_INCLUDE_DIR}/dbusmenu_version.h" DBUSMENUQT_VERSION_CONTENT) - - if ("${DBUSMENUQT_VERSION_CONTENT}" MATCHES "DBUSMENUQT_VERSION_MAJOR") # introduced after 0.6.4, makes this code here more robust - - string(REGEX MATCH "#define +DBUSMENUQT_VERSION_MAJOR +([0-9]+)" _dummy "${DBUSMENUQT_VERSION_CONTENT}") - set(DBUSMENUQT_VERSION_MAJOR "${CMAKE_MATCH_1}") - - string(REGEX MATCH "#define +DBUSMENUQT_VERSION_MINOR +([0-9]+)" _dummy "${DBUSMENUQT_VERSION_CONTENT}") - set(DBUSMENUQT_VERSION_MINOR "${CMAKE_MATCH_1}") - - string(REGEX MATCH "#define +DBUSMENUQT_VERSION_PATCH +([0-9]+)" _dummy "${DBUSMENUQT_VERSION_CONTENT}") - set(DBUSMENUQT_VERSION_PATCH "${CMAKE_MATCH_1}") - - else() - # In versions up to 0.6.4, the code for setting the version number in the header looked like - # shopw below. This made version checking quite un-obvious: - # #define DBUSMENUQT_VERSION \ - # ((0 << 16) \ - # |(6 << 8) \ - # |4) - - string(REGEX MATCH "\\(\\( *([0-9]+) *<<" _dummy "${DBUSMENUQT_VERSION_CONTENT}") - set(DBUSMENUQT_VERSION_MAJOR "${CMAKE_MATCH_1}") - - string(REGEX MATCH "\\|\\( *([0-9]+) *<<" _dummy "${DBUSMENUQT_VERSION_CONTENT}") - set(DBUSMENUQT_VERSION_MINOR "${CMAKE_MATCH_1}") - - string(REGEX MATCH "\\| *([0-9]+) *\\)" _dummy "${DBUSMENUQT_VERSION_CONTENT}") - set(DBUSMENUQT_VERSION_PATCH "${CMAKE_MATCH_1}") - endif() - endif() - - set(DBUSMENUQT_VERSION "${DBUSMENUQT_VERSION_MAJOR}.${DBUSMENUQT_VERSION_MINOR}.${DBUSMENUQT_VERSION_PATCH}" CACHE STRING "Version number of DBusMenuQt" FORCE) -endif() - - -find_package_handle_standard_args(DBusMenuQt REQUIRED_VARS DBUSMENUQT_LIBRARIES DBUSMENUQT_INCLUDE_DIR - VERSION_VAR DBUSMENUQT_VERSION) -#"Could not find dbusmenu-qt; available at https://launchpad.net/libdbusmenu-qt/" DBUSMENUQT_LIBRARIES DBUSMENUQT_INCLUDE_DIR) - -mark_as_advanced(DBUSMENUQT_INCLUDE_DIR DBUSMENUQT_LIBRARIES DBUSMENUQT_VERSION) diff --git a/attic/modules/FindDNSSD.cmake b/attic/modules/FindDNSSD.cmake deleted file mode 100644 index 8604bd57..00000000 --- a/attic/modules/FindDNSSD.cmake +++ /dev/null @@ -1,48 +0,0 @@ -# - Try to find DNSSD -# Once done this will define -# -# DNSSD_FOUND - system has DNSSD -# DNSSD_INCLUDE_DIR - the DNSSD include directory -# DNSSD_LIBRARIES - Link these to use dnssd -# DNSSD_DEFINITIONS - Compiler switches required for using DNSSD -# -# need more test: look at into dnssd/configure.in.in - -# Copyright (c) 2006, Laurent Montel, <montel@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -FIND_PATH(DNSSD_INCLUDE_DIR dns_sd.h - /usr/include/avahi-compat-libdns_sd/ -) - -if (DNSSD_INCLUDE_DIR) - if (APPLE) - set(DNSSD_LIBRARIES "/usr/lib/libSystem.dylib") - else (APPLE) - FIND_LIBRARY(DNSSD_LIBRARIES NAMES dns_sd ) - endif (APPLE) - - MACRO_PUSH_REQUIRED_VARS() - set(CMAKE_REQUIRED_INCLUDES ${DNSSD_INCLUDE_DIR}) - set(CMAKE_REQUIRED_LIBRARIES ${DNSSD_LIBRARIES}) - CHECK_FUNCTION_EXISTS(DNSServiceRefDeallocate DNSSD_FUNCTION_FOUND) - MACRO_POP_REQUIRED_VARS() - - if (DNSSD_INCLUDE_DIR AND DNSSD_LIBRARIES AND DNSSD_FUNCTION_FOUND) - set(DNSSD_FOUND TRUE) - endif (DNSSD_INCLUDE_DIR AND DNSSD_LIBRARIES AND DNSSD_FUNCTION_FOUND) -endif (DNSSD_INCLUDE_DIR) - -if (DNSSD_FOUND) - if (NOT DNSSD_FIND_QUIETLY) - message(STATUS "Found DNSSD: ${DNSSD_LIBRARIES}") - endif (NOT DNSSD_FIND_QUIETLY) -else (DNSSD_FOUND) - if (DNSSD_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find DNSSD") - endif (DNSSD_FIND_REQUIRED) -endif (DNSSD_FOUND) - -MARK_AS_ADVANCED(DNSSD_INCLUDE_DIR DNSSD_LIBRARIES) diff --git a/attic/modules/FindENCHANT.cmake b/attic/modules/FindENCHANT.cmake deleted file mode 100644 index 9c13c488..00000000 --- a/attic/modules/FindENCHANT.cmake +++ /dev/null @@ -1,44 +0,0 @@ -# - Try to find the Enchant spell checker -# Once done this will define -# -# ENCHANT_FOUND - system has ENCHANT -# ENCHANT_INCLUDE_DIR - the ENCHANT include directory -# ENCHANT_LIBRARIES - Link these to use ENCHANT -# ENCHANT_DEFINITIONS - Compiler switches required for using ENCHANT - -# Copyright (c) 2006, Zack Rusin, <zack@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -if (ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES) - - # in cache already - set(ENCHANT_FOUND TRUE) - -else (ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES) - if (NOT WIN32) - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - find_package(PkgConfig) - pkg_check_modules(PC_ENCHANT QUIET enchant) - set(ENCHANT_DEFINITIONS ${PC_ENCHANT_CFLAGS_OTHER}) - endif (NOT WIN32) - - find_path(ENCHANT_INCLUDE_DIR - NAMES enchant++.h - HINTS ${PC_ENCHANT_INCLUDEDIR} - ${PC_ENCHANT_INCLUDE_DIRS} - PATH_SUFFIXES enchant ) - - find_library(ENCHANT_LIBRARIES NAMES enchant - HINTS ${PC_ENCHANT_LIBDIR} - ${PC_ENCHANT_LIBRARY_DIRS} ) - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(ENCHANT DEFAULT_MSG ENCHANT_INCLUDE_DIR ENCHANT_LIBRARIES ) - - mark_as_advanced(ENCHANT_INCLUDE_DIR ENCHANT_LIBRARIES) - -endif (ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES) diff --git a/attic/modules/FindFAM.cmake b/attic/modules/FindFAM.cmake deleted file mode 100644 index 7a598fd0..00000000 --- a/attic/modules/FindFAM.cmake +++ /dev/null @@ -1,22 +0,0 @@ -# - Try to find the FAM directory notification library -# Once done this will define -# -# FAM_FOUND - system has FAM -# FAM_INCLUDE_DIR - the FAM include directory -# FAM_LIBRARIES - The libraries needed to use FAM - -# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -FIND_PATH(FAM_INCLUDE_DIR fam.h) - -FIND_LIBRARY(FAM_LIBRARIES NAMES fam ) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(FAM DEFAULT_MSG FAM_INCLUDE_DIR FAM_LIBRARIES ) - -MARK_AS_ADVANCED(FAM_INCLUDE_DIR FAM_LIBRARIES) - diff --git a/attic/modules/FindFFmpeg.cmake b/attic/modules/FindFFmpeg.cmake deleted file mode 100644 index d6259b0c..00000000 --- a/attic/modules/FindFFmpeg.cmake +++ /dev/null @@ -1,116 +0,0 @@ -# - Try to find ffmpeg -# Once done this will define -# -# FFMPEG_FOUND - system has ffmpeg -# FFMPEG_INCLUDE_DIR - Include directory necessary for using the ffmpeg headers -# FFMPEG_LIBRARIES - Link these to use ffmpeg -# FFMPEG_DEFINITIONS - Compiler switches required for using ffmpeg - -# Copyright (c) 2006, Matthias Kretz, <kretz@kde.org> -# Copyright (c) 2008, Alexander Neundorf, <neundorf@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -if (FFMPEG_LIBRARIES) - - # in cache already - set(FFMPEG_FOUND TRUE) - -else (FFMPEG_LIBRARIES) - -if (NOT WIN32) - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - find_package(PkgConfig) - pkg_check_modules(PC_LIBAVCODEC libavcodec) - set(FFMPEG_DEFINITIONS ${PC_LIBAVCODEC_CFLAGS_OTHER}) - -endif (NOT WIN32) - - # - # #include <libXXXX/XXXX.h> is the new style for FFMPEG headers - # This has been verified at least since 0.4.9 - # Please do not change to the old format, since this will break for - # people who are using newer versions. Instead, upgrade your ffmpeg - # installation. - # - find_path(FFMPEG_INCLUDE_DIR libavcodec/avcodec.h - HINTS - ${PC_LIBAVCODEC_INCLUDEDIR} - ${PC_LIBAVCODEC_INCLUDE_DIRS} - ) - - # also search for the old style include dir, just for the purpose - # of giving a useful error message if an old libavcodec is installed - # and the user might wonder why it is not found - find_path(FFMPEG_INCLUDE_DIR_OLD_STYLE ffmpeg/avcodec.h - HINTS - ${PC_LIBAVCODEC_INCLUDEDIR} - ${PC_LIBAVCODEC_INCLUDE_DIRS} - ) - - find_library(AVCODEC_LIBRARIES NAMES avcodec - HINTS - ${PC_LIBAVCODEC_LIBDIR} - ${PC_LIBAVCODEC_LIBRARY_DIRS} - ) - - find_library(AVFORMAT_LIBRARIES NAMES avformat - HINTS - ${PC_LIBAVCODEC_LIBDIR} - ${PC_LIBAVCODEC_LIBRARY_DIRS} - ) - - find_library(AVUTIL_LIBRARIES NAMES avutil - HINTS - ${PC_LIBAVCODEC_LIBDIR} - ${PC_LIBAVCODEC_LIBRARY_DIRS} - ) - - - - set(FFMPEG_LIBRARIES ) - if (AVCODEC_LIBRARIES) - set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${AVCODEC_LIBRARIES}) - endif (AVCODEC_LIBRARIES) - - if (AVFORMAT_LIBRARIES) - set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${AVFORMAT_LIBRARIES}) - endif (AVFORMAT_LIBRARIES) - - if (AVUTIL_LIBRARIES) - set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${AVUTIL_LIBRARIES}) - endif (AVUTIL_LIBRARIES) - - if (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIR) - set(FFMPEG_FOUND TRUE) - endif (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIR) - - if (FFMPEG_FOUND) - if (NOT FFmpeg_FIND_QUIETLY) - message(STATUS "Found FFMPEG: ${FFMPEG_LIBRARIES} ${FFMPEG_INCLUDE_DIR}") - endif (NOT FFmpeg_FIND_QUIETLY) - else (FFMPEG_FOUND) - # only an old libavcodec was found ? - if (FFMPEG_INCLUDE_DIR_OLD_STYLE AND NOT FFMPEG_INCLUDE_DIR AND NOT FFmpeg_FIND_QUIETLY) - message(STATUS "Found old version of libavcodec, but a newer version is required.") - endif (FFMPEG_INCLUDE_DIR_OLD_STYLE AND NOT FFMPEG_INCLUDE_DIR AND NOT FFmpeg_FIND_QUIETLY) - - if (FFmpeg_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find FFMPEG") - else (FFmpeg_FIND_REQUIRED) - if (NOT FFmpeg_FIND_QUIETLY) - message(STATUS "Could NOT find FFMPEG") - endif (NOT FFmpeg_FIND_QUIETLY) - endif (FFmpeg_FIND_REQUIRED) - endif (FFMPEG_FOUND) - - mark_as_advanced(AVCODEC_LIBRARIES - AVFORMAT_LIBRARIES - AVUTIL_LIBRARIES - FFMPEG_INCLUDE_DIR - FFMPEG_INCLUDE_DIR_OLD_STYLE) - -endif (FFMPEG_LIBRARIES)# AND FFMPEG_DEFINITIONS) diff --git a/attic/modules/FindFlac.cmake b/attic/modules/FindFlac.cmake deleted file mode 100644 index 208e3fc3..00000000 --- a/attic/modules/FindFlac.cmake +++ /dev/null @@ -1,34 +0,0 @@ -# - Try to find Flac, the Free Lossless Audio Codec -# Once done this will define -# -# FLAC_FOUND - system has Flac -# FLAC_INCLUDE_DIR - the Flac include directory -# FLAC_LIBRARIES - Link these to use Flac -# FLAC_OGGFLAC_LIBRARIES - Link these to use OggFlac -# -# No version checking is done - use FLAC_API_VERSION_CURRENT to -# conditionally compile version-dependent code - -# Copyright (c) 2006, Laurent Montel, <montel@kde.org> -# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -FIND_PATH(FLAC_INCLUDE_DIR FLAC/metadata.h) - -FIND_LIBRARY(FLAC_LIBRARIES NAMES FLAC ) - -FIND_LIBRARY(FLAC_OGG_LIBRARY NAMES OggFLAC) - - -IF(FLAC_LIBRARIES AND FLAC_OGG_LIBRARY) - SET(FLAC_OGGFLAC_LIBRARIES ${FLAC_OGG_LIBRARY} ${FLAC_LIBRARIES}) -ENDIF(FLAC_LIBRARIES AND FLAC_OGG_LIBRARY) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Flac REQUIRED_VARS FLAC_LIBRARIES FLAC_INCLUDE_DIR) - -# show the FLAC_INCLUDE_DIR and FLAC_LIBRARIES variables only in the advanced view -MARK_AS_ADVANCED(FLAC_INCLUDE_DIR FLAC_LIBRARIES FLAC_OGG_LIBRARY) - diff --git a/attic/modules/FindGMP.cmake b/attic/modules/FindGMP.cmake deleted file mode 100644 index 17d175c6..00000000 --- a/attic/modules/FindGMP.cmake +++ /dev/null @@ -1,23 +0,0 @@ -# Try to find the GMP librairies -# GMP_FOUND - system has GMP lib -# GMP_INCLUDE_DIR - the GMP include directory -# GMP_LIBRARIES - Libraries needed to use GMP - -# Copyright (c) 2006, Laurent Montel, <montel@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -if (GMP_INCLUDE_DIR AND GMP_LIBRARIES) - # Already in cache, be silent - set(GMP_FIND_QUIETLY TRUE) -endif (GMP_INCLUDE_DIR AND GMP_LIBRARIES) - -find_path(GMP_INCLUDE_DIR NAMES gmp.h ) -find_library(GMP_LIBRARIES NAMES gmp libgmp) - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(GMP DEFAULT_MSG GMP_INCLUDE_DIR GMP_LIBRARIES) - -mark_as_advanced(GMP_INCLUDE_DIR GMP_LIBRARIES) diff --git a/attic/modules/FindGObject.cmake b/attic/modules/FindGObject.cmake deleted file mode 100644 index af0c9f73..00000000 --- a/attic/modules/FindGObject.cmake +++ /dev/null @@ -1,52 +0,0 @@ -# - Try to find GObject -# Once done this will define -# -# GOBJECT_FOUND - system has GObject -# GOBJECT_INCLUDE_DIR - the GObject include directory -# GOBJECT_LIBRARIES - the libraries needed to use GObject -# GOBJECT_DEFINITIONS - Compiler switches required for using GObject - -# Copyright (c) 2011, Raphael Kubo da Costa <kubito@gmail.com> -# Copyright (c) 2006, Tim Beaulen <tbscope@gmail.com> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -FIND_PACKAGE(PkgConfig) -PKG_CHECK_MODULES(PC_GOBJECT gobject-2.0) -SET(GOBJECT_DEFINITIONS ${PC_GOBJECT_CFLAGS_OTHER}) - -FIND_PATH(GOBJECT_INCLUDE_DIR gobject.h - HINTS - ${PC_GOBJECT_INCLUDEDIR} - ${PC_GOBJECT_INCLUDE_DIRS} - PATH_SUFFIXES glib-2.0/gobject/ - ) - -FIND_LIBRARY(_GObjectLibs NAMES gobject-2.0 - HINTS - ${PC_GOBJECT_LIBDIR} - ${PC_GOBJECT_LIBRARY_DIRS} - ) -FIND_LIBRARY(_GModuleLibs NAMES gmodule-2.0 - HINTS - ${PC_GOBJECT_LIBDIR} - ${PC_GOBJECT_LIBRARY_DIRS} - ) -FIND_LIBRARY(_GThreadLibs NAMES gthread-2.0 - HINTS - ${PC_GOBJECT_LIBDIR} - ${PC_GOBJECT_LIBRARY_DIRS} - ) -FIND_LIBRARY(_GLibs NAMES glib-2.0 - HINTS - ${PC_GOBJECT_LIBDIR} - ${PC_GOBJECT_LIBRARY_DIRS} - ) - -SET( GOBJECT_LIBRARIES ${_GObjectLibs} ${_GModuleLibs} ${_GThreadLibs} ${_GLibs} ) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(GOBJECT DEFAULT_MSG GOBJECT_LIBRARIES GOBJECT_INCLUDE_DIR) - -MARK_AS_ADVANCED(GOBJECT_INCLUDE_DIR _GObjectLibs _GModuleLibs _GThreadLibs _GLibs) diff --git a/attic/modules/FindGSSAPI.cmake b/attic/modules/FindGSSAPI.cmake deleted file mode 100644 index 942cf558..00000000 --- a/attic/modules/FindGSSAPI.cmake +++ /dev/null @@ -1,78 +0,0 @@ -# - Try to detect the GSSAPI support -# Once done this will define -# -# GSSAPI_FOUND - system supports GSSAPI -# GSSAPI_INCS - the GSSAPI include directory -# GSSAPI_LIBS - the libraries needed to use GSSAPI -# GSSAPI_FLAVOR - the type of API - MIT or HEIMDAL - -# Copyright (c) 2006, Pino Toscano, <toscano.pino@tiscali.it> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -if(GSSAPI_LIBS AND GSSAPI_FLAVOR) - - # in cache already - set(GSSAPI_FOUND TRUE) - -else() - - find_program(KRB5_CONFIG NAMES krb5-config PATHS - /opt/local/bin - ONLY_CMAKE_FIND_ROOT_PATH # this is required when cross compiling with cmake 2.6 and ignored with cmake 2.4, Alex - ) - mark_as_advanced(KRB5_CONFIG) - - #reset vars - set(GSSAPI_INCS) - set(GSSAPI_LIBS) - set(GSSAPI_FLAVOR) - - if(KRB5_CONFIG) - - set(HAVE_KRB5_GSSAPI TRUE) - exec_program(${KRB5_CONFIG} ARGS --libs gssapi RETURN_VALUE _return_VALUE OUTPUT_VARIABLE GSSAPI_LIBS) - if(_return_VALUE) - message(STATUS "GSSAPI configure check failed.") - set(HAVE_KRB5_GSSAPI FALSE) - endif() - - exec_program(${KRB5_CONFIG} ARGS --cflags gssapi RETURN_VALUE _return_VALUE OUTPUT_VARIABLE GSSAPI_INCS) - string(REGEX REPLACE "(\r?\n)+$" "" GSSAPI_INCS "${GSSAPI_INCS}") - string(REGEX REPLACE " *-I" ";" GSSAPI_INCS "${GSSAPI_INCS}") - - exec_program(${KRB5_CONFIG} ARGS --vendor RETURN_VALUE _return_VALUE OUTPUT_VARIABLE gssapi_flavor_tmp) - set(GSSAPI_FLAVOR_MIT) - if(gssapi_flavor_tmp MATCHES ".*Massachusetts.*") - set(GSSAPI_FLAVOR "MIT") - else() - set(GSSAPI_FLAVOR "HEIMDAL") - endif() - - if(NOT HAVE_KRB5_GSSAPI) - if (gssapi_flavor_tmp MATCHES "Sun Microsystems.*") - message(STATUS "Solaris Kerberos does not have GSSAPI; this is normal.") - set(GSSAPI_LIBS) - set(GSSAPI_INCS) - else() - message(WARNING "${KRB5_CONFIG} failed unexpectedly.") - endif() - endif() - - if(GSSAPI_LIBS) # GSSAPI_INCS can be also empty, so don't rely on that - set(GSSAPI_FOUND TRUE) - message(STATUS "Found GSSAPI: ${GSSAPI_LIBS}") - - set(GSSAPI_INCS ${GSSAPI_INCS}) - set(GSSAPI_LIBS ${GSSAPI_LIBS}) - set(GSSAPI_FLAVOR ${GSSAPI_FLAVOR}) - - mark_as_advanced(GSSAPI_INCS GSSAPI_LIBS GSSAPI_FLAVOR) - - endif() - - endif() - -endif() diff --git a/attic/modules/FindGphoto2.cmake b/attic/modules/FindGphoto2.cmake deleted file mode 100644 index 71436118..00000000 --- a/attic/modules/FindGphoto2.cmake +++ /dev/null @@ -1,60 +0,0 @@ -# cmake macro to test if we use gphoto2 -# GPHOTO2_FOUND - system has the GPHOTO2 library -# GPHOTO2_INCLUDE_DIR - the GPHOTO2 include directory -# GPHOTO2_LIBRARIES - The libraries needed to use GPHOTO2 - -# Copyright (c) 2006, 2007 Laurent Montel, <montel@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -option(KDE4_GPHOTO2 "do not build kamera (gphoto2 required)" ON) -if (KDE4_GPHOTO2 ) - IF (GPHOTO2_LIBRARIES AND GPHOTO2_INCLUDE_DIR) - # in cache already - SET(GPHOTO2_FOUND TRUE) - ELSE (GPHOTO2_LIBRARIES AND GPHOTO2_INCLUDE_DIR) - - FIND_PROGRAM(GHOTO2CONFIG_EXECUTABLE NAMES gphoto2-config - ) - - FIND_PROGRAM(GHOTO2PORTCONFIG_EXECUTABLE NAMES gphoto2-port-config - ) - set(GPHOTO2_LIBRARIES) - set(GPHOTO2_INCLUDE_DIRS) - # if gphoto2-port-config and gphoto2-config have been found - IF (GHOTO2PORTCONFIG_EXECUTABLE AND GHOTO2CONFIG_EXECUTABLE) - EXEC_PROGRAM(${GHOTO2PORTCONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE GPHOTO2PORT_LIBRARY) - EXEC_PROGRAM(${GHOTO2CONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE GPHOTO2_LIBRARY) - - EXEC_PROGRAM(${GHOTO2PORTCONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _GPHOTO2PORT_RESULT_INCLUDE_DIR) - EXEC_PROGRAM(${GHOTO2CONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _GPHOTO2_RESULT_INCLUDE_DIR) - - set(GPHOTO2_LIBRARIES ${GPHOTO2PORT_LIBRARY} ${GPHOTO2_LIBRARY}) - # the cflags for poppler-qt4 can contain more than one include path - separate_arguments(_GPHOTO2_RESULT_INCLUDE_DIR) - foreach(_includedir ${_GPHOTO2_RESULT_INCLUDE_DIR}) - string(REGEX REPLACE "-I(.+)" "\\1" _includedir "${_includedir}") - set(GPHOTO2_INCLUDE_DIR ${GPHOTO2_INCLUDE_DIR} ${_includedir}) - endforeach(_includedir) - separate_arguments(_GPHOTO2PORT_RESULT_INCLUDE_DIR) - foreach(_includedir ${_GPHOTO2PORT_RESULT_INCLUDE_DIR}) - string(REGEX REPLACE "-I(.+)" "\\1" _includedir "${_includedir}") - set(GPHOTO2PORT_INCLUDE_DIR ${GPHOTO2PORT_INCLUDE_DIR} ${_includedir}) - endforeach(_includedir) - - - - set(GPHOTO2_INCLUDE_DIRS ${GPHOTO2PORT_INCLUDE_DIR} ${GPHOTO2_INCLUDE_DIR} ) - endif() - - IF (GPHOTO2_LIBRARIES AND GPHOTO2_INCLUDE_DIRS) - SET(GPHOTO2_FOUND TRUE) - message(STATUS "Found gphoto2: ${GPHOTO2_LIBRARIES}") - ENDIF (GPHOTO2_LIBRARIES AND GPHOTO2_INCLUDE_DIRS) - ENDIF (GPHOTO2_LIBRARIES AND GPHOTO2_INCLUDE_DIR) - MARK_AS_ADVANCED(GPHOTO2_LIBRARIES GPHOTO2_INCLUDE_DIRS) - -endif() - diff --git a/attic/modules/FindHUNSPELL.cmake b/attic/modules/FindHUNSPELL.cmake deleted file mode 100644 index 26942b56..00000000 --- a/attic/modules/FindHUNSPELL.cmake +++ /dev/null @@ -1,25 +0,0 @@ -# - Try to find HUNSPELL -# Once done this will define -# -# HUNSPELL_FOUND - system has HUNSPELL -# HUNSPELL_INCLUDE_DIR - the HUNSPELL include directory -# HUNSPELL_LIBRARIES - The libraries needed to use HUNSPELL -# HUNSPELL_DEFINITIONS - Compiler switches required for using HUNSPELL - - -IF (HUNSPELL_INCLUDE_DIR AND HUNSPELL_LIBRARIES) - # Already in cache, be silent - SET(HUNSPELL_FIND_QUIETLY TRUE) -ENDIF (HUNSPELL_INCLUDE_DIR AND HUNSPELL_LIBRARIES) - -FIND_PATH(HUNSPELL_INCLUDE_DIR hunspell/hunspell.hxx ) - -FIND_LIBRARY(HUNSPELL_LIBRARIES NAMES hunspell-1.3 hunspell-1.2) - -# handle the QUIETLY and REQUIRED arguments and set HUNSPELL_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(HUNSPELL DEFAULT_MSG HUNSPELL_LIBRARIES HUNSPELL_INCLUDE_DIR) - - -MARK_AS_ADVANCED(HUNSPELL_INCLUDE_DIR HUNSPELL_LIBRARIES) diff --git a/attic/modules/FindHUpnp.cmake b/attic/modules/FindHUpnp.cmake deleted file mode 100644 index 85c80306..00000000 --- a/attic/modules/FindHUpnp.cmake +++ /dev/null @@ -1,31 +0,0 @@ -# - Try to find HUPnP library -# Once done this will define -# -# HUPNP_FOUND - system has HUPnP -# HUPNP_INCLUDE_DIR - the LIBHUpnp include directory -# HUPNP_LIBS - the LIBHUpnp libraries -# HUPNP_VERSION_STRING - The version of HUpnp -# HUPNP_VERSION_MAJOR - The major version of HUpnp -# HUPNP_VERSION_MINOR - The minor version of HUpnp -# HUPNP_VERSION_PATCH - The patch version of HUpnp -# -# Copyright (c) 2010, Paulo Romulo Alves Barros <paulo.romulo@kdemail.net> - -find_path( HUPNP_INCLUDE_DIR HUpnpCore/HUpnp ) - -find_library( HUPNP_LIBS HUpnp ) - -if( HUPNP_INCLUDE_DIR AND EXISTS "${HUPNP_INCLUDE_DIR}/HUpnpCore/public/hupnpinfo.h" ) - file( STRINGS "${HUPNP_INCLUDE_DIR}/HUpnpCore/public/hupnpinfo.h" HUPNP_INFO_H REGEX "^#define HUPNP_CORE_.*_VERSION .*$" ) - string( REGEX REPLACE ".*HUPNP_CORE_MAJOR_VERSION ([0-9]+).*" "\\1" HUPNP_VERSION_MAJOR "${HUPNP_INFO_H}" ) - string( REGEX REPLACE ".*HUPNP_CORE_MINOR_VERSION ([0-9]+).*" "\\1" HUPNP_VERSION_MINOR "${HUPNP_INFO_H}" ) - string( REGEX REPLACE ".*HUPNP_CORE_PATCH_VERSION ([0-9]+).*" "\\1" HUPNP_VERSION_PATCH "${HUPNP_INFO_H}" ) - - set( HUPNP_VERSION_STRING "${HUPNP_VERSION_MAJOR}.${HUPNP_VERSION_MINOR}.${HUPNP_VERSION_PATCH}" ) -endif() - -include( FindPackageHandleStandardArgs ) - -find_package_handle_standard_args( HUpnp DEFAULT_MSG HUPNP_INCLUDE_DIR HUPNP_LIBS ) - -mark_as_advanced( HUPNP_INCLUDE_DIR HUPNP_LIBS ) diff --git a/attic/modules/FindIOKit.cmake b/attic/modules/FindIOKit.cmake deleted file mode 100644 index f3e3ecb2..00000000 --- a/attic/modules/FindIOKit.cmake +++ /dev/null @@ -1,23 +0,0 @@ -# - Find IOKit on Mac -# -# IOKIT_LIBRARY - the library to use IOKit -# IOKIT_FOUND - true if IOKit has been found - -# Copyright (c) 2009, Harald Fernengel <harry@kdevelop.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -include(CMakeFindFrameworks) - -cmake_find_frameworks(IOKit) -cmake_find_frameworks(CoreFoundation) - -if (IOKit_FRAMEWORKS) - set(IOKIT_LIBRARY "-framework IOKit -framework CoreFoundation" CACHE FILEPATH "IOKit framework" FORCE) - set(IOKIT_FOUND 1) -endif (IOKit_FRAMEWORKS) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(IOKit DEFAULT_MSG IOKIT_LIBRARY) - diff --git a/attic/modules/FindKDEWIN32.cmake b/attic/modules/FindKDEWIN32.cmake deleted file mode 100644 index 1f78055b..00000000 --- a/attic/modules/FindKDEWIN32.cmake +++ /dev/null @@ -1,26 +0,0 @@ -# - Try to find the KDEWIN32 library -# - Try to find the KDEWIN32 library - deprecated -# -# Once done this will define -# -# KDEWIN32_FOUND - system has KDEWIN32 -# KDEWIN32_INCLUDES - the KDEWIN32 include directories -# KDEWIN32_LIBRARIES - The libraries needed to use KDEWIN32 - -# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> -# Copyright (c) 2007-2009, Ralf Habacker, <ralf.habacker@freenet.de> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -if (WIN32) - message(STATUS "The kdewin32 cmake module is deprecated, use kdewin instead") - find_package(KDEWIN) - - if (KDEWIN_FOUND) - set(KDEWIN32_FOUND ${KDEWIN_FOUND}) - set(KDEWIN32_INCLUDES ${KDEWIN_INCLUDES}) - set(KDEWIN32_LIBRARIES ${KDEWIN_LIBRARIES}) - endif (KDEWIN_FOUND) -endif (WIN32) diff --git a/attic/modules/FindKDEWIN_Packager.cmake b/attic/modules/FindKDEWIN_Packager.cmake deleted file mode 100644 index 6a8af57c..00000000 --- a/attic/modules/FindKDEWIN_Packager.cmake +++ /dev/null @@ -1,171 +0,0 @@ -# -# KDEWIN packager http://www.winkde.org/pub/kde/ports/win32/installer -# -# The kdewin packager is searched in the following pathes and order -# -# path specified by the environment dir KDEWIN_PACKAGER_DIR -# <ProgramFiles>/kdewin-packager -# <ProgramFiles>/kdewin-installer -# -# The macro KDEWIN_PACKAGER provides package building support and should be -# added to the top level CMakeLists.txt as shown below -# -# if (KDEWIN_PACKAGER_FOUND) -# KDEWIN_PACKAGER( -# "projectname" -# "version" -# "description" -# "additional options" -# ) -# endif (KDEWIN_PACKAGER_FOUND) - -# The macro KDEWIN_PACKAGER adds three additional makefile targets, which could be -# called using the regular make tool -# -# kdewin_package -# - build kdewin package with currently used compiler and build type -# kdewin_package_debug_and_release -# - build kdewin debug and release package with currently used compiler -# kdewin_package_debug_and_release_mingw_and_msvc -# - build kdewin debug and release package with mingw and msvc compiler -# -# -# -# Copyright (c) 2006-2007, Ralf Habacker -# -# Redistribution and use is allowed according to the terms of the BSD license. -# - -if (WIN32) - if(NOT KDEWIN_PACKAGER_DIR) - # check for environment variable - file(TO_CMAKE_PATH "$ENV{KDEWIN_PACKAGER_DIR}" KDEWIN_PACKAGER_DIR) - if(NOT KDEWIN_PACKAGER_DIR) - # search in the default program install folder - file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _progFiles) - find_file(KDEWIN_PACKAGER_DIR_tmp kdewin-packager kdewin-installer - PATHS - "${_progFiles}" - ) - set(KDEWIN_PACKAGER_DIR ${KDEWIN_PACKAGER_DIR_tmp}) - endif() - endif() - - if (KDEWIN_PACKAGER_DIR) - - find_program(KDEWIN_PACKAGER_EXECUTABLE kdewin-packager - PATHS - ${KDEWIN_PACKAGER_DIR}/bin - ${CMAKE_INSTALL_PREFIX}/bin - ) - - set(KDEWIN_PACKAGER_FOUND TRUE) - else (KDEWIN_PACKAGER_DIR) - set(KDEWIN_PACKAGER_FOUND) - endif (KDEWIN_PACKAGER_DIR) - - if (KDEWIN_PACKAGER_FOUND) - if (NOT KDEWIN_Packager_FIND_QUIETLY) - message(STATUS "Found KDEWIN Packager: ${KDEWIN_PACKAGER_DIR}") - endif (NOT KDEWIN_Packager_FIND_QUIETLY) - else (KDEWIN_PACKAGER_FOUND) - if (KDEWIN_Packager_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find KDEWIN PAckager") - endif (KDEWIN_Packager_FIND_REQUIRED) - endif (KDEWIN_PACKAGER_FOUND) - -endif (WIN32) - -MACRO (KDEWIN_PACKAGER _name _version _notes _options) - if (KDEWIN_PACKAGER_FOUND) - if (MSVC) - set (type "msvc") - else (MSVC) - set (type "mingw") - endif (MSVC) - - add_custom_target(kdewin_package - COMMAND ${CMAKE_COMMAND} - -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/temp -P ${CMAKE_BINARY_DIR}/cmake_install.cmake - COMMAND ${KDEWIN_PACKAGER_EXECUTABLE} - -name ${_name} - -root ${CMAKE_BINARY_DIR}/temp - -srcroot ${CMAKE_SOURCE_DIR} - -version ${_version} - -notes "${_notes}" - -type ${type} - ${_options} - # FIXME: cleanup does not work - #COMMAND rmdir /Q /S ${CMAKE_BINARY_DIR}\temp - ) - # prelimary target - add_custom_target(kdewin_package_without_compiler - COMMAND ${CMAKE_COMMAND} - -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/temp -P ${CMAKE_BINARY_DIR}/cmake_install.cmake - COMMAND ${KDEWIN_PACKAGER_EXECUTABLE} - -name ${_name} - -root ${CMAKE_BINARY_DIR}/temp - -srcroot ${CMAKE_SOURCE_DIR} - -version ${_version} - -notes "${_notes}" - ${_options} - # FIXME: cleanup does not work - #COMMAND rmdir /Q /S ${CMAKE_BINARY_DIR}\temp - ) - add_custom_target(kdewin_package_debug_and_release - COMMAND ${CMAKE_COMMAND} - -H$(CMAKE_SOURCE_DIR) - -B$(CMAKE_BINARY_DIR) - -DCMAKE_BUILD_TYPE=Debug - COMMAND ${CMAKE_MAKE_PROGRAM} - clean - COMMAND ${CMAKE_MAKE_PROGRAM} - install/local - COMMAND ${CMAKE_COMMAND} - -H$(CMAKE_SOURCE_DIR) - -B$(CMAKE_BINARY_DIR) - -DCMAKE_BUILD_TYPE=Release - COMMAND ${CMAKE_MAKE_PROGRAM} - clean - COMMAND ${CMAKE_MAKE_PROGRAM} - install/local - COMMAND ${KDEWIN_PACKAGER_EXECUTABLE} - -name ${_name} - -root ${CMAKE_BINARY_DIR}/temp - -srcroot ${CMAKE_SOURCE_DIR} - -version ${_version} - -notes "${_notes}" - -type ${type} - ${_options} - # FIXME: cleanup does not work - #COMMAND rmdir /Q /S ${CMAKE_BINARY_DIR}\temp - ) -set (CONTENT " -if \"%1\" == \"package_only\" goto package_only - -del CMakeCache.txt -rmdir /Q /S ${CMAKE_BINARY_DIR}/temp -${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR} -G \"MinGW Makefiles\" -DCMAKE_BUILD_TYPE=Debug -mingw32-make -${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/temp -P cmake_install.cmake -${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR} -G \"MinGW Makefiles\" -DCMAKE_BUILD_TYPE=Release -mingw32-make -${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/temp -P cmake_install.cmake -del CMakeCache.txt -${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR} -G \"NMake Makefiles\" -DCMAKE_BUILD_TYPE=Debug -nmake -${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/temp -P cmake_install.cmake -${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR} -G \"NMake Makefiles\" -DCMAKE_BUILD_TYPE=Release -nmake -${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/temp -P cmake_install.cmake -:package_only -${KDEWIN_PACKAGER_EXECUTABLE} -name ${_name} -root ${CMAKE_BINARY_DIR}/temp -srcroot ${CMAKE_SOURCE_DIR} -version ${_version} -notes \"${_notes}\" ${_options} -" -) - write_file(${CMAKE_BINARY_DIR}/kdewin_package_debug_and_release_mingw_and_msvc.bat "${CONTENT}") - add_custom_target(kdewin_package_debug_and_release_mingw_and_msvc - COMMAND ${CMAKE_BINARY_DIR}/kdewin_package_debug_and_release_mingw_and_msvc.bat - ) - endif (KDEWIN_PACKAGER_FOUND) -ENDMACRO (KDEWIN_PACKAGER) - diff --git a/attic/modules/FindKDEWin.cmake b/attic/modules/FindKDEWin.cmake deleted file mode 100644 index 8f690737..00000000 --- a/attic/modules/FindKDEWin.cmake +++ /dev/null @@ -1,89 +0,0 @@ -# - Try to find the KDEWIN library -# -# Once done this will define -# -# KDEWIN_FOUND - system has KDEWIN -# KDEWIN_INCLUDES - the KDEWIN include directories -# KDEWIN_LIBRARIES - The libraries needed to use KDEWIN - -# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> -# Copyright (c) 2007-2009, Ralf Habacker, <ralf.habacker@freenet.de> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -if (WIN32) - - if(WINCE) - FIND_PACKAGE(WCECOMPAT REQUIRED) - endif() - - if (NOT KDEWIN_LIBRARY) - - - find_path(KDEWIN_INCLUDE_DIR kdewin_export.h - ${KDE4_INCLUDE_DIR} - ${CMAKE_INCLUDE_PATH} - ${CMAKE_INSTALL_PREFIX}/include - ) - - # search for kdewin in the default install directory for applications (default of (n)make install) - FILE(TO_CMAKE_PATH "${CMAKE_LIBRARY_PATH}" _cmakeLibraryPathCmakeStyle) - - string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_TOLOWER) - if (CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) - set (LIBRARY_NAME kdewind) - else() - set (LIBRARY_NAME kdewin) - endif (CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) - - find_library(KDEWIN_LIBRARY - NAMES ${LIBRARY_NAME} - PATHS - ${KDE4_LIB_DIR} - ${_cmakeLibraryPathCmakeStyle} - ${CMAKE_INSTALL_PREFIX}/lib - NO_SYSTEM_ENVIRONMENT_PATH - ) - endif (NOT KDEWIN_LIBRARY) - - if (KDEWIN_LIBRARY AND KDEWIN_INCLUDE_DIR) - set(KDEWIN_FOUND TRUE) - # add needed system libs - if(NOT WINCE) - set(KDEWIN_LIBRARIES ${KDEWIN_LIBRARY} user32 shell32 ws2_32 netapi32 userenv) - else() - set(KDEWIN_LIBRARIES ${KDEWIN_LIBRARY} ws2 ${WCECOMPAT_LIBRARIES}) - endif() - - if (MINGW) - #mingw compiler - set(KDEWIN_INCLUDES ${KDEWIN_INCLUDE_DIR} ${KDEWIN_INCLUDE_DIR}/mingw ${QT_INCLUDES}) - else (MINGW) - # msvc compiler - # add the MS SDK include directory if available - file(TO_CMAKE_PATH "$ENV{MSSDK}" MSSDK_DIR) - if (WINCE) - set(KDEWIN_INCLUDES ${KDEWIN_INCLUDE_DIR} ${KDEWIN_INCLUDE_DIR}/msvc ${WCECOMPAT_INCLUDE_DIR} ${QT_INCLUDES} ${MSSDK_DIR}) - else() - set(KDEWIN_INCLUDES ${KDEWIN_INCLUDE_DIR} ${KDEWIN_INCLUDE_DIR}/msvc ${QT_INCLUDES} ${MSSDK_DIR}) - endif() - endif (MINGW) - - endif (KDEWIN_LIBRARY AND KDEWIN_INCLUDE_DIR) - # required for configure - set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${KDEWIN_INCLUDES}) - set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${KDEWIN_LIBRARIES}) - - if (KDEWIN_FOUND) - if (NOT KDEWin_FIND_QUIETLY) - message(STATUS "Found KDEWin library: ${KDEWIN_LIBRARY}") - endif (NOT KDEWin_FIND_QUIETLY) - - else (KDEWIN_FOUND) - if (KDEWin_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find KDEWin library\nPlease install it first") - endif (KDEWin_FIND_REQUIRED) - endif (KDEWIN_FOUND) -endif (WIN32) diff --git a/attic/modules/FindLibArt.cmake b/attic/modules/FindLibArt.cmake deleted file mode 100644 index b14cd9db..00000000 --- a/attic/modules/FindLibArt.cmake +++ /dev/null @@ -1,63 +0,0 @@ -# - Try to find the LibArt 2D graphics library -# Once done this will define -# -# LIBART_FOUND - system has the LibArt -# LIBART_INCLUDE_DIR - the LibArt include directory -# LIBART_LIBRARIES - The libraries needed to use LibArt - -# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -if (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) - - # in cache already - SET(LIBART_FOUND TRUE) - -else (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) - - IF (NOT WIN32) - find_package(PkgConfig) - - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - pkg_check_modules(PC_LIBART QUIET libart-2.0) - - ######### ?? where is this used ?? ############### - set(LIBART_DEFINITIONS ${PC_LIBART_CFLAGS_OTHER}) - ENDIF (NOT WIN32) - - FIND_PATH(LIBART_INCLUDE_DIR NAMES libart_lgpl/libart.h - PATHS - ${PC_LIBART_INCLUDEDIR} - ${PC_LIBART_INCLUDE_DIRS} - PATH_SUFFIXES libart-2.0 - ) - - FIND_LIBRARY(LIBART_LIBRARIES NAMES art_lgpl_2 - PATHS - ${PC_LIBART_LIBDIR} - ${PC_LIBART_LIBRARY_DIRS} - ) - - - if (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) - set(LIBART_FOUND TRUE) - endif (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) - - - if (LIBART_FOUND) - if (NOT LibArt_FIND_QUIETLY) - message(STATUS "Found libart: ${LIBART_LIBRARIES}") - endif (NOT LibArt_FIND_QUIETLY) - else (LIBART_FOUND) - if (LibArt_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find libart") - endif (LibArt_FIND_REQUIRED) - endif (LIBART_FOUND) - - MARK_AS_ADVANCED(LIBART_INCLUDE_DIR LIBART_LIBRARIES) - -endif (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) diff --git a/attic/modules/FindLibLZMA.cmake b/attic/modules/FindLibLZMA.cmake deleted file mode 100644 index b0553d86..00000000 --- a/attic/modules/FindLibLZMA.cmake +++ /dev/null @@ -1,45 +0,0 @@ -# - Find LibLZMA -# Find LibLZMA headers and library -# -# LIBLZMA_FOUND - True if liblzma is found. -# LIBLZMA_INCLUDE_DIRS - Directory where liblzma headers are located. -# LIBLZMA_LIBRARIES - Lzma libraries to link against. -# LIBLZMA_HAS_AUTO_DECODER - True if lzma_auto_decoder() is found (required). -# LIBLZMA_HAS_EASY_ENCODER - True if lzma_easy_encoder() is found (required). -# LIBLZMA_HAS_LZMA_PRESET - True if lzma_lzma_preset() is found (required). - - -# Copyright (c) 2008, Per Øyvind Karlsen, <peroyvind@mandriva.org> -# Copyright (c) 2009, Alexander Neundorf, <neundorf@kde.org> -# Copyright (c) 2009, Helio Chissini de Castro, <helio@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -FIND_PATH(LIBLZMA_INCLUDE_DIR lzma.h ) -FIND_LIBRARY(LIBLZMA_LIBRARY lzma) - -SET(LIBLZMA_LIBRARIES ${LIBLZMA_LIBRARY}) -SET(LIBLZMA_INCLUDE_DIRS ${LIBLZMA_INCLUDE_DIR}) - - -# We're using new code known now as XZ, even library still been called LZMA -# it can be found in https://tukaani.org/xz/ -# Avoid using old codebase -IF (LIBLZMA_LIBRARIES) - INCLUDE(CheckLibraryExists) - CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARIES} lzma_auto_decoder "" LIBLZMA_HAS_AUTO_DECODER) - CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARIES} lzma_easy_encoder "" LIBLZMA_HAS_EASY_ENCODER) - CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARIES} lzma_lzma_preset "" LIBLZMA_HAS_LZMA_PRESET) -ENDIF (LIBLZMA_LIBRARIES) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBLZMA DEFAULT_MSG LIBLZMA_INCLUDE_DIR - LIBLZMA_LIBRARY - LIBLZMA_HAS_AUTO_DECODER - LIBLZMA_HAS_EASY_ENCODER - LIBLZMA_HAS_LZMA_PRESET - ) - -MARK_AS_ADVANCED( LIBLZMA_INCLUDE_DIR LIBLZMA_LIBRARY ) diff --git a/attic/modules/FindLibPython.py b/attic/modules/FindLibPython.py deleted file mode 100644 index ec21b338..00000000 --- a/attic/modules/FindLibPython.py +++ /dev/null @@ -1,13 +0,0 @@ - -# Copyright (c) 2007, Simon Edwards <simon@simonzone.com> -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -import sys -import distutils.sysconfig - -print("exec_prefix:%s" % sys.exec_prefix) -print("short_version:%s" % sys.version[:3]) -print("long_version:%s" % sys.version.split()[0]) -print("py_inc_dir:%s" % distutils.sysconfig.get_python_inc()) -print("site_packages_dir:%s" % distutils.sysconfig.get_python_lib(plat_specific=1)) diff --git a/attic/modules/FindLibUSB1.cmake b/attic/modules/FindLibUSB1.cmake deleted file mode 100644 index eba47115..00000000 --- a/attic/modules/FindLibUSB1.cmake +++ /dev/null @@ -1,37 +0,0 @@ -# - Try to find the libusb-1.0 library -# Once done this defines -# -# LIBUSB1_FOUND - system has libusb-1.0 -# LibUSB1_INCLUDE_DIRS - the libusb-1.0 include directory -# LibUSB1_LIBRARIES - Link these to use libusb-1.0 - -# Copyright (c) 2011, 2013 Yury Kudryashov, <urkud@ya.ru> -# Based on FindUSB.cmake which is: -# Copyright (c) 2006, 2008 Laurent Montel, <montel@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -# use pkg-config to get the directories and then use these values -# in the FIND_PATH() and FIND_LIBRARY() calls -find_package(PkgConfig) -pkg_check_modules(PC_LibUSB1 QUIET libusb-1.0) - -find_path(LibUSB1_TOP_INCLUDE_DIR libusb-1.0/libusb.h - HINTS ${PC_LibUSB1_INCLUDEDIR}) - -set(LibUSB1_INCLUDE_DIRS ${LibUSB1_TOP_INCLUDE_DIR}/libusb-1.0) - -find_library(LibUSB1_LIBRARY NAMES usb-1.0 - HINTS ${PC_LibUSB1_LIBDIR} ${PC_LibUSB1_LIBRARY_DIRS}) - -set(LibUSB1_LIBRARIES ${LibUSB1_LIBRARY}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(LibUSB1 DEFAULT_MSG LibUSB1_LIBRARIES LibUSB1_INCLUDE_DIRS) - -include(FeatureSummary) -set_package_properties(LibUSB1 PROPERTIES URL http://www.libusb.org/ - DESCRIPTION "A library that provides uniform API to access USB devices on many OSes") - -mark_as_advanced(LibUSB1_TOP_INCLUDE_DIR LibUSB1_LIBRARY) diff --git a/attic/modules/FindLibintl.cmake b/attic/modules/FindLibintl.cmake deleted file mode 100644 index c7cbc969..00000000 --- a/attic/modules/FindLibintl.cmake +++ /dev/null @@ -1,46 +0,0 @@ -# Try to find Libintl functionality -# Once done this will define -# -# LIBINTL_FOUND - system has Libintl -# LIBINTL_INCLUDE_DIR - Libintl include directory -# LIBINTL_LIBRARIES - Libraries needed to use Libintl -# -# TODO: This will enable translations only if Gettext functionality is -# present in libc. Must have more robust system for release, where Gettext -# functionality can also reside in standalone Gettext library, or the one -# embedded within kdelibs (cf. gettext.m4 from Gettext source). - -# Copyright (c) 2006, Chusslove Illich, <caslav.ilic@gmx.net> -# Copyright (c) 2007, Alexander Neundorf, <neundorf@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -if(LIBINTL_INCLUDE_DIR AND LIBINTL_LIB_FOUND) - set(Libintl_FIND_QUIETLY TRUE) -endif() - -find_path(LIBINTL_INCLUDE_DIR libintl.h) - -set(LIBINTL_LIB_FOUND FALSE) - -if(LIBINTL_INCLUDE_DIR) - include(CheckFunctionExists) - check_function_exists(dgettext LIBINTL_LIBC_HAS_DGETTEXT) - - if (LIBINTL_LIBC_HAS_DGETTEXT) - set(LIBINTL_LIBRARIES) - set(LIBINTL_LIB_FOUND TRUE) - else (LIBINTL_LIBC_HAS_DGETTEXT) - find_library(LIBINTL_LIBRARIES NAMES intl libintl ) - if(LIBINTL_LIBRARIES) - set(LIBINTL_LIB_FOUND TRUE) - endif() - endif (LIBINTL_LIBC_HAS_DGETTEXT) - -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Libintl DEFAULT_MSG LIBINTL_INCLUDE_DIR LIBINTL_LIB_FOUND) - -mark_as_advanced(LIBINTL_INCLUDE_DIR LIBINTL_LIBRARIES LIBINTL_LIBC_HAS_DGETTEXT LIBINTL_LIB_FOUND) diff --git a/attic/modules/FindLibraryWithDebug.cmake b/attic/modules/FindLibraryWithDebug.cmake deleted file mode 100644 index 58cd7308..00000000 --- a/attic/modules/FindLibraryWithDebug.cmake +++ /dev/null @@ -1,113 +0,0 @@ -# -# FIND_LIBRARY_WITH_DEBUG -# -> enhanced FIND_LIBRARY to allow the search for an -# optional debug library with a WIN32_DEBUG_POSTFIX similar -# to CMAKE_DEBUG_POSTFIX when creating a shared lib -# it has to be the second and third argument - -# Copyright (c) 2007, Christian Ehrlicher, <ch.ehrlicher@gmx.de> -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -MACRO(FIND_LIBRARY_WITH_DEBUG var_name win32_dbg_postfix_name dgb_postfix libname) - - IF(NOT "${win32_dbg_postfix_name}" STREQUAL "WIN32_DEBUG_POSTFIX") - - # no WIN32_DEBUG_POSTFIX -> simply pass all arguments to FIND_LIBRARY - FIND_LIBRARY(${var_name} - ${win32_dbg_postfix_name} - ${dgb_postfix} - ${libname} - ${ARGN} - ) - - ELSE(NOT "${win32_dbg_postfix_name}" STREQUAL "WIN32_DEBUG_POSTFIX") - - IF(NOT WIN32) - # on non-win32 we don't need to take care about WIN32_DEBUG_POSTFIX - - FIND_LIBRARY(${var_name} ${libname} ${ARGN}) - - ELSE(NOT WIN32) - - # 1. get all possible libnames - SET(args ${ARGN}) - SET(newargs "") - SET(libnames_release "") - SET(libnames_debug "") - - LIST(LENGTH args listCount) - - IF("${libname}" STREQUAL "NAMES") - SET(append_rest 0) - LIST(APPEND args " ") - - FOREACH(i RANGE ${listCount}) - LIST(GET args ${i} val) - - IF(append_rest) - LIST(APPEND newargs ${val}) - ELSE(append_rest) - IF("${val}" STREQUAL "PATHS") - LIST(APPEND newargs ${val}) - SET(append_rest 1) - ELSE("${val}" STREQUAL "PATHS") - LIST(APPEND libnames_release "${val}") - LIST(APPEND libnames_debug "${val}${dgb_postfix}") - ENDIF("${val}" STREQUAL "PATHS") - ENDIF(append_rest) - - ENDFOREACH(i) - - ELSE("${libname}" STREQUAL "NAMES") - - # just one name - LIST(APPEND libnames_release "${libname}") - LIST(APPEND libnames_debug "${libname}${dgb_postfix}") - - SET(newargs ${args}) - - ENDIF("${libname}" STREQUAL "NAMES") - - # search the release lib - FIND_LIBRARY(${var_name}_RELEASE - NAMES ${libnames_release} - ${newargs} - ) - - # search the debug lib - FIND_LIBRARY(${var_name}_DEBUG - NAMES ${libnames_debug} - ${newargs} - ) - - IF(${var_name}_RELEASE AND ${var_name}_DEBUG) - - # both libs found - SET(${var_name} optimized ${${var_name}_RELEASE} - debug ${${var_name}_DEBUG}) - - ELSE(${var_name}_RELEASE AND ${var_name}_DEBUG) - - IF(${var_name}_RELEASE) - - # only release found - SET(${var_name} ${${var_name}_RELEASE}) - - ELSE(${var_name}_RELEASE) - - # only debug (or nothing) found - SET(${var_name} ${${var_name}_DEBUG}) - - ENDIF(${var_name}_RELEASE) - - ENDIF(${var_name}_RELEASE AND ${var_name}_DEBUG) - - MARK_AS_ADVANCED(${var_name}_RELEASE) - MARK_AS_ADVANCED(${var_name}_DEBUG) - - ENDIF(NOT WIN32) - - ENDIF(NOT "${win32_dbg_postfix_name}" STREQUAL "WIN32_DEBUG_POSTFIX") - -ENDMACRO(FIND_LIBRARY_WITH_DEBUG) diff --git a/attic/modules/FindLinuxWirelesstools.cmake b/attic/modules/FindLinuxWirelesstools.cmake deleted file mode 100644 index 794bba77..00000000 --- a/attic/modules/FindLinuxWirelesstools.cmake +++ /dev/null @@ -1,29 +0,0 @@ -# - Try to find wireless extensions support libraries -# Once done this will define -# -# IW_FOUND - system has IW -# IW_INCLUDE_DIR - the IW include directory -# IW_LIBRARIES - Link to these to use IW - -# Copyright (c) 2006, Thorsten Roeder, <thorsten.roeder@weihenstephan.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -IF (IW_INCLUDE_DIR) - # Already in cache, be silent - SET(LinuxWirelesstools_FIND_QUIETLY TRUE) -ENDIF (IW_INCLUDE_DIR) - -FIND_PATH(IW_INCLUDE_DIR iwlib.h) - -FIND_LIBRARY(IW_LIBRARIES NAMES iw) - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(IW "Could not find Linux Wirelesstools (libIW)" IW_INCLUDE_DIR IW_LIBRARIES ) - - -# show the IW_INCLUDE_DIR and IW_LIBRARIES variables only in the advanced view -MARK_AS_ADVANCED(IW_INCLUDE_DIR IW_LIBRARIES ) - diff --git a/attic/modules/FindMySQL.cmake b/attic/modules/FindMySQL.cmake deleted file mode 100644 index c0ef8792..00000000 --- a/attic/modules/FindMySQL.cmake +++ /dev/null @@ -1,140 +0,0 @@ -# - Try to find MySQL / MySQL Embedded library -# Find the MySQL includes and client library -# This module defines -# MYSQL_INCLUDE_DIR, where to find mysql.h -# MYSQL_LIBRARIES, the libraries needed to use MySQL. -# MYSQL_LIB_DIR, path to the MYSQL_LIBRARIES -# MYSQL_EMBEDDED_LIBRARIES, the libraries needed to use MySQL Embedded. -# MYSQL_EMBEDDED_LIB_DIR, path to the MYSQL_EMBEDDED_LIBRARIES -# MYSQL_FOUND, If false, do not try to use MySQL. -# MYSQL_EMBEDDED_FOUND, If false, do not try to use MySQL Embedded. - -# Copyright (c) 2006-2008, Jarosław Staniek <staniek@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -include(CheckCXXSourceCompiles) -include(MacroPushRequiredVars) - -if(WIN32) - find_path(MYSQL_INCLUDE_DIR mysql.h - PATHS - $ENV{MYSQL_INCLUDE_DIR} - $ENV{MYSQL_DIR}/include - $ENV{ProgramFiles}/MySQL/*/include - $ENV{SystemDrive}/MySQL/*/include - ) -else() - find_path(MYSQL_INCLUDE_DIR mysql.h - PATHS - $ENV{MYSQL_INCLUDE_DIR} - $ENV{MYSQL_DIR}/include - /usr/local/mysql/include - /opt/mysql/mysql/include - PATH_SUFFIXES - mysql - ) -endif() - -if(WIN32) - string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER) - - # path suffix for debug/release mode - # binary_dist: mysql binary distribution - # build_dist: custom build - if(CMAKE_BUILD_TYPE_TOLOWER MATCHES "debug") - set(binary_dist debug) - set(build_dist Debug) - else() - ADD_DEFINITIONS(-DDBUG_OFF) - set(binary_dist opt) - set(build_dist Release) - endif() - -# find_library(MYSQL_LIBRARIES NAMES mysqlclient - find_library(MYSQL_LIBRARIES NAMES libmysql - PATHS - $ENV{MYSQL_DIR}/lib/${binary_dist} - $ENV{MYSQL_DIR}/libmysql/${build_dist} - $ENV{MYSQL_DIR}/client/${build_dist} - $ENV{ProgramFiles}/MySQL/*/lib/${binary_dist} - $ENV{SystemDrive}/MySQL/*/lib/${binary_dist} - ) -else() -# find_library(MYSQL_LIBRARIES NAMES mysqlclient - find_library(MYSQL_LIBRARIES NAMES libmysql - PATHS - $ENV{MYSQL_DIR}/libmysql_r/.libs - $ENV{MYSQL_DIR}/lib - $ENV{MYSQL_DIR}/lib/mysql - /usr/local/mysql/lib - /opt/mysql/mysql/lib - PATH_SUFFIXES - mysql - ) -endif() - -if(WIN32) - set(MYSQL_LIB_PATHS - $ENV{MYSQL_DIR}/lib/opt - $ENV{MYSQL_DIR}/client/release - $ENV{ProgramFiles}/MySQL/*/lib/opt - $ENV{SystemDrive}/MySQL/*/lib/opt - ) - find_library(MYSQL_LIBRARIES NAMES mysqlclient - PATHS - ${MYSQL_LIB_PATHS} - ) -else() - set(MYSQL_LIB_PATHS - $ENV{MYSQL_DIR}/libmysql_r/.libs - $ENV{MYSQL_DIR}/lib - $ENV{MYSQL_DIR}/lib/mysql - /usr/local/mysql/lib - /opt/mysql/mysql/lib - PATH_SUFFIXES - mysql - ) - find_library(MYSQL_LIBRARIES NAMES mysqlclient - PATHS - ${MYSQL_LIB_PATHS} - ) -endif() - -find_library(MYSQL_EMBEDDED_LIBRARIES NAMES mysqld - PATHS - ${MYSQL_LIB_PATHS} -) - -if(MYSQL_LIBRARIES) - get_filename_component(MYSQL_LIB_DIR ${MYSQL_LIBRARIES} PATH) -endif() - -if(MYSQL_EMBEDDED_LIBRARIES) - get_filename_component(MYSQL_EMBEDDED_LIB_DIR ${MYSQL_EMBEDDED_LIBRARIES} PATH) -endif() - -macro_push_required_vars() -set( CMAKE_REQUIRED_INCLUDES ${MYSQL_INCLUDE_DIR} ) -set( CMAKE_REQUIRED_LIBRARIES ${MYSQL_EMBEDDED_LIBRARIES} ) -check_cxx_source_compiles( "#include <mysql.h>\nint main() { int i = MYSQL_OPT_USE_EMBEDDED_CONNECTION; }" HAVE_MYSQL_OPT_EMBEDDED_CONNECTION ) -macro_pop_required_vars() - -if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) - set(MYSQL_FOUND TRUE) - message(STATUS "Found MySQL: ${MYSQL_INCLUDE_DIR}, ${MYSQL_LIBRARIES}") -else() - set(MYSQL_FOUND FALSE) - message(STATUS "MySQL not found.") -endif() - -if(MYSQL_INCLUDE_DIR AND MYSQL_EMBEDDED_LIBRARIES AND HAVE_MYSQL_OPT_EMBEDDED_CONNECTION) - set(MYSQL_EMBEDDED_FOUND TRUE) - message(STATUS "Found MySQL Embedded: ${MYSQL_INCLUDE_DIR}, ${MYSQL_EMBEDDED_LIBRARIES}") -else() - set(MYSQL_EMBEDDED_FOUND FALSE) - message(STATUS "MySQL Embedded not found.") -endif() - -mark_as_advanced(MYSQL_INCLUDE_DIR MYSQL_LIBRARIES MYSQL_EMBEDDED_LIBRARIES) diff --git a/attic/modules/FindNetworkManager.cmake b/attic/modules/FindNetworkManager.cmake deleted file mode 100644 index ced2017c..00000000 --- a/attic/modules/FindNetworkManager.cmake +++ /dev/null @@ -1,42 +0,0 @@ -# - Try to find NetworkManager -# Once done this will define -# -# NETWORKMANAGER_FOUND - system has NetworkManager -# NETWORKMANAGER_INCLUDE_DIRS - the NetworkManager include directories -# NETWORKMANAGER_LIBRARIES - the libraries needed to use NetworkManager -# NETWORKMANAGER_CFLAGS - Compiler switches required for using NetworkManager -# NETWORKMANAGER_VERSION - version number of NetworkManager - -# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> -# Copyright (c) 2007, Will Stephenson, <wstephenson@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -IF (NETWORKMANAGER_INCLUDE_DIRS AND NM-UTIL_INCLUDE_DIRS) - # in cache already - SET(NetworkManager_FIND_QUIETLY TRUE) -ENDIF (NETWORKMANAGER_INCLUDE_DIRS AND NM-UTIL_INCLUDE_DIRS) - -IF (NOT WIN32) - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - find_package(PkgConfig) - PKG_SEARCH_MODULE( NETWORKMANAGER NetworkManager ) - PKG_SEARCH_MODULE( NM-UTIL libnm-util ) -ENDIF (NOT WIN32) - -IF (NETWORKMANAGER_FOUND AND NM-UTIL_FOUND) - IF (NOT NetworkManager_FIND_QUIETLY) - MESSAGE(STATUS "Found NetworkManager ${NETWORKMANAGER_VERSION}: ${NETWORKMANAGER_LIBRARY_DIRS}") - MESSAGE(STATUS "Found libnm-util: ${NM-UTIL_LIBRARY_DIRS}") - ENDIF (NOT NetworkManager_FIND_QUIETLY) -ELSE (NETWORKMANAGER_FOUND AND NM-UTIL_FOUND) - IF (NetworkManager_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could NOT find NetworkManager or libnm-util, check FindPkgConfig output above!") - ENDIF (NetworkManager_FIND_REQUIRED) -ENDIF (NETWORKMANAGER_FOUND AND NM-UTIL_FOUND) - -MARK_AS_ADVANCED(NETWORKMANAGER_INCLUDE_DIRS NM-UTIL_INCLUDE_DIRS) - diff --git a/attic/modules/FindOggVorbis.cmake b/attic/modules/FindOggVorbis.cmake deleted file mode 100644 index 28575d39..00000000 --- a/attic/modules/FindOggVorbis.cmake +++ /dev/null @@ -1,76 +0,0 @@ -# - Try to find the OggVorbis libraries -# Once done this will define -# -# OGGVORBIS_FOUND - system has OggVorbis -# OGGVORBIS_VERSION - set either to 1 or 2 -# OGGVORBIS_INCLUDE_DIR - the OggVorbis include directory -# OGGVORBIS_LIBRARIES - The libraries needed to use OggVorbis -# OGG_LIBRARY - The Ogg library -# VORBIS_LIBRARY - The Vorbis library -# VORBISFILE_LIBRARY - The VorbisFile library -# VORBISENC_LIBRARY - The VorbisEnc library - -# Copyright (c) 2006, Richard Laerkaeng, <richard@goteborg.utfors.se> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -include (CheckLibraryExists) - -find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h) -find_path(OGG_INCLUDE_DIR ogg/ogg.h) - -find_library(OGG_LIBRARY NAMES ogg) -find_library(VORBIS_LIBRARY NAMES vorbis) -find_library(VORBISFILE_LIBRARY NAMES vorbisfile) -find_library(VORBISENC_LIBRARY NAMES vorbisenc) - -mark_as_advanced(VORBIS_INCLUDE_DIR OGG_INCLUDE_DIR - OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY VORBISENC_LIBRARY) - - -if (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBISENC_LIBRARY) - - set(OGGVORBIS_LIBRARIES ${OGG_LIBRARY} ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY} ${VORBISENC_LIBRARY}) - - set(_CMAKE_REQUIRED_LIBRARIES_TMP ${CMAKE_REQUIRED_LIBRARIES}) - set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${OGGVORBIS_LIBRARIES}) - check_library_exists(vorbis vorbis_bitrate_addblock "" HAVE_LIBVORBISENC2) - set(CMAKE_REQUIRED_LIBRARIES ${_CMAKE_REQUIRED_LIBRARIES_TMP}) - - if (HAVE_LIBVORBISENC2) - set (OGGVORBIS_VERSION 2) - else (HAVE_LIBVORBISENC2) - set (OGGVORBIS_VERSION 1) - endif (HAVE_LIBVORBISENC2) - -endif (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBISENC_LIBRARY) - - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(OggVorbis REQUIRED_VARS VORBIS_LIBRARY OGG_LIBRARY VORBISFILE_LIBRARY VORBISENC_LIBRARY - VORBIS_INCLUDE_DIR OGG_INCLUDE_DIR) - -#check_include_files(vorbis/vorbisfile.h HAVE_VORBISFILE_H) -#check_library_exists(ogg ogg_page_version "" HAVE_LIBOGG) -#check_library_exists(vorbis vorbis_info_init "" HAVE_LIBVORBIS) -#check_library_exists(vorbisfile ov_open "" HAVE_LIBVORBISFILE) -#check_library_exists(vorbisenc vorbis_info_clear "" HAVE_LIBVORBISENC) -#check_library_exists(vorbis vorbis_bitrate_addblock "" HAVE_LIBVORBISENC2) - -#if (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE AND HAVE_LIBVORBISENC) -# message(STATUS "Ogg/Vorbis found") -# set (VORBIS_LIBS "-lvorbis -logg") -# set (VORBISFILE_LIBS "-lvorbisfile") -# set (VORBISENC_LIBS "-lvorbisenc") -# set (OGGVORBIS_FOUND TRUE) -# if (HAVE_LIBVORBISENC2) -# set (HAVE_VORBIS 2) -# else (HAVE_LIBVORBISENC2) -# set (HAVE_VORBIS 1) -# endif (HAVE_LIBVORBISENC2) -#else (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE AND HAVE_LIBVORBISENC) -# message(STATUS "Ogg/Vorbis not found") -#endif (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE AND HAVE_LIBVORBISENC) - diff --git a/attic/modules/FindPCRE.cmake b/attic/modules/FindPCRE.cmake deleted file mode 100644 index 0fe3210a..00000000 --- a/attic/modules/FindPCRE.cmake +++ /dev/null @@ -1,44 +0,0 @@ -# - Try to find the PCRE regular expression library -# Once done this will define -# -# PCRE_FOUND - system has the PCRE library -# PCRE_INCLUDE_DIR - the PCRE include directory -# PCRE_LIBRARIES - The libraries needed to use PCRE - -# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -if (PCRE_INCLUDE_DIR AND PCRE_PCREPOSIX_LIBRARY AND PCRE_PCRE_LIBRARY) - # Already in cache, be silent - set(PCRE_FIND_QUIETLY TRUE) -endif (PCRE_INCLUDE_DIR AND PCRE_PCREPOSIX_LIBRARY AND PCRE_PCRE_LIBRARY) - - -if (NOT WIN32) - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - find_package(PkgConfig) - - pkg_check_modules(PC_PCRE QUIET libpcre) - - set(PCRE_DEFINITIONS ${PC_PCRE_CFLAGS_OTHER}) - -endif (NOT WIN32) - -find_path(PCRE_INCLUDE_DIR pcre.h - HINTS ${PC_PCRE_INCLUDEDIR} ${PC_PCRE_INCLUDE_DIRS} - PATH_SUFFIXES pcre) - -find_library(PCRE_PCRE_LIBRARY NAMES pcre pcred HINTS ${PC_PCRE_LIBDIR} ${PC_PCRE_LIBRARY_DIRS}) - -find_library(PCRE_PCREPOSIX_LIBRARY NAMES pcreposix pcreposixd HINTS ${PC_PCRE_LIBDIR} ${PC_PCRE_LIBRARY_DIRS}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(PCRE DEFAULT_MSG PCRE_INCLUDE_DIR PCRE_PCRE_LIBRARY PCRE_PCREPOSIX_LIBRARY ) - -set(PCRE_LIBRARIES ${PCRE_PCRE_LIBRARY} ${PCRE_PCREPOSIX_LIBRARY}) - -mark_as_advanced(PCRE_INCLUDE_DIR PCRE_LIBRARIES PCRE_PCREPOSIX_LIBRARY PCRE_PCRE_LIBRARY) diff --git a/attic/modules/FindPhonon.cmake b/attic/modules/FindPhonon.cmake deleted file mode 100644 index 197f47ff..00000000 --- a/attic/modules/FindPhonon.cmake +++ /dev/null @@ -1,37 +0,0 @@ -# Find libphonon -# Once done this will define -# -# PHONON_FOUND - system has Phonon Library -# PHONON_INCLUDES - the Phonon include directory -# PHONON_LIBS - link these to use Phonon -# PHONON_VERSION - the version of the Phonon Library - -# Copyright (c) 2008, Matthias Kretz <kretz@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -macro(_phonon_find_version) - set(_phonon_namespace_header_file "${PHONON_INCLUDE_DIR}/phonon/phononnamespace.h") - if (APPLE AND EXISTS "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h") - set(_phonon_namespace_header_file "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h") - endif (APPLE AND EXISTS "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h") - file(READ ${_phonon_namespace_header_file} _phonon_header LIMIT 5000 OFFSET 1000) - string(REGEX MATCH "define PHONON_VERSION_STR \"(4\\.[0-9]+\\.[0-9a-z]+)\"" _phonon_version_match "${_phonon_header}") - set(PHONON_VERSION "${CMAKE_MATCH_1}") -endmacro(_phonon_find_version) - -# the dirs listed with HINTS are searched before the default sets of dirs -find_library(PHONON_LIBRARY NAMES phonon HINTS ${KDE4_LIB_INSTALL_DIR} ${QT_LIBRARY_DIR}) -find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h HINTS ${KDE4_INCLUDE_INSTALL_DIR} ${QT_INCLUDE_DIR} ${INCLUDE_INSTALL_DIR} ${QT_LIBRARY_DIR}) - -if(PHONON_INCLUDE_DIR AND PHONON_LIBRARY) - set(PHONON_LIBS ${phonon_LIB_DEPENDS} ${PHONON_LIBRARY}) - set(PHONON_INCLUDES ${PHONON_INCLUDE_DIR}/KDE ${PHONON_INCLUDE_DIR}) - _phonon_find_version() -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Phonon DEFAULT_MSG PHONON_INCLUDE_DIR PHONON_LIBRARY) - -mark_as_advanced(PHONON_INCLUDE_DIR PHONON_LIBRARY) diff --git a/attic/modules/FindPolkitQt-1.cmake b/attic/modules/FindPolkitQt-1.cmake deleted file mode 100644 index 4e905378..00000000 --- a/attic/modules/FindPolkitQt-1.cmake +++ /dev/null @@ -1,37 +0,0 @@ -# - Try to find PolkitQt-1 -# Once done this will define -# -# POLKITQT-1_FOUND - system has Polkit-qt -# POLKITQT-1_INCLUDE_DIR - the Polkit-qt include directory -# POLKITQT-1_LIBRARIES - Link these to use all Polkit-qt libs -# POLKITQT-1_CORE_LIBRARY - Link this to use the polkit-qt-core library only -# POLKITQT-1_GUI_LIBRARY - Link this to use GUI elements in polkit-qt (polkit-qt-gui) -# POLKITQT-1_AGENT_LIBRARY - Link this to use the agent wrapper in polkit-qt -# POLKITQT-1_DEFINITIONS - Compiler switches required for using Polkit-qt -# -# The minimum required version of PolkitQt-1 can be specified using the -# standard syntax, e.g. find_package(PolkitQt-1 1.0) - -# Copyright (c) 2009, Dario Freddi, <drf@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -# Support POLKITQT-1_MIN_VERSION for compatibility: -if ( NOT PolkitQt-1_FIND_VERSION AND POLKITQT-1_MIN_VERSION ) - set ( PolkitQt-1_FIND_VERSION ${POLKITQT-1_MIN_VERSION} ) -endif ( NOT PolkitQt-1_FIND_VERSION AND POLKITQT-1_MIN_VERSION ) - -set( _PolkitQt-1_FIND_QUIETLY ${PolkitQt-1_FIND_QUIETLY} ) -find_package( PolkitQt-1 ${PolkitQt-1_FIND_VERSION} QUIET NO_MODULE PATHS ${LIB_INSTALL_DIR}/PolkitQt-1/cmake ) -set( PolkitQt-1_FIND_QUIETLY ${_PolkitQt-1_FIND_QUIETLY} ) - -include( FindPackageHandleStandardArgs ) -find_package_handle_standard_args( PolkitQt-1 DEFAULT_MSG PolkitQt-1_CONFIG ) - -if (POLKITQT-1_FOUND) - if (NOT POLKITQT-1_INSTALL_DIR STREQUAL CMAKE_INSTALL_PREFIX) - message("WARNING: Installation prefix does not match PolicyKit install prefixes. You probably will need to move files installed " - "in POLICY_FILES_INSTALL_DIR and by dbus_add_activation_system_service to the ${PC_POLKITQT-1_PREFIX} prefix") - endif (NOT POLKITQT-1_INSTALL_DIR STREQUAL CMAKE_INSTALL_PREFIX) -endif (POLKITQT-1_FOUND) diff --git a/attic/modules/FindPyKDE4.cmake b/attic/modules/FindPyKDE4.cmake deleted file mode 100644 index b062912e..00000000 --- a/attic/modules/FindPyKDE4.cmake +++ /dev/null @@ -1,184 +0,0 @@ -# FindPyKDE4 -# -# Checks that Python and PyKDE4 are installed and defines a couple macros: -# * PYKDE4_INSTALL_PYTHON_FILES -# * PYKDE4_ADD_UI_FILES -# * PYKDE4_ADD_EXECUTABLE - -# By Simon Edwards <simon@simonzone.com> -# This file is in the public domain. - -INCLUDE(FindPythonInterp) - -SET(PYKDE4_FOUND FALSE) - -get_filename_component( current_module_dir ${CMAKE_CURRENT_LIST_FILE} PATH) - -IF(PYTHONINTERP_FOUND) - EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${current_module_dir}/FindPyKDE4.py OUTPUT_VARIABLE pykde_config) - IF(NOT pykde_config) - # Failure to run - SET(PYKDE4_FOUND FALSE) - ELSE(NOT pykde_config) - - STRING(REGEX REPLACE ".*\npykde_version:([^\n]+).*$" "\\1" PYKDE4_VERSION ${pykde_config}) - STRING(REGEX REPLACE ".*\npykde_version_str:([^\n]+).*$" "\\1" PYKDE4_VERSION_STR ${pykde_config}) - STRING(REGEX REPLACE ".*\npykde_kde_sip_flags:([^\n]+).*$" "\\1" PYKDE4_SIP_FLAGS ${pykde_config}) - STRING(REGEX REPLACE ".*\npykde_sip_dir:([^\n]+).*$" "\\1" PYKDE4_SIP_DIR ${pykde_config}) - MESSAGE(STATUS "Found PyKDE4 version ${PYKDE4_VERSION_STR} ${PYKDE4_SIP_DIR}") - - SET(PYKDE4_FOUND TRUE) - - # PyKDE4 doesn't install pykdeuic4 when installing via CMake. - # Fortunately pykdeuic4 isn't needed by pate. - # - ## FIND_PROGRAM(PYKDE4_PYKDEUIC_EXE pykdeuic4 PATHS)# ${PYKDE4_BIN_DIR}) - ## IF(NOT PYKDE4_PYKDEUIC_EXE) - ## MESSAGE(FATAL_ERROR "ERROR: Could not find pykdeuic4 (part of PyKDE4)") - ## ENDIF(NOT PYKDE4_PYKDEUIC_EXE) - - ########################################################################### - # This comes mostly from KDE's FindKDE4Internal.cmake - - macro(_SET_FANCY _var _value _comment) - set(predefinedvalue "${_value}") - if ("${CMAKE_INSTALL_PREFIX}" STREQUAL "${KDE4_INSTALL_DIR}" AND DEFINED KDE4_${_var}) - set(predefinedvalue "${KDE4_${_var}}") - endif ("${CMAKE_INSTALL_PREFIX}" STREQUAL "${KDE4_INSTALL_DIR}" AND DEFINED KDE4_${_var}) - - if (NOT DEFINED ${_var}) - set(${_var} ${predefinedvalue}) - else (NOT DEFINED ${_var}) - set(${_var} "${${_var}}" CACHE PATH "${_comment}") - endif (NOT DEFINED ${_var}) - endmacro(_SET_FANCY) - - if (WIN32) - # use relative install prefix to avoid hardcoded install pathes in cmake_install.cmake files - _set_fancy(EXEC_INSTALL_PREFIX "" "Base directory for executables and libraries") - _set_fancy(SHARE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share" "Base directory for files which go to share/") - _set_fancy(BIN_INSTALL_DIR "bin" "The install dir for executables (default ${EXEC_INSTALL_PREFIX}/bin)") - _set_fancy(SBIN_INSTALL_DIR "sbin" "The install dir for system executables (default ${EXEC_INSTALL_PREFIX}/sbin)") - else (WIN32) - _set_fancy(EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" "Base directory for executables and libraries") - _set_fancy(SHARE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share" "Base directory for files which go to share/") - _set_fancy(BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" "The install dir for executables (default ${EXEC_INSTALL_PREFIX}/bin)") - _set_fancy(SBIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/sbin" "The install dir for system executables (default ${EXEC_INSTALL_PREFIX}/sbin)") - endif (WIN32) - - _set_fancy(PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/kde4" "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/kde4)") - _set_fancy(CONFIG_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/config" "The config file install dir") - _set_fancy(DATA_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/apps" "The parent directory where applications can install their data") - _set_fancy(HTML_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/doc/HTML" "The HTML install dir for documentation") - _set_fancy(ICON_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/icons" "The icon install dir (default ${SHARE_INSTALL_PREFIX}/share/icons/)") - _set_fancy(KCFG_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/config.kcfg" "The install dir for kconfig files") - _set_fancy(LOCALE_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/locale" "The install dir for translations") - _set_fancy(MIME_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/mimelnk" "The install dir for the mimetype desktop files") - _set_fancy(SERVICES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/kde4/services" "The install dir for service (desktop, protocol, ...) files") - _set_fancy(SERVICETYPES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/kde4/servicetypes" "The install dir for servicestypes desktop files") - _set_fancy(SOUND_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/sounds" "The install dir for sound files") - _set_fancy(TEMPLATES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/templates" "The install dir for templates (Create new file...)") - _set_fancy(WALLPAPER_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/wallpapers" "The install dir for wallpapers") - _set_fancy(KCONF_UPDATE_INSTALL_DIR "${DATA_INSTALL_DIR}/kconf_update" "The kconf_update install dir") - # this one shouldn't be used anymore - _set_fancy(APPLNK_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/applnk" "Is this still used ?") - _set_fancy(AUTOSTART_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/autostart" "The install dir for autostart files") - - _set_fancy(XDG_APPS_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/applications/kde4" "The XDG apps dir") - _set_fancy(XDG_DIRECTORY_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/desktop-directories" "The XDG directory") - _set_fancy(XDG_MIME_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/mime/packages" "The install dir for the xdg mimetypes") - - _set_fancy(SYSCONF_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/etc" "The kde sysconfig install dir (default /etc)") - _set_fancy(MAN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/man" "The kde man install dir (default ${CMAKE_INSTALL_PREFIX}/man/)") - _set_fancy(INFO_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/info" "The kde info install dir (default ${CMAKE_INSTALL_PREFIX}/info)") - _set_fancy(DBUS_INTERFACES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/dbus-1/interfaces" "The kde dbus interfaces install dir (default ${SHARE_INSTALL_PREFIX}/dbus-1/interfaces)") - _set_fancy(DBUS_SERVICES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/dbus-1/services" "The kde dbus services install dir (default ${SHARE_INSTALL_PREFIX}/dbus-1/services)") - - ENDIF(NOT pykde_config) -ENDIF(PYTHONINTERP_FOUND) - -########################################################################### -# PYKDE4_INSTALL_PYTHON_FILES(file_name...) -# -# Installs and bytes compiles Python files into the data directory for this -# project.. -# -MACRO(PYKDE4_INSTALL_PYTHON_FILES) - - ADD_CUSTOM_TARGET(pysupport ALL) - FOREACH (_current_file ${ARGN}) - - # Install the source file. - INSTALL(FILES ${_current_file} DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}) - - # Byte compile and install the .pyc file. - GET_FILENAME_COMPONENT(_absfilename ${_current_file} ABSOLUTE) - GET_FILENAME_COMPONENT(_filename ${_current_file} NAME) - GET_FILENAME_COMPONENT(_filenamebase ${_current_file} NAME_WE) - GET_FILENAME_COMPONENT(_basepath ${_current_file} PATH) - SET(_bin_py ${CMAKE_BINARY_DIR}/${_basepath}/${_filename}) - SET(_bin_pyc ${CMAKE_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc) - - FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}) - - SET(_message "-DMESSAGE=Byte-compiling ${_bin_py}") - - GET_FILENAME_COMPONENT(_abs_bin_py ${_bin_py} ABSOLUTE) - IF(_abs_bin_py STREQUAL ${_absfilename}) # Don't copy the file onto itself. - ADD_CUSTOM_COMMAND( - TARGET pysupport - COMMAND ${CMAKE_COMMAND} -E echo ${message} - COMMAND ${PYTHON_EXECUTABLE} ${current_module_dir}/PythonCompile.py ${_bin_py} - DEPENDS ${_absfilename} - ) - ELSE(_abs_bin_py STREQUAL ${_absfilename}) - ADD_CUSTOM_COMMAND( - TARGET pysupport - COMMAND ${CMAKE_COMMAND} -E echo ${message} - COMMAND ${CMAKE_COMMAND} -E copy ${_absfilename} ${_bin_py} - COMMAND ${PYTHON_EXECUTABLE} ${current_module_dir}/PythonCompile.py ${_bin_py} - DEPENDS ${_absfilename} - ) - ENDIF(_abs_bin_py STREQUAL ${_absfilename}) - - INSTALL(FILES ${_bin_pyc} DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}) - - ENDFOREACH (_current_file) -ENDMACRO(PYKDE4_INSTALL_PYTHON_FILES) - - -########################################################################### -# PYKDE4_ADD_EXECUTABLE(py_name exe_name) -# -# Creates a smybolic link with name exe_name at install time from the -# install bin directory to the Python file. The Python file is also make -# executable. -# -MACRO(PYKDE4_ADD_EXECUTABLE _pyname _exename) - if(NOT PROJECT_NAME) - MESSAGE(STATUS "Project name is necessary to create symlink against python program!!! It will fail.") - endif() - if(WIN32) - # we generate a batch file instead of a symlink. A windows link would only - # work if the file extension .py is associated with python - but that is - # not guaranteed. - # What if python.exe is not in PATH or points to a wrong python version? - # The python app should check for compatible versions at startup. - # TODO: we cannot attach an icon to a bat file. So we might have to write a - # C program which then calls python - FILE(TO_CMAKE_PATH "${BIN_INSTALL_DIR}/${_exename}.bat" LINK_NAME) - FILE(TO_CMAKE_PATH "${DATA_INSTALL_DIR}/${PROJECT_NAME}/${_pyname}" TARGET) - GET_FILENAME_COMPONENT(abs_link_name $ENV{DESTDIR}/${LINK_NAME} ABSOLUTE) - GET_FILENAME_COMPONENT(link_path $ENV{DESTDIR}/${LINK_NAME} PATH) - GET_FILENAME_COMPONENT(abs_link_path ${link_path} ABSOLUTE) - FILE(MAKE_DIRECTORY ${abs_link_path}) - - FILE(TO_NATIVE_PATH "../${TARGET}" rel_target) - FILE(WRITE ${abs_link_name} "rem this file has been generated by PYKDE4_ADD_EXECUTABLE\n") - FILE(APPEND ${abs_link_name} "python ${rel_target}\n") - INSTALL(PROGRAMS ${LINK_NAME} DESTINATION $ENV{DESTDIR}/${BIN_INSTALL_DIR}) - else() - INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -DTARGET=${DATA_INSTALL_DIR}/${PROJECT_NAME}/${_pyname} -DLINK_NAME=${BIN_INSTALL_DIR}/${_exename} -P ${current_module_dir}/create_exe_symlink.cmake)" ) - endif() -ENDMACRO(PYKDE4_ADD_EXECUTABLE) - diff --git a/attic/modules/FindPyKDE4.py b/attic/modules/FindPyKDE4.py deleted file mode 100644 index 7916aa60..00000000 --- a/attic/modules/FindPyKDE4.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2014, Raphael Kubo da Costa <rakuco@FreeBSD.org> -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -import PyKDE4.kdecore - -if __name__ == '__main__': - try: - import PyKDE4.pykdeconfig - pykdecfg = PyKDE4.pykdeconfig.Configuration() - sip_dir = pykdecfg.pykde_sip_dir - sip_flags = pykdecfg.pykde_kde_sip_flags - except ImportError: - # PyQt4 >= 4.10.0 was built with configure-ng.py instead of - # configure.py, so pyqtconfig.py and pykdeconfig.py are not installed. - sip_dir = PyKDE4.kdecore.PYKDE_CONFIGURATION['sip_dir'] - sip_flags = PyKDE4.kdecore.PYKDE_CONFIGURATION['sip_flags'] - - print('pykde_version:%06.x' % PyKDE4.kdecore.version()) - print('pykde_version_str:%s' % PyKDE4.kdecore.versionString()) - print('pykde_sip_dir:%s' % sip_dir) - print('pykde_sip_flags:%s' % sip_flags) diff --git a/attic/modules/FindPyQt.py b/attic/modules/FindPyQt.py deleted file mode 100644 index 6c1c759d..00000000 --- a/attic/modules/FindPyQt.py +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) 2007, Simon Edwards <simon@simonzone.com> -# Copyright (c) 2014, Raphael Kubo da Costa <rakuco@FreeBSD.org> -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -import PyQt4.QtCore -import os -import sys - -def get_default_sip_dir(): - # This is based on QScintilla's configure.py, and only works for the - # default case where installation paths have not been changed in PyQt's - # configuration process. - if sys.platform == 'win32': - pyqt_sip_dir = os.path.join(sys.prefix, 'sip', 'PyQt4') - else: - pyqt_sip_dir = os.path.join(sys.prefix, 'share', 'sip', 'PyQt4') - return pyqt_sip_dir - -def get_qt4_tag(sip_flags): - in_t = False - for item in sip_flags.split(' '): - if item == '-t': - in_t = True - elif in_t: - if item.startswith('Qt_4'): - return item - else: - in_t = False - raise ValueError('Cannot find Qt\'s tag in PyQt4\'s SIP flags.') - -if __name__ == '__main__': - try: - import PyQt4.pyqtconfig - pyqtcfg = PyQt4.pyqtconfig.Configuration() - sip_dir = pyqtcfg.pyqt_sip_dir - sip_flags = pyqtcfg.pyqt_sip_flags - except ImportError: - # PyQt4 >= 4.10.0 was built with configure-ng.py instead of - # configure.py, so pyqtconfig.py is not installed. - sip_dir = get_default_sip_dir() - sip_flags = PyQt4.QtCore.PYQT_CONFIGURATION['sip_flags'] - - print('pyqt_version:%06.x' % PyQt4.QtCore.PYQT_VERSION) - print('pyqt_version_str:%s' % PyQt4.QtCore.PYQT_VERSION_STR) - print('pyqt_version_tag:%s' % get_qt4_tag(sip_flags)) - print('pyqt_sip_dir:%s' % sip_dir) - print('pyqt_sip_flags:%s' % sip_flags) diff --git a/attic/modules/FindPyQt4.cmake b/attic/modules/FindPyQt4.cmake deleted file mode 100644 index dfaa141b..00000000 --- a/attic/modules/FindPyQt4.cmake +++ /dev/null @@ -1,71 +0,0 @@ -# Find PyQt4 -# ~~~~~~~~~~ -# Copyright (c) 2007-2008, Simon Edwards <simon@simonzone.com> -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# -# PyQt4 website: https://riverbankcomputing.com/software/pyqt -# -# Find the installed version of PyQt4. FindPyQt4 should only be called after -# Python has been found. -# -# This file defines the following variables, which can also be overridden by -# users: -# -# PYQT4_VERSION - The version of PyQt4 found expressed as a 6 digit hex number -# suitable for comparison as a string -# -# PYQT4_VERSION_STR - The version of PyQt4 as a human readable string. -# -# PYQT4_VERSION_TAG - The Qt4 version tag used by PyQt's sip files. -# -# PYQT4_SIP_DIR - The directory holding the PyQt4 .sip files. This can be unset -# if PyQt4 was built using its new build system and pyqtconfig.py is not -# present on the system, as in this case its value cannot be determined -# automatically. -# -# PYQT4_SIP_FLAGS - The SIP flags used to build PyQt. - -IF(EXISTS PYQT4_VERSION) - # Already in cache, be silent - SET(PYQT4_FOUND TRUE) -ELSE(EXISTS PYQT4_VERSION) - - FIND_FILE(_find_pyqt_py FindPyQt.py PATHS ${CMAKE_MODULE_PATH}) - - EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${_find_pyqt_py} OUTPUT_VARIABLE pyqt_config) - IF(pyqt_config) - STRING(REGEX MATCH "^pyqt_version:([^\n]+).*$" _dummy ${pyqt_config}) - SET(PYQT4_VERSION "${CMAKE_MATCH_1}" CACHE STRING "PyQt4's version as a 6-digit hexadecimal number") - - STRING(REGEX MATCH ".*\npyqt_version_str:([^\n]+).*$" _dummy ${pyqt_config}) - SET(PYQT4_VERSION_STR "${CMAKE_MATCH_1}" CACHE STRING "PyQt4's version as a human-readable string") - - STRING(REGEX MATCH ".*\npyqt_version_tag:([^\n]+).*$" _dummy ${pyqt_config}) - SET(PYQT4_VERSION_TAG "${CMAKE_MATCH_1}" CACHE STRING "The Qt4 version tag used by PyQt4's .sip files") - - STRING(REGEX MATCH ".*\npyqt_sip_dir:([^\n]+).*$" _dummy ${pyqt_config}) - SET(PYQT4_SIP_DIR "${CMAKE_MATCH_1}" CACHE PATH "The base directory where PyQt4's .sip files are installed") - - STRING(REGEX MATCH ".*\npyqt_sip_flags:([^\n]+).*$" _dummy ${pyqt_config}) - SET(PYQT4_SIP_FLAGS "${CMAKE_MATCH_1}" CACHE STRING "The SIP flags used to build PyQt4") - - IF(NOT IS_DIRECTORY "${PYQT4_SIP_DIR}") - MESSAGE(WARNING "The base directory where PyQt4's SIP files are installed could not be determined. This usually means PyQt4 was built with its new build system and pyqtconfig.py is not present.\n" - "Please set the PYQT4_SIP_DIR variable manually.") - ELSE(NOT IS_DIRECTORY "${PYQT4_SIP_DIR}") - SET(PYQT4_FOUND TRUE) - ENDIF(NOT IS_DIRECTORY "${PYQT4_SIP_DIR}") - ENDIF(pyqt_config) - - IF(PYQT4_FOUND) - IF(NOT PYQT4_FIND_QUIETLY) - MESSAGE(STATUS "Found PyQt4 version: ${PYQT4_VERSION_STR}") - ENDIF(NOT PYQT4_FIND_QUIETLY) - ELSE(PYQT4_FOUND) - IF(PYQT4_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find Python") - ENDIF(PYQT4_FIND_REQUIRED) - ENDIF(PYQT4_FOUND) - -ENDIF(EXISTS PYQT4_VERSION) diff --git a/attic/modules/FindPythonLibrary.cmake b/attic/modules/FindPythonLibrary.cmake deleted file mode 100644 index bb02c1bb..00000000 --- a/attic/modules/FindPythonLibrary.cmake +++ /dev/null @@ -1,106 +0,0 @@ -# Find Python -# ~~~~~~~~~~~ -# Find the Python interpreter and related Python directories. -# -# This file defines the following variables: -# -# PYTHON_EXECUTABLE - The path and filename of the Python interpreter. -# -# PYTHON_SHORT_VERSION - The version of the Python interpreter found, -# excluding the patch version number. (e.g. 2.5 and not 2.5.1)) -# -# PYTHON_LONG_VERSION - The version of the Python interpreter found as a human -# readable string. -# -# PYTHON_SITE_PACKAGES_INSTALL_DIR - this cache variable can be used for installing -# own python modules. You may want to adjust this to be the -# same as ${PYTHON_SITE_PACKAGES_DIR}, but then admin -# privileges may be required for installation. -# -# PYTHON_SITE_PACKAGES_DIR - Location of the Python site-packages directory. -# -# PYTHON_INCLUDE_PATH - Directory holding the python.h include file. -# -# PYTHON_LIBRARY, PYTHON_LIBRARIES- Location of the Python library. - -# Copyright (c) 2007, Simon Edwards <simon@simonzone.com> -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - - -include(CMakeFindFrameworks) - -if(EXISTS PYTHON_LIBRARY) - # Already in cache, be silent - set(PYTHONLIBRARY_FOUND TRUE) -else() - - find_package(PythonInterp) - - if(PYTHONINTERP_FOUND) - - # get the directory of the current file, used later on in the file - get_filename_component( _py_cmake_module_dir ${CMAKE_CURRENT_LIST_FILE} PATH) - if(NOT EXISTS "${_py_cmake_module_dir}/FindLibPython.py") - message(FATAL_ERROR "The file FindLibPython.py does not exist in ${_py_cmake_module_dir} (the directory where FindPythonLibrary.cmake is located). Check your installation.") - endif() - - execute_process(COMMAND ${PYTHON_EXECUTABLE} "${_py_cmake_module_dir}/FindLibPython.py" OUTPUT_VARIABLE python_config) - if(python_config) - string(REGEX REPLACE ".*exec_prefix:([^\n]+).*$" "\\1" PYTHON_PREFIX ${python_config}) - string(REGEX REPLACE ".*\nshort_version:([^\n]+).*$" "\\1" PYTHON_SHORT_VERSION ${python_config}) - string(REGEX REPLACE ".*\nlong_version:([^\n]+).*$" "\\1" PYTHON_LONG_VERSION ${python_config}) - - string(REGEX REPLACE ".*\npy_inc_dir:([^\n]+).*$" "\\1" _TMP_PYTHON_INCLUDE_PATH ${python_config}) - string(REGEX REPLACE ".*\nsite_packages_dir:([^\n]+).*$" "\\1" _TMP_PYTHON_SITE_PACKAGES_DIR ${python_config}) - - # Put these two variables in the cache so they are visible for the user, but read-only: - set(PYTHON_INCLUDE_PATH "${_TMP_PYTHON_INCLUDE_PATH}" CACHE PATH "The python include directory" FORCE) - set(PYTHON_SITE_PACKAGES_DIR "${_TMP_PYTHON_SITE_PACKAGES_DIR}" CACHE PATH "The python site packages dir" FORCE) - - # This one is intended to be used and changed by the user for installing own modules: - set(PYTHON_SITE_PACKAGES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/python${PYTHON_SHORT_VERSION}/site-packages CACHE PATH "The directory where python modules will be installed to.") - - string(REGEX REPLACE "([0-9]+).([0-9]+)" "\\1\\2" PYTHON_SHORT_VERSION_NO_DOT ${PYTHON_SHORT_VERSION}) - set(PYTHON_LIBRARY_NAMES python${PYTHON_SHORT_VERSION} python${PYTHON_SHORT_VERSION_NO_DOT}) - if(WIN32) - string(REPLACE "\\" "/" PYTHON_SITE_PACKAGES_DIR ${PYTHON_SITE_PACKAGES_DIR}) - endif() - find_library(PYTHON_LIBRARY NAMES ${PYTHON_LIBRARY_NAMES} PATHS ${PYTHON_PREFIX}/lib ${PYTHON_PREFIX}/libs NO_DEFAULT_PATH) - set(PYTHONLIBRARY_FOUND TRUE) - endif() - - # adapted from cmake's builtin FindPythonLibs - if(APPLE) - cmake_find_frameworks(Python) - set(PYTHON_FRAMEWORK_INCLUDES) - if(Python_FRAMEWORKS) - # If a framework has been selected for the include path, - # make sure "-framework" is used to link it. - if("${PYTHON_INCLUDE_PATH}" MATCHES "Python\\.framework") - set(PYTHON_LIBRARY "") - set(PYTHON_DEBUG_LIBRARY "") - endif() - if(NOT PYTHON_LIBRARY) - set (PYTHON_LIBRARY "-framework Python" CACHE FILEPATH "Python Framework" FORCE) - endif() - set(PYTHONLIBRARY_FOUND TRUE) - endif() - endif() - endif() - - if(PYTHONLIBRARY_FOUND) - set(PYTHON_LIBRARIES ${PYTHON_LIBRARY}) - if(NOT PYTHONLIBRARY_FIND_QUIETLY) - message(STATUS "Found Python executable: ${PYTHON_EXECUTABLE}") - message(STATUS "Found Python version: ${PYTHON_LONG_VERSION}") - message(STATUS "Found Python library: ${PYTHON_LIBRARY}") - endif() - else() - if(PYTHONLIBRARY_FIND_REQUIRED) - message(FATAL_ERROR "Could not find Python") - endif() - endif() - -endif (EXISTS PYTHON_LIBRARY) diff --git a/attic/modules/FindQCA2.cmake b/attic/modules/FindQCA2.cmake deleted file mode 100644 index e2d8f2a5..00000000 --- a/attic/modules/FindQCA2.cmake +++ /dev/null @@ -1,48 +0,0 @@ -# - Try to find QCA2 (Qt Cryptography Architecture 2) -# Once done this will define -# -# QCA2_FOUND - system has QCA2 -# QCA2_INCLUDE_DIR - the QCA2 include directory -# QCA2_LIBRARIES - the libraries needed to use QCA2 -# QCA2_DEFINITIONS - Compiler switches required for using QCA2 -# -# use pkg-config to get the directories and then use these values -# in the FIND_PATH() and FIND_LIBRARY() calls - -# Copyright (c) 2006, Michael Larouche, <michael.larouche@kdemail.net> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -include(FindLibraryWithDebug) - -if (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES) - - # in cache already - set(QCA2_FOUND TRUE) - -else (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES) - - - if (NOT WIN32) - find_package(PkgConfig) - pkg_check_modules(PC_QCA2 QUIET qca2) - set(QCA2_DEFINITIONS ${PC_QCA2_CFLAGS_OTHER}) - endif (NOT WIN32) - - find_library_with_debug(QCA2_LIBRARIES - WIN32_DEBUG_POSTFIX d - NAMES qca - HINTS ${PC_QCA2_LIBDIR} ${PC_QCA2_LIBRARY_DIRS} - ) - - find_path(QCA2_INCLUDE_DIR QtCrypto - HINTS ${PC_QCA2_INCLUDEDIR} ${PC_QCA2_INCLUDE_DIRS} - PATH_SUFFIXES QtCrypto) - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(QCA2 DEFAULT_MSG QCA2_LIBRARIES QCA2_INCLUDE_DIR) - - mark_as_advanced(QCA2_INCLUDE_DIR QCA2_LIBRARIES) - -endif (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES) diff --git a/attic/modules/FindQImageBlitz.cmake b/attic/modules/FindQImageBlitz.cmake deleted file mode 100644 index 1b34741e..00000000 --- a/attic/modules/FindQImageBlitz.cmake +++ /dev/null @@ -1,51 +0,0 @@ -# - Try to find the qimageblitz lib -# Once done this will define -# -# QIMAGEBLITZ_FOUND - system has qimageblitz lib -# QIMAGEBLITZ_INCLUDES - the qimageblitz include directory -# QIMAGEBLITZ_LIBRARIES - The libraries needed to use qimageblitz - -# Copyright (c) 2006, Montel Laurent, <montel@kde.org> -# Copyright (c) 2007, Allen Winter, <winter@kde.org> -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -include(FindLibraryWithDebug) - -if (QIMAGEBLITZ_INCLUDES AND QIMAGEBLITZ_LIBRARIES) - set(QImageBlitz_FIND_QUIETLY TRUE) -endif (QIMAGEBLITZ_INCLUDES AND QIMAGEBLITZ_LIBRARIES) - -if (NOT WIN32) - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - find_package(PkgConfig) - pkg_check_modules(PC_QIMAGEBLITZ QUIET qimageblitz) -endif (NOT WIN32) - -find_path(QIMAGEBLITZ_INCLUDES - NAMES - qimageblitz.h - PATH_SUFFIXES qimageblitz - HINTS - $ENV{QIMAGEBLITZDIR}/include - ${PC_QIMAGEBLITZ_INCLUDEDIR} - ${KDE4_INCLUDE_DIR} - ${INCLUDE_INSTALL_DIR} -) - -find_library_with_debug(QIMAGEBLITZ_LIBRARIES - WIN32_DEBUG_POSTFIX d - qimageblitz - HINTS - $ENV{QIMAGEBLITZDIR}/lib - ${PC_QIMAGEBLITZ_LIBDIR} - ${KDE4_LIB_DIR} - ${LIB_INSTALL_DIR} -) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(QImageBlitz DEFAULT_MSG - QIMAGEBLITZ_INCLUDES QIMAGEBLITZ_LIBRARIES) - -mark_as_advanced(QIMAGEBLITZ_INCLUDES QIMAGEBLITZ_LIBRARIES) diff --git a/attic/modules/FindQt4.cmake b/attic/modules/FindQt4.cmake deleted file mode 100644 index 2c1b2de4..00000000 --- a/attic/modules/FindQt4.cmake +++ /dev/null @@ -1,1272 +0,0 @@ -# - Find QT 4 -# This module can be used to find Qt4. -# The most important issue is that the Qt4 qmake is available via the system path. -# This qmake is then used to detect basically everything else. -# This module defines a number of key variables and macros. -# The variable QT_USE_FILE is set which is the path to a CMake file that can be included -# to compile Qt 4 applications and libraries. It sets up the compilation -# environment for include directories, preprocessor defines and populates a -# QT_LIBRARIES variable. -# -# Typical usage could be something like: -# find_package(Qt4 4.4.3 COMPONENTS QtCore QtGui QtXml REQUIRED ) -# include(${QT_USE_FILE}) -# add_executable(myexe main.cpp) -# target_link_libraries(myexe ${QT_LIBRARIES}) -# -# The minimum required version can be specified using the standard find_package()-syntax -# (see example above). -# For compatibility with older versions of FindQt4.cmake it is also possible to -# set the variable QT_MIN_VERSION to the minimum required version of Qt4 before the -# find_package(Qt4) command. -# If both are used, the version used in the find_package() command overrides the -# one from QT_MIN_VERSION. -# -# When using the components argument, QT_USE_QT* variables are automatically set -# for the QT_USE_FILE to pick up. If one wishes to manually set them, the -# available ones to set include: -# QT_DONT_USE_QTCORE -# QT_DONT_USE_QTGUI -# QT_USE_QT3SUPPORT -# QT_USE_QTASSISTANT -# QT_USE_QAXCONTAINER -# QT_USE_QAXSERVER -# QT_USE_QTDESIGNER -# QT_USE_QTMOTIF -# QT_USE_QTMAIN -# QT_USE_QTMULTIMEDIA -# QT_USE_QTNETWORK -# QT_USE_QTNSPLUGIN -# QT_USE_QTOPENGL -# QT_USE_QTSQL -# QT_USE_QTXML -# QT_USE_QTSVG -# QT_USE_QTTEST -# QT_USE_QTUITOOLS -# QT_USE_QTDBUS -# QT_USE_QTSCRIPT -# QT_USE_QTASSISTANTCLIENT -# QT_USE_QTHELP -# QT_USE_QTWEBKIT -# QT_USE_QTXMLPATTERNS -# QT_USE_PHONON -# QT_USE_QTSCRIPTTOOLS -# QT_USE_QTDECLARATIVE -# -# QT_USE_IMPORTED_TARGETS -# If this variable is set to TRUE, FindQt4.cmake will create imported -# library targets for the various Qt libraries and set the -# library variables like QT_QTCORE_LIBRARY to point at these imported -# targets instead of the library file on disk. This provides much better -# handling of the release and debug versions of the Qt libraries and is -# also always backwards compatible, except for the case that dependencies -# of libraries are exported, these will then also list the names of the -# imported targets as dependency and not the file location on disk. This -# is much more flexible, but requires that FindQt4.cmake is executed before -# such an exported dependency file is processed. -# -# There are also some files that need processing by some Qt tools such as moc -# and uic. Listed below are macros that may be used to process those files. -# -# macro QT4_WRAP_CPP(outfiles inputfile ... OPTIONS ...) -# create moc code from a list of files containing Qt class with -# the Q_OBJECT declaration. Per-direcotry preprocessor definitions -# are also added. Options may be given to moc, such as those found -# when executing "moc -help". -# -# macro QT4_WRAP_UI(outfiles inputfile ... OPTIONS ...) -# create code from a list of Qt designer ui files. -# Options may be given to uic, such as those found -# when executing "uic -help" -# -# macro QT4_ADD_RESOURCES(outfiles inputfile ... OPTIONS ...) -# create code from a list of Qt resource files. -# Options may be given to rcc, such as those found -# when executing "rcc -help" -# -# macro QT4_GENERATE_MOC(inputfile outputfile ) -# creates a rule to run moc on infile and create outfile. -# Use this if for some reason QT4_WRAP_CPP() isn't appropriate, e.g. -# because you need a custom filename for the moc file or something similar. -# -# macro QT4_AUTOMOC(sourcefile1 sourcefile2 ... ) -# This macro is still experimental. -# It can be used to have moc automatically handled. -# So if you have the files foo.h and foo.cpp, and in foo.h a -# a class uses the Q_OBJECT macro, moc has to run on it. If you don't -# want to use QT4_WRAP_CPP() (which is reliable and mature), you can insert -# #include "foo.moc" -# in foo.cpp and then give foo.cpp as argument to QT4_AUTOMOC(). This will the -# scan all listed files at cmake-time for such included moc files and if it finds -# them cause a rule to be generated to run moc at build time on the -# accompanying header file foo.h. -# If a source file has the SKIP_AUTOMOC property set it will be ignored by this macro. -# -# macro QT4_ADD_DBUS_INTERFACE(outfiles interface basename) -# create a the interface header and implementation files with the -# given basename from the given interface xml file and add it to -# the list of sources. -# To disable generating a namespace header, set the source file property -# NO_NAMESPACE to TRUE on the interface file. -# To include a header in the interface header, set the source file property -# INCLUDE to the name of the header. -# To specify a class name to use, set the source file property CLASSNAME -# to the name of the class. -# -# macro QT4_ADD_DBUS_INTERFACES(outfiles inputfile ... ) -# create the interface header and implementation files -# for all listed interface xml files -# the name will be automatically determined from the name of the xml file -# To disable generating namespace headers, set the source file property -# NO_NAMESPACE to TRUE for these inputfiles. -# To include a header in the interface header, set the source file property -# INCLUDE to the name of the header. -# To specify a class name to use, set the source file property CLASSNAME -# to the name of the class. -# -# macro QT4_ADD_DBUS_ADAPTOR(outfiles xmlfile parentheader parentclassname [basename] [classname]) -# create a dbus adaptor (header and implementation file) from the xml file -# describing the interface, and add it to the list of sources. The adaptor -# forwards the calls to a parent class, defined in parentheader and named -# parentclassname. The name of the generated files will be -# <basename>adaptor.{cpp,h} where basename defaults to the basename of the xml file. -# If <classname> is provided, then it will be used as the classname of the -# adaptor itself. -# -# macro QT4_GENERATE_DBUS_INTERFACE( header [interfacename] OPTIONS ...) -# generate the xml interface file from the given header. -# If the optional argument interfacename is omitted, the name of the -# interface file is constructed from the basename of the header with -# the suffix .xml appended. -# Options may be given to qdbuscpp2xml, such as those found when executing "qdbuscpp2xml --help" -# -# macro QT4_CREATE_TRANSLATION( qm_files directories ... sources ... -# ts_files ... OPTIONS ...) -# out: qm_files -# in: directories sources ts_files -# options: flags to pass to lupdate, such as -extensions to specify -# extensions for a directory scan. -# generates commands to create .ts (vie lupdate) and .qm -# (via lrelease) - files from directories and/or sources. The ts files are -# created and/or updated in the source tree (unless given with full paths). -# The qm files are generated in the build tree. -# Updating the translations can be done by adding the qm_files -# to the source list of your library/executable, so they are -# always updated, or by adding a custom target to control when -# they get updated/generated. -# -# macro QT4_ADD_TRANSLATION( qm_files ts_files ... ) -# out: qm_files -# in: ts_files -# generates commands to create .qm from .ts - files. The generated -# filenames can be found in qm_files. The ts_files -# must exists and are not updated in any way. -# -# -# Below is a detailed list of variables that FindQt4.cmake sets. -# QT_FOUND If false, don't try to use Qt. -# QT4_FOUND If false, don't try to use Qt 4. -# -# QT_VERSION_MAJOR The major version of Qt found. -# QT_VERSION_MINOR The minor version of Qt found. -# QT_VERSION_PATCH The patch version of Qt found. -# -# QT_EDITION Set to the edition of Qt (i.e. DesktopLight) -# QT_EDITION_DESKTOPLIGHT True if QT_EDITION == DesktopLight -# QT_QTCORE_FOUND True if QtCore was found. -# QT_QTGUI_FOUND True if QtGui was found. -# QT_QT3SUPPORT_FOUND True if Qt3Support was found. -# QT_QTASSISTANT_FOUND True if QtAssistant was found. -# QT_QTASSISTANTCLIENT_FOUND True if QtAssistantClient was found. -# QT_QAXCONTAINER_FOUND True if QAxContainer was found (Windows only). -# QT_QAXSERVER_FOUND True if QAxServer was found (Windows only). -# QT_QTDBUS_FOUND True if QtDBus was found. -# QT_QTDESIGNER_FOUND True if QtDesigner was found. -# QT_QTDESIGNERCOMPONENTS True if QtDesignerComponents was found. -# QT_QTHELP_FOUND True if QtHelp was found. -# QT_QTMOTIF_FOUND True if QtMotif was found. -# QT_QTMULTIMEDIA_FOUND True if QtMultimedia was found (since Qt 4.6.0). -# QT_QTNETWORK_FOUND True if QtNetwork was found. -# QT_QTNSPLUGIN_FOUND True if QtNsPlugin was found. -# QT_QTOPENGL_FOUND True if QtOpenGL was found. -# QT_QTSQL_FOUND True if QtSql was found. -# QT_QTSVG_FOUND True if QtSvg was found. -# QT_QTSCRIPT_FOUND True if QtScript was found. -# QT_QTSCRIPTTOOLS_FOUND True if QtScriptTools was found. -# QT_QTTEST_FOUND True if QtTest was found. -# QT_QTUITOOLS_FOUND True if QtUiTools was found. -# QT_QTWEBKIT_FOUND True if QtWebKit was found. -# QT_QTXML_FOUND True if QtXml was found. -# QT_QTXMLPATTERNS_FOUND True if QtXmlPatterns was found. -# QT_PHONON_FOUND True if phonon was found. -# QT_QTDECLARATIVE_FOUND True if QtDeclarative was found. -# -# QT_MAC_USE_COCOA For Mac OS X, its whether Cocoa or Carbon is used. -# In general, this should not be used, but its useful -# when having platform specific code. -# -# QT_DEFINITIONS Definitions to use when compiling code that uses Qt. -# You do not need to use this if you include QT_USE_FILE. -# The QT_USE_FILE will also define QT_DEBUG and QT_NO_DEBUG -# to fit your current build type. Those are not contained -# in QT_DEFINITIONS. -# -# QT_INCLUDES List of paths to all include directories of -# Qt4 QT_INCLUDE_DIR and QT_QTCORE_INCLUDE_DIR are -# always in this variable even if NOTFOUND, -# all other INCLUDE_DIRS are -# only added if they are found. -# You do not need to use this if you include QT_USE_FILE. -# -# -# Include directories for the Qt modules are listed here. -# You do not need to use these variables if you include QT_USE_FILE. -# -# QT_INCLUDE_DIR Path to "include" of Qt4 -# QT_QT_INCLUDE_DIR Path to "include/Qt" -# QT_QT3SUPPORT_INCLUDE_DIR Path to "include/Qt3Support" -# QT_QTASSISTANT_INCLUDE_DIR Path to "include/QtAssistant" -# QT_QTASSISTANTCLIENT_INCLUDE_DIR Path to "include/QtAssistant" -# QT_QAXCONTAINER_INCLUDE_DIR Path to "include/ActiveQt" (Windows only) -# QT_QAXSERVER_INCLUDE_DIR Path to "include/ActiveQt" (Windows only) -# QT_QTCORE_INCLUDE_DIR Path to "include/QtCore" -# QT_QTDBUS_INCLUDE_DIR Path to "include/QtDBus" -# QT_QTDESIGNER_INCLUDE_DIR Path to "include/QtDesigner" -# QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR Path to "include/QtDesigner" -# QT_QTGUI_INCLUDE_DIR Path to "include/QtGui" -# QT_QTHELP_INCLUDE_DIR Path to "include/QtHelp" -# QT_QTMOTIF_INCLUDE_DIR Path to "include/QtMotif" -# QT_QTMULTIMEDIA_INCLUDE_DIR Path to "include/QtMultimedia" -# QT_QTNETWORK_INCLUDE_DIR Path to "include/QtNetwork" -# QT_QTNSPLUGIN_INCLUDE_DIR Path to "include/QtNsPlugin" -# QT_QTOPENGL_INCLUDE_DIR Path to "include/QtOpenGL" -# QT_QTSCRIPT_INCLUDE_DIR Path to "include/QtScript" -# QT_QTSQL_INCLUDE_DIR Path to "include/QtSql" -# QT_QTSVG_INCLUDE_DIR Path to "include/QtSvg" -# QT_QTTEST_INCLUDE_DIR Path to "include/QtTest" -# QT_QTWEBKIT_INCLUDE_DIR Path to "include/QtWebKit" -# QT_QTXML_INCLUDE_DIR Path to "include/QtXml" -# QT_QTXMLPATTERNS_INCLUDE_DIR Path to "include/QtXmlPatterns" -# QT_PHONON_INCLUDE_DIR Path to "include/phonon" -# QT_QTSCRIPTTOOLS_INCLUDE_DIR Path to "include/QtScriptTools" -# QT_QTDECLARATIVE_INCLUDE_DIR Path to "include/QtDeclarative" -# -# QT_BINARY_DIR Path to "bin" of Qt4 -# QT_LIBRARY_DIR Path to "lib" of Qt4 -# QT_PLUGINS_DIR Path to "plugins" for Qt4 -# QT_TRANSLATIONS_DIR Path to "translations" of Qt4 -# QT_IMPORTS_DIR Path to "imports" of Qt4 -# QT_DOC_DIR Path to "doc" of Qt4 -# QT_MKSPECS_DIR Path to "mkspecs" of Qt4 -# -# -# For every library of Qt, a QT_QTFOO_LIBRARY variable is defined, with the full path to the library. -# -# So there are the following variables: -# The Qt3Support library: QT_QT3SUPPORT_LIBRARY -# -# The QtAssistant library: QT_QTASSISTANT_LIBRARY -# -# The QtAssistantClient library: QT_QTASSISTANTCLIENT_LIBRARY -# -# The QAxServer library: QT_QAXSERVER_LIBRARY -# -# The QAxContainer library: QT_QAXCONTAINER_LIBRARY -# -# The QtCore library: QT_QTCORE_LIBRARY -# -# The QtDBus library: QT_QTDBUS_LIBRARY -# -# The QtDesigner library: QT_QTDESIGNER_LIBRARY -# -# The QtDesignerComponents library: QT_QTDESIGNERCOMPONENTS_LIBRARY -# -# The QtGui library: QT_QTGUI_LIBRARY -# -# The QtHelp library: QT_QTHELP_LIBRARY -# -# The QtMotif library: QT_QTMOTIF_LIBRARY -# -# The QtMultimedia library: QT_QTMULTIMEDIA_LIBRARY -# -# The QtNetwork library: QT_QTNETWORK_LIBRARY -# -# The QtNsPLugin library: QT_QTNSPLUGIN_LIBRARY -# -# The QtOpenGL library: QT_QTOPENGL_LIBRARY -# -# The QtScript library: QT_QTSCRIPT_LIBRARY -# -# The QtScriptTools library: QT_QTSCRIPTTOOLS_LIBRARY -# -# The QtSql library: QT_QTSQL_LIBRARY -# -# The QtSvg library: QT_QTSVG_LIBRARY -# -# The QtTest library: QT_QTTEST_LIBRARY -# -# The QtUiTools library: QT_QTUITOOLS_LIBRARY -# -# The QtWebKit library: QT_QTWEBKIT_LIBRARY -# -# The QtXml library: QT_QTXML_LIBRARY -# -# The QtXmlPatterns library: QT_QTXMLPATTERNS_LIBRARY -# -# The qtmain library for Windows QT_QTMAIN_LIBRARY -# -# The Phonon library: QT_PHONON_LIBRARY -# -# The QtDeclarative library: QT_QTDECLARATIVE_LIBRARY -# -# also defined, but NOT for general use are -# QT_MOC_EXECUTABLE Where to find the moc tool. -# QT_UIC_EXECUTABLE Where to find the uic tool. -# QT_UIC3_EXECUTABLE Where to find the uic3 tool. -# QT_RCC_EXECUTABLE Where to find the rcc tool -# QT_DBUSCPP2XML_EXECUTABLE Where to find the qdbuscpp2xml tool. -# QT_DBUSXML2CPP_EXECUTABLE Where to find the qdbusxml2cpp tool. -# QT_LUPDATE_EXECUTABLE Where to find the lupdate tool. -# QT_LRELEASE_EXECUTABLE Where to find the lrelease tool. -# QT_QCOLLECTIONGENERATOR_EXECUTABLE Where to find the qcollectiongenerator tool. -# QT_DESIGNER_EXECUTABLE Where to find the Qt designer tool. -# QT_LINGUIST_EXECUTABLE Where to find the Qt linguist tool. -# -# -# These are around for backwards compatibility -# they will be set -# QT_WRAP_CPP Set true if QT_MOC_EXECUTABLE is found -# QT_WRAP_UI Set true if QT_UIC_EXECUTABLE is found -# -# These variables do _NOT_ have any effect anymore (compared to FindQt.cmake) -# QT_MT_REQUIRED Qt4 is now always multithreaded -# -# These variables are set to "" Because Qt structure changed -# (They make no sense in Qt4) -# QT_QT_LIBRARY Qt-Library is now split - -# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. -# See Copyright.txt or https://cmake.org/licensing for details. - -# Use FIND_PACKAGE( Qt4 COMPONENTS ... ) to enable modules -IF( Qt4_FIND_COMPONENTS ) - FOREACH( component ${Qt4_FIND_COMPONENTS} ) - STRING( TOUPPER ${component} _COMPONENT ) - SET( QT_USE_${_COMPONENT} 1 ) - ENDFOREACH( component ) - - # To make sure we don't use QtCore or QtGui when not in COMPONENTS - IF(NOT QT_USE_QTCORE) - SET( QT_DONT_USE_QTCORE 1 ) - ENDIF(NOT QT_USE_QTCORE) - - IF(NOT QT_USE_QTGUI) - SET( QT_DONT_USE_QTGUI 1 ) - ENDIF(NOT QT_USE_QTGUI) - -ENDIF( Qt4_FIND_COMPONENTS ) - -# If Qt3 has already been found, fail. -IF(QT_QT_LIBRARY) - IF(Qt4_FIND_REQUIRED) - MESSAGE( FATAL_ERROR "Qt3 and Qt4 cannot be used together in one project. If switching to Qt4, the CMakeCache.txt needs to be cleaned.") - ELSE(Qt4_FIND_REQUIRED) - IF(NOT Qt4_FIND_QUIETLY) - MESSAGE( STATUS "Qt3 and Qt4 cannot be used together in one project. If switching to Qt4, the CMakeCache.txt needs to be cleaned.") - ENDIF(NOT Qt4_FIND_QUIETLY) - RETURN() - ENDIF(Qt4_FIND_REQUIRED) -ENDIF(QT_QT_LIBRARY) - -function(_QT4_QUERY_QMAKE VAR RESULT) - exec_program(${QT_QMAKE_EXECUTABLE} ARGS "-query ${VAR}" RETURN_VALUE return_code OUTPUT_VARIABLE output ) - if(NOT return_code) - file(TO_CMAKE_PATH "${output}" output) - set(${RESULT} ${output} PARENT_SCOPE) - endif() -endfunction(_QT4_QUERY_QMAKE) - - -IF (QT4_QMAKE_FOUND AND Qt4::QtCore) - # Check already done in this cmake run, nothing more to do - RETURN() -ENDIF (QT4_QMAKE_FOUND AND Qt4::QtCore) - -# check that QT_NO_DEBUG is defined for release configurations -MACRO(QT_CHECK_FLAG_EXISTS FLAG VAR DOC) - IF(NOT ${VAR} MATCHES "${FLAG}") - SET(${VAR} "${${VAR}} ${FLAG}" - CACHE STRING "Flags used by the compiler during ${DOC} builds." FORCE) - ENDIF(NOT ${VAR} MATCHES "${FLAG}") -ENDMACRO(QT_CHECK_FLAG_EXISTS FLAG VAR) - -QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_RELWITHDEBINFO "Release with Debug Info") -QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_RELEASE "release") -QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL "release minsize") - -INCLUDE(MacroPushRequiredVars) -INCLUDE(CheckSymbolExists) -INCLUDE(MacroAddFileDependencies) - -SET(QT_USE_FILE ${CMAKE_ROOT}/Modules/UseQt4.cmake) - -SET( QT_DEFINITIONS "") - -SET(QT4_INSTALLED_VERSION_TOO_OLD FALSE) - -# macro for asking qmake to process pro files -MACRO(QT_QUERY_QMAKE outvar invar) - IF(QT_QMAKE_EXECUTABLE) - FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake/tmp.pro - "message(CMAKE_MESSAGE<$$${invar}>)") - - # Invoke qmake with the tmp.pro program to get the desired - # information. Use the same variable for both stdout and stderr - # to make sure we get the output on all platforms. - EXECUTE_PROCESS(COMMAND ${QT_QMAKE_EXECUTABLE} - WORKING_DIRECTORY - ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake - OUTPUT_VARIABLE _qmake_query_output - RESULT_VARIABLE _qmake_result - ERROR_VARIABLE _qmake_query_output ) - - FILE(REMOVE_RECURSE - "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake") - - IF(_qmake_result) - MESSAGE(WARNING " querying qmake for ${invar}. qmake reported:\n${_qmake_query_output}") - ELSE(_qmake_result) - STRING(REGEX REPLACE ".*CMAKE_MESSAGE<([^>]*).*" "\\1" ${outvar} "${_qmake_query_output}") - ENDIF(_qmake_result) - - ENDIF(QT_QMAKE_EXECUTABLE) -ENDMACRO(QT_QUERY_QMAKE) - -GET_FILENAME_COMPONENT(qt_install_version "[HKEY_CURRENT_USER\\Software\\trolltech\\Versions;DefaultQtVersion]" NAME) -# check for qmake -# Debian uses qmake-qt4 -# macports' Qt uses qmake-mac -FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 qmake-mac PATHS - "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin" - "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin" - "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]/bin" - $ENV{QTDIR}/bin - DOC "The qmake executable for the Qt installation to use" -) - -IF (QT_QMAKE_EXECUTABLE) - - IF(QT_QMAKE_EXECUTABLE_LAST) - STRING(COMPARE NOTEQUAL "${QT_QMAKE_EXECUTABLE_LAST}" "${QT_QMAKE_EXECUTABLE}" QT_QMAKE_CHANGED) - ENDIF(QT_QMAKE_EXECUTABLE_LAST) - - SET(QT_QMAKE_EXECUTABLE_LAST "${QT_QMAKE_EXECUTABLE}" CACHE INTERNAL "" FORCE) - - SET(QT4_QMAKE_FOUND FALSE) - - _qt4_query_qmake(QT_VERSION QTVERSION) - - # check for qt3 qmake and then try and find qmake4 or qmake-qt4 in the path - IF(NOT QTVERSION) - SET(QT_QMAKE_EXECUTABLE NOTFOUND CACHE FILEPATH "" FORCE) - FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake-qt4 PATHS - "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin" - "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin" - $ENV{QTDIR}/bin - DOC "The qmake executable for the Qt installation to use" - ) - IF(QT_QMAKE_EXECUTABLE) - _qt4_query_qmake(QT_VERSION QTVERSION) - ENDIF(QT_QMAKE_EXECUTABLE) - ENDIF(NOT QTVERSION) - - # check that we found the Qt4 qmake, Qt3 qmake output won't match here - STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" qt_version_tmp "${QTVERSION}") - IF (qt_version_tmp) - - # we need at least version 4.0.0 - IF (NOT QT_MIN_VERSION) - SET(QT_MIN_VERSION "4.0.0") - ENDIF (NOT QT_MIN_VERSION) - - #now parse the parts of the user given version string into variables - STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" req_qt_major_vers "${QT_MIN_VERSION}") - IF (NOT req_qt_major_vers) - MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT_MIN_VERSION}\", expected e.g. \"4.0.1\"") - ENDIF (NOT req_qt_major_vers) - - # now parse the parts of the user given version string into variables - STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" req_qt_major_vers "${QT_MIN_VERSION}") - STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" req_qt_minor_vers "${QT_MIN_VERSION}") - STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" req_qt_patch_vers "${QT_MIN_VERSION}") - - # Suppport finding at least a particular version, for instance FIND_PACKAGE( Qt4 4.4.3 ) - # This implementation is a hack to avoid duplicating code and make sure we stay - # source-compatible with CMake 2.6.x - IF( Qt4_FIND_VERSION ) - SET( QT_MIN_VERSION ${Qt4_FIND_VERSION} ) - SET( req_qt_major_vers ${Qt4_FIND_VERSION_MAJOR} ) - SET( req_qt_minor_vers ${Qt4_FIND_VERSION_MINOR} ) - SET( req_qt_patch_vers ${Qt4_FIND_VERSION_PATCH} ) - ENDIF( Qt4_FIND_VERSION ) - - IF (NOT req_qt_major_vers EQUAL 4) - MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT_MIN_VERSION}\", major version 4 is required, e.g. \"4.0.1\"") - ENDIF (NOT req_qt_major_vers EQUAL 4) - - # and now the version string given by qmake - STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}") - STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}") - STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}") - - # compute an overall version number which can be compared at once - MATH(EXPR req_vers "${req_qt_major_vers}*10000 + ${req_qt_minor_vers}*100 + ${req_qt_patch_vers}") - MATH(EXPR found_vers "${QT_VERSION_MAJOR}*10000 + ${QT_VERSION_MINOR}*100 + ${QT_VERSION_PATCH}") - - # Support finding *exactly* a particular version, for instance FIND_PACKAGE( Qt4 4.4.3 EXACT ) - IF( Qt4_FIND_VERSION_EXACT ) - IF(found_vers EQUAL req_vers) - SET( QT4_QMAKE_FOUND TRUE ) - ELSE(found_vers EQUAL req_vers) - SET( QT4_QMAKE_FOUND FALSE ) - IF (found_vers LESS req_vers) - SET(QT4_INSTALLED_VERSION_TOO_OLD TRUE) - ELSE (found_vers LESS req_vers) - SET(QT4_INSTALLED_VERSION_TOO_NEW TRUE) - ENDIF (found_vers LESS req_vers) - ENDIF(found_vers EQUAL req_vers) - ELSE( Qt4_FIND_VERSION_EXACT ) - IF (found_vers LESS req_vers) - SET(QT4_QMAKE_FOUND FALSE) - SET(QT4_INSTALLED_VERSION_TOO_OLD TRUE) - ELSE (found_vers LESS req_vers) - SET(QT4_QMAKE_FOUND TRUE) - ENDIF (found_vers LESS req_vers) - ENDIF( Qt4_FIND_VERSION_EXACT ) - ENDIF (qt_version_tmp) - -ENDIF (QT_QMAKE_EXECUTABLE) - -IF (QT4_QMAKE_FOUND) - - if (WIN32) - # get qt install dir - get_filename_component(_DIR ${QT_QMAKE_EXECUTABLE} PATH ) - get_filename_component(QT_INSTALL_DIR ${_DIR} PATH ) - endif (WIN32) - - # ask qmake for the library dir - # Set QT_LIBRARY_DIR - IF (NOT QT_LIBRARY_DIR OR QT_QMAKE_CHANGED) - _qt4_query_qmake(QT_INSTALL_LIBS QT_LIBRARY_DIR_TMP) - IF(EXISTS "${QT_LIBRARY_DIR_TMP}") - SET(QT_LIBRARY_DIR ${QT_LIBRARY_DIR_TMP} CACHE PATH "Qt library dir" FORCE) - ELSE(EXISTS "${QT_LIBRARY_DIR_TMP}") - MESSAGE("Warning: QT_QMAKE_EXECUTABLE reported QT_INSTALL_LIBS as ${QT_LIBRARY_DIR_TMP}") - MESSAGE("Warning: ${QT_LIBRARY_DIR_TMP} does NOT exist, Qt must NOT be installed correctly.") - ENDIF(EXISTS "${QT_LIBRARY_DIR_TMP}") - ENDIF(NOT QT_LIBRARY_DIR OR QT_QMAKE_CHANGED) - - IF (APPLE) - IF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework) - SET(QT_USE_FRAMEWORKS ON - CACHE BOOL "Set to ON if Qt build uses frameworks." FORCE) - ELSE (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework) - SET(QT_USE_FRAMEWORKS OFF - CACHE BOOL "Set to ON if Qt build uses frameworks." FORCE) - ENDIF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework) - - MARK_AS_ADVANCED(QT_USE_FRAMEWORKS) - ENDIF (APPLE) - - # ask qmake for the binary dir - IF (QT_LIBRARY_DIR AND NOT QT_BINARY_DIR OR QT_QMAKE_CHANGED) - _qt4_query_qmake(QT_INSTALL_BINS qt_bins) - SET(QT_BINARY_DIR ${qt_bins} CACHE INTERNAL "" FORCE) - ENDIF (QT_LIBRARY_DIR AND NOT QT_BINARY_DIR OR QT_QMAKE_CHANGED) - - # ask qmake for the include dir - IF (QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR OR QT_QMAKE_CHANGED) - _qt4_query_qmake(QT_INSTALL_HEADERS qt_headers) - SET(QT_HEADERS_DIR ${qt_headers} CACHE INTERNAL "" FORCE) - ENDIF (QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR OR QT_QMAKE_CHANGED) - - - # ask qmake for the documentation directory - IF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR OR QT_QMAKE_CHANGED) - _qt4_query_qmake(QT_INSTALL_DOCS qt_doc_dir) - SET(QT_DOC_DIR ${qt_doc_dir} CACHE PATH "The location of the Qt docs" FORCE) - ENDIF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR OR QT_QMAKE_CHANGED) - - # ask qmake for the mkspecs directory - IF (QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR OR QT_QMAKE_CHANGED) - _qt4_query_qmake(QMAKE_MKSPECS qt_mkspecs_dirs) - # do not replace : on windows as it might be a drive letter - # and windows should already use ; as a separator - IF(UNIX) - STRING(REPLACE ":" ";" qt_mkspecs_dirs "${qt_mkspecs_dirs}") - ENDIF(UNIX) - SET(QT_MKSPECS_DIR NOTFOUND) - FIND_PATH(QT_MKSPECS_DIR qconfig.pri PATHS ${qt_mkspecs_dirs} - DOC "The location of the Qt mkspecs containing qconfig.pri" - NO_DEFAULT_PATH ) - ENDIF (QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR OR QT_QMAKE_CHANGED) - - # ask qmake for the plugins directory - IF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR OR QT_QMAKE_CHANGED) - _qt4_query_qmake(QT_INSTALL_PLUGINS qt_plugins_dir) - SET(QT_PLUGINS_DIR ${qt_plugins_dir} CACHE PATH "The location of the Qt plugins" FORCE) - ENDIF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR OR QT_QMAKE_CHANGED) - - # ask qmake for the translations directory - IF (QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR OR QT_QMAKE_CHANGED) - _qt4_query_qmake(QT_INSTALL_TRANSLATIONS qt_translations_dir) - SET(QT_TRANSLATIONS_DIR ${qt_translations_dir} CACHE PATH "The location of the Qt translations" FORCE) - ENDIF (QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR OR QT_QMAKE_CHANGED) - - # ask qmake for the imports directory - IF (QT_LIBRARY_DIR AND NOT QT_IMPORTS_DIR OR QT_QMAKE_CHANGED) - _qt4_query_qmake(QT_INSTALL_IMPORTS qt_imports_dir) - if(qt_imports_dir) - SET(QT_IMPORTS_DIR NOTFOUND) - foreach(qt_cross_path ${CMAKE_FIND_ROOT_PATH}) - set(qt_cross_paths ${qt_cross_paths} "${qt_cross_path}/imports") - endforeach(qt_cross_path) - FIND_PATH(QT_IMPORTS_DIR NAMES Qt - HINTS ${qt_cross_paths} ${qt_imports_dir} - DOC "The location of the Qt imports" - NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH) - mark_as_advanced(QT_IMPORTS_DIR) - endif() - ENDIF (QT_LIBRARY_DIR AND NOT QT_IMPORTS_DIR OR QT_QMAKE_CHANGED) - - # Make variables changeble to the advanced user - MARK_AS_ADVANCED( QT_LIBRARY_DIR QT_DOC_DIR QT_MKSPECS_DIR - QT_PLUGINS_DIR QT_TRANSLATIONS_DIR) - - - ############################################# - # - # Find out what window system we're using - # - ############################################# - # Save required includes and required_flags variables - MACRO_PUSH_REQUIRED_VARS() - # Add QT_INCLUDE_DIR to CMAKE_REQUIRED_INCLUDES - SET(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${QT_HEADERS_DIR}") - # On Mac OS X when Qt has framework support, also add the framework path - IF( QT_USE_FRAMEWORKS ) - SET(CMAKE_REQUIRED_FLAGS "-F${QT_LIBRARY_DIR} ") - ENDIF( QT_USE_FRAMEWORKS ) - # Check for Window system symbols (note: only one should end up being set) - CHECK_SYMBOL_EXISTS(Q_WS_X11 "QtCore/qglobal.h" Q_WS_X11) - CHECK_SYMBOL_EXISTS(Q_WS_WIN "QtCore/qglobal.h" Q_WS_WIN) - CHECK_SYMBOL_EXISTS(Q_WS_QWS "QtCore/qglobal.h" Q_WS_QWS) - CHECK_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC) - IF(Q_WS_MAC) - IF(QT_QMAKE_CHANGED) - UNSET(QT_MAC_USE_COCOA CACHE) - ENDIF(QT_QMAKE_CHANGED) - CHECK_SYMBOL_EXISTS(QT_MAC_USE_COCOA "QtCore/qconfig.h" QT_MAC_USE_COCOA) - ENDIF(Q_WS_MAC) - - IF (QT_QTCOPY_REQUIRED) - CHECK_SYMBOL_EXISTS(QT_IS_QTCOPY "QtCore/qglobal.h" QT_KDE_QT_COPY) - IF (NOT QT_IS_QTCOPY) - MESSAGE(FATAL_ERROR "qt-copy is required, but hasn't been found") - ENDIF (NOT QT_IS_QTCOPY) - ENDIF (QT_QTCOPY_REQUIRED) - - # Restore CMAKE_REQUIRED_INCLUDES+CMAKE_REQUIRED_FLAGS variables - MACRO_POP_REQUIRED_VARS() - # - ############################################# - - - - ######################################## - # - # Setting the INCLUDE-Variables - # - ######################################## - - SET(QT_MODULES QtCore QtGui Qt3Support QtSvg QtScript QtTest QtUiTools - QtHelp QtWebKit QtXmlPatterns QtNetwork QtMultimedia - QtNsPlugin QtOpenGL QtSql QtXml QtDesigner QtDBus QtScriptTools - QtDeclarative) - - IF(Q_WS_X11) - SET(QT_MODULES ${QT_MODULES} QtMotif) - ENDIF(Q_WS_X11) - - IF(QT_QMAKE_CHANGED) - FOREACH(QT_MODULE ${QT_MODULES}) - STRING(TOUPPER ${QT_MODULE} _upper_qt_module) - SET(QT_${_upper_qt_module}_INCLUDE_DIR NOTFOUND) - SET(QT_${_upper_qt_module}_LIBRARY_RELEASE NOTFOUND) - SET(QT_${_upper_qt_module}_LIBRARY_DEBUG NOTFOUND) - ENDFOREACH(QT_MODULE) - SET(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR NOTFOUND) - SET(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NOTFOUND) - SET(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NOTFOUND) - SET(QT_QTASSISTANTCLIENT_INCLUDE_DIR NOTFOUND) - SET(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NOTFOUND) - SET(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NOTFOUND) - SET(QT_QTASSISTANT_INCLUDE_DIR NOTFOUND) - SET(QT_QTASSISTANT_LIBRARY_RELEASE NOTFOUND) - SET(QT_QTASSISTANT_LIBRARY_DEBUG NOTFOUND) - SET(QT_QTCLUCENE_LIBRARY_RELEASE NOTFOUND) - SET(QT_QTCLUCENE_LIBRARY_DEBUG NOTFOUND) - SET(QT_QAXCONTAINER_INCLUDE_DIR NOTFOUND) - SET(QT_QAXCONTAINER_LIBRARY_RELEASE NOTFOUND) - SET(QT_QAXCONTAINER_LIBRARY_DEBUG NOTFOUND) - SET(QT_QAXSERVER_INCLUDE_DIR NOTFOUND) - SET(QT_QAXSERVER_LIBRARY_RELEASE NOTFOUND) - SET(QT_QAXSERVER_LIBRARY_DEBUG NOTFOUND) - IF(WIN32) - SET(QT_QTMAIN_LIBRARY_DEBUG NOTFOUND) - SET(QT_QTMAIN_LIBRARY_RELEASE NOTFOUND) - ENDIF(WIN32) - SET(QT_PHONON_INCLUDE_DIR NOTFOUND) - ENDIF(QT_QMAKE_CHANGED) - - FOREACH(QT_MODULE ${QT_MODULES}) - STRING(TOUPPER ${QT_MODULE} _upper_qt_module) - FIND_PATH(QT_${_upper_qt_module}_INCLUDE_DIR ${QT_MODULE} - PATHS - ${QT_HEADERS_DIR}/${QT_MODULE} - ${QT_LIBRARY_DIR}/${QT_MODULE}.framework/Headers - NO_DEFAULT_PATH - ) - ENDFOREACH(QT_MODULE) - - IF(WIN32) - SET(QT_MODULES ${QT_MODULES} QAxContainer QAxServer) - # Set QT_AXCONTAINER_INCLUDE_DIR and QT_AXSERVER_INCLUDE_DIR - FIND_PATH(QT_QAXCONTAINER_INCLUDE_DIR ActiveQt - PATHS - ${QT_HEADERS_DIR}/ActiveQt - NO_DEFAULT_PATH - ) - FIND_PATH(QT_QAXSERVER_INCLUDE_DIR ActiveQt - PATHS - ${QT_HEADERS_DIR}/ActiveQt - NO_DEFAULT_PATH - ) - ENDIF(WIN32) - - # Set QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR - FIND_PATH(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR QDesignerComponents - PATHS - ${QT_HEADERS_DIR}/QtDesigner - ${QT_LIBRARY_DIR}/QtDesigner.framework/Headers - NO_DEFAULT_PATH - ) - - # Set QT_QTASSISTANT_INCLUDE_DIR - FIND_PATH(QT_QTASSISTANT_INCLUDE_DIR QtAssistant - PATHS - ${QT_HEADERS_DIR}/QtAssistant - ${QT_LIBRARY_DIR}/QtAssistant.framework/Headers - NO_DEFAULT_PATH - ) - - # Set QT_QTASSISTANTCLIENT_INCLUDE_DIR - FIND_PATH(QT_QTASSISTANTCLIENT_INCLUDE_DIR QAssistantClient - PATHS - ${QT_HEADERS_DIR}/QtAssistant - ${QT_LIBRARY_DIR}/QtAssistant.framework/Headers - NO_DEFAULT_PATH - ) - - # Set QT_QT_INCLUDE_DIR - FIND_PATH(QT_QT_INCLUDE_DIR qglobal.h - PATHS - ${QT_HEADERS_DIR}/Qt - ${QT_LIBRARY_DIR}/QtCore.framework/Headers - NO_DEFAULT_PATH - ) - - # Set QT_PHONON_INCLUDE_DIR - # Qt >= 4.5.3 (or kde-qt-4.5.2 which has the fix too) : Phonon/ClassName is inside include/phonon - # With previous versions of Qt, this could not work; upgrade Qt or use a standalone phonon - FIND_PATH(QT_PHONON_INCLUDE_DIR Phonon - PATHS - ${QT_HEADERS_DIR}/phonon - NO_DEFAULT_PATH - ) - SET(QT_MODULES ${QT_MODULES} phonon) - - # Set QT_INCLUDE_DIR by removine "/QtCore" in the string ${QT_QTCORE_INCLUDE_DIR} - IF( QT_QTCORE_INCLUDE_DIR AND NOT QT_INCLUDE_DIR) - IF (QT_USE_FRAMEWORKS) - SET(QT_INCLUDE_DIR ${QT_HEADERS_DIR}) - ELSE (QT_USE_FRAMEWORKS) - STRING( REGEX REPLACE "/QtCore$" "" qt4_include_dir ${QT_QTCORE_INCLUDE_DIR}) - SET( QT_INCLUDE_DIR ${qt4_include_dir} CACHE PATH "") - ENDIF (QT_USE_FRAMEWORKS) - ENDIF( QT_QTCORE_INCLUDE_DIR AND NOT QT_INCLUDE_DIR) - - IF( NOT QT_INCLUDE_DIR) - IF(Qt4_FIND_REQUIRED) - MESSAGE( FATAL_ERROR "Could NOT find QtCore header") - ENDIF(Qt4_FIND_REQUIRED) - ENDIF( NOT QT_INCLUDE_DIR) - - # Make variables changeble to the advanced user - MARK_AS_ADVANCED( QT_INCLUDE_DIR QT_QT_INCLUDE_DIR) - - # Set QT_INCLUDES - SET( QT_INCLUDES ${QT_QT_INCLUDE_DIR} ${QT_MKSPECS_DIR}/default ${QT_INCLUDE_DIR} ) - - - ####################################### - # - # Qt configuration - # - ####################################### - IF(EXISTS "${QT_MKSPECS_DIR}/qconfig.pri") - FILE(READ ${QT_MKSPECS_DIR}/qconfig.pri _qconfig_FILE_contents) - STRING(REGEX MATCH "QT_CONFIG[^\n]+" QT_QCONFIG "${_qconfig_FILE_contents}") - STRING(REGEX MATCH "CONFIG[^\n]+" QT_CONFIG "${_qconfig_FILE_contents}") - STRING(REGEX MATCH "EDITION[^\n]+" QT_EDITION "${_qconfig_FILE_contents}") - STRING(REGEX MATCH "QT_LIBINFIX[^\n]+" _qconfig_qt_libinfix "${_qconfig_FILE_contents}") - STRING(REGEX REPLACE "QT_LIBINFIX *= *([^\n]*)" "\\1" QT_LIBINFIX "${_qconfig_qt_libinfix}") - ENDIF(EXISTS "${QT_MKSPECS_DIR}/qconfig.pri") - IF("${QT_EDITION}" MATCHES "DesktopLight") - SET(QT_EDITION_DESKTOPLIGHT 1) - ENDIF("${QT_EDITION}" MATCHES "DesktopLight") - - ######################################## - # - # Setting the LIBRARY-Variables - # - ######################################## - - # find the libraries - FOREACH(QT_MODULE ${QT_MODULES}) - STRING(TOUPPER ${QT_MODULE} _upper_qt_module) - FIND_LIBRARY(QT_${_upper_qt_module}_LIBRARY_RELEASE - NAMES ${QT_MODULE}${QT_LIBINFIX} ${QT_MODULE}${QT_LIBINFIX}4 - PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH - ) - FIND_LIBRARY(QT_${_upper_qt_module}_LIBRARY_DEBUG - NAMES ${QT_MODULE}${QT_LIBINFIX}_debug ${QT_MODULE}${QT_LIBINFIX}d ${QT_MODULE}${QT_LIBINFIX}d4 - PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH - ) - ENDFOREACH(QT_MODULE) - - # QtUiTools not with other frameworks with binary installation (in /usr/lib) - IF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE) - FIND_LIBRARY(QT_QTUITOOLS_LIBRARY_RELEASE NAMES QtUiTools${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR}) - ENDIF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE) - - IF( NOT QT_QTCORE_LIBRARY_DEBUG AND NOT QT_QTCORE_LIBRARY_RELEASE ) - - # try dropping a hint if trying to use Visual Studio with Qt built by mingw - IF(QT_LIBRARY_DIR AND MSVC) - IF(EXISTS ${QT_LIBRARY_DIR}/libqtmain.a) - MESSAGE( FATAL_ERROR "It appears you're trying to use Visual Studio with Qt built by mingw") - ENDIF(EXISTS ${QT_LIBRARY_DIR}/libqtmain.a) - ENDIF(QT_LIBRARY_DIR AND MSVC) - - IF(Qt4_FIND_REQUIRED) - MESSAGE( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details.") - ENDIF(Qt4_FIND_REQUIRED) - ENDIF( NOT QT_QTCORE_LIBRARY_DEBUG AND NOT QT_QTCORE_LIBRARY_RELEASE ) - - # Set QT_QTDESIGNERCOMPONENTS_LIBRARY - FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NAMES QtDesignerComponents${QT_LIBINFIX} QtDesignerComponents${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) - FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NAMES QtDesignerComponents${QT_LIBINFIX}_debug QtDesignerComponents${QT_LIBINFIX}d QtDesignerComponents${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) - - # Set QT_QTMAIN_LIBRARY - IF(WIN32) - FIND_LIBRARY(QT_QTMAIN_LIBRARY_RELEASE NAMES qtmain${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR} - NO_DEFAULT_PATH) - FIND_LIBRARY(QT_QTMAIN_LIBRARY_DEBUG NAMES qtmain${QT_LIBINFIX}d PATHS ${QT_LIBRARY_DIR} - NO_DEFAULT_PATH) - ENDIF(WIN32) - - # Set QT_QTASSISTANTCLIENT_LIBRARY - FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) - FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) - - # Set QT_QTASSISTANT_LIBRARY - FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 QtAssistant${QT_LIBINFIX} QtAssistant${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) - FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_DEBUG NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 QtAssistant${QT_LIBINFIX}_debug QtAssistant${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) - - # Set QT_QTHELP_LIBRARY - FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene${QT_LIBINFIX} QtCLucene${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) - FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_DEBUG NAMES QtCLucene${QT_LIBINFIX}_debug QtCLucene${QT_LIBINFIX}d QtCLucene${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) - # QtCLucene not with other frameworks with binary installation (in /usr/lib) - IF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE) - FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR}) - ENDIF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE) - - ############################################ - # - # Check the existence of the libraries. - # - ############################################ - - # On OSX when Qt is found as framework, never use the imported targets for now, since - # in this case the handling of the framework directory currently does not work correctly. - IF(QT_USE_FRAMEWORKS) - SET(QT_USE_IMPORTED_TARGETS FALSE) - ENDIF(QT_USE_FRAMEWORKS) - - - MACRO (_QT4_ADJUST_LIB_VARS _camelCaseBasename) - - STRING(TOUPPER "${_camelCaseBasename}" basename) - - # The name of the imported targets, i.e. the prefix "Qt4::" must not change, - # since it is stored in EXPORT-files as name of a required library. If the name would change - # here, this would lead to the imported Qt4-library targets not being resolved by cmake anymore. - IF (QT_${basename}_LIBRARY_RELEASE OR QT_${basename}_LIBRARY_DEBUG) - - IF(NOT TARGET Qt4::${_camelCaseBasename}) - ADD_LIBRARY(Qt4::${_camelCaseBasename} UNKNOWN IMPORTED ) - - IF (QT_${basename}_LIBRARY_RELEASE) - SET_PROPERTY(TARGET Qt4::${_camelCaseBasename} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) - SET_PROPERTY(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_RELEASE "${QT_${basename}_LIBRARY_RELEASE}" ) - ENDIF (QT_${basename}_LIBRARY_RELEASE) - - IF (QT_${basename}_LIBRARY_DEBUG) - SET_PROPERTY(TARGET Qt4::${_camelCaseBasename} APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) - SET_PROPERTY(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_DEBUG "${QT_${basename}_LIBRARY_DEBUG}" ) - ENDIF (QT_${basename}_LIBRARY_DEBUG) - ENDIF(NOT TARGET Qt4::${_camelCaseBasename}) - - # If QT_USE_IMPORTED_TARGETS is enabled, the QT_QTFOO_LIBRARY variables are set to point at these - # imported targets. This works better in general, and is also in almost all cases fully - # backward compatible. The only issue is when a project A which had this enabled then exports its - # libraries via export or EXPORT_LIBRARY_DEPENDENCIES(). In this case the libraries from project - # A will depend on the imported Qt targets, and the names of these imported targets will be stored - # in the dependency files on disk. This means when a project B then uses project A, these imported - # targets must be created again, otherwise e.g. "Qt4__QtCore" will be interpreted as name of a - # library file on disk, and not as a target, and linking will fail: - IF(QT_USE_IMPORTED_TARGETS) - SET(QT_${basename}_LIBRARY Qt4::${_camelCaseBasename} ) - SET(QT_${basename}_LIBRARIES Qt4::${_camelCaseBasename} ) - ELSE(QT_USE_IMPORTED_TARGETS) - - # if the release- as well as the debug-version of the library have been found: - IF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE) - # if the generator supports configuration types then set - # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value - IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) - SET(QT_${basename}_LIBRARY optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG}) - ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) - # if there are no configuration types and CMAKE_BUILD_TYPE has no value - # then just use the release libraries - SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_RELEASE} ) - ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) - SET(QT_${basename}_LIBRARIES optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG}) - ENDIF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE) - - # if only the release version was found, set the debug variable also to the release version - IF (QT_${basename}_LIBRARY_RELEASE AND NOT QT_${basename}_LIBRARY_DEBUG) - SET(QT_${basename}_LIBRARY_DEBUG ${QT_${basename}_LIBRARY_RELEASE}) - SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_RELEASE}) - SET(QT_${basename}_LIBRARIES ${QT_${basename}_LIBRARY_RELEASE}) - ENDIF (QT_${basename}_LIBRARY_RELEASE AND NOT QT_${basename}_LIBRARY_DEBUG) - - # if only the debug version was found, set the release variable also to the debug version - IF (QT_${basename}_LIBRARY_DEBUG AND NOT QT_${basename}_LIBRARY_RELEASE) - SET(QT_${basename}_LIBRARY_RELEASE ${QT_${basename}_LIBRARY_DEBUG}) - SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_DEBUG}) - SET(QT_${basename}_LIBRARIES ${QT_${basename}_LIBRARY_DEBUG}) - ENDIF (QT_${basename}_LIBRARY_DEBUG AND NOT QT_${basename}_LIBRARY_RELEASE) - - # put the value in the cache: - SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY} CACHE STRING "The Qt ${basename} library" FORCE) - - ENDIF(QT_USE_IMPORTED_TARGETS) - -# message(STATUS "QT_${basename}_LIBRARY: ${QT_${basename}_LIBRARY}") - - SET(QT_${basename}_FOUND 1) - - ENDIF (QT_${basename}_LIBRARY_RELEASE OR QT_${basename}_LIBRARY_DEBUG) - - IF (QT_${basename}_INCLUDE_DIR) - #add the include directory to QT_INCLUDES - SET(QT_INCLUDES "${QT_${basename}_INCLUDE_DIR}" ${QT_INCLUDES}) - ENDIF (QT_${basename}_INCLUDE_DIR) - - # Make variables changeble to the advanced user - MARK_AS_ADVANCED(QT_${basename}_LIBRARY QT_${basename}_LIBRARY_RELEASE QT_${basename}_LIBRARY_DEBUG QT_${basename}_INCLUDE_DIR) - ENDMACRO (_QT4_ADJUST_LIB_VARS) - - - # Set QT_xyz_LIBRARY variable and add - # library include path to QT_INCLUDES - _QT4_ADJUST_LIB_VARS(QtCore) - _QT4_ADJUST_LIB_VARS(QtGui) - _QT4_ADJUST_LIB_VARS(Qt3Support) - _QT4_ADJUST_LIB_VARS(QtAssistant) - _QT4_ADJUST_LIB_VARS(QtAssistantClient) - _QT4_ADJUST_LIB_VARS(QtCLucene) - _QT4_ADJUST_LIB_VARS(QtDBus) - _QT4_ADJUST_LIB_VARS(QtDeclarative) - _QT4_ADJUST_LIB_VARS(QtDesigner) - _QT4_ADJUST_LIB_VARS(QtDesignerComponents) - _QT4_ADJUST_LIB_VARS(QtHelp) - _QT4_ADJUST_LIB_VARS(QtMultimedia) - _QT4_ADJUST_LIB_VARS(QtNetwork) - _QT4_ADJUST_LIB_VARS(QtNsPlugin) - _QT4_ADJUST_LIB_VARS(QtOpenGL) - _QT4_ADJUST_LIB_VARS(QtScript) - _QT4_ADJUST_LIB_VARS(QtScriptTools) - _QT4_ADJUST_LIB_VARS(QtSql) - _QT4_ADJUST_LIB_VARS(QtSvg) - _QT4_ADJUST_LIB_VARS(QtTest) - _QT4_ADJUST_LIB_VARS(QtUiTools) - _QT4_ADJUST_LIB_VARS(QtWebKit) - _QT4_ADJUST_LIB_VARS(QtXml) - _QT4_ADJUST_LIB_VARS(QtXmlPatterns) - _QT4_ADJUST_LIB_VARS(phonon) - - # platform dependent libraries - IF(Q_WS_X11) - _QT4_ADJUST_LIB_VARS(QtMotif) - ENDIF(Q_WS_X11) - IF(WIN32) - _QT4_ADJUST_LIB_VARS(qtmain) - _QT4_ADJUST_LIB_VARS(QAxServer) - _QT4_ADJUST_LIB_VARS(QAxContainer) - ENDIF(WIN32) - - # If Qt is installed as a framework, we need to add QT_QTCORE_LIBRARY here (which - # is the framework directory in that case), since this will make the cmake include_directories() - # command recognize that we need the framework flag with the respective directory (-F) - IF(QT_USE_FRAMEWORKS) - SET(QT_INCLUDES ${QT_INCLUDES} ${QT_QTCORE_LIBRARY} ) - SET(QT_INCLUDE_DIR ${QT_INCLUDE_DIR} ${QT_QTCORE_LIBRARY} ) - ENDIF(QT_USE_FRAMEWORKS) - - - - ####################################### - # - # Check the executables of Qt - # ( moc, uic, rcc ) - # - ####################################### - - - IF(QT_QMAKE_CHANGED) - SET(QT_UIC_EXECUTABLE NOTFOUND) - SET(QT_MOC_EXECUTABLE NOTFOUND) - SET(QT_UIC3_EXECUTABLE NOTFOUND) - SET(QT_RCC_EXECUTABLE NOTFOUND) - SET(QT_DBUSCPP2XML_EXECUTABLE NOTFOUND) - SET(QT_DBUSXML2CPP_EXECUTABLE NOTFOUND) - SET(QT_LUPDATE_EXECUTABLE NOTFOUND) - SET(QT_LRELEASE_EXECUTABLE NOTFOUND) - SET(QT_QCOLLECTIONGENERATOR_EXECUTABLE NOTFOUND) - SET(QT_DESIGNER_EXECUTABLE NOTFOUND) - SET(QT_LINGUIST_EXECUTABLE NOTFOUND) - ENDIF(QT_QMAKE_CHANGED) - - FIND_PROGRAM(QT_MOC_EXECUTABLE - NAMES moc-qt4 moc - PATHS ${QT_BINARY_DIR} - NO_DEFAULT_PATH - ) - - FIND_PROGRAM(QT_UIC_EXECUTABLE - NAMES uic-qt4 uic - PATHS ${QT_BINARY_DIR} - NO_DEFAULT_PATH - ) - - FIND_PROGRAM(QT_UIC3_EXECUTABLE - NAMES uic3 - PATHS ${QT_BINARY_DIR} - NO_DEFAULT_PATH - ) - - FIND_PROGRAM(QT_RCC_EXECUTABLE - NAMES rcc - PATHS ${QT_BINARY_DIR} - NO_DEFAULT_PATH - ) - -if(NOT WINCE) - FIND_PROGRAM(QT_DBUSCPP2XML_EXECUTABLE - NAMES qdbuscpp2xml - PATHS ${QT_BINARY_DIR} - NO_DEFAULT_PATH - ) - - FIND_PROGRAM(QT_DBUSXML2CPP_EXECUTABLE - NAMES qdbusxml2cpp - PATHS ${QT_BINARY_DIR} - NO_DEFAULT_PATH - ) -else() - FIND_PROGRAM(QT_DBUSCPP2XML_EXECUTABLE - NAMES qdbuscpp2xml - PATHS ${HOST_BINDIR} - NO_DEFAULT_PATH - ) - - FIND_PROGRAM(QT_DBUSXML2CPP_EXECUTABLE - NAMES qdbusxml2cpp - PATHS ${HOST_BINDIR} - NO_DEFAULT_PATH - ) -endif() - - FIND_PROGRAM(QT_LUPDATE_EXECUTABLE - NAMES lupdate-qt4 lupdate - PATHS ${QT_BINARY_DIR} - NO_DEFAULT_PATH - ) - - FIND_PROGRAM(QT_LRELEASE_EXECUTABLE - NAMES lrelease-qt4 lrelease - PATHS ${QT_BINARY_DIR} - NO_DEFAULT_PATH - ) - - FIND_PROGRAM(QT_QCOLLECTIONGENERATOR_EXECUTABLE - NAMES qcollectiongenerator-qt4 qcollectiongenerator - PATHS ${QT_BINARY_DIR} - NO_DEFAULT_PATH - ) - - FIND_PROGRAM(QT_DESIGNER_EXECUTABLE - NAMES designer-qt4 designer - PATHS ${QT_BINARY_DIR} - NO_DEFAULT_PATH - ) - - FIND_PROGRAM(QT_LINGUIST_EXECUTABLE - NAMES linguist-qt4 linguist - PATHS ${QT_BINARY_DIR} - NO_DEFAULT_PATH - ) - - IF (QT_MOC_EXECUTABLE) - SET(QT_WRAP_CPP "YES") - ENDIF (QT_MOC_EXECUTABLE) - - IF (QT_UIC_EXECUTABLE) - SET(QT_WRAP_UI "YES") - ENDIF (QT_UIC_EXECUTABLE) - - - - MARK_AS_ADVANCED( QT_UIC_EXECUTABLE QT_UIC3_EXECUTABLE QT_MOC_EXECUTABLE - QT_RCC_EXECUTABLE QT_DBUSXML2CPP_EXECUTABLE QT_DBUSCPP2XML_EXECUTABLE - QT_LUPDATE_EXECUTABLE QT_LRELEASE_EXECUTABLE QT_QCOLLECTIONGENERATOR_EXECUTABLE - QT_DESIGNER_EXECUTABLE QT_LINGUIST_EXECUTABLE) - - - # get the directory of the current file, used later on in the file - GET_FILENAME_COMPONENT( _qt4_current_dir "${CMAKE_CURRENT_LIST_FILE}" PATH) - - ###################################### - # - # Macros for building Qt files - # - ###################################### - - INCLUDE("${_qt4_current_dir}/Qt4Macros.cmake") - - - ###################################### - # - # decide if Qt got found - # - ###################################### - - # if the includes,libraries,moc,uic and rcc are found then we have it - IF( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND - QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY) - SET( QT4_FOUND "YES" ) - IF( NOT Qt4_FIND_QUIETLY) - MESSAGE(STATUS "Found Qt-Version ${QTVERSION} (using ${QT_QMAKE_EXECUTABLE})") - ENDIF( NOT Qt4_FIND_QUIETLY) - ELSE( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND - QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY) - SET( QT4_FOUND "NO") - SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE) - IF( Qt4_FIND_REQUIRED) - IF ( NOT QT_LIBRARY_DIR ) - MESSAGE(STATUS "Qt libraries NOT found!") - ENDIF(NOT QT_LIBRARY_DIR ) - IF ( NOT QT_INCLUDE_DIR ) - MESSAGE(STATUS "Qt includes NOT found!") - ENDIF( NOT QT_INCLUDE_DIR ) - IF ( NOT QT_MOC_EXECUTABLE ) - MESSAGE(STATUS "Qt's moc NOT found!") - ENDIF( NOT QT_MOC_EXECUTABLE ) - IF ( NOT QT_UIC_EXECUTABLE ) - MESSAGE(STATUS "Qt's uic NOT found!") - ENDIF( NOT QT_UIC_EXECUTABLE ) - IF ( NOT QT_RCC_EXECUTABLE ) - MESSAGE(STATUS "Qt's rcc NOT found!") - ENDIF( NOT QT_RCC_EXECUTABLE ) - MESSAGE( FATAL_ERROR "Qt libraries, includes, moc, uic or/and rcc NOT found!") - ENDIF( Qt4_FIND_REQUIRED) - ENDIF( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND - QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY) - - SET(QT_FOUND ${QT4_FOUND}) - - - ############################################### - # - # configuration/system dependent settings - # - ############################################### - - INCLUDE("${_qt4_current_dir}/Qt4ConfigDependentSettings.cmake") - - - ####################################### - # - # compatibility settings - # - ####################################### - # Backwards compatibility for CMake1.4 and 1.2 - SET (QT_MOC_EXE ${QT_MOC_EXECUTABLE} ) - SET (QT_UIC_EXE ${QT_UIC_EXECUTABLE} ) - - SET( QT_QT_LIBRARY "") - -ELSE(QT4_QMAKE_FOUND) - - SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE) - - # The code below is overly complex to make sure we do not break compatibility with CMake 2.6.x - # For CMake 2.8, it should be simplified by getting rid of QT4_INSTALLED_VERSION_TOO_OLD and - # QT4_INSTALLED_VERSION_TOO_NEW - IF(Qt4_FIND_REQUIRED) - IF(QT4_INSTALLED_VERSION_TOO_OLD) - IF( Qt4_FIND_VERSION_EXACT ) - MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too old, version ${QT_MIN_VERSION} is required") - ELSE( Qt4_FIND_VERSION_EXACT ) - MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too old, at least version ${QT_MIN_VERSION} is required") - ENDIF( Qt4_FIND_VERSION_EXACT ) - ELSE(QT4_INSTALLED_VERSION_TOO_OLD) - IF( Qt4_FIND_VERSION_EXACT AND QT4_INSTALLED_VERSION_TOO_NEW ) - MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too new, version ${QT_MIN_VERSION} is required") - ELSE( Qt4_FIND_VERSION_EXACT AND QT4_INSTALLED_VERSION_TOO_NEW ) - MESSAGE( FATAL_ERROR "Qt qmake not found!") - ENDIF( Qt4_FIND_VERSION_EXACT AND QT4_INSTALLED_VERSION_TOO_NEW ) - ENDIF(QT4_INSTALLED_VERSION_TOO_OLD) - ELSE(Qt4_FIND_REQUIRED) - IF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY) - MESSAGE(STATUS "The installed Qt version ${QTVERSION} is too old, at least version ${QT_MIN_VERSION} is required") - ENDIF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY) - ENDIF(Qt4_FIND_REQUIRED) - -ENDIF (QT4_QMAKE_FOUND) - diff --git a/attic/modules/FindSIP.cmake b/attic/modules/FindSIP.cmake deleted file mode 100644 index d94bd8ef..00000000 --- a/attic/modules/FindSIP.cmake +++ /dev/null @@ -1,60 +0,0 @@ -# Find SIP -# ~~~~~~~~ -# -# SIP website: https://riverbankcomputing.com/software/sip -# -# Find the installed version of SIP. FindSIP should be called after Python -# has been found. -# -# This file defines the following variables: -# -# SIP_VERSION - The version of SIP found expressed as a 6 digit hex number -# suitable for comparison as a string. -# -# SIP_VERSION_STR - The version of SIP found as a human readable string. -# -# SIP_EXECUTABLE - Path and filename of the SIP command line executable. -# -# SIP_INCLUDE_DIR - Directory holding the SIP C++ header file. -# -# SIP_DEFAULT_SIP_DIR - Default directory where .sip files should be installed -# into. - -# Copyright (c) 2007, Simon Edwards <simon@simonzone.com> -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - - -IF(SIP_VERSION) - # Already in cache, be silent - SET(SIP_FOUND TRUE) -ELSE(SIP_VERSION) - - FIND_FILE(_find_sip_py FindSIP.py PATHS ${CMAKE_MODULE_PATH}) - - EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${_find_sip_py} OUTPUT_VARIABLE sip_config) - IF(sip_config) - STRING(REGEX REPLACE "^sip_version:([^\n]+).*$" "\\1" SIP_VERSION ${sip_config}) - STRING(REGEX REPLACE ".*\nsip_version_str:([^\n]+).*$" "\\1" SIP_VERSION_STR ${sip_config}) - STRING(REGEX REPLACE ".*\nsip_bin:([^\n]+).*$" "\\1" SIP_EXECUTABLE ${sip_config}) - IF(NOT SIP_DEFAULT_SIP_DIR) - STRING(REGEX REPLACE ".*\ndefault_sip_dir:([^\n]+).*$" "\\1" SIP_DEFAULT_SIP_DIR ${sip_config}) - ENDIF(NOT SIP_DEFAULT_SIP_DIR) - STRING(REGEX REPLACE ".*\nsip_inc_dir:([^\n]+).*$" "\\1" SIP_INCLUDE_DIR ${sip_config}) - FILE(TO_CMAKE_PATH ${SIP_DEFAULT_SIP_DIR} SIP_DEFAULT_SIP_DIR) - FILE(TO_CMAKE_PATH ${SIP_INCLUDE_DIR} SIP_INCLUDE_DIR) - SET(SIP_FOUND TRUE) - ENDIF(sip_config) - - IF(SIP_FOUND) - IF(NOT SIP_FIND_QUIETLY) - MESSAGE(STATUS "Found SIP version: ${SIP_VERSION_STR}") - ENDIF(NOT SIP_FIND_QUIETLY) - ELSE(SIP_FOUND) - IF(SIP_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find SIP") - ENDIF(SIP_FIND_REQUIRED) - ENDIF(SIP_FOUND) - -ENDIF(SIP_VERSION) diff --git a/attic/modules/FindSIP.py b/attic/modules/FindSIP.py deleted file mode 100644 index ecb734f2..00000000 --- a/attic/modules/FindSIP.py +++ /dev/null @@ -1,15 +0,0 @@ -# FindSIP.py -# -# Copyright (c) 2007, Simon Edwards <simon@simonzone.com> -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -import sys -import sipconfig - -sipcfg = sipconfig.Configuration() -print("sip_version:%06.0x" % sipcfg.sip_version) -print("sip_version_str:%s" % sipcfg.sip_version_str) -print("sip_bin:%s" % sipcfg.sip_bin) -print("default_sip_dir:%s" % sipcfg.default_sip_dir) -print("sip_inc_dir:%s" % sipcfg.sip_inc_dir) diff --git a/attic/modules/FindSamba.cmake b/attic/modules/FindSamba.cmake deleted file mode 100644 index 92746fd5..00000000 --- a/attic/modules/FindSamba.cmake +++ /dev/null @@ -1,62 +0,0 @@ -# - Try to find the samba directory library -# Once done this will define -# -# SAMBA_FOUND - system has SAMBA -# SAMBA_INCLUDE_DIR - the SAMBA include directory -# SAMBA_LIBRARIES - The libraries needed to use SAMBA -# Set SAMBA_REQUIRE_SMBC_SET_CONTEXT to TRUE if you need a version of Samba -# which comes with smbc_set_context() - -# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -if(SAMBA_INCLUDE_DIR AND SAMBA_LIBRARIES) - # Already in cache, be silent - set(Samba_FIND_QUIETLY TRUE) -endif() - -find_path(SAMBA_INCLUDE_DIR NAMES libsmbclient.h ) - -find_library(SAMBA_LIBRARIES NAMES smbclient ) - - -if(SAMBA_INCLUDE_DIR AND SAMBA_LIBRARIES) - set(SAMBA_FOUND TRUE) - # check whether libsmbclient has smbc_set_context() - include(CheckSymbolExists) - include(MacroPushRequiredVars) - macro_push_required_vars() - set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${SAMBA_LIBRARIES}) - set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${SAMBA_INCLUDE_DIR}) - check_symbol_exists(smbc_set_context "libsmbclient.h" SAMBA_HAVE_SMBC_SET_CONTEXT) - check_symbol_exists(smbc_option_set "libsmbclient.h" SAMBA_HAVE_SMBC_OPTION_SET) - macro_pop_required_vars() - # fail if smbc_set_context() was required but hasn't been found - if (SAMBA_REQUIRE_SMBC_SET_CONTEXT AND NOT SAMBA_HAVE_SMBC_SET_CONTEXT) - set(SAMBA_FOUND FALSE) - endif (SAMBA_REQUIRE_SMBC_SET_CONTEXT AND NOT SAMBA_HAVE_SMBC_SET_CONTEXT) - # fail if smbc_option_set() was required but hasn't been found - if (SAMBA_REQUIRE_SMBC_OPTION_SET AND NOT SAMBA_HAVE_SMBC_OPTION_SET) - set(SAMBA_FOUND FALSE) - endif (SAMBA_REQUIRE_SMBC_OPTION_SET AND NOT SAMBA_HAVE_SMBC_OPTION_SET) - -else() - set(SAMBA_FOUND FALSE) - set(SAMBA_HAVE_SMBC_SET_CONTEXT FALSE) -endif() - - -if(SAMBA_FOUND) - if(NOT Samba_FIND_QUIETLY) - message(STATUS "Found samba: ${SAMBA_LIBRARIES}") - endif() -else() - if (Samba_FIND_REQUIRED) - message(FATAL_ERROR "Could not find Samba library") - endif (Samba_FIND_REQUIRED) -endif() - -mark_as_advanced(SAMBA_INCLUDE_DIR SAMBA_LIBRARIES) - diff --git a/attic/modules/FindSane.cmake b/attic/modules/FindSane.cmake deleted file mode 100644 index 64efa87a..00000000 --- a/attic/modules/FindSane.cmake +++ /dev/null @@ -1,21 +0,0 @@ -# cmake macro to test if we use sane -# -# SANE_FOUND - system has SANE libs -# SANE_INCLUDE_DIR - the SANE include directory -# SANE_LIBRARIES - The libraries needed to use SANE - -# Copyright (c) 2006, Marcus Hufgard <hufgardm@hufgard.de> 2006 -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -FIND_PATH(SANE_INCLUDE_DIR sane/sane.h) - -FIND_LIBRARY(SANE_LIBRARY NAMES sane libsane - PATH_SUFFIXES sane -) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Sane DEFAULT_MSG SANE_LIBRARY SANE_INCLUDE_DIR ) - -MARK_AS_ADVANCED(SANE_INCLUDE_DIR SANE_LIBRARY) diff --git a/attic/modules/FindSqlite.cmake b/attic/modules/FindSqlite.cmake deleted file mode 100644 index ed8d4ea1..00000000 --- a/attic/modules/FindSqlite.cmake +++ /dev/null @@ -1,50 +0,0 @@ -# - Try to find Sqlite -# Once done this will define -# -# SQLITE_FOUND - system has Sqlite -# SQLITE_INCLUDE_DIR - the Sqlite include directory -# SQLITE_LIBRARIES - Link these to use Sqlite -# SQLITE_DEFINITIONS - Compiler switches required for using Sqlite -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# - - -# Copyright (c) 2008, Gilles Caulier, <caulier.gilles@gmail.com> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -if ( SQLITE_INCLUDE_DIR AND SQLITE_LIBRARIES ) - # in cache already - SET(Sqlite_FIND_QUIETLY TRUE) -endif ( SQLITE_INCLUDE_DIR AND SQLITE_LIBRARIES ) - -# use pkg-config to get the directories and then use these values -# in the FIND_PATH() and FIND_LIBRARY() calls -if( NOT WIN32 ) - find_package(PkgConfig) - - pkg_check_modules(PC_SQLITE QUIET sqlite3) - - set(SQLITE_DEFINITIONS ${PC_SQLITE_CFLAGS_OTHER}) -endif() - -find_path(SQLITE_INCLUDE_DIR NAMES sqlite3.h - PATHS - ${PC_SQLITE_INCLUDEDIR} - ${PC_SQLITE_INCLUDE_DIRS} -) - -find_library(SQLITE_LIBRARIES NAMES sqlite3 - PATHS - ${PC_SQLITE_LIBDIR} - ${PC_SQLITE_LIBRARY_DIRS} -) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Sqlite DEFAULT_MSG SQLITE_INCLUDE_DIR SQLITE_LIBRARIES ) - -# show the SQLITE_INCLUDE_DIR and SQLITE_LIBRARIES variables only in the advanced view -mark_as_advanced(SQLITE_INCLUDE_DIR SQLITE_LIBRARIES ) - diff --git a/attic/modules/FindStrigi.cmake b/attic/modules/FindStrigi.cmake deleted file mode 100644 index 214894c1..00000000 --- a/attic/modules/FindStrigi.cmake +++ /dev/null @@ -1,148 +0,0 @@ -# - Try to find Strigi, a fast and small desktop search program (http://strigi.sourceforge.net ) -# Once done this will define -# -# STRIGI_FOUND - system has Strigi -# STRIGI_INCLUDE_DIR - the Strigi include directory -# STRIGI_STREAMANALYZER_LIBRARY - Link these to use Strigi streamanalyzer -# STRIGI_STREAMS_LIBRARY - Link these to use Strigi streams -# STRIGI_LINE_ANALYZER_PREFIX - strigi plugin prefix -# STRIGI_THROUGH_ANALYZER_PREFIX - strigi plugin prefix - -# Copyright (c) 2008, Jos van den Oever, <jos@vandenoever.info> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -if(NOT STRIGI_MIN_VERSION) - set(STRIGI_MIN_VERSION "0.5.9") -endif() - -file(TO_CMAKE_PATH "$ENV{STRIGI_HOME}" strigi_home) - -set(_Strigi_FIND_QUIETLY ${Strigi_FIND_QUIETLY}) -# Try to find and load the StrigiConfig.cmake installed by kdesupport/strigi -find_package(Strigi QUIET NO_MODULE PATHS "${strigi_home}/lib/strigi" "${strigi_home}/lib64/strigi") -set(Strigi_FIND_QUIETLY ${_Strigi_FIND_QUIETLY}) - -# If StrigiConfig.cmake (installed by kdesupport/Strigi) has been found -# and it contains all necessary information (since November 16th, 2008), use the information -# included there, otherwise search it in the same way as any non-cmake project. -# This variable is set by StrigiConfig.cmake . Alex -if (STRIGI_CONFIG_FOUND_AND_HAS_COMPLETE_INFORMATION) - set (_strigiErrorMessage "Couldn't find Strigi streams and streamanalyzer libraries. Set the environment variable STRIGI_HOME (or CMAKE_PREFIX_PATH) to the strigi install dir.") - set(STRIGI_VERSION_OK TRUE) - if(STRIGI_VERSION VERSION_LESS ${STRIGI_MIN_VERSION}) - set(_strigiErrorMessage "Strigi version ${STRIGI_VERSION} found, but at least version ${STRIGI_MIN_VERSION} is required") - set(STRIGI_VERSION_OK FALSE) - endif() - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Strigi - "${_strigiErrorMessage}" - STRIGI_STREAMS_LIBRARY STRIGI_STREAMANALYZER_LIBRARY STRIGI_INCLUDE_DIR STRIGI_VERSION_OK) - -else() - # this else() branch is for finding strigi versions before November 16th, 2008. Alex - include(FindLibraryWithDebug) - include(MacroPushRequiredVars) - - if (WIN32) - file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _program_FILES_DIR) - endif() - - if (NOT WIN32) - if(NOT strigi_home) - find_package(PkgConfig) - if(PKG_CONFIG_EXECUTABLE) - pkg_check_modules(STRIGI QUIET libstreamanalyzer>=${STRIGI_MIN_VERSION}) - endif() - endif() - endif() - - if (NOT STRIGI_INCLUDEDIR) - find_path(STRIGI_INCLUDE_DIR strigi/streamanalyzer.h - PATHS - ${strigi_home}/include - ${STRIGI_INCLUDEDIR} - ${_program_FILES_DIR}/strigi/include - ) - set( STRIGI_INCLUDEDIR ${STRIGI_INCLUDE_DIR} ) - else (NOT STRIGI_INCLUDEDIR) - set( STRIGI_INCLUDE_DIR ${STRIGI_INCLUDEDIR} ) - endif (NOT STRIGI_INCLUDEDIR) - - - find_library_with_debug(STRIGI_STREAMANALYZER_LIBRARY - WIN32_DEBUG_POSTFIX d - NAMES streamanalyzer - PATHS - ${strigi_home}/lib - ${STRIGI_LIBRARY_DIRS} - ${_program_FILES_DIR}/strigi/lib - ) - - find_library_with_debug(STRIGI_STREAMS_LIBRARY - WIN32_DEBUG_POSTFIX d - NAMES streams - PATHS - ${strigi_home}/lib - ${STRIGI_LIBRARY_DIRS} - ${_program_FILES_DIR}/strigi/lib - ) - - find_library_with_debug(STRIGI_STRIGIQTDBUSCLIENT_LIBRARY - WIN32_DEBUG_POSTFIX d - NAMES strigiqtdbusclient - PATHS - ${strigi_home}/lib - ${STRIGI_LIBRARY_DIRS} - ${_program_FILES_DIR}/strigi/lib - ) - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Strigi - "Couldn't find Strigi streams and streamanalyzer libraries. Set the environment variable STRIGI_HOME (or CMAKE_PREFIX_PATH if using CMake >=2.6) to the strigi install dir." - STRIGI_STREAMS_LIBRARY STRIGI_STREAMANALYZER_LIBRARY STRIGI_INCLUDE_DIR) - - if (STRIGI_FOUND) - set( STRIGI_NEEDS_SIGNED_CHAR TRUE CACHE BOOL "TRUE if strigi is 0.6.0 or later" ) - set( STRIGI_NEEDS_CHAR FALSE CACHE BOOL "TRUE if strigi is 0.5.9 or before" ) - endif (STRIGI_FOUND) - -endif (STRIGI_CONFIG_FOUND_AND_HAS_COMPLETE_INFORMATION) - - -if(WIN32) - # this is needed to have mingw, cygwin and msvc libs installed in one directory - if(MSVC) - set(STRIGI_LINE_ANALYZER_PREFIX msvc_strigila_) - set(STRIGI_THROUGH_ANALYZER_PREFIX msvc_strigita_) - elseif(CYGWIN) - set(STRIGI_LINE_ANALYZER_PREFIX cyg_strigila_) - set(STRIGI_THROUGH_ANALYZER_PREFIX cyg_strigita_) - elseif(MINGW) - set(STRIGI_LINE_ANALYZER_PREFIX mingw_strigila_) - set(STRIGI_THROUGH_ANALYZER_PREFIX mingw_strigita_) - endif() -else() - set(STRIGI_LINE_ANALYZER_PREFIX strigila_) - set(STRIGI_THROUGH_ANALYZER_PREFIX strigita_) -endif() - -mark_as_advanced( - STRIGI_INCLUDE_DIR - STRIGI_STREAMANALYZER_LIBRARY - STRIGI_STREAMANALYZER_LIBRARY_DEBUG - STRIGI_STREAMANALYZER_LIBRARY_RELEASE - STRIGI_STREAMS_LIBRARY - STRIGI_STREAMS_LIBRARY_DEBUG - STRIGI_STREAMS_LIBRARY_RELEASE - STRIGI_STRIGIQTDBUSCLIENT_LIBRARY - STRIGI_STRIGIQTDBUSCLIENT_LIBRARY_DEBUG - STRIGI_STRIGIQTDBUSCLIENT_LIBRARY_RELEASE - STRIGI_LINE_ANALYZER_PREFIX - STRIGI_THROUGH_ANALYZER_PREFIX - STRIGI_NEEDS_SIGNED_CHAR - STRIGI_NEEDS_CHAR -) diff --git a/attic/modules/FindUSB.cmake b/attic/modules/FindUSB.cmake deleted file mode 100644 index 73b54a8e..00000000 --- a/attic/modules/FindUSB.cmake +++ /dev/null @@ -1,30 +0,0 @@ -# - Try to find the freetype library -# Once done this defines -# -# LIBUSB_FOUND - system has libusb -# LIBUSB_INCLUDE_DIR - the libusb include directory -# LIBUSB_LIBRARIES - Link these to use libusb - -# Copyright (c) 2006, 2008 Laurent Montel, <montel@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -if (NOT WIN32) - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - find_package(PkgConfig) - pkg_check_modules(PC_LIBUSB QUIET libusb) -endif() - -find_path(LIBUSB_INCLUDE_DIR usb.h - HINTS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS}) - -find_library(LIBUSB_LIBRARIES NAMES usb - HINTS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(LIBUSB DEFAULT_MSG LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIR) - -mark_as_advanced(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARIES) diff --git a/attic/modules/FindWcecompat.cmake b/attic/modules/FindWcecompat.cmake deleted file mode 100644 index acba2dd4..00000000 --- a/attic/modules/FindWcecompat.cmake +++ /dev/null @@ -1,25 +0,0 @@ -# Try to find Wcecompat functionality -# Once done this will define -# -# WCECOMPAT_FOUND - system has Wcecompat -# WCECOMPAT_INCLUDE_DIR - Wcecompat include directory -# WCECOMPAT_LIBRARIES - Libraries needed to use Wcecompat -# -# Copyright (c) 2010, Andreas Holzammer, <andy@kdab.com> -# -# Redistribution and use is allowed according to the terms of the BSD license. - -find_path(WCECOMPAT_INCLUDE_DIR errno.h PATH_SUFFIXES wcecompat) - -set(WCECOMPAT_LIB_FOUND FALSE) - -if(WCECOMPAT_INCLUDE_DIR) - find_library(WCECOMPAT_LIBRARIES NAMES wcecompat wcecompatex ) - - if(WCECOMPAT_LIBRARIES) - set(WCECOMPAT_LIB_FOUND TRUE) - endif() -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Wcecompat DEFAULT_MSG WCECOMPAT_LIBRARIES WCECOMPAT_LIB_FOUND) diff --git a/attic/modules/FindXKB.cmake b/attic/modules/FindXKB.cmake deleted file mode 100644 index a91078ad..00000000 --- a/attic/modules/FindXKB.cmake +++ /dev/null @@ -1,15 +0,0 @@ -# - - find_path(X11_XKB_INCLUDE_PATH X11/XKBlib.h "${X11_INC_SEARCH_PATH}") - if (X11_XKB_INCLUDE_PATH) - MACRO_PUSH_REQUIRED_VARS() - set(CMAKE_REQUIRED_LIBRARIES "${X11_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES}") - check_library_exists(X11 XkbLockModifiers "" HAVE_XKB) - MACRO_POP_REQUIRED_VARS() - if (HAVE_XKB) - set(XKB_FOUND TRUE) - endif (HAVE_XKB) - endif (X11_XKB_INCLUDE_PATH) - - - diff --git a/attic/modules/FindXine.cmake b/attic/modules/FindXine.cmake deleted file mode 100644 index de296798..00000000 --- a/attic/modules/FindXine.cmake +++ /dev/null @@ -1,64 +0,0 @@ -# - Try to find the XINE library -# Once done this will define -# -# XINE_FOUND - system has the XINE library -# XINE_VERSION - XINE version -# XINE_BUGFIX_VERSION - the XINE bugfix version -# XINE_INCLUDE_DIR - the XINE include directory -# XINE_LIBRARY - The libraries needed to use XINE -# XINE_XCB_FOUND - libxine can use XCB for video output - -# Copyright (c) 2006,2007 Laurent Montel, <montel@kde.org> -# Copyright (c) 2006, Matthias Kretz, <kretz@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -if (XINE_INCLUDE_DIR AND XINE_LIBRARY) - # Already in cache, be silent - set(Xine_FIND_QUIETLY TRUE) -endif (XINE_INCLUDE_DIR AND XINE_LIBRARY) - -find_package(PkgConfig) -if (PKG_CONFIG_FOUND) - pkg_check_modules(PC_LIBXINE QUIET libxine) -endif (PKG_CONFIG_FOUND) - -find_path(XINE_INCLUDE_DIR NAMES xine.h - HINTS # HINTS is new in cmake 2.6. These dirs will be preferred over the default ones - ${PC_LIBXINE_INCLUDEDIR} - ${PC_LIBXINE_INCLUDE_DIRS} - ) - -find_library(XINE_LIBRARY NAMES xine - HINTS - ${PC_LIBXINE_LIBDIR} - ${PC_LIBXINE_LIBRARY_DIRS} - ) - -find_program(XINECONFIG_EXECUTABLE NAMES xine-config - HINTS - ${PC_LIBXINE_PREFIX}/bin -) - -if (XINE_INCLUDE_DIR AND XINE_LIBRARY AND XINECONFIG_EXECUTABLE) - exec_program(${XINECONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE XINE_VERSION) - if("${XINE_VERSION}" VERSION_GREATER "1.1.0") #if (... VERSION_GREATER) is new since cmake 2.6.2 - set(XINE_VERSION_OK TRUE) - string(REGEX REPLACE "[0-9]\\.[0-9]\\." "" XINE_BUGFIX_VERSION ${XINE_VERSION}) - endif() -endif (XINE_INCLUDE_DIR AND XINE_LIBRARY AND XINECONFIG_EXECUTABLE) - - -if( XINE_VERSION_OK) - include(CheckCSourceCompiles) - set(CMAKE_REQUIRED_INCLUDES ${XINE_INCLUDE_DIR}) - set(CMAKE_REQUIRED_LIBRARIES ${XINE_LIBRARY}) - check_c_source_compiles("#include <xine.h>\nint main()\n{\n xine_open_video_driver(xine_new(), \"auto\", XINE_VISUAL_TYPE_XCB, NULL);\n return 0;\n}\n" XINE_XCB_FOUND) - set(XINE_FOUND TRUE) -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Xine "Could NOT find XINE 1.1.1 or greater" XINE_INCLUDE_DIR XINE_LIBRARY XINECONFIG_EXECUTABLE XINE_VERSION_OK) - -mark_as_advanced(XINE_INCLUDE_DIR XINE_LIBRARY XINECONFIG_EXECUTABLE) diff --git a/attic/modules/FindXmms.cmake b/attic/modules/FindXmms.cmake deleted file mode 100644 index b687d120..00000000 --- a/attic/modules/FindXmms.cmake +++ /dev/null @@ -1,44 +0,0 @@ -# Search xmms -# Once done this will define -# -# XMMS_FOUND - system has xmms -# XMMS_INCLUDE_DIRS - the xmms include directory -# XMMS_LIBRARIES - Link these to use xmms -# XMMS_LDFLAGS - for compatibility only, same as XMMS_LIBRARIES - -# Copyright (c) 2006, 2007 Laurent Montel, <montel@kde.org> -# Copyright (c) 2007 Allen Winter <winter@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -if (XMMS_INCLUDE_DIRS AND XMMS_LIBRARIES) - # in cache already - set(XMMS_FOUND TRUE) - -else (XMMS_INCLUDE_DIRS AND XMMS_LIBRARIES) - if (NOT WIN32) - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - find_package(PkgConfig) - - pkg_check_modules(PC_XMMS QUIET xmms) - endif() - - find_path(XMMS_INCLUDE_DIRS xmmsctrl.h - PATHS ${PC_XMMS_INCLUDEDIR} ${PC_XMMS_INCLUDE_DIRS} - PATH_SUFFIXES xmms) - - find_library(XMMS_LIBRARIES NAMES xmms - PATHS ${PC_XMMS_LIBDIR} ${PC_XMMS_LIBRARY_DIRS}) - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Xmms DEFAULT_MSG - XMMS_LIBRARIES XMMS_INCLUDE_DIRS) - - mark_as_advanced(XMMS_INCLUDE_DIRS XMMS_LIBRARIES) - -endif (XMMS_INCLUDE_DIRS AND XMMS_LIBRARIES) - -# for compatibility -set(XMMS_LDFLAGS ${XMMS_LIBRARIES}) diff --git a/attic/modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake b/attic/modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake deleted file mode 100644 index b775b424..00000000 --- a/attic/modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake +++ /dev/null @@ -1,85 +0,0 @@ - -# This is a helper function used by CheckCXXSourceRuns.cmake and -# CheckCXXSourceCompiles.cmake. Actually it should be used by all macros which -# use TRY_COMPILE() or TRY_RUN(). -# It takes the CMAKE_REQUIRED_LIBRARY variable and searches it for imported -# (library) targets. Since the project created by TRY_COMPILE() (and TRY_RUN()) -# does not know about these imported targets, this macro here replaces these -# imported targets with the actual library files on disk and it also -# adds the libraries from the link interface of these imported targets. -# E.g the imported target KDE4__kdeui is replaced on my system with /opt/kdelibs/lib/libkdeui.so -# and the link interface libraries, which includes e.g. /opt/kdelibs/lib/libkdecore.so. -# This way imported targets work also when used with CHECK_CXX_SOURCE_COMPILES/RUNS(). - -# Copyright (c) 2009, Alexander Neundorf, <neundorf@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -FUNCTION(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _RESULT) -# handle imported library targets - SET(_CCSR_IMP_TARGETS_MAP) - SET(_CCSR_REQ_LIBS ${CMAKE_REQUIRED_LIBRARIES}) - SET(_CHECK_FOR_IMPORTED_TARGETS TRUE) - SET(_CCSR_LOOP_COUNTER 0) - WHILE(_CHECK_FOR_IMPORTED_TARGETS) - MATH(EXPR _CCSR_LOOP_COUNTER "${_CCSR_LOOP_COUNTER} + 1 ") - SET(_CCSR_NEW_REQ_LIBS ) - SET(_CHECK_FOR_IMPORTED_TARGETS FALSE) - FOREACH(_CURRENT_LIB ${_CCSR_REQ_LIBS}) - GET_TARGET_PROPERTY(_importedConfigs ${_CURRENT_LIB} IMPORTED_CONFIGURATIONS) - IF (_importedConfigs) - # Ok, so this is an imported target. - # First we get the imported configurations. - # Then we get the location of the actual library on disk of the first configuration. - # then we'll get its link interface libraries property, - # iterate through it and replace all imported targets we find there - # with there actual location. - - # guard against infinite loop: abort after 100 iterations ( 100 is arbitrary chosen) - IF ("${_CCSR_LOOP_COUNTER}" LESS 100) - SET(_CHECK_FOR_IMPORTED_TARGETS TRUE) -# ELSE ("${_CCSR_LOOP_COUNTER}" LESS 1) -# MESSAGE(STATUS "********* aborting loop, counter : ${_CCSR_LOOP_COUNTER}") - ENDIF ("${_CCSR_LOOP_COUNTER}" LESS 100) - - LIST(GET _importedConfigs 0 _firstImportedConfig) - GET_TARGET_PROPERTY(_firstImportedLocation ${_CURRENT_LIB} IMPORTED_LOCATION_${_firstImportedConfig}) - GET_TARGET_PROPERTY(_linkInterfaceLibs ${_CURRENT_LIB} IMPORTED_LINK_INTERFACE_LIBRARIES_${_firstImportedConfig} ) - - LIST(APPEND _CCSR_NEW_REQ_LIBS ${_firstImportedLocation}) -# MESSAGE(STATUS "Appending lib ${_CURRENT_LIB} as ${_firstImportedLocation}") - IF(_linkInterfaceLibs) - FOREACH(_currentLinkInterfaceLib ${_linkInterfaceLibs}) -# MESSAGE(STATUS "Appending link interface lib ${_currentLinkInterfaceLib}") - IF(_currentLinkInterfaceLib) - LIST(APPEND _CCSR_NEW_REQ_LIBS ${_currentLinkInterfaceLib} ) - ENDIF(_currentLinkInterfaceLib) - ENDFOREACH(_currentLinkInterfaceLib ${_linkInterfaceLibs}) - ENDIF(_linkInterfaceLibs) - ELSE(_importedConfigs) - # "Normal" libraries are just used as they are. - LIST(APPEND _CCSR_NEW_REQ_LIBS ${_CURRENT_LIB} ) -# MESSAGE(STATUS "Appending lib directly: ${_CURRENT_LIB}") - ENDIF(_importedConfigs) - ENDFOREACH(_CURRENT_LIB ${_CCSR_REQ_LIBS}) - - SET(_CCSR_REQ_LIBS ${_CCSR_NEW_REQ_LIBS} ) - ENDWHILE(_CHECK_FOR_IMPORTED_TARGETS) - - # Finally we iterate once more over all libraries. This loop only removes - # all remaining imported target names (there shouldn't be any left anyway). - SET(_CCSR_NEW_REQ_LIBS ) - FOREACH(_CURRENT_LIB ${_CCSR_REQ_LIBS}) - GET_TARGET_PROPERTY(_importedConfigs ${_CURRENT_LIB} IMPORTED_CONFIGURATIONS) - IF (NOT _importedConfigs) - LIST(APPEND _CCSR_NEW_REQ_LIBS ${_CURRENT_LIB} ) -# MESSAGE(STATUS "final: appending ${_CURRENT_LIB}") - ELSE (NOT _importedConfigs) -# MESSAGE(STATUS "final: skipping ${_CURRENT_LIB}") - ENDIF (NOT _importedConfigs) - ENDFOREACH(_CURRENT_LIB ${_CCSR_REQ_LIBS}) - SET(${_RESULT} ${_CCSR_NEW_REQ_LIBS} PARENT_SCOPE) - -ENDFUNCTION(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _CCSR_REQ_LIBS) - diff --git a/attic/modules/MacroAppendIf.cmake b/attic/modules/MacroAppendIf.cmake deleted file mode 100644 index 90f26aff..00000000 --- a/attic/modules/MacroAppendIf.cmake +++ /dev/null @@ -1,22 +0,0 @@ -# MACRO_APPEND_IF(CONDITION VAR VALUE1...VALUEN ) -# This convenience macro appends the values VALUE1 up to VALUEN to the list -# given in VAR, but only if the variable CONDITION is TRUE: -# -# usage example: -# IF(SOMELIB_FOUND) -# SET(my_sources ${my_sources} somefile.c someotherfile.c) -# ENDIF(SOMELIB_FOUND) -# -# becomes: -# MACRO_APPEND_IF(SOMELIB_FOUND my_sources somefile.c someotherfile.c) - -# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -macro(macro_append_if _cond _list) - if(${_cond}) - list(APPEND ${_list} ${ARGN}) - endif() -endmacro(macro_append_if _cond _list) diff --git a/attic/modules/MacroBoolTo01.cmake b/attic/modules/MacroBoolTo01.cmake deleted file mode 100644 index 63b98526..00000000 --- a/attic/modules/MacroBoolTo01.cmake +++ /dev/null @@ -1,20 +0,0 @@ -# MACRO_BOOL_TO_01( VAR RESULT0 ... RESULTN ) -# This macro evaluates its first argument -# and sets all the given vaiables either to 0 or 1 -# depending on the value of the first one - -# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -MACRO(MACRO_BOOL_TO_01 FOUND_VAR ) - FOREACH (_current_VAR ${ARGN}) - IF(${FOUND_VAR}) - SET(${_current_VAR} 1) - ELSE(${FOUND_VAR}) - SET(${_current_VAR} 0) - ENDIF(${FOUND_VAR}) - ENDFOREACH(_current_VAR) -ENDMACRO(MACRO_BOOL_TO_01) diff --git a/attic/modules/MacroEnsureOutOfSourceBuild.cmake b/attic/modules/MacroEnsureOutOfSourceBuild.cmake deleted file mode 100644 index cb26e0c3..00000000 --- a/attic/modules/MacroEnsureOutOfSourceBuild.cmake +++ /dev/null @@ -1,20 +0,0 @@ -# - MACRO_ENSURE_OUT_OF_SOURCE_BUILD(<errorMessage>) -# MACRO_ENSURE_OUT_OF_SOURCE_BUILD(<errorMessage>) -# Call this macro in your project if you want to enforce out-of-source builds. -# If an in-source build is detected, it will abort with the given error message. -# This macro works in any of the CMakeLists.txt of your project, but the recommended -# location to call this is close to the beginning of the top level CMakeLists.txt - -# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -MACRO (MACRO_ENSURE_OUT_OF_SOURCE_BUILD _errorMessage) - - STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource) - IF(insource) - MESSAGE(FATAL_ERROR "${_errorMessage}") - ENDIF(insource) - -ENDMACRO (MACRO_ENSURE_OUT_OF_SOURCE_BUILD) diff --git a/attic/modules/MacroLibrary.cmake b/attic/modules/MacroLibrary.cmake deleted file mode 100644 index a467d840..00000000 --- a/attic/modules/MacroLibrary.cmake +++ /dev/null @@ -1,19 +0,0 @@ -# - include MacroLibrary offers a collection of macros which extend the built-in cmake commands - -# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -INCLUDE(MacroOptionalFindPackage) -INCLUDE(MacroOptionalAddSubdirectory) -INCLUDE(MacroAdditionalCleanFiles) -INCLUDE(MacroAddFileDependencies) -INCLUDE(MacroAddCompileFlags) -INCLUDE(MacroAddLinkFlags) -INCLUDE(MacroAppendIf) -INCLUDE(MacroEnsureOutOfSourceBuild) -INCLUDE(MacroBoolTo01) -INCLUDE(MacroPushRequiredVars) -INCLUDE(MacroLogFeature) -INCLUDE(MacroWriteBasicCMakeVersionFile) diff --git a/attic/modules/PythonCompile.py b/attic/modules/PythonCompile.py deleted file mode 100644 index 156fea28..00000000 --- a/attic/modules/PythonCompile.py +++ /dev/null @@ -1,4 +0,0 @@ -# By Simon Edwards <simon@simonzone.com> -# This file is in the public domain. -import py_compile, sys -sys.exit(py_compile.main()) diff --git a/attic/modules/PythonMacros.cmake b/attic/modules/PythonMacros.cmake deleted file mode 100644 index 0abaccbd..00000000 --- a/attic/modules/PythonMacros.cmake +++ /dev/null @@ -1,62 +0,0 @@ -# Python macros -# ~~~~~~~~~~~~~ -# Copyright (c) 2007, Simon Edwards <simon@simonzone.com> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# -# This file defines the following macros: -# -# PYTHON_INSTALL (SOURCE_FILE DESINATION_DIR) -# Install the SOURCE_FILE, which is a Python .py file, into the -# destination directory during install. The file will be byte compiled -# and both the .py file and .pyc file will be installed. - -GET_FILENAME_COMPONENT(PYTHON_MACROS_MODULE_PATH ${CMAKE_CURRENT_LIST_FILE} PATH) - -MACRO(PYTHON_INSTALL SOURCE_FILE DESINATION_DIR) - - FIND_FILE(_python_compile_py PythonCompile.py PATHS ${CMAKE_MODULE_PATH}) - - ADD_CUSTOM_TARGET(compile_python_files ALL) - - # Install the source file. - INSTALL(FILES ${SOURCE_FILE} DESTINATION ${DESINATION_DIR}) - - # Byte compile and install the .pyc file. - GET_FILENAME_COMPONENT(_absfilename ${SOURCE_FILE} ABSOLUTE) - GET_FILENAME_COMPONENT(_filename ${SOURCE_FILE} NAME) - GET_FILENAME_COMPONENT(_filenamebase ${SOURCE_FILE} NAME_WE) - GET_FILENAME_COMPONENT(_basepath ${SOURCE_FILE} PATH) - - if(WIN32) - string(REGEX REPLACE ".:/" "/" _basepath "${_basepath}") - endif() - - SET(_bin_py ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filename}) - SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc) - - FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}) - - SET(_message "-DMESSAGE=Byte-compiling ${_bin_py}") - - GET_FILENAME_COMPONENT(_abs_bin_py ${_bin_py} ABSOLUTE) - IF(_abs_bin_py STREQUAL ${_absfilename}) # Don't copy the file onto itself. - ADD_CUSTOM_COMMAND( - TARGET compile_python_files - COMMAND ${CMAKE_COMMAND} -E echo ${message} - COMMAND ${PYTHON_EXECUTABLE} ${_python_compile_py} ${_bin_py} - DEPENDS ${_absfilename} - ) - ELSE(_abs_bin_py STREQUAL ${_absfilename}) - ADD_CUSTOM_COMMAND( - TARGET compile_python_files - COMMAND ${CMAKE_COMMAND} -E echo ${message} - COMMAND ${CMAKE_COMMAND} -E copy ${_absfilename} ${_bin_py} - COMMAND ${PYTHON_EXECUTABLE} ${_python_compile_py} ${_bin_py} - DEPENDS ${_absfilename} - ) - ENDIF(_abs_bin_py STREQUAL ${_absfilename}) - - INSTALL(FILES ${_bin_pyc} DESTINATION ${DESINATION_DIR}) -ENDMACRO(PYTHON_INSTALL) diff --git a/attic/modules/Qt4ConfigDependentSettings.cmake b/attic/modules/Qt4ConfigDependentSettings.cmake deleted file mode 100644 index b5462e7b..00000000 --- a/attic/modules/Qt4ConfigDependentSettings.cmake +++ /dev/null @@ -1,384 +0,0 @@ -# This file is included by FindQt4.cmake, don't include it directly. - -#============================================================================= -# Copyright 2005-2009 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distributed this file outside of CMake, substitute the full -# License text for the above reference.) - - -############################################### -# -# configuration/system dependent settings -# -############################################### - -# this check for X11 and threads may not be necessary, since it is not -# contained in the cmake version of FindQt4.cmake: - -# for unix add X11 stuff -IF(UNIX) - # on OS X X11 may not be required - IF (Q_WS_X11) - FIND_PACKAGE(X11 REQUIRED) - ENDIF (Q_WS_X11) - FIND_PACKAGE(Threads) - SET(QT_QTCORE_LIBRARY ${QT_QTCORE_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) -ENDIF(UNIX) - - -# find dependencies for some Qt modules -# when doing builds against a static Qt, they are required -# when doing builds against a shared Qt, they are not required -# if a user needs the dependencies, and they couldn't be found, they can set -# the variables themselves. - -SET(QT_QTGUI_LIB_DEPENDENCIES "") -SET(QT_QTCORE_LIB_DEPENDENCIES "") -SET(QT_QTNETWORK_LIB_DEPENDENCIES "") -SET(QT_QTOPENGL_LIB_DEPENDENCIES "") -SET(QT_QTDBUS_LIB_DEPENDENCIES "") -SET(QT_QTHELP_LIB_DEPENDENCIES ${QT_QTCLUCENE_LIBRARY}) - - -IF(WIN32) - # On Windows, qconfig.pri has "static" for static library builds - IF(QT_CONFIG MATCHES "static") - SET(QT_IS_STATIC 1) - ENDIF(QT_CONFIG MATCHES "static") -ELSE(WIN32) - # On other platforms, check file extension to know if its static - IF(QT_QTCORE_LIBRARY_RELEASE) - GET_FILENAME_COMPONENT(qtcore_lib_ext "${QT_QTCORE_LIBRARY_RELEASE}" EXT) - IF("${qtcore_lib_ext}" STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}") - SET(QT_IS_STATIC 1) - ENDIF("${qtcore_lib_ext}" STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}") - ENDIF(QT_QTCORE_LIBRARY_RELEASE) - IF(QT_QTCORE_LIBRARY_DEBUG) - GET_FILENAME_COMPONENT(qtcore_lib_ext "${QT_QTCORE_LIBRARY_DEBUG}" EXT) - IF(${qtcore_lib_ext} STREQUAL ${CMAKE_STATIC_LIBRARY_SUFFIX}) - SET(QT_IS_STATIC 1) - ENDIF(${qtcore_lib_ext} STREQUAL ${CMAKE_STATIC_LIBRARY_SUFFIX}) - ENDIF(QT_QTCORE_LIBRARY_DEBUG) -ENDIF(WIN32) - -# build using shared Qt needs -DQT_DLL on Windows -IF(WIN32 AND NOT QT_IS_STATIC) - SET(QT_DEFINITIONS ${QT_DEFINITIONS} -DQT_DLL) -ENDIF(WIN32 AND NOT QT_IS_STATIC) - - -# QtOpenGL dependencies -QT_QUERY_QMAKE(QMAKE_LIBS_OPENGL "QMAKE_LIBS_OPENGL") -IF(Q_WS_MAC) -# On the Mac OpenGL is probably frameworks and QMAKE_LIBS_OPENGL can be e.g. "-framework OpenGL -framework AGL". -# The separate_arguments() call in the other branch makes "-framework;-OpenGL;-framework;-lAGL" appear in the -# linker command. So we need to protect the "-framework foo" as non-separatable strings. -# We do this by replacing the space after "-framework" with an underscore, then calling separate_arguments(), -# and then we replace the underscores again with spaces. So we get proper linker commands. Alex - STRING(REGEX REPLACE "-framework +" "-framework_" QMAKE_LIBS_OPENGL "${QMAKE_LIBS_OPENGL}") - SEPARATE_ARGUMENTS(QMAKE_LIBS_OPENGL) - STRING(REGEX REPLACE "-framework_" "-framework " QMAKE_LIBS_OPENGL "${QMAKE_LIBS_OPENGL}") -ELSE(Q_WS_MAC) - SEPARATE_ARGUMENTS(QMAKE_LIBS_OPENGL) -ENDIF(Q_WS_MAC) -SET (QT_QTOPENGL_LIB_DEPENDENCIES ${QT_QTOPENGL_LIB_DEPENDENCIES} ${QMAKE_LIBS_OPENGL}) - - -## system png -IF(QT_QCONFIG MATCHES "system-png") - FIND_LIBRARY(QT_PNG_LIBRARY NAMES png) - MARK_AS_ADVANCED(QT_PNG_LIBRARY) - IF(QT_PNG_LIBRARY) - SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_PNG_LIBRARY}) - ENDIF(QT_PNG_LIBRARY) -ENDIF(QT_QCONFIG MATCHES "system-png") - - -# for X11, get X11 library directory -IF(Q_WS_X11) - QT_QUERY_QMAKE(QMAKE_LIBDIR_X11 "QMAKE_LIBDIR_X11") -ENDIF(Q_WS_X11) - - -## X11 SM -IF(QT_QCONFIG MATCHES "x11sm") - # ask qmake where the x11 libs are - FIND_LIBRARY(QT_X11_SM_LIBRARY NAMES SM PATHS ${QMAKE_LIBDIR_X11}) - FIND_LIBRARY(QT_X11_ICE_LIBRARY NAMES ICE PATHS ${QMAKE_LIBDIR_X11}) - MARK_AS_ADVANCED(QT_X11_SM_LIBRARY) - MARK_AS_ADVANCED(QT_X11_ICE_LIBRARY) - IF(QT_X11_SM_LIBRARY AND QT_X11_ICE_LIBRARY) - SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_X11_SM_LIBRARY} ${QT_X11_ICE_LIBRARY}) - ENDIF(QT_X11_SM_LIBRARY AND QT_X11_ICE_LIBRARY) -ENDIF(QT_QCONFIG MATCHES "x11sm") - - -## Xi -IF(QT_QCONFIG MATCHES "tablet") - FIND_LIBRARY(QT_XI_LIBRARY NAMES Xi PATHS ${QMAKE_LIBDIR_X11}) - MARK_AS_ADVANCED(QT_XI_LIBRARY) - IF(QT_XI_LIBRARY) - SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XI_LIBRARY}) - ENDIF(QT_XI_LIBRARY) -ENDIF(QT_QCONFIG MATCHES "tablet") - - -## Xrender -IF(QT_QCONFIG MATCHES "xrender") - FIND_LIBRARY(QT_XRENDER_LIBRARY NAMES Xrender PATHS ${QMAKE_LIBDIR_X11}) - MARK_AS_ADVANCED(QT_XRENDER_LIBRARY) - IF(QT_XRENDER_LIBRARY) - SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XRENDER_LIBRARY}) - ENDIF(QT_XRENDER_LIBRARY) -ENDIF(QT_QCONFIG MATCHES "xrender") - - -## Xrandr -IF(QT_QCONFIG MATCHES "xrandr") - FIND_LIBRARY(QT_XRANDR_LIBRARY NAMES Xrandr PATHS ${QMAKE_LIBDIR_X11}) - MARK_AS_ADVANCED(QT_XRANDR_LIBRARY) - IF(QT_XRANDR_LIBRARY) - SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XRANDR_LIBRARY}) - ENDIF(QT_XRANDR_LIBRARY) -ENDIF(QT_QCONFIG MATCHES "xrandr") - - -## Xcursor -IF(QT_QCONFIG MATCHES "xcursor") - FIND_LIBRARY(QT_XCURSOR_LIBRARY NAMES Xcursor PATHS ${QMAKE_LIBDIR_X11}) - MARK_AS_ADVANCED(QT_XCURSOR_LIBRARY) - IF(QT_XCURSOR_LIBRARY) - SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XCURSOR_LIBRARY}) - ENDIF(QT_XCURSOR_LIBRARY) -ENDIF(QT_QCONFIG MATCHES "xcursor") - - -## Xinerama -IF(QT_QCONFIG MATCHES "xinerama") - FIND_LIBRARY(QT_XINERAMA_LIBRARY NAMES Xinerama PATHS ${QMAKE_LIBDIR_X11}) - MARK_AS_ADVANCED(QT_XINERAMA_LIBRARY) - IF(QT_XINERAMA_LIBRARY) - SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XINERAMA_LIBRARY}) - ENDIF(QT_XINERAMA_LIBRARY) -ENDIF(QT_QCONFIG MATCHES "xinerama") - - -## Xfixes -IF(QT_QCONFIG MATCHES "xfixes") - FIND_LIBRARY(QT_XFIXES_LIBRARY NAMES Xfixes PATHS ${QMAKE_LIBDIR_X11}) - MARK_AS_ADVANCED(QT_XFIXES_LIBRARY) - IF(QT_XFIXES_LIBRARY) - SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XFIXES_LIBRARY}) - ENDIF(QT_XFIXES_LIBRARY) -ENDIF(QT_QCONFIG MATCHES "xfixes") - - -## system-freetype -IF(QT_QCONFIG MATCHES "system-freetype") - FIND_LIBRARY(QT_FREETYPE_LIBRARY NAMES freetype) - MARK_AS_ADVANCED(QT_FREETYPE_LIBRARY) - IF(QT_FREETYPE_LIBRARY) - SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_FREETYPE_LIBRARY}) - ENDIF(QT_FREETYPE_LIBRARY) -ENDIF(QT_QCONFIG MATCHES "system-freetype") - - -## fontconfig -IF(QT_QCONFIG MATCHES "fontconfig") - FIND_LIBRARY(QT_FONTCONFIG_LIBRARY NAMES fontconfig) - MARK_AS_ADVANCED(QT_FONTCONFIG_LIBRARY) - IF(QT_FONTCONFIG_LIBRARY) - SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_FONTCONFIG_LIBRARY}) - ENDIF(QT_FONTCONFIG_LIBRARY) -ENDIF(QT_QCONFIG MATCHES "fontconfig") - - -## system-zlib -IF(QT_QCONFIG MATCHES "system-zlib") - FIND_LIBRARY(QT_ZLIB_LIBRARY NAMES z) - MARK_AS_ADVANCED(QT_ZLIB_LIBRARY) - IF(QT_ZLIB_LIBRARY) - SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_ZLIB_LIBRARY}) - ENDIF(QT_ZLIB_LIBRARY) -ENDIF(QT_QCONFIG MATCHES "system-zlib") - - -## openssl -IF(NOT Q_WS_WIN) - SET(_QT_NEED_OPENSSL 0) - IF(QT_VERSION_MINOR LESS 4 AND QT_QCONFIG MATCHES "openssl") - SET(_QT_NEED_OPENSSL 1) - ENDIF(QT_VERSION_MINOR LESS 4 AND QT_QCONFIG MATCHES "openssl") - IF(QT_VERSION_MINOR GREATER 3 AND QT_QCONFIG MATCHES "openssl-linked") - SET(_QT_NEED_OPENSSL 1) - ENDIF(QT_VERSION_MINOR GREATER 3 AND QT_QCONFIG MATCHES "openssl-linked") - IF(_QT_NEED_OPENSSL) - FIND_PACKAGE(OpenSSL) - IF(OPENSSL_LIBRARIES) - SET(QT_QTNETWORK_LIB_DEPENDENCIES ${QT_QTNETWORK_LIB_DEPENDENCIES} ${OPENSSL_LIBRARIES}) - ENDIF(OPENSSL_LIBRARIES) - ENDIF(_QT_NEED_OPENSSL) -ENDIF(NOT Q_WS_WIN) - - -## dbus -IF(QT_QCONFIG MATCHES "dbus") - - # if the dbus library isn't found, we'll assume its not required to build - # shared Qt on Linux doesn't require it - IF(NOT QT_DBUS_LIBRARY) - EXECUTE_PROCESS(COMMAND pkg-config --libs-only-L dbus-1 - OUTPUT_VARIABLE _dbus_query_output - RESULT_VARIABLE _dbus_result - ERROR_VARIABLE _dbus_query_output ) - - IF(_dbus_result MATCHES 0) - STRING(REPLACE "-L" "" _dbus_query_output "${_dbus_query_output}") - SEPARATE_ARGUMENTS(_dbus_query_output) - ELSE(_dbus_result MATCHES 0) - SET(_dbus_query_output) - ENDIF(_dbus_result MATCHES 0) - - FIND_LIBRARY(QT_DBUS_LIBRARY NAMES dbus-1 PATHS ${_dbus_query_output} ) - - IF(QT_DBUS_LIBRARY) - SET(QT_QTDBUS_LIB_DEPENDENCIES ${QT_QTDBUS_LIB_DEPENDENCIES} ${QT_DBUS_LIBRARY}) - ENDIF(QT_DBUS_LIBRARY) - - MARK_AS_ADVANCED(QT_DBUS_LIBRARY) - ENDIF(NOT QT_DBUS_LIBRARY) - -ENDIF(QT_QCONFIG MATCHES "dbus") - - -## glib -IF(QT_QCONFIG MATCHES "glib") - - # if the glib libraries aren't found, we'll assume its not required to build - # shared Qt on Linux doesn't require it - - # Qt 4.2.0+ uses glib-2.0 - IF(NOT QT_GLIB_LIBRARY OR NOT QT_GTHREAD_LIBRARY) - EXECUTE_PROCESS(COMMAND pkg-config --libs-only-L glib-2.0 gthread-2.0 - OUTPUT_VARIABLE _glib_query_output - RESULT_VARIABLE _glib_result - ERROR_VARIABLE _glib_query_output ) - - IF(_glib_result MATCHES 0) - STRING(REPLACE "-L" "" _glib_query_output "${_glib_query_output}") - SEPARATE_ARGUMENTS(_glib_query_output) - ELSE(_glib_result MATCHES 0) - SET(_glib_query_output) - ENDIF(_glib_result MATCHES 0) - - FIND_LIBRARY(QT_GLIB_LIBRARY NAMES glib-2.0 PATHS ${_glib_query_output} ) - FIND_LIBRARY(QT_GTHREAD_LIBRARY NAMES gthread-2.0 PATHS ${_glib_query_output} ) - - MARK_AS_ADVANCED(QT_GLIB_LIBRARY) - MARK_AS_ADVANCED(QT_GTHREAD_LIBRARY) - ENDIF(NOT QT_GLIB_LIBRARY OR NOT QT_GTHREAD_LIBRARY) - - IF(QT_GLIB_LIBRARY AND QT_GTHREAD_LIBRARY) - SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} - ${QT_GTHREAD_LIBRARY} ${QT_GLIB_LIBRARY}) - ENDIF(QT_GLIB_LIBRARY AND QT_GTHREAD_LIBRARY) - - - # Qt 4.5+ also links to gobject-2.0 - IF(QT_VERSION_MINOR GREATER 4) - IF(NOT QT_GOBJECT_LIBRARY) - EXECUTE_PROCESS(COMMAND pkg-config --libs-only-L gobject-2.0 - OUTPUT_VARIABLE _glib_query_output - RESULT_VARIABLE _glib_result - ERROR_VARIABLE _glib_query_output ) - - IF(_glib_result MATCHES 0) - STRING(REPLACE "-L" "" _glib_query_output "${_glib_query_output}") - SEPARATE_ARGUMENTS(_glib_query_output) - ELSE(_glib_result MATCHES 0) - SET(_glib_query_output) - ENDIF(_glib_result MATCHES 0) - - FIND_LIBRARY(QT_GOBJECT_LIBRARY NAMES gobject-2.0 PATHS ${_glib_query_output} ) - - MARK_AS_ADVANCED(QT_GOBJECT_LIBRARY) - ENDIF(NOT QT_GOBJECT_LIBRARY) - - IF(QT_GOBJECT_LIBRARY) - SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} - ${QT_GOBJECT_LIBRARY}) - ENDIF(QT_GOBJECT_LIBRARY) - ENDIF(QT_VERSION_MINOR GREATER 4) - -ENDIF(QT_QCONFIG MATCHES "glib") - - -## clock-monotonic, just see if we need to link with rt -IF(QT_QCONFIG MATCHES "clock-monotonic") - SET(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES}) - SET(CMAKE_REQUIRED_LIBRARIES rt) - CHECK_SYMBOL_EXISTS(_POSIX_TIMERS "unistd.h;time.h" QT_POSIX_TIMERS) - SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAVE}) - IF(QT_POSIX_TIMERS) - FIND_LIBRARY(QT_RT_LIBRARY NAMES rt) - MARK_AS_ADVANCED(QT_RT_LIBRARY) - IF(QT_RT_LIBRARY) - SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_RT_LIBRARY}) - ENDIF(QT_RT_LIBRARY) - ENDIF(QT_POSIX_TIMERS) -ENDIF(QT_QCONFIG MATCHES "clock-monotonic") - - -IF(Q_WS_X11) - # X11 libraries Qt absolutely depends on - QT_QUERY_QMAKE(QT_LIBS_X11 "QMAKE_LIBS_X11") - SEPARATE_ARGUMENTS(QT_LIBS_X11) - FOREACH(QT_X11_LIB ${QT_LIBS_X11}) - STRING(REGEX REPLACE "-l" "" QT_X11_LIB "${QT_X11_LIB}") - SET(QT_TMP_STR "QT_X11_${QT_X11_LIB}_LIBRARY") - FIND_LIBRARY(${QT_TMP_STR} NAMES "${QT_X11_LIB}" PATHS ${QMAKE_LIBDIR_X11}) - MARK_AS_ADVANCED(${QT_TMP_STR}) - IF(${QT_TMP_STR}) - SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${${QT_TMP_STR}}) - ENDIF(${QT_TMP_STR}) - ENDFOREACH(QT_X11_LIB) - - QT_QUERY_QMAKE(QT_LIBS_THREAD "QMAKE_LIBS_THREAD") - SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_LIBS_THREAD}) - - QT_QUERY_QMAKE(QMAKE_LIBS_DYNLOAD "QMAKE_LIBS_DYNLOAD") - SET (QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QMAKE_LIBS_DYNLOAD}) - -ENDIF(Q_WS_X11) - - -IF(Q_WS_WIN) - SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} imm32 winmm) - SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ws2_32) -ENDIF(Q_WS_WIN) - - -IF(Q_WS_MAC) - SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} "-framework Carbon") - - # Qt 4.0, 4.1, 4.2 use QuickTime - IF(QT_VERSION_MINOR LESS 3) - SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} "-framework QuickTime") - ENDIF(QT_VERSION_MINOR LESS 3) - - # Qt 4.2+ use AppKit - IF(QT_VERSION_MINOR GREATER 1) - SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} "-framework AppKit") - ENDIF(QT_VERSION_MINOR GREATER 1) - - SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} "-framework ApplicationServices") -ENDIF(Q_WS_MAC) - diff --git a/attic/modules/Qt4Macros.cmake b/attic/modules/Qt4Macros.cmake deleted file mode 100644 index 24379a61..00000000 --- a/attic/modules/Qt4Macros.cmake +++ /dev/null @@ -1,414 +0,0 @@ -# This file is included by FindQt4.cmake, don't include it directly. - -#============================================================================= -# Copyright 2005-2009 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distributed this file outside of CMake, substitute the full -# License text for the above reference.) - - -###################################### -# -# Macros for building Qt files -# -###################################### - - -MACRO (QT4_EXTRACT_OPTIONS _qt4_files _qt4_options) - SET(${_qt4_files}) - SET(${_qt4_options}) - SET(_QT4_DOING_OPTIONS FALSE) - FOREACH(_currentArg ${ARGN}) - IF ("${_currentArg}" STREQUAL "OPTIONS") - SET(_QT4_DOING_OPTIONS TRUE) - ELSE ("${_currentArg}" STREQUAL "OPTIONS") - IF(_QT4_DOING_OPTIONS) - LIST(APPEND ${_qt4_options} "${_currentArg}") - ELSE(_QT4_DOING_OPTIONS) - LIST(APPEND ${_qt4_files} "${_currentArg}") - ENDIF(_QT4_DOING_OPTIONS) - ENDIF ("${_currentArg}" STREQUAL "OPTIONS") - ENDFOREACH(_currentArg) -ENDMACRO (QT4_EXTRACT_OPTIONS) - - -# macro used to create the names of output files preserving relative dirs -MACRO (QT4_MAKE_OUTPUT_FILE infile prefix ext outfile ) - STRING(LENGTH ${CMAKE_CURRENT_BINARY_DIR} _binlength) - STRING(LENGTH ${infile} _infileLength) - SET(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR}) - IF(_infileLength GREATER _binlength) - STRING(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile) - IF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}") - FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile}) - ELSE(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}") - FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile}) - ENDIF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}") - ELSE(_infileLength GREATER _binlength) - FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile}) - ENDIF(_infileLength GREATER _binlength) - IF(WIN32 AND rel MATCHES "^[a-zA-Z]:") # absolute path - STRING(REGEX REPLACE "^([a-zA-Z]):(.*)$" "\\1_\\2" rel "${rel}") - ENDIF(WIN32 AND rel MATCHES "^[a-zA-Z]:") - SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}") - STRING(REPLACE ".." "__" _outfile ${_outfile}) - GET_FILENAME_COMPONENT(outpath ${_outfile} PATH) - GET_FILENAME_COMPONENT(_outfile ${_outfile} NAME_WE) - FILE(MAKE_DIRECTORY ${outpath}) - SET(${outfile} ${outpath}/${prefix}${_outfile}.${ext}) -ENDMACRO (QT4_MAKE_OUTPUT_FILE ) - - -MACRO (QT4_GET_MOC_FLAGS _moc_flags) - SET(${_moc_flags}) - GET_DIRECTORY_PROPERTY(_inc_DIRS INCLUDE_DIRECTORIES) - - FOREACH(_current ${_inc_DIRS}) - IF("${_current}" MATCHES ".framework/?$") - STRING(REGEX REPLACE "/[^/]+.framework" "" framework_path "${_current}") - SET(${_moc_flags} ${${_moc_flags}} "-F${framework_path}") - ELSE("${_current}" MATCHES ".framework/?$") - SET(${_moc_flags} ${${_moc_flags}} "-I${_current}") - ENDIF("${_current}" MATCHES ".framework/?$") - ENDFOREACH(_current ${_inc_DIRS}) - - GET_DIRECTORY_PROPERTY(_defines COMPILE_DEFINITIONS) - FOREACH(_current ${_defines}) - SET(${_moc_flags} ${${_moc_flags}} "-D${_current}") - ENDFOREACH(_current ${_defines}) - - IF(Q_WS_WIN) - SET(${_moc_flags} ${${_moc_flags}} -DWIN32) - ENDIF(Q_WS_WIN) - -ENDMACRO(QT4_GET_MOC_FLAGS) - - -# helper macro to set up a moc rule -MACRO (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options) - # For Windows, create a parameters file to work around command line length limit - IF (WIN32) - # Pass the parameters in a file. Set the working directory to - # be that containing the parameters file and reference it by - # just the file name. This is necessary because the moc tool on - # MinGW builds does not seem to handle spaces in the path to the - # file given with the @ syntax. - GET_FILENAME_COMPONENT(_moc_outfile_name "${outfile}" NAME) - GET_FILENAME_COMPONENT(_moc_outfile_dir "${outfile}" PATH) - IF(_moc_outfile_dir) - SET(_moc_working_dir WORKING_DIRECTORY ${_moc_outfile_dir}) - ENDIF(_moc_outfile_dir) - SET (_moc_parameters_file ${outfile}_parameters) - SET (_moc_parameters ${moc_flags} ${moc_options} -o "${outfile}" "${infile}") - FILE (REMOVE ${_moc_parameters_file}) - FOREACH(arg ${_moc_parameters}) - FILE (APPEND ${_moc_parameters_file} "${arg}\n") - ENDFOREACH(arg) - ADD_CUSTOM_COMMAND(OUTPUT ${outfile} - COMMAND ${QT_MOC_EXECUTABLE} @${_moc_outfile_name}_parameters - DEPENDS ${infile} - ${_moc_working_dir} - VERBATIM) - ELSE (WIN32) - ADD_CUSTOM_COMMAND(OUTPUT ${outfile} - COMMAND ${QT_MOC_EXECUTABLE} - ARGS ${moc_flags} ${moc_options} -o ${outfile} ${infile} - DEPENDS ${infile}) - ENDIF (WIN32) -ENDMACRO (QT4_CREATE_MOC_COMMAND) - - -MACRO (QT4_GENERATE_MOC infile outfile ) -# get include dirs and flags - QT4_GET_MOC_FLAGS(moc_flags) - GET_FILENAME_COMPONENT(abs_infile ${infile} ABSOLUTE) - QT4_CREATE_MOC_COMMAND(${abs_infile} ${outfile} "${moc_flags}" "") - SET_SOURCE_FILES_PROPERTIES(${outfile} PROPERTIES SKIP_AUTOMOC TRUE) # don't run automoc on this file - - MACRO_ADD_FILE_DEPENDENCIES(${abs_infile} ${outfile}) -ENDMACRO (QT4_GENERATE_MOC) - - -# QT4_WRAP_CPP(outfiles inputfile ... ) - -MACRO (QT4_WRAP_CPP outfiles ) - # get include dirs - QT4_GET_MOC_FLAGS(moc_flags) - QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN}) - - FOREACH (it ${moc_files}) - GET_FILENAME_COMPONENT(it ${it} ABSOLUTE) - QT4_MAKE_OUTPUT_FILE(${it} moc_ cxx outfile) - QT4_CREATE_MOC_COMMAND(${it} ${outfile} "${moc_flags}" "${moc_options}") - SET(${outfiles} ${${outfiles}} ${outfile}) - ENDFOREACH(it) - -ENDMACRO (QT4_WRAP_CPP) - - -# QT4_WRAP_UI(outfiles inputfile ... ) - -MACRO (QT4_WRAP_UI outfiles ) - QT4_EXTRACT_OPTIONS(ui_files ui_options ${ARGN}) - - FOREACH (it ${ui_files}) - GET_FILENAME_COMPONENT(outfile ${it} NAME_WE) - GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE) - SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h) - ADD_CUSTOM_COMMAND(OUTPUT ${outfile} - COMMAND ${QT_UIC_EXECUTABLE} - ARGS ${ui_options} -o ${outfile} ${infile} - MAIN_DEPENDENCY ${infile}) - SET(${outfiles} ${${outfiles}} ${outfile}) - ENDFOREACH (it) - -ENDMACRO (QT4_WRAP_UI) - - -# QT4_ADD_RESOURCES(outfiles inputfile ... ) - -MACRO (QT4_ADD_RESOURCES outfiles ) - QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN}) - - FOREACH (it ${rcc_files}) - GET_FILENAME_COMPONENT(outfilename ${it} NAME_WE) - GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE) - GET_FILENAME_COMPONENT(rc_path ${infile} PATH) - SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx) - # parse file for dependencies - # all files are absolute paths or relative to the location of the qrc file - FILE(READ "${infile}" _RC_FILE_CONTENTS) - STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}") - SET(_RC_DEPENDS) - FOREACH(_RC_FILE ${_RC_FILES}) - STRING(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}") - STRING(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}") - IF(NOT _ABS_PATH_INDICATOR) - SET(_RC_FILE "${rc_path}/${_RC_FILE}") - ENDIF(NOT _ABS_PATH_INDICATOR) - SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}") - ENDFOREACH(_RC_FILE) - ADD_CUSTOM_COMMAND(OUTPUT ${outfile} - COMMAND ${QT_RCC_EXECUTABLE} - ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile} - MAIN_DEPENDENCY ${infile} - DEPENDS ${_RC_DEPENDS}) - SET(${outfiles} ${${outfiles}} ${outfile}) - ENDFOREACH (it) - -ENDMACRO (QT4_ADD_RESOURCES) - - -MACRO(QT4_ADD_DBUS_INTERFACE _sources _interface _basename) - GET_FILENAME_COMPONENT(_infile ${_interface} ABSOLUTE) - SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h) - SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) - SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc) - - GET_SOURCE_FILE_PROPERTY(_nonamespace ${_interface} NO_NAMESPACE) - IF ( _nonamespace ) - SET(_params -N -m) - ELSE ( _nonamespace ) - SET(_params -m) - ENDIF ( _nonamespace ) - - GET_SOURCE_FILE_PROPERTY(_classname ${_interface} CLASSNAME) - IF ( _classname ) - SET(_params ${_params} -c ${_classname}) - ENDIF ( _classname ) - - GET_SOURCE_FILE_PROPERTY(_include ${_interface} INCLUDE) - IF ( _include ) - SET(_params ${_params} -i ${_include}) - ENDIF ( _include ) - - ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} - COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} ${_params} -p ${_basename} ${_infile} - DEPENDS ${_infile}) - - SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE) - - QT4_GENERATE_MOC(${_header} ${_moc}) - - SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc}) - MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc}) - -ENDMACRO(QT4_ADD_DBUS_INTERFACE) - - -MACRO(QT4_ADD_DBUS_INTERFACES _sources) - FOREACH (_current_FILE ${ARGN}) - GET_FILENAME_COMPONENT(_infile ${_current_FILE} ABSOLUTE) - # get the part before the ".xml" suffix - STRING(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2" _basename ${_current_FILE}) - STRING(TOLOWER ${_basename} _basename) - QT4_ADD_DBUS_INTERFACE(${_sources} ${_infile} ${_basename}interface) - ENDFOREACH (_current_FILE) -ENDMACRO(QT4_ADD_DBUS_INTERFACES) - - -MACRO(QT4_GENERATE_DBUS_INTERFACE _header) # _customName OPTIONS -some -options ) - QT4_EXTRACT_OPTIONS(_customName _qt4_dbus_options ${ARGN}) - - GET_FILENAME_COMPONENT(_in_file ${_header} ABSOLUTE) - GET_FILENAME_COMPONENT(_basename ${_header} NAME_WE) - - IF (_customName) - SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_customName}) - ELSE (_customName) - SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.xml) - ENDIF (_customName) - - ADD_CUSTOM_COMMAND(OUTPUT ${_target} - COMMAND ${QT_DBUSCPP2XML_EXECUTABLE} ${_qt4_dbus_options} ${_in_file} -o ${_target} - DEPENDS ${_in_file} - ) -ENDMACRO(QT4_GENERATE_DBUS_INTERFACE) - - -MACRO(QT4_ADD_DBUS_ADAPTOR _sources _xml_file _include _parentClass) # _optionalBasename _optionalClassName) - GET_FILENAME_COMPONENT(_infile ${_xml_file} ABSOLUTE) - - SET(_optionalBasename "${ARGV4}") - IF (_optionalBasename) - SET(_basename ${_optionalBasename} ) - ELSE (_optionalBasename) - STRING(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2adaptor" _basename ${_infile}) - STRING(TOLOWER ${_basename} _basename) - ENDIF (_optionalBasename) - - SET(_optionalClassName "${ARGV5}") - SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h) - SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) - SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc) - - IF(_optionalClassName) - ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} - COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -c ${_optionalClassName} -i ${_include} -l ${_parentClass} ${_infile} - DEPENDS ${_infile} - ) - ELSE(_optionalClassName) - ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} - COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -i ${_include} -l ${_parentClass} ${_infile} - DEPENDS ${_infile} - ) - ENDIF(_optionalClassName) - - QT4_GENERATE_MOC(${_header} ${_moc}) - SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE) - MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc}) - - SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc}) -ENDMACRO(QT4_ADD_DBUS_ADAPTOR) - - -MACRO(QT4_AUTOMOC) - QT4_GET_MOC_FLAGS(_moc_INCS) - - SET(_matching_FILES ) - FOREACH (_current_FILE ${ARGN}) - - GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE) - # if "SKIP_AUTOMOC" is set to true, we will not handle this file here. - # This is required to make uic work correctly: - # we need to add generated .cpp files to the sources (to compile them), - # but we cannot let automoc handle them, as the .cpp files don't exist yet when - # cmake is run for the very first time on them -> however the .cpp files might - # exist at a later run. at that time we need to skip them, so that we don't add two - # different rules for the same moc file - GET_SOURCE_FILE_PROPERTY(_skip ${_abs_FILE} SKIP_AUTOMOC) - - IF ( NOT _skip AND EXISTS ${_abs_FILE} ) - - FILE(READ ${_abs_FILE} _contents) - - GET_FILENAME_COMPONENT(_abs_PATH ${_abs_FILE} PATH) - - STRING(REGEX MATCHALL "# *include +[^ ]+\\.moc[\">]" _match "${_contents}") - IF(_match) - FOREACH (_current_MOC_INC ${_match}) - STRING(REGEX MATCH "[^ <\"]+\\.moc" _current_MOC "${_current_MOC_INC}") - - GET_FILENAME_COMPONENT(_basename ${_current_MOC} NAME_WE) - IF(EXISTS ${_abs_PATH}/${_basename}.hpp) - SET(_header ${_abs_PATH}/${_basename}.hpp) - ELSE(EXISTS ${_abs_PATH}/${_basename}.hpp) - SET(_header ${_abs_PATH}/${_basename}.h) - ENDIF(EXISTS ${_abs_PATH}/${_basename}.hpp) - SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC}) - QT4_CREATE_MOC_COMMAND(${_header} ${_moc} "${_moc_INCS}" "") - MACRO_ADD_FILE_DEPENDENCIES(${_abs_FILE} ${_moc}) - ENDFOREACH (_current_MOC_INC) - ENDIF(_match) - ENDIF ( NOT _skip AND EXISTS ${_abs_FILE} ) - ENDFOREACH (_current_FILE) -ENDMACRO(QT4_AUTOMOC) - - -MACRO(QT4_CREATE_TRANSLATION _qm_files) - QT4_EXTRACT_OPTIONS(_lupdate_files _lupdate_options ${ARGN}) - SET(_my_sources) - SET(_my_dirs) - SET(_my_tsfiles) - SET(_ts_pro) - FOREACH (_file ${_lupdate_files}) - GET_FILENAME_COMPONENT(_ext ${_file} EXT) - GET_FILENAME_COMPONENT(_abs_FILE ${_file} ABSOLUTE) - IF(_ext MATCHES "ts") - LIST(APPEND _my_tsfiles ${_abs_FILE}) - ELSE(_ext MATCHES "ts") - IF(NOT _ext) - LIST(APPEND _my_dirs ${_abs_FILE}) - ELSE(NOT _ext) - LIST(APPEND _my_sources ${_abs_FILE}) - ENDIF(NOT _ext) - ENDIF(_ext MATCHES "ts") - ENDFOREACH(_file) - FOREACH(_ts_file ${_my_tsfiles}) - IF(_my_sources) - # make a .pro file to call lupdate on, so we don't make our commands too - # long for some systems - GET_FILENAME_COMPONENT(_ts_name ${_ts_file} NAME_WE) - SET(_ts_pro ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${_ts_name}_lupdate.pro) - SET(_pro_srcs) - FOREACH(_pro_src ${_my_sources}) - SET(_pro_srcs "${_pro_srcs} \"${_pro_src}\"") - ENDFOREACH(_pro_src ${_my_sources}) - FILE(WRITE ${_ts_pro} "SOURCES = ${_pro_srcs}") - ENDIF(_my_sources) - ADD_CUSTOM_COMMAND(OUTPUT ${_ts_file} - COMMAND ${QT_LUPDATE_EXECUTABLE} - ARGS ${_lupdate_options} ${_ts_pro} ${_my_dirs} -ts ${_ts_file} - DEPENDS ${_my_sources} ${_ts_pro}) - ENDFOREACH(_ts_file) - QT4_ADD_TRANSLATION(${_qm_files} ${_my_tsfiles}) -ENDMACRO(QT4_CREATE_TRANSLATION) - - -MACRO(QT4_ADD_TRANSLATION _qm_files) - FOREACH (_current_FILE ${ARGN}) - GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE) - GET_FILENAME_COMPONENT(qm ${_abs_FILE} NAME_WE) - GET_SOURCE_FILE_PROPERTY(output_location ${_abs_FILE} OUTPUT_LOCATION) - IF(output_location) - FILE(MAKE_DIRECTORY "${output_location}") - SET(qm "${output_location}/${qm}.qm") - ELSE(output_location) - SET(qm "${CMAKE_CURRENT_BINARY_DIR}/${qm}.qm") - ENDIF(output_location) - - ADD_CUSTOM_COMMAND(OUTPUT ${qm} - COMMAND ${QT_LRELEASE_EXECUTABLE} - ARGS ${_abs_FILE} -qm ${qm} - DEPENDS ${_abs_FILE} - ) - SET(${_qm_files} ${${_qm_files}} ${qm}) - ENDFOREACH (_current_FILE) -ENDMACRO(QT4_ADD_TRANSLATION) diff --git a/attic/modules/README b/attic/modules/README deleted file mode 100644 index 29483051..00000000 --- a/attic/modules/README +++ /dev/null @@ -1,19 +0,0 @@ -these are additional cmake modules required for compiling KDE3 or KDE4 -applications with cmake. Some of them are enhanced versions of the files -coming with cmake, some of them are NOT yet part of cmake. -To use them, copy them into the cmake Module directory or -run "cmake ." followed by "make install" - -Changes to any files should follow the - -cmake commit policy - - at https://community.kde.org/Policies/CMake_Commit_Policy - -and the cmake coding style - - at https://community.kde.org/Policies/CMake_Coding_Style - - -Alex <neundorf@kde.org> - diff --git a/attic/modules/SIPMacros.cmake b/attic/modules/SIPMacros.cmake deleted file mode 100644 index 69fec90e..00000000 --- a/attic/modules/SIPMacros.cmake +++ /dev/null @@ -1,124 +0,0 @@ -# Macros for SIP -# ~~~~~~~~~~~~~~ -# Copyright (c) 2007, Simon Edwards <simon@simonzone.com> -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# -# SIP website: https://riverbankcomputing.com/software/sip -# -# This file defines the following macros: -# -# ADD_SIP_PYTHON_MODULE (MODULE_NAME MODULE_SIP [library1, libaray2, ...]) -# Specifies a SIP file to be built into a Python module and installed. -# MODULE_NAME is the name of Python module including any path name. (e.g. -# os.sys, Foo.bar etc). MODULE_SIP the path and filename of the .sip file -# to process and compile. libraryN are libraries that the Python module, -# which is typically a shared library, should be linked to. The built -# module will also be install into Python's site-packages directory. -# -# The behaviour of the ADD_SIP_PYTHON_MODULE macro can be controlled by a -# number of variables: -# -# SIP_INCLUDES - List of directories which SIP will scan through when looking -# for included .sip files. (Corresponds to the -I option for SIP.) -# -# SIP_TAGS - List of tags to define when running SIP. (Corresponds to the -t -# option for SIP.) -# -# SIP_CONCAT_PARTS - An integer which defines the number of parts the C++ code -# of each module should be split into. Defaults to 8. (Corresponds to the -# -j option for SIP.) -# -# SIP_DISABLE_FEATURES - List of feature names which should be disabled -# running SIP. (Corresponds to the -x option for SIP.) -# -# SIP_EXTRA_OPTIONS - Extra command line options which should be passed on to -# SIP. - -SET(SIP_INCLUDES) -SET(SIP_TAGS) -SET(SIP_CONCAT_PARTS 8) -SET(SIP_DISABLE_FEATURES) -SET(SIP_EXTRA_OPTIONS) - -MACRO(ADD_SIP_PYTHON_MODULE MODULE_NAME MODULE_SIP) - - SET(EXTRA_LINK_LIBRARIES ${ARGN}) - - STRING(REPLACE "." "/" _x ${MODULE_NAME}) - GET_FILENAME_COMPONENT(_parent_module_path ${_x} PATH) - GET_FILENAME_COMPONENT(_child_module_name ${_x} NAME) - - GET_FILENAME_COMPONENT(_module_path ${MODULE_SIP} PATH) - - if(_module_path STREQUAL "") - set(CMAKE_CURRENT_SIP_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}") - else() - set(CMAKE_CURRENT_SIP_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/${_module_path}") - endif() - - GET_FILENAME_COMPONENT(_abs_module_sip ${MODULE_SIP} ABSOLUTE) - - # We give this target a long logical target name. - # (This is to avoid having the library name clash with any already - # install library names. If that happens then cmake dependancy - # tracking get confused.) - STRING(REPLACE "." "_" _logical_name ${MODULE_NAME}) - SET(_logical_name "python_module_${_logical_name}") - - FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_SIP_OUTPUT_DIR}) # Output goes in this dir. - - SET(_sip_includes) - FOREACH (_inc ${SIP_INCLUDES}) - GET_FILENAME_COMPONENT(_abs_inc ${_inc} ABSOLUTE) - LIST(APPEND _sip_includes -I ${_abs_inc}) - ENDFOREACH (_inc ) - - SET(_sip_tags) - FOREACH (_tag ${SIP_TAGS}) - LIST(APPEND _sip_tags -t ${_tag}) - ENDFOREACH (_tag) - - SET(_sip_x) - FOREACH (_x ${SIP_DISABLE_FEATURES}) - LIST(APPEND _sip_x -x ${_x}) - ENDFOREACH (_x ${SIP_DISABLE_FEATURES}) - - SET(_message "-DMESSAGE=Generating CPP code for module ${MODULE_NAME}") - SET(_sip_output_files) - FOREACH(CONCAT_NUM RANGE 0 ${SIP_CONCAT_PARTS} ) - IF( ${CONCAT_NUM} LESS ${SIP_CONCAT_PARTS} ) - SET(_sip_output_files ${_sip_output_files} ${CMAKE_CURRENT_SIP_OUTPUT_DIR}/sip${_child_module_name}part${CONCAT_NUM}.cpp ) - ENDIF( ${CONCAT_NUM} LESS ${SIP_CONCAT_PARTS} ) - ENDFOREACH(CONCAT_NUM RANGE 0 ${SIP_CONCAT_PARTS} ) - - IF(NOT WIN32) - SET(TOUCH_COMMAND touch) - ELSE(NOT WIN32) - SET(TOUCH_COMMAND echo) - # instead of a touch command, give out the name and append to the files - # this is basically what the touch command does. - FOREACH(filename ${_sip_output_files}) - FILE(APPEND filename "") - ENDFOREACH(filename ${_sip_output_files}) - ENDIF(NOT WIN32) - ADD_CUSTOM_COMMAND( - OUTPUT ${_sip_output_files} - COMMAND ${CMAKE_COMMAND} -E echo ${message} - COMMAND ${TOUCH_COMMAND} ${_sip_output_files} - COMMAND ${SIP_EXECUTABLE} ${_sip_tags} ${_sip_x} ${SIP_EXTRA_OPTIONS} -j ${SIP_CONCAT_PARTS} -c ${CMAKE_CURRENT_SIP_OUTPUT_DIR} ${_sip_includes} ${_abs_module_sip} - DEPENDS ${_abs_module_sip} ${SIP_EXTRA_FILES_DEPEND} - ) - # not sure if type MODULE could be uses anywhere, limit to cygwin for now - IF (CYGWIN) - ADD_LIBRARY(${_logical_name} MODULE ${_sip_output_files} ) - ELSE (CYGWIN) - ADD_LIBRARY(${_logical_name} SHARED ${_sip_output_files} ) - ENDIF (CYGWIN) - TARGET_LINK_LIBRARIES(${_logical_name} ${PYTHON_LIBRARY}) - TARGET_LINK_LIBRARIES(${_logical_name} ${EXTRA_LINK_LIBRARIES}) - SET_TARGET_PROPERTIES(${_logical_name} PROPERTIES PREFIX "" OUTPUT_NAME ${_child_module_name}) - - INSTALL(TARGETS ${_logical_name} DESTINATION "${PYTHON_SITE_PACKAGES_INSTALL_DIR}/${_parent_module_path}") - -ENDMACRO(ADD_SIP_PYTHON_MODULE) diff --git a/attic/modules/Win32.Manifest.in b/attic/modules/Win32.Manifest.in deleted file mode 100644 index f8d7ba4f..00000000 --- a/attic/modules/Win32.Manifest.in +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> -<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> -<security> -<requestedPrivileges> -<requestedExecutionLevel level="asInvoker" uiAccess="true"/> -</requestedPrivileges> -</security> -</trustInfo> -</assembly> diff --git a/attic/modules/check_installed_exports_file.cmake b/attic/modules/check_installed_exports_file.cmake deleted file mode 100644 index 83ed205b..00000000 --- a/attic/modules/check_installed_exports_file.cmake +++ /dev/null @@ -1,73 +0,0 @@ - -# This file is executed via install(SCRIPT). -# This means it is include()d into the cmake_install.cmake file -# Due to this the following variables already have the correct value: -# CMAKE_INSTALL_PREFIX -# CMAKE_CURRENT_BINARY_DIR -# -# Additionally the following two variables have to be set: -# EXPORT_INSTALL_DIR - set it to the install destination -# EXPORT_FILES - the filenames of the exports file -# -# Alex - - -# put all the code into a function so all variables used here are local -# which makes sure including this file multiple times in a cmake_install.cmake works -function(CHECK_INSTALLED_EXPORTS_FILE _filename) - - # get the absolute install directory, consider absolute and relative paths and also DESTDIR - if(IS_ABSOLUTE "${EXPORT_INSTALL_DIR}") - set(installDir "$ENV{DESTDIR}${EXPORT_INSTALL_DIR}") - else() - set(installDir "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${EXPORT_INSTALL_DIR}") - endif() - - set(installedExportsFile "${installDir}/${_filename}") - - #message(STATUS "************ bin dir: ${CMAKE_CURRENT_BINARY_DIR}") - #message(STATUS "************ prefix: ${CMAKE_INSTALL_PREFIX}") - #message(STATUS "************ exportsfile: ${installedExportsFile}") - - # if the file already exists at the install location, and if we can - # find the exports file in the build dir, read both, and if their contents differ, - # remove all configuration-specific exports files from the install dir, since - # they may create conflicts if the new targets have been added/targets have been - # removed/ targets have been renamed/ the namespace for the exported targets has changed - if(EXISTS "${installedExportsFile}") - if (${EXPORT_INSTALL_DIR} MATCHES "^(/)(.+)$") - set(binaryDirExportFileDir "_${CMAKE_MATCH_2}") - set(binaryDirExportsFile "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Export/${binaryDirExportFileDir}/${_filename}") - else (${EXPORT_INSTALL_DIR} MATCHES "^(/)(.+)$") - set(binaryDirExportsFile "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Export/${EXPORT_INSTALL_DIR}/${_filename}") - endif (${EXPORT_INSTALL_DIR} MATCHES "^(/)(.+)$") - - # message(STATUS "************* binaryDirExportsFile: ${binaryDirExportsFile}") - - if(EXISTS "${binaryDirExportsFile}") - file(READ "${installedExportsFile}" installedExportsFileContents) - file(READ "${binaryDirExportsFile}" binaryDirExportsFileContents) - - if(NOT "${installedExportsFileContents}" STREQUAL "${binaryDirExportsFileContents}") - - if("${_filename}" MATCHES "^(.+)(\\.cmake)$") - message(STATUS "XXX Installed and new ${_filename} differ, removing installed ${CMAKE_MATCH_1}-*.cmake files") - file(GLOB exportFiles "${installDir}/${CMAKE_MATCH_1}-*.cmake") -# message(STATUS "XXX files: ${exportFiles}") - file(REMOVE ${exportFiles}) - endif() - else() -# message(STATUS "XXX FILES ${_filename} are the same") - endif() - - endif() - - endif() - -endfunction(CHECK_INSTALLED_EXPORTS_FILE) - -# call the function for each exports file -foreach(_currentExportsFile ${EXPORT_FILES}) - check_installed_exports_file("${_currentExportsFile}") -endforeach(_currentExportsFile ${EXPORT_FILES}) - diff --git a/attic/modules/cmake-modules-styleguide.txt b/attic/modules/cmake-modules-styleguide.txt deleted file mode 100644 index 10e65dc0..00000000 --- a/attic/modules/cmake-modules-styleguide.txt +++ /dev/null @@ -1,115 +0,0 @@ -This is a copy of the file CMake/Modules/readme.txt from cmake cvs. -Please adhere to the guidelines given below when writing cmake modules -for KDE. - -Some additional guidelines for use in KDE: --indent using 2, 3 or 4 spaces, not tabs --use all-lower-case for commands, except if the rest of the file uses -consistently all-upper-case for commands - -Alex - ----------------------------------------------------------------------- - -Note to authors of FindXXX.cmake files - -We would like all FindXXX.cmake files to produce consistent variable names. - -Please use the following consistent variable names for general use. - -XXX_INCLUDE_DIRS The final set of include directories listed in one variable for use by client code. This should not be a cache entry. -XXX_LIBRARIES The libraries to link against to use XXX. These should include full paths. This should not be a cache entry. -XXX_DEFINITIONS Definitions to use when compiling code that uses XXX. This really shouldn't include options such as (-DHAS_JPEG)that a client source-code file uses to decide whether to #include <jpeg.h> -XXX_EXECUTABLE Where to find the XXX tool. -XXX_YYY_EXECUTABLE Where to find the YYY tool that comes with XXX. -XXX_LIBRARY_DIRS Optionally, the final set of library directories listed in one variable for use by client code. This should not be a cache entry. -XXX_ROOT_DIR Where to find the base directory of XXX. -XXX_VERSION_YY Expect Version YY if true. Make sure at most one of these is ever true. -XXX_WRAP_YY If False, do not try to use the relevent CMake wrapping command. -XXX_YY_FOUND If False, optional YY part of XXX sytem is not available. -XXX_FOUND Set to false, or undefined, if we haven't found, or don't want to use XXX. -XXX_RUNTIME_LIBRARY_DIRS Optionally, the runtime library search path for use when running an executable linked to shared libraries. - The list should be used by user code to create the PATH on windows or LD_LIBRARY_PATH on unix. - This should not be a cache entry. -XXX_VERSION_STRING A human-readable string containing the version of the package found, if any. -XXX_VERSION_MAJOR The major version of the package found, if any. -XXX_VERSION_MINOR The minor version of the package found, if any. -XXX_VERSION_PATCH The patch version of the package found, if any. - -You do not have to provide all of the above variables. You should provide XXX_FOUND under most circumstances. If XXX is a library, then XXX_LIBRARIES, should also be defined, and XXX_INCLUDE_DIRS should usually be defined (I guess libm.a might be an exception) - -The following names should not usually be used in CMakeLists.txt files, but they may be usefully modified in users' CMake Caches to control stuff. - -XXX_LIBRARY Name of XXX Library. A User may set this and XXX_INCLUDE_DIR to ignore to force non-use of XXX. -XXX_YY_LIBRARY Name of YY library that is part of the XXX system. It may or may not be required to use XXX. -XXX_INCLUDE_DIR Where to find xxx.h, etc. (XXX_INCLUDE_PATH was considered bad because a path includes an actual filename.) -XXX_YY_INCLUDE_DIR Where to find xxx_yy.h, etc. - -For tidiness's sake, try to keep as many options as possible out of the cache, leaving at least one option which can be used to disable use of the module, or locate a not-found library (e.g. XXX_ROOT_DIR). For the same reason, mark most cache options as advanced. - -If you need other commands to do special things then it should still begin with XXX_. This gives a sort of namespace effect and keeps things tidy for the user. You should put comments describing all the exported settings, plus descriptions of any the users can use to control stuff. - -You really should also provide backwards compatibility any old settings that were actually in use. Make sure you comment them as deprecated, so that no-one starts using them. - -To correctly document a module, create a comment block at the top with # comments. There are three types of comments that can be in the block: - -1. The brief description of the module, this is done by: -# - a small description - -2. A paragraph of text. This is done with all text that has a single -space between the # and the text. To create a new paragraph, just -put a # with no text on the line. - -3. A verbatim line. This is done with two spaces between the # and the text. - -For example: - -# - This is a cool module -# This module does really cool stuff. -# It can do even more than you think. -# -# It even needs to paragraphs to tell you about it. -# And it defines the following variables: -# VAR_COOL - this is great isn't it? -# VAR_REALLY_COOL - cool right? -# - -To have a .cmake file in this directory NOT show up in the -modules documentation, you should start the file with a blank -line. - -A FindXXX.cmake module will typically be loaded by the command - - FIND_PACKAGE(XXX [major[.minor[.patch]]] [EXACT] - [QUIET] [REQUIRED [components...]]) - -If any version numbers are given to the command it will set the -variable XXX_FIND_VERSION to contain the whole version. The variables -XXX_FIND_VERSION_MAJOR, XXX_FIND_VERSION_MINOR, and -XXX_FIND_VERSION_PATCH will be set to contain the corresponding -portions of the version number. The variable XXX_FIND_VERSION_EXACT -will indicate whether an exact version is requested. -If the find module supports versioning it should locate a version of -the package that is compatible with the version requested. If a -compatible version of the package cannot be found the module should -not report success. The version of the package found should be stored -in the version variables named above. - -If the QUIET option is given to the command it will set the variable -XXX_FIND_QUIETLY to true before loading the FindXXX.cmake module. If -this variable is set the module should not complain about not being -able to find the package. If the -REQUIRED option is given to the command it will set the variable -XXX_FIND_REQUIRED to true before loading the FindXXX.cmake module. If -this variable is set the module should issue a FATAL_ERROR if the -package cannot be found. For each package-specific component, say -YYY, listed after the REQUIRED option a variable XXX_FIND_REQUIRED_YYY -to true. The set of components listed will also be specified in a -XXX_FIND_COMPONENTS variable. This can be used by the FindXXX.cmake -module to determine which sub-components of the package must be found. -If neither the QUIET nor REQUIRED options are given then the -FindXXX.cmake module should look for the package and complain without -error if the module is not found. - -To get this behaviour you can use the FIND_PACKAGE_HANDLE_STANDARD_ARGS() -macro, as an example see FindJPEG.cmake. diff --git a/attic/modules/create_exe_symlink.cmake b/attic/modules/create_exe_symlink.cmake deleted file mode 100644 index f265780b..00000000 --- a/attic/modules/create_exe_symlink.cmake +++ /dev/null @@ -1,16 +0,0 @@ -# Create an executable symlink to a Python script. -# This also sets the target script's permission bits. - -MESSAGE(STATUS "Symlinking $ENV{DESTDIR}/${LINK_NAME} to ${TARGET}") - -GET_FILENAME_COMPONENT(abs_link_name $ENV{DESTDIR}/${LINK_NAME} ABSOLUTE) -GET_FILENAME_COMPONENT(link_path $ENV{DESTDIR}/${LINK_NAME} PATH) -GET_FILENAME_COMPONENT(abs_link_path ${link_path} ABSOLUTE) -FILE(MAKE_DIRECTORY ${abs_link_path}) - -GET_FILENAME_COMPONENT(abs_target ${TARGET} ABSOLUTE) -IF(UNIX) - EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${abs_target} ${abs_link_name}) - EXECUTE_PROCESS(COMMAND chmod a+x $ENV{DESTDIR}/${abs_target}) -ENDIF(UNIX) -# FIXME: WIN32 support diff --git a/attic/modules/kde4_cmake_uninstall.cmake.in b/attic/modules/kde4_cmake_uninstall.cmake.in deleted file mode 100644 index 36dd9ba8..00000000 --- a/attic/modules/kde4_cmake_uninstall.cmake.in +++ /dev/null @@ -1,22 +0,0 @@ -IF(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") - MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_BINARY_DIR@/install_manifest.txt\"") -ENDIF(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") - -FILE(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files) -STRING(REGEX REPLACE "\n" ";" files "${files}") -FOREACH(file ${files}) - MESSAGE(STATUS "Uninstalling \"${file}\"") - IF(EXISTS "${file}") - EXEC_PROGRAM( - "@CMAKE_COMMAND@" ARGS "-E remove \"${file}\"" - OUTPUT_VARIABLE rm_out - RETURN_VALUE rm_retval - ) - IF("${rm_retval}" STREQUAL 0) - ELSE("${rm_retval}" STREQUAL 0) - MESSAGE(FATAL_ERROR "Problem when removing \"${file}\"") - ENDIF("${rm_retval}" STREQUAL 0) - ELSE(EXISTS "${file}") - MESSAGE(STATUS "File \"${file}\" does not exist.") - ENDIF(EXISTS "${file}") -ENDFOREACH(file) diff --git a/attic/modules/kde4_exec_via_sh.cmake b/attic/modules/kde4_exec_via_sh.cmake deleted file mode 100644 index 6b826ff0..00000000 --- a/attic/modules/kde4_exec_via_sh.cmake +++ /dev/null @@ -1,31 +0,0 @@ - -# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -if (UNIX) - -file(WRITE "${_filename}" -"#!/bin/sh -# created by cmake, don't edit, changes will be lost - -${_library_path_variable}=${_ld_library_path}\${${_library_path_variable}:+:\$${_library_path_variable}} \"${_executable}\" \"$@\" -") - -# make it executable -# since this is only executed on UNIX, it is safe to call chmod -exec_program(chmod ARGS ug+x \"${_filename}\" OUTPUT_VARIABLE _dummy ) - -else (UNIX) - -file(TO_NATIVE_PATH "${_ld_library_path}" win_path) - -file(WRITE "${_filename}" -" -set PATH=${win_path};$ENV{PATH} -\"${_executable}\" %* -") - -endif (UNIX) |