aboutsummaryrefslogtreecommitdiff
path: root/modules/FindAutomoc4.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2008-11-10 23:52:13 +0000
committerAlexander Neundorf <neundorf@kde.org>2008-11-10 23:52:13 +0000
commit57d92979d017bcc1748f29e942b5843428e30051 (patch)
treec274b20c35aa77bf604ac19e36b65de4afd0d5ab /modules/FindAutomoc4.cmake
parent114be0522e85d5c34fe48a1b9d56afc99e15e83b (diff)
downloadextra-cmake-modules-57d92979d017bcc1748f29e942b5843428e30051.tar.gz
extra-cmake-modules-57d92979d017bcc1748f29e942b5843428e30051.tar.bz2
-require cmake 2.6.2
-enable the reduced link interface for everybody now in kdelibs -convert all the set_target_properties(foo LINK_INTERFACE_LIBRARIES...) to the new target_link_libraries(foo LINK_INTERFACE_LIBRARIES ...) -install all shared libs also as "exported targets", so these libraries can be included by the other projects again as "imported targets", which should fix some problems with different build configurations, the reduced link interface, hopefully also custom install locations (Windows), maybe more -remove the temporary internal hackish macro _KDE4_EXPORT_LIBRARY_DEPENDENCIES() Alex, who hopes this doesn't break too much... So if you get linker errors now, please let me know (or even better kde-buildsystem@kde.org) svn path=/trunk/KDE/kdelibs/; revision=882594
Diffstat (limited to 'modules/FindAutomoc4.cmake')
-rw-r--r--modules/FindAutomoc4.cmake34
1 files changed, 5 insertions, 29 deletions
diff --git a/modules/FindAutomoc4.cmake b/modules/FindAutomoc4.cmake
index 5cf75627..c76d20b8 100644
--- a/modules/FindAutomoc4.cmake
+++ b/modules/FindAutomoc4.cmake
@@ -17,40 +17,16 @@
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-# enable the code below again when cmake also searches in lib64/ (should be 2.6.2), Alex
-# # check if we are inside KDESupport and automoc is enabled
-# if("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
-# # when building this project as part of kdesupport
-# include("${KDESupport_SOURCE_DIR}/automoc/Automoc4Config.cmake")
-# else("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
-# # when building this project outside kdesupport
-# # use the new "config-mode" of cmake 2.6, which searches the installed Automoc4Config.cmake file
-# # see the man page for details
-# find_package(Automoc4 QUIET NO_MODULE)
-# endif("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
-
+# check if we are inside KDESupport and automoc is enabled
if("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
# when building this project as part of kdesupport
- set(AUTOMOC4_CONFIG_FILE "${KDESupport_SOURCE_DIR}/automoc/Automoc4Config.cmake")
+ include("${KDESupport_SOURCE_DIR}/automoc/Automoc4Config.cmake")
else("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
# when building this project outside kdesupport
- # CMAKE_[SYSTEM_]PREFIX_PATH exists starting with cmake 2.6.0
- file(TO_CMAKE_PATH "$ENV{CMAKE_PREFIX_PATH}" _env_CMAKE_PREFIX_PATH)
- file(TO_CMAKE_PATH "$ENV{CMAKE_LIBRARY_PATH}" _env_CMAKE_LIBRARY_PATH)
- set(AUTOMOC4_SEARCH_PATHS
- ${_env_CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH} ${CMAKE_SYSTEM_PREFIX_PATH}
- ${_env_CMAKE_LIBRARY_PATH} ${CMAKE_LIBRARY_PATH} ${CMAKE_SYSTEM_LIBRARY_PATH}
- ${CMAKE_INSTALL_PREFIX}
- )
- find_file(AUTOMOC4_CONFIG_FILE NAMES Automoc4Config.cmake
- PATH_SUFFIXES automoc4 lib/automoc4 lib64/automoc4
- PATHS ${AUTOMOC4_SEARCH_PATHS}
- NO_DEFAULT_PATH )
+ # use the new "config-mode" of cmake 2.6, which searches the installed Automoc4Config.cmake file
+ # see the man page for details
+ find_package(Automoc4 QUIET NO_MODULE)
endif("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
-if(AUTOMOC4_CONFIG_FILE)
- include(${AUTOMOC4_CONFIG_FILE})
-endif(AUTOMOC4_CONFIG_FILE)
-
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Automoc4 "Did not find automoc4 (part of kdesupport). Searched for Automoc4Config.cmake in ${AUTOMOC4_SEARCH_PATHS} using suffixes automoc4 lib/automoc4 lib64/automoc4." AUTOMOC4_EXECUTABLE)