From e679996e1a351e33d29c532e7871f47d59a3a0e3 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 10 May 2008 21:48:49 +0000 Subject: -use automoc4 from kdesupport if available, otherwise fallback to the one from kdelibs. In a few weeks automoc4 from kdesupport will be required. Alex CCMAIL: kretz@kde.org svn path=/trunk/KDE/kdelibs/; revision=806300 --- modules/FindAutomoc4.cmake | 52 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 modules/FindAutomoc4.cmake (limited to 'modules/FindAutomoc4.cmake') diff --git a/modules/FindAutomoc4.cmake b/modules/FindAutomoc4.cmake new file mode 100644 index 00000000..03a90974 --- /dev/null +++ b/modules/FindAutomoc4.cmake @@ -0,0 +1,52 @@ +# - Try to find automoc4 +# Once done this will define +# +# AUTOMOC4_FOUND - automoc4 has been found +# AUTOMOC4_EXECUTABLE - the automoc4 tool +# +# It also adds the following macros +# AUTOMOC4( ) +# Use this to run automoc4 on all files contained in the list . +# +# AUTOMOC4_MOC_HEADERS( header1.h header2.h) +# Use this to add more header files to be processed with automoc4. + + +# Copyright (c) 2008, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +# 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") +else("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") + # when building this project outside kdesupport + find_file(AUTOMOC4_CONFIG_FILE NAMES Automoc4Config.cmake + PATH_SUFFIXES automoc4 lib/automoc4 lib64/automoc4 + PATHS ${CMAKE_SYSTEM_PREFIX_PATH} ${CMAKE_SYSTEM_LIBRARY_PATH} ${CMAKE_INSTALL_PREFIX}/lib + NO_DEFAULT_PATH ) +endif("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") + + +if(AUTOMOC4_CONFIG_FILE) + include(${AUTOMOC4_CONFIG_FILE}) + set(AUTOMOC4_FOUND TRUE) +else(AUTOMOC4_CONFIG_FILE) + set(AUTOMOC4_FOUND FALSE) +endif(AUTOMOC4_CONFIG_FILE) + +if (AUTOMOC4_FOUND) + if (NOT Automoc4_FIND_QUIETLY) + message(STATUS "Found Automoc4: ${AUTOMOC4_EXECUTABLE}") + endif (NOT Automoc4_FIND_QUIETLY) +else (AUTOMOC4_FOUND) + if (Automoc4_FIND_REQUIRED) + message(FATAL_ERROR "Did not find automoc4 (part of kdesupport).") + else (Automoc4_FIND_REQUIRED) + if (NOT Automoc4_FIND_QUIETLY) + message(STATUS "Did not find automoc4 (part of kdesupport).") + endif (NOT Automoc4_FIND_QUIETLY) + endif (Automoc4_FIND_REQUIRED) +endif (AUTOMOC4_FOUND) -- cgit v1.2.1 From e13e219d9a24e4379bcf80c40e55ab89359fbcc9 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 2 Jun 2008 23:03:30 +0000 Subject: -search in more directories Alex CCMAIL: faure@kde.org svn path=/trunk/KDE/kdelibs/; revision=815981 --- modules/FindAutomoc4.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'modules/FindAutomoc4.cmake') diff --git a/modules/FindAutomoc4.cmake b/modules/FindAutomoc4.cmake index 03a90974..6052d2c5 100644 --- a/modules/FindAutomoc4.cmake +++ b/modules/FindAutomoc4.cmake @@ -23,9 +23,16 @@ if("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") set(AUTOMOC4_CONFIG_FILE "${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) + find_file(AUTOMOC4_CONFIG_FILE NAMES Automoc4Config.cmake PATH_SUFFIXES automoc4 lib/automoc4 lib64/automoc4 - PATHS ${CMAKE_SYSTEM_PREFIX_PATH} ${CMAKE_SYSTEM_LIBRARY_PATH} ${CMAKE_INSTALL_PREFIX}/lib + 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}/lib NO_DEFAULT_PATH ) endif("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") -- cgit v1.2.1 From 54f94006b8bb79bccf17b2de46f8b7b0a4c6e090 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Tue, 8 Jul 2008 21:54:53 +0000 Subject: -apply patch from guru AT computer-rave DOT com , search CMAKE_INSTALL_PREFIX correctly, i.e. without the "/lib", since this is already part of the PATH_SUFFIX Alex svn path=/trunk/KDE/kdelibs/; revision=829705 --- modules/FindAutomoc4.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/FindAutomoc4.cmake') diff --git a/modules/FindAutomoc4.cmake b/modules/FindAutomoc4.cmake index 6052d2c5..ad3ed05f 100644 --- a/modules/FindAutomoc4.cmake +++ b/modules/FindAutomoc4.cmake @@ -32,7 +32,7 @@ else("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") PATH_SUFFIXES automoc4 lib/automoc4 lib64/automoc4 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}/lib + ${CMAKE_INSTALL_PREFIX} NO_DEFAULT_PATH ) endif("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") -- cgit v1.2.1 From 6402cc6a7ad14a3c37408dc0624eac8d5095fd52 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sun, 10 Aug 2008 09:13:30 +0000 Subject: use the new-style cmake 2.6 find_package() mode which automatically searches for the installed Automoc4Config.cmake in the appropriate directories. Alex svn path=/trunk/KDE/kdelibs/; revision=844694 --- modules/FindAutomoc4.cmake | 39 ++++++--------------------------------- 1 file changed, 6 insertions(+), 33 deletions(-) (limited to 'modules/FindAutomoc4.cmake') diff --git a/modules/FindAutomoc4.cmake b/modules/FindAutomoc4.cmake index ad3ed05f..fad02bef 100644 --- a/modules/FindAutomoc4.cmake +++ b/modules/FindAutomoc4.cmake @@ -20,40 +20,13 @@ # 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) - - find_file(AUTOMOC4_CONFIG_FILE NAMES Automoc4Config.cmake - PATH_SUFFIXES automoc4 lib/automoc4 lib64/automoc4 - 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} - 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}) - set(AUTOMOC4_FOUND TRUE) -else(AUTOMOC4_CONFIG_FILE) - set(AUTOMOC4_FOUND FALSE) -endif(AUTOMOC4_CONFIG_FILE) - -if (AUTOMOC4_FOUND) - if (NOT Automoc4_FIND_QUIETLY) - message(STATUS "Found Automoc4: ${AUTOMOC4_EXECUTABLE}") - endif (NOT Automoc4_FIND_QUIETLY) -else (AUTOMOC4_FOUND) - if (Automoc4_FIND_REQUIRED) - message(FATAL_ERROR "Did not find automoc4 (part of kdesupport).") - else (Automoc4_FIND_REQUIRED) - if (NOT Automoc4_FIND_QUIETLY) - message(STATUS "Did not find automoc4 (part of kdesupport).") - endif (NOT Automoc4_FIND_QUIETLY) - endif (Automoc4_FIND_REQUIRED) -endif (AUTOMOC4_FOUND) +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Automoc4 "Did not find automoc4 (part of kdesupport)." AUTOMOC4_EXECUTABLE) -- cgit v1.2.1 From 989a8c1696b3f8a245ccafd3f90a805a1f283d37 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 11 Aug 2008 23:33:22 +0000 Subject: mostly revert patch from yesterday, since it doesn't seem to support 64bit yet Alex svn path=/trunk/KDE/kdelibs/; revision=845536 --- modules/FindAutomoc4.cmake | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) (limited to 'modules/FindAutomoc4.cmake') diff --git a/modules/FindAutomoc4.cmake b/modules/FindAutomoc4.cmake index fad02bef..03b0b23d 100644 --- a/modules/FindAutomoc4.cmake +++ b/modules/FindAutomoc4.cmake @@ -17,16 +17,37 @@ # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# 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) +# 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}") + +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") +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) + find_file(AUTOMOC4_CONFIG_FILE NAMES Automoc4Config.cmake + PATH_SUFFIXES automoc4 lib/automoc4 lib64/automoc4 + 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} + NO_DEFAULT_PATH ) 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)." AUTOMOC4_EXECUTABLE) -- cgit v1.2.1 From c362b85b1b3ae1cf41d8451b6397e81426368a4a Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 13 Aug 2008 15:44:20 +0000 Subject: Similar patch as in branch: more informative output when automoc4 isn't found. svn path=/trunk/KDE/kdelibs/; revision=846504 --- modules/FindAutomoc4.cmake | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'modules/FindAutomoc4.cmake') diff --git a/modules/FindAutomoc4.cmake b/modules/FindAutomoc4.cmake index 03b0b23d..5cf75627 100644 --- a/modules/FindAutomoc4.cmake +++ b/modules/FindAutomoc4.cmake @@ -29,25 +29,28 @@ # find_package(Automoc4 QUIET NO_MODULE) # endif("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") -if("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") - # when building this project as part of kdesupport +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") -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) - find_file(AUTOMOC4_CONFIG_FILE NAMES Automoc4Config.cmake - PATH_SUFFIXES automoc4 lib/automoc4 lib64/automoc4 - 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} - NO_DEFAULT_PATH ) +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 ) endif("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") -if(AUTOMOC4_CONFIG_FILE) - include(${AUTOMOC4_CONFIG_FILE}) +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)." AUTOMOC4_EXECUTABLE) +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) -- cgit v1.2.1 From 57d92979d017bcc1748f29e942b5843428e30051 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 10 Nov 2008 23:52:13 +0000 Subject: -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 --- modules/FindAutomoc4.cmake | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-) (limited to 'modules/FindAutomoc4.cmake') 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) -- cgit v1.2.1 From f9248c8938c2ee4e31cb2ea8565c6350757dbae2 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 8 Dec 2008 22:39:27 +0000 Subject: -make finding the FooConfig.cmake file quiet, but don't make the outer FindFoo.cmake file quiet Alex svn path=/trunk/KDE/kdelibs/; revision=894602 --- modules/FindAutomoc4.cmake | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/FindAutomoc4.cmake') diff --git a/modules/FindAutomoc4.cmake b/modules/FindAutomoc4.cmake index c76d20b8..1192ea01 100644 --- a/modules/FindAutomoc4.cmake +++ b/modules/FindAutomoc4.cmake @@ -25,7 +25,9 @@ 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 + set(_Automoc4_FIND_QUIETLY ${Automoc4_FIND_QUIETLY}) find_package(Automoc4 QUIET NO_MODULE) + set(Automoc4_FIND_QUIETLY ${_Automoc4_FIND_QUIETLY}) endif("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") include(FindPackageHandleStandardArgs) -- cgit v1.2.1 From 87c903a8e853eec433860818a01040da8d1c5f1a Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sun, 4 Jan 2009 15:39:53 +0000 Subject: -add missing copyright notices, I hope I got it right -also a few empty lines here and there to make it look nicer Alex svn path=/trunk/KDE/kdelibs/; revision=905547 --- modules/FindAutomoc4.cmake | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'modules/FindAutomoc4.cmake') diff --git a/modules/FindAutomoc4.cmake b/modules/FindAutomoc4.cmake index 1192ea01..cbe7ad1e 100644 --- a/modules/FindAutomoc4.cmake +++ b/modules/FindAutomoc4.cmake @@ -3,20 +3,42 @@ # # AUTOMOC4_FOUND - automoc4 has been found # AUTOMOC4_EXECUTABLE - the automoc4 tool +# AUTOMOC4_VERSION - the full version of automoc4 +# AUTOMOC4_VERSION_MAJOR, AUTOMOC4_VERSION_MINOR, AUTOMOC4_VERSION_PATCH - AUTOMOC4_VERSION +# broken into its components # # It also adds the following macros # AUTOMOC4( ) # Use this to run automoc4 on all files contained in the list . # -# AUTOMOC4_MOC_HEADERS( header1.h header2.h) +# AUTOMOC4_MOC_HEADERS( header1.h header2.h ...) # Use this to add more header files to be processed with automoc4. +# +# AUTOMOC4_ADD_EXECUTABLE( src1 src2 ...) +# This macro does the same as ADD_EXECUTABLE, but additionally +# adds automoc4 handling for all source files. +# +# AUTOMOC4_ADD_LIBRARY( src1 src2 ...) +# This macro does the same as ADD_LIBRARY, but additionally +# adds automoc4 handling for all source files. +# Internal helper macro, may change or be removed anytime: +# _ADD_AUTOMOC4_TARGET( ) +# +# Since version 0.9.88: +# The following two macros are only to be used for KDE4 projects +# and do something which makes sure automoc4 works for KDE. Don't +# use them anywhere else. +# _AUTOMOC4_KDE4_PRE_TARGET_HANDLING( ) +# _AUTOMOC4_KDE4_POST_TARGET_HANDLING() -# Copyright (c) 2008, Alexander Neundorf, + +# Copyright (c) 2008-2009, Alexander Neundorf, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. + # 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 -- cgit v1.2.1 From 856f2d3758d59e0d022b8e73e84079bfaa79dcc7 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Thu, 24 Jun 2010 21:26:01 +0000 Subject: -remove wrong status message, this was a left over from r882594 Alex svn path=/trunk/KDE/kdelibs/; revision=1142413 --- modules/FindAutomoc4.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/FindAutomoc4.cmake') diff --git a/modules/FindAutomoc4.cmake b/modules/FindAutomoc4.cmake index cbe7ad1e..e08ae802 100644 --- a/modules/FindAutomoc4.cmake +++ b/modules/FindAutomoc4.cmake @@ -53,4 +53,4 @@ else("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") endif("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") 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) +find_package_handle_standard_args(Automoc4 "Did not find automoc4 (Automoc4Config.cmake, part of kdesupport)." AUTOMOC4_EXECUTABLE) -- cgit v1.2.1