aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/FindEigen2.cmake4
-rw-r--r--modules/FindPulseAudio.cmake66
-rw-r--r--modules/FindPyKDE4.cmake6
-rw-r--r--modules/KDE4Macros.cmake2
-rw-r--r--modules/check_installed_exports_file.cmake95
-rw-r--r--modules/create_exe_symlink.cmake16
6 files changed, 37 insertions, 152 deletions
diff --git a/modules/FindEigen2.cmake b/modules/FindEigen2.cmake
index 5feddf3e..2579a6c9 100644
--- a/modules/FindEigen2.cmake
+++ b/modules/FindEigen2.cmake
@@ -16,10 +16,10 @@ if (EIGEN2_INCLUDE_DIR)
else (EIGEN2_INCLUDE_DIR)
find_path(EIGEN2_INCLUDE_DIR NAMES Eigen/Core
- PATH_SUFFIXES eigen2
- HINTS
+ PATHS
${INCLUDE_INSTALL_DIR}
${KDE4_INCLUDE_DIR}
+ PATH_SUFFIXES eigen2
)
include(FindPackageHandleStandardArgs)
diff --git a/modules/FindPulseAudio.cmake b/modules/FindPulseAudio.cmake
deleted file mode 100644
index c9689219..00000000
--- a/modules/FindPulseAudio.cmake
+++ /dev/null
@@ -1,66 +0,0 @@
-# Try to find the PulseAudio library
-#
-# Once done this will define:
-#
-# PULSEAUDIO_FOUND - system has the PulseAudio library
-# PULSEAUDIO_INCLUDE_DIR - the PulseAudio include directory
-# PULSEAUDIO_LIBRARY - the libraries needed to use PulseAudio
-# PULSEAUDIO_MAINLOOP_LIBRARY - the libraries needed to use PulsAudio Mailoop
-#
-# 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.
-
-if (NOT PULSEAUDIO_MINIMUM_VERSION)
- set(PULSEAUDIO_MINIMUM_VERSION "0.9.9")
-endif (NOT PULSEAUDIO_MINIMUM_VERSION)
-
-if (PULSEAUDIO_INCLUDE_DIR AND PULSEAUDIO_LIBRARY AND PULSEAUDIO_MAINLOOP_LIBRARY)
- # Already in cache, be silent
- set(PULSEAUDIO_FIND_QUIETLY TRUE)
-endif (PULSEAUDIO_INCLUDE_DIR AND PULSEAUDIO_LIBRARY AND PULSEAUDIO_MAINLOOP_LIBRARY)
-
-if (NOT WIN32)
- include(FindPkgConfig)
- pkg_check_modules(PULSEAUDIO libpulse>=${PULSEAUDIO_MINIMUM_VERSION})
- if(PULSEAUDIO_FOUND)
- set(PULSEAUDIO_LIBRARY ${PULSEAUDIO_LIBRARIES} CACHE FILEPATH "Path to the PulseAudio library")
- set(PULSEAUDIO_INCLUDE_DIR ${PULSEAUDIO_INCLUDEDIR} CACHE PATH "Path to the PulseAudio includes")
- # PULSEAUDIO_DEFINITIONS - Compiler switches required for using PulseAudio
- # set(PULSEAUDIO_DEFINITIONS ${PULSEAUDIO_CFLAGS})
- pkg_check_modules(PULSEAUDIO_MAINLOOP libpulse-mainloop-glib)
- if(PULSEAUDIO_MAINLOOP_FOUND)
- set(PULSEAUDIO_MAINLOOP_LIBRARY ${PULSEAUDIO_MAINLOOP_LIBRARIES} CACHE FILEPATH "Path to the PulsAudio Mainloop library")
- endif(PULSEAUDIO_MAINLOOP_FOUND)
- endif(PULSEAUDIO_FOUND)
-else (NOT WIN32)
-
- if (NOT PULSEAUDIO_INCLUDE_DIR)
- FIND_PATH(PULSEAUDIO_INCLUDE_DIR pulse/pulseaudio.h)
- endif (NOT PULSEAUDIO_INCLUDE_DIR)
-
- if (NOT PULSEAUDIO_LIBRARY)
- FIND_LIBRARY(PULSEAUDIO_LIBRARY NAMES pulse)
- endif (NOT PULSEAUDIO_LIBRARY)
-
- if (PULSEAUDIO_INCLUDE_DIR AND PULSEAUDIO_LIBRARY)
- set(PULSEAUDIO_FOUND TRUE)
- else (PULSEAUDIO_INCLUDE_DIR AND PULSEAUDIO_LIBRARY)
- set(PULSEAUDIO_FOUND FALSE)
- endif (PULSEAUDIO_INCLUDE_DIR AND PULSEAUDIO_LIBRARY)
-endif( NOT WIN32)
-if (PULSEAUDIO_FOUND)
- if (NOT PULSEAUDIO_FIND_QUIETLY)
- message(STATUS "Found PulseAudio: ${PULSEAUDIO_LIBRARY}")
- if (PULSEAUDIO_MAINLOOP_FOUND)
- message(STATUS "Found PulseAudio Mainloop: ${PULSEAUDIO_MAINLOOP_LIBRARY}")
- else (PULSAUDIO_MAINLOOP_FOUND)
- message(STATUS "Could NOT find PulseAudio Mainloop Library")
- endif (PULSEAUDIO_MAINLOOP_FOUND)
- endif (NOT PULSEAUDIO_FIND_QUIETLY)
-else (PULSEAUDIO_FOUND)
- message(STATUS "Could NOT find PulseAudio")
-endif (PULSEAUDIO_FOUND)
-
-#mark_as_advanced(PULSEAUDIO_INCLUDE_DIR PULSEAUDIO_LIBRARY PULSEAUDIO_MAINLOOP_LIBRARY)
diff --git a/modules/FindPyKDE4.cmake b/modules/FindPyKDE4.cmake
index dd2b7380..f738741e 100644
--- a/modules/FindPyKDE4.cmake
+++ b/modules/FindPyKDE4.cmake
@@ -156,9 +156,5 @@ ENDMACRO(PYKDE4_INSTALL_PYTHON_FILES)
# 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 failed.")
- endif(NOT ${PROJECT_NAME})
- 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)" )
+ INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -DTARGET=${DATA_INSTALL_DIR}/${PROJECT_NAME}/${_pyname} -DLINK_NAME=${BIN_INSTALL_DIR}/${_exename} -P ${CMAKE_SOURCE_DIR}/cmake/modules/create_exe_symlink.cmake)" )
ENDMACRO(PYKDE4_ADD_EXECUTABLE)
-
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake
index 7f5b1d6f..f719e4a3 100644
--- a/modules/KDE4Macros.cmake
+++ b/modules/KDE4Macros.cmake
@@ -826,7 +826,7 @@ macro (KDE4_ADD_EXECUTABLE _target_NAME)
_automoc4_kde4_post_target_handling(${_target_NAME})
if (_test)
- set_target_properties(${_target_NAME} PROPERTIES COMPILE_FLAGS -DKDESRCDIR="\\"${CMAKE_CURRENT_SOURCE_DIR}/\\"")
+ set_target_properties(${_target_NAME} PROPERTIES COMPILE_FLAGS -DKDESRCDIR="\\"${CMAKE_CURRENT_SOURCE_DIR}\\"")
endif (_test)
kde4_handle_rpath_for_executable(${_target_NAME} ${_type})
diff --git a/modules/check_installed_exports_file.cmake b/modules/check_installed_exports_file.cmake
index d1d0c718..454d2a09 100644
--- a/modules/check_installed_exports_file.cmake
+++ b/modules/check_installed_exports_file.cmake
@@ -1,48 +1,27 @@
-
-# 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(IS_ABSOLUTE "${EXPORT_INSTALL_DIR}")
- set(installDir "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${EXPORT_INSTALL_DIR}")
- endif(IS_ABSOLUTE "${EXPORT_INSTALL_DIR}")
-
- 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}")
+# INSTALL_DIR - set it to the install destination
+# INSTALL_PREFIX - set it to CMAKE_INSTALL_PREFIX
+# CURRENT_BINARY_DIR - set it to CMAKE_CURRENT_BINARY_DIR
+# FILENAME - the filename of the exports file
+
+# get the absolute install directory, consider absolute and relative paths and also DESTDIR
+if(IS_ABSOLUTE "${INSTALL_DIR}")
+ set(installDir "$ENV{DESTDIR}${INSTALL_DIR}")
+else(IS_ABSOLUTE "${INSTALL_DIR}")
+ set(installDir "$ENV{DESTDIR}${INSTALL_PREFIX}/${INSTALL_DIR}")
+endif(IS_ABSOLUTE "${INSTALL_DIR}")
+
+set(installedExportsFile "${installDir}/${FILENAME}")
+
+
+# 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 (${INSTALL_DIR} MATCHES "^(/)(.+)$")
+ set(binaryDirExportFileDir "_${CMAKE_MATCH_2}")
+ set(binaryDirExportsFile "${CURRENT_BINARY_DIR}/CMakeFiles/Export/${binaryDirExportFileDir}/${FILENAME}")
if(EXISTS "${binaryDirExportsFile}")
file(READ "${installedExportsFile}" installedExportsFileContents)
@@ -50,24 +29,16 @@ function(CHECK_INSTALLED_EXPORTS_FILE _filename)
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("${_filename}" MATCHES "^(.+)(\\.cmake)$")
- else(NOT "${installedExportsFileContents}" STREQUAL "${binaryDirExportsFileContents}")
-# message(STATUS "XXX FILES ${_filename} are the same")
+ if("${FILENAME}" MATCHES "^(.+)(\\.cmake)$")
+ message(STATUS "Installed and new ${FILENAME} differ, removing installed ${CMAKE_MATCH_1}-*.cmake files")
+ file(GLOB files "${installDir}/${CMAKE_MATCH_1}-*.cmake")
+ file(REMOVE ${files})
+ endif("${FILENAME}" MATCHES "^(.+)(\\.cmake)$")
+# else(NOT "${installedExportsFileContents}" STREQUAL "${binaryDirExportsFileContents}")
+# message(STATUS "FILES are the same")
endif(NOT "${installedExportsFileContents}" STREQUAL "${binaryDirExportsFileContents}")
endif(EXISTS "${binaryDirExportsFile}")
+ endif (${INSTALL_DIR} MATCHES "^(/)(.+)$")
- endif(EXISTS "${installedExportsFile}")
-
-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})
-
+endif(EXISTS "${installedExportsFile}")
diff --git a/modules/create_exe_symlink.cmake b/modules/create_exe_symlink.cmake
deleted file mode 100644
index 6f35ff76..00000000
--- a/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 $ENV{DESTDIR}/${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 $ENV{DESTDIR}/${TARGET} ABSOLUTE)
-IF(UNIX)
- EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${abs_target} ${abs_link_name})
- EXECUTE_PROCESS(COMMAND chmod a+x ${abs_target})
-ENDIF(UNIX)
-# FIXME: WIN32 support