From b2c19873fae32927ac9e1ecbb6a57fc9951fa8e8 Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Wed, 9 Jul 2008 20:07:00 +0000 Subject: 4.1 -> 4.2 svn path=/branches/KDE/4.1/kdelibs/; revision=830126 --- modules/FindKDE4Internal.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 83213217..e873d0ee 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -1046,13 +1046,13 @@ macro (KDE4_PRINT_RESULTS) # inside kdelibs the include dir and lib dir are internal, not "found" if (NOT _kdeBootStrapping) if(KDE4_INCLUDE_DIR) - message(STATUS "Found KDE 4.1 include dir: ${KDE4_INCLUDE_DIR}") + message(STATUS "Found KDE 4.2 include dir: ${KDE4_INCLUDE_DIR}") else(KDE4_INCLUDE_DIR) message(STATUS "ERROR: unable to find KDE 4 headers") endif(KDE4_INCLUDE_DIR) if(KDE4_LIB_DIR) - message(STATUS "Found KDE 4.1 library dir: ${KDE4_LIB_DIR}") + message(STATUS "Found KDE 4.2 library dir: ${KDE4_LIB_DIR}") else(KDE4_LIB_DIR) message(STATUS "ERROR: unable to find KDE 4 core library") endif(KDE4_LIB_DIR) -- cgit v1.2.1 From 786bddac098895df0de680edf2f85a4627009a71 Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Wed, 9 Jul 2008 20:11:31 +0000 Subject: revert. wrong branch dummy! svn path=/branches/KDE/4.1/kdelibs/; revision=830130 --- modules/FindKDE4Internal.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index e873d0ee..83213217 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -1046,13 +1046,13 @@ macro (KDE4_PRINT_RESULTS) # inside kdelibs the include dir and lib dir are internal, not "found" if (NOT _kdeBootStrapping) if(KDE4_INCLUDE_DIR) - message(STATUS "Found KDE 4.2 include dir: ${KDE4_INCLUDE_DIR}") + message(STATUS "Found KDE 4.1 include dir: ${KDE4_INCLUDE_DIR}") else(KDE4_INCLUDE_DIR) message(STATUS "ERROR: unable to find KDE 4 headers") endif(KDE4_INCLUDE_DIR) if(KDE4_LIB_DIR) - message(STATUS "Found KDE 4.2 library dir: ${KDE4_LIB_DIR}") + message(STATUS "Found KDE 4.1 library dir: ${KDE4_LIB_DIR}") else(KDE4_LIB_DIR) message(STATUS "ERROR: unable to find KDE 4 core library") endif(KDE4_LIB_DIR) -- cgit v1.2.1 From 93e82c9bc1fbe7eefdd80e3c2754ac9c0e0167db Mon Sep 17 00:00:00 2001 From: David Faure Date: Fri, 11 Jul 2008 10:33:24 +0000 Subject: Fix compilation of kdegraphics with exiv2-0.12 installed on the computer. The code uses AccessMode which was added in 0.13, so at least for kdegraphics, the min version for a usable exiv2 is 0.13. CCMAIL: caulier.gilles@gmail.com svn path=/branches/KDE/4.1/kdelibs/; revision=830862 --- modules/FindExiv2.cmake | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/FindExiv2.cmake b/modules/FindExiv2.cmake index 884be4ed..5555c92e 100644 --- a/modules/FindExiv2.cmake +++ b/modules/FindExiv2.cmake @@ -17,17 +17,21 @@ else (EXIV2_INCLUDE_DIR AND EXIV2_LIBRARIES) # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls INCLUDE(UsePkgConfig) + + if(NOT EXIV2_MIN_VERSION) + set(EXIV2_MIN_VERSION "0.12") + endif(NOT EXIV2_MIN_VERSION) PKGCONFIG(exiv2 _EXIV2IncDir _EXIV2LinkDir _EXIV2LinkFlags _EXIV2Cflags) if(_EXIV2LinkFlags) # query pkg-config asking for a Exiv2 >= 0.12 - EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.12 exiv2 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) + EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=${EXIV2_MIN_VERSION} exiv2 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) if(_return_VALUE STREQUAL "0") - message(STATUS "Found Exiv2 release >= 0.12") + message(STATUS "Found Exiv2 release >= ${EXIV2_MIN_VERSION}") set(EXIV2_VERSION_GOOD_FOUND TRUE) else(_return_VALUE STREQUAL "0") - message(STATUS "Found Exiv2 release < 0.12") + message(STATUS "Found Exiv2 release < ${EXIV2_MIN_VERSION}") endif(_return_VALUE STREQUAL "0") else(_EXIV2LinkFlags) set(EXIV2_FOUND FALSE) @@ -54,6 +58,7 @@ else (EXIV2_INCLUDE_DIR AND EXIV2_LIBRARIES) if (EXIV2_INCLUDE_DIR AND EXIV2_LIBRARIES) set(EXIV2_FOUND TRUE) + # TODO version check is missing endif (EXIV2_INCLUDE_DIR AND EXIV2_LIBRARIES) endif(EXIV2_VERSION_GOOD_FOUND) if (EXIV2_FOUND) -- cgit v1.2.1 From 9c7f54bcfd27f0299fff56cdeff76d6e6894d36d Mon Sep 17 00:00:00 2001 From: Helio Castro Date: Tue, 15 Jul 2008 21:18:36 +0000 Subject: - Logic fix for boost subminor test detection by Andreas Pakulat. It fixes Mandriva 1.35.0 boos detection svn path=/branches/KDE/4.1/kdelibs/; revision=832962 --- modules/FindBoost.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/FindBoost.cmake b/modules/FindBoost.cmake index 01075ec7..7f3aff9e 100644 --- a/modules/FindBoost.cmake +++ b/modules/FindBoost.cmake @@ -482,10 +482,10 @@ ELSE (_boost_IN_CACHE) SET( Boost_FOUND TRUE ) IF( Boost_FIND_VERSION_MAJOR AND Boost_MAJOR_VERSION LESS "${Boost_FIND_VERSION_MAJOR}" ) SET( Boost_FOUND FALSE ) - ELSE( Boost_FIND_VERSION_MAJOR AND Boost_MAJOR_VERSION LESS "${Boost_FIND_VERSION_MAJOR}" ) + ELSEIF( Boost_FIND_VERSION_MAJOR AND Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" ) IF( Boost_FIND_VERSION_MINOR AND Boost_MINOR_VERSION LESS "${Boost_FIND_VERSION_MINOR}" ) SET( Boost_FOUND FALSE ) - ELSE( Boost_FIND_VERSION_MINOR AND Boost_MINOR_VERSION LESS "${Boost_FIND_VERSION_MINOR}" ) + ELSEIF( Boost_FIND_VERSION_MINOR AND Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" ) IF( Boost_FIND_VERSION_PATCH AND Boost_SUBMINOR_VERSION LESS "${Boost_FIND_VERSION_PATCH}" ) SET( Boost_FOUND FALSE ) ENDIF( Boost_FIND_VERSION_PATCH AND Boost_SUBMINOR_VERSION LESS "${Boost_FIND_VERSION_PATCH}" ) -- cgit v1.2.1 From c0c1c612fb548a668664dc380a3b9b75db75283e Mon Sep 17 00:00:00 2001 From: Andreas Pakulat Date: Sat, 19 Jul 2008 10:28:45 +0000 Subject: automatically merged revision 834533: Explain the various build types that KDE4 supports and add Debugfull to the build configuration types for CMake > 2.5 svn path=/branches/KDE/4.1/kdelibs/; revision=834621 --- modules/FindKDE4Internal.cmake | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 83213217..2f589598 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -199,6 +199,27 @@ # _KDE4_PLATFORM_INCLUDE_DIRS is used only internally # _KDE4_PLATFORM_DEFINITIONS is used only internally +# Note on the possible values for CMAKE_BUILD_TYPE and how KDE handles +# the flags for those buildtypes. FindKDE4Internal supports the values +# Debug, Release, Relwithdebinfo, Profile and Debugfull +# +# Release +# optimised for speed, qDebug/kDebug turned off, no debug symbols +# Release with debug info +# optimised for speed, debugging symbols on (-g) +# Debug +# optimised but debuggable, debugging on (-g) +# (-fno-reorder-blocks -fno-schedule-insns -fno-inline) +# DebugFull +# no optimisation, full debugging on (-g3) +# Profile +# DebugFull + -ftest-coverage -fprofile-arcs +# +# It is expected that the "Debug" build type be still debuggable with gdb +# without going all over the place, but still produce better performance. +# It's also important to note that gcc cannot detect all warning conditions +# unless the optimiser is active. + # Copyright (c) 2006-2008, Alexander Neundorf # Copyright (c) 2006, Laurent Montel, # @@ -360,7 +381,6 @@ else (_kdeBootStrapping) find_library(KDE4_KDEUI_LIBRARY NAMES kdeui PATHS ${KDE4_LIB_INSTALL_DIR} NO_DEFAULT_PATH ) set(KDE4_KDEUI_LIBS ${kdeui_LIB_DEPENDS} ${KDE4_KDEUI_LIBRARY} ) - find_library(KDE4_KIO_LIBRARY NAMES kio PATHS ${KDE4_LIB_INSTALL_DIR} NO_DEFAULT_PATH ) set(KDE4_KIO_LIBS ${kio_LIB_DEPENDS} ${KDE4_KIO_LIBRARY} ) @@ -897,6 +917,10 @@ endif(MSVC) if (CMAKE_COMPILER_IS_GNUCXX) + if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.6) + set (CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} "Debugfull") + endif("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.6) + set (KDE4_ENABLE_EXCEPTIONS -fexceptions) # Select flags. set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") @@ -1003,6 +1027,11 @@ endif (CMAKE_COMPILER_IS_GNUCXX) if (CMAKE_C_COMPILER MATCHES "icc") + + if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.6) + set (CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} "Debugfull") + endif("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.6) + set (KDE4_ENABLE_EXCEPTIONS -fexceptions) # Select flags. set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") -- cgit v1.2.1 From c4503f753b9af4e676c8d42e3c8659fc0a7445aa Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 19 Jul 2008 13:35:17 +0000 Subject: -synch with trunk: -some formatting -KDE_DEFAULT_HOME is now a cache variable -fix for the link interface libs from Dirk -fix for targets with "-" in their name from Christian Alex svn path=/branches/KDE/4.1/kdelibs/; revision=834700 --- modules/KDE4Macros.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index 6da11793..4374c6fe 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -657,6 +657,7 @@ macro (KDE4_ADD_KDEINIT_EXECUTABLE _target_NAME ) # keep the library there- if(WIN32) set(_KDEINIT4_TARGET_NAME_ ${_target_NAME}) + string(REGEX REPLACE "[-]" "_" _KDEINIT4_TARGET_NAME_ "${_KDEINIT4_TARGET_NAME_}") configure_file(${KDE4_MODULE_DIR}/kde4init_win32lib_dummy.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_win32lib_dummy.cpp) add_library(kdeinit_${_target_NAME} STATIC ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_win32lib_dummy.cpp) @@ -1117,7 +1118,7 @@ endmacro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES) macro (KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs) if(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX )# AND NOT APPLE) - set_target_properties("${_target}" "${_interface_libs}") + set_target_properties("${_target}" PROPERTIES LINK_INTERFACE_LIBRARIES "${_interface_libs}") endif(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX)# AND NOT APPLE) endmacro (KDE4_TARGET_LINK_INTERFACE_LIBRARIES) -- cgit v1.2.1 From 760e338ee29066253a2036c221c5b4c8e7fe8df8 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sun, 20 Jul 2008 21:38:13 +0000 Subject: documentation and formatting fixes, no functional changes Alex svn path=/branches/KDE/4.1/kdelibs/; revision=835631 --- modules/FindExiv2.cmake | 18 +++++++++------ modules/FindGSSAPI.cmake | 44 ++++++++++++++++++------------------ modules/FindKDE4Internal.cmake | 13 ++++++----- modules/FindPCRE.cmake | 18 +++++++-------- modules/FindQt4.cmake | 4 ---- modules/FindSharedMimeInfo.cmake | 5 ++++ modules/FindTaglib.cmake | 49 +++++++++++++++++++++------------------- 7 files changed, 80 insertions(+), 71 deletions(-) diff --git a/modules/FindExiv2.cmake b/modules/FindExiv2.cmake index 5555c92e..5bef48be 100644 --- a/modules/FindExiv2.cmake +++ b/modules/FindExiv2.cmake @@ -1,4 +1,8 @@ # - Try to find the Exiv2 library +# +# EXIV2_MIN_VERSION - You can set this variable to the minimum version you need +# before doing FIND_PACKAGE(Exiv2). The default is 0.12. +# # Once done this will define # # EXIV2_FOUND - system has libexiv2 @@ -10,23 +14,23 @@ if (EXIV2_INCLUDE_DIR AND EXIV2_LIBRARIES) # in cache already - SET(EXIV2_FOUND TRUE) + set(EXIV2_FOUND TRUE) else (EXIV2_INCLUDE_DIR AND EXIV2_LIBRARIES) if (NOT WIN32) # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls - INCLUDE(UsePkgConfig) + include(UsePkgConfig) if(NOT EXIV2_MIN_VERSION) set(EXIV2_MIN_VERSION "0.12") endif(NOT EXIV2_MIN_VERSION) - PKGCONFIG(exiv2 _EXIV2IncDir _EXIV2LinkDir _EXIV2LinkFlags _EXIV2Cflags) + pkgconfig(exiv2 _EXIV2IncDir _EXIV2LinkDir _EXIV2LinkFlags _EXIV2Cflags) if(_EXIV2LinkFlags) # query pkg-config asking for a Exiv2 >= 0.12 - EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=${EXIV2_MIN_VERSION} exiv2 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) + exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=${EXIV2_MIN_VERSION} exiv2 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) if(_return_VALUE STREQUAL "0") message(STATUS "Found Exiv2 release >= ${EXIV2_MIN_VERSION}") set(EXIV2_VERSION_GOOD_FOUND TRUE) @@ -47,11 +51,11 @@ else (EXIV2_INCLUDE_DIR AND EXIV2_LIBRARIES) if(EXIV2_VERSION_GOOD_FOUND) set(EXIV2_DEFINITIONS ${_EXIV2Cflags}) - FIND_PATH(EXIV2_INCLUDE_DIR exiv2/exif.hpp + find_path(EXIV2_INCLUDE_DIR exiv2/exif.hpp ${_EXIV2IncDir} ) - FIND_LIBRARY(EXIV2_LIBRARIES NAMES exiv2 libexiv2 + find_library(EXIV2_LIBRARIES NAMES exiv2 libexiv2 PATHS ${_EXIV2LinkDir} ) @@ -76,7 +80,7 @@ else (EXIV2_INCLUDE_DIR AND EXIV2_LIBRARIES) endif (Exiv2_FIND_REQUIRED) endif (EXIV2_FOUND) - MARK_AS_ADVANCED(EXIV2_INCLUDE_DIR EXIV2_LIBRARIES) + mark_as_advanced(EXIV2_INCLUDE_DIR EXIV2_LIBRARIES) endif (EXIV2_INCLUDE_DIR AND EXIV2_LIBRARIES) diff --git a/modules/FindGSSAPI.cmake b/modules/FindGSSAPI.cmake index 45e4e0e1..0951c675 100644 --- a/modules/FindGSSAPI.cmake +++ b/modules/FindGSSAPI.cmake @@ -32,34 +32,34 @@ else(GSSAPI_LIBS AND 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(_return_VALUE) + 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(_return_VALUE) - EXEC_PROGRAM(${KRB5_CONFIG} ARGS --cflags gssapi RETURN_VALUE _return_VALUE OUTPUT_VARIABLE GSSAPI_INCS) + 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) + 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(gssapi_flavor_tmp MATCHES ".*Massachusetts.*") - SET(GSSAPI_FLAVOR "HEIMDAL") - ENDIF(gssapi_flavor_tmp MATCHES ".*Massachusetts.*") + if(gssapi_flavor_tmp MATCHES ".*Massachusetts.*") + set(GSSAPI_FLAVOR "MIT") + else(gssapi_flavor_tmp MATCHES ".*Massachusetts.*") + set(GSSAPI_FLAVOR "HEIMDAL") + endif(gssapi_flavor_tmp MATCHES ".*Massachusetts.*") - 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(gssapi_flavor_tmp MATCHES "Sun Microsystems.*") - MESSAGE(WARNING "${KRB5_CONFIG} failed unexpectedly.") - ENDIF(gssapi_flavor_tmp MATCHES "Sun Microsystems.*") - ENDIF(NOT HAVE_KRB5_GSSAPI) + 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(gssapi_flavor_tmp MATCHES "Sun Microsystems.*") + message(WARNING "${KRB5_CONFIG} failed unexpectedly.") + endif(gssapi_flavor_tmp MATCHES "Sun Microsystems.*") + endif(NOT HAVE_KRB5_GSSAPI) if(GSSAPI_LIBS) # GSSAPI_INCS can be also empty, so don't rely on that set(GSSAPI_FOUND TRUE) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 2f589598..044bb4f3 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -194,12 +194,9 @@ # The resulting manpage will be installed to when using # INSTALL_DESTINATION , or to / if # SUBDIR is specified. - - -# _KDE4_PLATFORM_INCLUDE_DIRS is used only internally -# _KDE4_PLATFORM_DEFINITIONS is used only internally - -# Note on the possible values for CMAKE_BUILD_TYPE and how KDE handles +# +# +# A note on the possible values for CMAKE_BUILD_TYPE and how KDE handles # the flags for those buildtypes. FindKDE4Internal supports the values # Debug, Release, Relwithdebinfo, Profile and Debugfull # @@ -220,6 +217,9 @@ # It's also important to note that gcc cannot detect all warning conditions # unless the optimiser is active. +# _KDE4_PLATFORM_INCLUDE_DIRS is used only internally +# _KDE4_PLATFORM_DEFINITIONS is used only internally + # Copyright (c) 2006-2008, Alexander Neundorf # Copyright (c) 2006, Laurent Montel, # @@ -401,6 +401,7 @@ else (_kdeBootStrapping) find_library(KDE4_KJS_LIBRARY NAMES kjs PATHS ${KDE4_LIB_INSTALL_DIR} NO_DEFAULT_PATH ) set(KDE4_KJS_LIBS ${kjs_LIB_DEPENDS} ${KDE4_KJS_LIBRARY} ) + find_library(KDE4_KJSAPI_LIBRARY NAMES kjsapi PATHS ${KDE4_LIB_INSTALL_DIR} NO_DEFAULT_PATH ) set(KDE4_KJSAPI_LIBS ${kjsapi_LIB_DEPENDS} ${KDE4_KJSAPI_LIBRARY} ) diff --git a/modules/FindPCRE.cmake b/modules/FindPCRE.cmake index 56f015a8..ba2de623 100644 --- a/modules/FindPCRE.cmake +++ b/modules/FindPCRE.cmake @@ -17,23 +17,23 @@ if (PCRE_INCLUDE_DIR AND PCRE_PCREPOSIX_LIBRARY AND PCRE_PCRE_LIBRARY) endif (PCRE_INCLUDE_DIR AND PCRE_PCREPOSIX_LIBRARY AND PCRE_PCRE_LIBRARY) -IF (NOT WIN32) +if (NOT WIN32) # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls - INCLUDE(UsePkgConfig) + include(UsePkgConfig) - PKGCONFIG(libpcre _PCREIncDir _PCRELinkDir _PCRELinkFlags _PCRECflags) -ENDIF (NOT WIN32) + pkgconfig(libpcre _PCREIncDir _PCRELinkDir _PCRELinkFlags _PCRECflags) +endif (NOT WIN32) -FIND_PATH(PCRE_INCLUDE_DIR pcre.h PATHS ${_PCREIncDir} PATH_SUFFIXES pcre) +find_path(PCRE_INCLUDE_DIR pcre.h PATHS ${_PCREIncDir} PATH_SUFFIXES pcre) -FIND_LIBRARY(PCRE_PCRE_LIBRARY NAMES pcre PATHS ${_PCRELinkDir}) +find_library(PCRE_PCRE_LIBRARY NAMES pcre PATHS ${_PCRELinkDir}) -FIND_LIBRARY(PCRE_PCREPOSIX_LIBRARY NAMES pcreposix PATHS ${_PCRELinkDir}) +find_library(PCRE_PCREPOSIX_LIBRARY NAMES pcreposix PATHS ${_PCRELinkDir}) include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG PCRE_INCLUDE_DIR PCRE_PCRE_LIBRARY PCRE_PCREPOSIX_LIBRARY ) +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) +mark_as_advanced(PCRE_INCLUDE_DIR PCRE_LIBRARIES PCRE_PCREPOSIX_LIBRARY PCRE_PCRE_LIBRARY) diff --git a/modules/FindQt4.cmake b/modules/FindQt4.cmake index 797bd972..55c44dfd 100644 --- a/modules/FindQt4.cmake +++ b/modules/FindQt4.cmake @@ -219,7 +219,6 @@ # The qtmain library for Windows QT_QTMAIN_LIBRARY # # The QtUiTools library: QT_QTUITOOLS_LIBRARY - # # The QtAssistantClient library: QT_QTASSISTANTCLIENT_LIBRARY # @@ -230,9 +229,6 @@ # The QtXmlPatterns library: QT_QTXMLPATTERNS_LIBRARY # # The Phonon library: QT_PHONON_LIBRARY - - - # # also defined, but NOT for general use are # QT_MOC_EXECUTABLE Where to find the moc tool. diff --git a/modules/FindSharedMimeInfo.cmake b/modules/FindSharedMimeInfo.cmake index 510c4992..707cb006 100644 --- a/modules/FindSharedMimeInfo.cmake +++ b/modules/FindSharedMimeInfo.cmake @@ -1,4 +1,7 @@ # - Try to find the shared-mime-info package +# +# SHARED_MIME_INFO_MINIMUM_VERSION - Set this to the minimum version you need, default is 0.18 +# # Once done this will define # # SHARED_MIME_INFO_FOUND - system has the shared-mime-info package @@ -61,9 +64,11 @@ macro(UPDATE_XDG_MIMETYPES _path) else("${_xdgmimeDir}" STREQUAL packages ) set(_xdgmimeDir "${_path}") endif("${_xdgmimeDir}" STREQUAL packages ) + install(CODE " set(DESTDIR_VALUE \"\$ENV{DESTDIR}\") if (NOT DESTDIR_VALUE) + # under Windows relative paths are used, that's why it runs from CMAKE_INSTALL_PREFIX execute_process(COMMAND ${UPDATE_MIME_DATABASE_EXECUTABLE} ${_xdgmimeDir} WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}) endif (NOT DESTDIR_VALUE) diff --git a/modules/FindTaglib.cmake b/modules/FindTaglib.cmake index 35fd6b03..3edfdb4a 100644 --- a/modules/FindTaglib.cmake +++ b/modules/FindTaglib.cmake @@ -14,37 +14,40 @@ if(NOT TAGLIB_MIN_VERSION) set(TAGLIB_MIN_VERSION "1.4") endif(NOT TAGLIB_MIN_VERSION) -IF(NOT WIN32) - FIND_PROGRAM(TAGLIBCONFIG_EXECUTABLE NAMES taglib-config PATHS +if(NOT WIN32) + find_program(TAGLIBCONFIG_EXECUTABLE NAMES taglib-config PATHS ${BIN_INSTALL_DIR} ) -ENDIF(NOT WIN32) +endif(NOT WIN32) + #reset vars set(TAGLIB_LIBRARIES) set(TAGLIB_CFLAGS) # if taglib-config has been found -IF(TAGLIBCONFIG_EXECUTABLE) +if(TAGLIBCONFIG_EXECUTABLE) - EXEC_PROGRAM(${TAGLIBCONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_VERSION) + exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_VERSION) if(TAGLIB_VERSION STRLESS "${TAGLIB_MIN_VERSION}") - MESSAGE(STATUS "TagLib version not found: version searched :${TAGLIB_MIN_VERSION}, found ${TAGLIB_VERSION}") - SET(TAGLIB_FOUND FALSE) + message(STATUS "TagLib version not found: version searched :${TAGLIB_MIN_VERSION}, found ${TAGLIB_VERSION}") + set(TAGLIB_FOUND FALSE) else(TAGLIB_VERSION STRLESS "${TAGLIB_MIN_VERSION}") - EXEC_PROGRAM(${TAGLIBCONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_LIBRARIES) + exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_LIBRARIES) - EXEC_PROGRAM(${TAGLIBCONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_CFLAGS) + exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_CFLAGS) - IF(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS) - SET(TAGLIB_FOUND TRUE) + if(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS) + set(TAGLIB_FOUND TRUE) message(STATUS "Found taglib: ${TAGLIB_LIBRARIES}") - ENDIF(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS) + endif(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS) + + endif(TAGLIB_VERSION STRLESS "${TAGLIB_MIN_VERSION}") + mark_as_advanced(TAGLIB_CFLAGS TAGLIB_LIBRARIES) + +else(TAGLIBCONFIG_EXECUTABLE) - endif(TAGLIB_VERSION STRLESS "${TAGLIB_MIN_VERSION}") - MARK_AS_ADVANCED(TAGLIB_CFLAGS TAGLIB_LIBRARIES) -ELSE(TAGLIBCONFIG_EXECUTABLE) include(FindLibraryWithDebug) include(FindPackageHandleStandardArgs) @@ -67,16 +70,16 @@ ELSE(TAGLIBCONFIG_EXECUTABLE) find_package_handle_standard_args(Taglib DEFAULT_MSG TAGLIB_INCLUDES TAGLIB_LIBRARIES) -ENDIF(TAGLIBCONFIG_EXECUTABLE) +endif(TAGLIBCONFIG_EXECUTABLE) if(TAGLIB_FOUND) - IF(NOT Taglib_FIND_QUIETLY AND TAGLIBCONFIG_EXECUTABLE) - MESSAGE(STATUS "Taglib found: ${TAGLIB_LIBRARIES}") - ENDIF(NOT Taglib_FIND_QUIETLY AND TAGLIBCONFIG_EXECUTABLE) -ELSE(TAGLIB_FOUND) - IF(Taglib_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find Taglib") - ENDIF(Taglib_FIND_REQUIRED) + if(NOT Taglib_FIND_QUIETLY AND TAGLIBCONFIG_EXECUTABLE) + message(STATUS "Taglib found: ${TAGLIB_LIBRARIES}") + endif(NOT Taglib_FIND_QUIETLY AND TAGLIBCONFIG_EXECUTABLE) +else(TAGLIB_FOUND) + if(Taglib_FIND_REQUIRED) + message(FATAL_ERROR "Could not find Taglib") + endif(Taglib_FIND_REQUIRED) endif(TAGLIB_FOUND) -- cgit v1.2.1 From 5f61200948e3f19a0eab2c9678ad76c130ec6df8 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sun, 20 Jul 2008 22:14:42 +0000 Subject: -rename variable XMLLINT_EXECUTABLE to LIBXML2_XMLLINT_EXECUTABLE, to be consistent with the cmake module coding style (keep the old one for compatibility) -adapt config-kdoctools.h.cmake accordingly Alex svn path=/branches/KDE/4.1/kdelibs/; revision=835658 --- modules/FindLibXml2.cmake | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/modules/FindLibXml2.cmake b/modules/FindLibXml2.cmake index 5f23c184..bbe5e8b2 100644 --- a/modules/FindLibXml2.cmake +++ b/modules/FindLibXml2.cmake @@ -1,10 +1,11 @@ # - Try to find LibXml2 # Once done this will define # -# LIBXML2_FOUND - system has LibXml2 -# LIBXML2_INCLUDE_DIR - the LibXml2 include directory -# LIBXML2_LIBRARIES - the libraries needed to use LibXml2 +# LIBXML2_FOUND - System has LibXml2 +# LIBXML2_INCLUDE_DIR - The LibXml2 include directory +# LIBXML2_LIBRARIES - The libraries needed to use LibXml2 # LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2 +# LIBXML2_XMLLINT_EXECUTABLE - The XML checking tool xmllint coming with LibXml2 # Copyright (c) 2006, Alexander Neundorf, # @@ -42,11 +43,13 @@ ELSE (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES) SET(LIBXML2_FOUND FALSE) ENDIF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES) -FIND_PROGRAM(XMLLINT_EXECUTABLE xmllint) +FIND_PROGRAM(LIBXML2_XMLLINT_EXECUTABLE xmllint) +# for backwards compat. with KDE 4.0.x: +SET(XMLLINT_EXECUTABLE "${LIBXML2_XMLLINT_EXECUTABLE}") -if( NOT XMLLINT_EXECUTABLE ) +IF( NOT LIBXML2_XMLLINT_EXECUTABLE ) MESSAGE(STATUS "xmllint program not found. Install it if you want validate generated doc file.") -endif(NOT XMLLINT_EXECUTABLE ) +ENDIF(NOT LIBXML2_XMLLINT_EXECUTABLE ) IF (LIBXML2_FOUND) IF (NOT LibXml2_FIND_QUIETLY) @@ -58,5 +61,5 @@ ELSE (LIBXML2_FOUND) ENDIF (LibXml2_FIND_REQUIRED) ENDIF (LIBXML2_FOUND) -MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES XMLLINT_EXECUTABLE) +MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES LIBXML2_XMLLINT_EXECUTABLE) -- cgit v1.2.1 From a3a1c93e8ebfea28aff2aa3a15c8919802e7df56 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sun, 20 Jul 2008 22:16:40 +0000 Subject: -prefix kde4_target_link_interface_libraries() with an "_", to make clear this is only a temporary macro which will be gone again very soon Alex CCMAIL: mueller@kde.org svn path=/branches/KDE/4.1/kdelibs/; revision=835659 --- modules/KDE4Macros.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index 4374c6fe..c30973da 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -1116,11 +1116,15 @@ macro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES _append_or_write _filename) endif(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX)# AND NOT APPLE) endmacro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES) -macro (KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs) +macro (_KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs) if(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX )# AND NOT APPLE) set_target_properties("${_target}" PROPERTIES LINK_INTERFACE_LIBRARIES "${_interface_libs}") endif(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX)# AND NOT APPLE) -endmacro (KDE4_TARGET_LINK_INTERFACE_LIBRARIES) +endmacro (_KDE4_TARGET_LINK_INTERFACE_LIBRARIES) + +macro (KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs) + message(FATAL_ERROR "KDE4_TARGET_LINK_INTERFACE_LIBRARIES() has been renamed to _KDE4_TARGET_LINK_INTERFACE_LIBRARIES(), so use that instead") +endmacro (KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs) macro (KDE4_INSTALL_HANDBOOK _lang) message(STATUS "KDE4_INSTALL_HANDBOOK() is deprecated. Remove it please. Now all is done in KDE4_CREATE_HANDBOOK.") -- cgit v1.2.1 From 24a1cc7c66f4d2137c441c4222731980d4f5892b Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 21 Jul 2008 19:25:47 +0000 Subject: -also disable _KDE4_TARGET_LINK_INTERFACE_LIBRARIES() and use the renamed LINK_INTERFACE_LIBRARIES target property instead: set_target_properties(foo PROPERTIES ${KDE4_DISABLE_PROPERTY_}LINK_INTERFACE_LIBRARIES "kdeui;kdecore" ) While this doesn't look very nice, it is completely forward and backward compatible (i.e. cmake 2.4 doesn't complain, cmake 2.6 works, both versions work as soon as the reduced link interface is the default (soon), if somebody uses this with kdelibs which don't have that anymore he will get the reduced interface instead of errors, so all should be ok) This was discussed on kde-buildsystem end of June. Alex CCMAIL: mueller@kde.org svn path=/branches/KDE/4.1/kdelibs/; revision=836133 --- modules/FindKDE4Internal.cmake | 23 ++++++++++++++++++++++- modules/KDE4Macros.cmake | 6 ++---- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 044bb4f3..34b67ac2 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -493,12 +493,33 @@ option(KDE4_ENABLE_FINAL "Enable final all-in-one compilation") option(KDE4_BUILD_TESTS "Build the tests") option(KDE4_ENABLE_HTMLHANDBOOK "Create targets htmlhandbook for creating the html versions of the docbook docs") -# this one enables the smaller link interface for libs on UNIX (exceot OSX) + +# this one enables the smaller link interface for libs on UNIX +set(KDE4_DISABLE_PROPERTY_ ) if(UNIX )# AND NOT APPLE) option(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT "Enable the experimental reduced library exports" FALSE) + # The purpose of the KDE4_DISABLE_PROPERTY_ variable is to be used as a prefix for + # the target property LINK_INTERFACE_LIBRARIES. If it is empty, the property will have its + # correct name, if it's not empty, it will be a different name, i.e. the actual property + # will not be set, i.e. disabled. See kdelibs/kdecore/CMakeLists.txt for an example. + # This will be removed again as soon as we use the reduced link interface as default. + # This won't cause any incompatibilties then because then cmake files which still + # have that prefix will work, since that prefix will just be empty. + # + # If enabled, make it empty, so the property will keep it's actual name. + if (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) + set(KDE4_DISABLE_PROPERTY_ ) + else (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) + # If disabled, make it non-empty, so the property name will change from "LINK_INTERFACE_LIBRARIES" + # to "DISABLED_LINK_INTERFACE_LIBRARIES", which is a different (non-existing) target property, and so + # setting that property won't have an effect + set(KDE4_DISABLE_PROPERTY_ "DISABLED_") + endif (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) endif(UNIX)# AND NOT APPLE) + + if( KDE4_ENABLE_FINAL) add_definitions(-DKDE_USE_FINAL) endif(KDE4_ENABLE_FINAL) diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index c30973da..768a36e2 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -1117,13 +1117,11 @@ macro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES _append_or_write _filename) endmacro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES) macro (_KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs) - if(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX )# AND NOT APPLE) - set_target_properties("${_target}" PROPERTIES LINK_INTERFACE_LIBRARIES "${_interface_libs}") - endif(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX)# AND NOT APPLE) + message(FATAL_ERROR "_KDE4_TARGET_LINK_INTERFACE_LIBRARIES() doesn't exist anymore. Set the LINK_INTERFACE_LIBRARIES target property instead. See kdelibs/kdecore/CMakeLists.txt for an example.") endmacro (_KDE4_TARGET_LINK_INTERFACE_LIBRARIES) macro (KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs) - message(FATAL_ERROR "KDE4_TARGET_LINK_INTERFACE_LIBRARIES() has been renamed to _KDE4_TARGET_LINK_INTERFACE_LIBRARIES(), so use that instead") + message(FATAL_ERROR "KDE4_TARGET_LINK_INTERFACE_LIBRARIES() doesn't exist anymore. Set the LINK_INTERFACE_LIBRARIES target property instead. See kdelibs/kdecore/CMakeLists.txt for an example.") endmacro (KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs) macro (KDE4_INSTALL_HANDBOOK _lang) -- cgit v1.2.1 From 921d92fbcab5cc918ce1696336fa4c358d20f611 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Tue, 22 Jul 2008 07:14:29 +0000 Subject: Backport fix from trunk svn path=/branches/KDE/4.1/kdelibs/; revision=836388 --- modules/FindTaglib.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/FindTaglib.cmake b/modules/FindTaglib.cmake index 3edfdb4a..5bbb8ee1 100644 --- a/modules/FindTaglib.cmake +++ b/modules/FindTaglib.cmake @@ -42,9 +42,9 @@ if(TAGLIBCONFIG_EXECUTABLE) set(TAGLIB_FOUND TRUE) message(STATUS "Found taglib: ${TAGLIB_LIBRARIES}") endif(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS) - + string(REGEX REPLACE " *-I" ";" TAGLIB_INCLUDES "${TAGLIB_CFLAGS}") endif(TAGLIB_VERSION STRLESS "${TAGLIB_MIN_VERSION}") - mark_as_advanced(TAGLIB_CFLAGS TAGLIB_LIBRARIES) + mark_as_advanced(TAGLIB_CFLAGS TAGLIB_LIBRARIES TAGLIB_INCLUDES) else(TAGLIBCONFIG_EXECUTABLE) -- cgit v1.2.1 From d6cbf4318d3b047f5ffb4ad284fe59a6a1a12cd4 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Tue, 22 Jul 2008 22:53:29 +0000 Subject: -same fix as in trunk: fix linking on Windows The intention was tha by default the reduced link interface shouldn't be used (yet), but this wasn't the case under Windows, where it was enabled by default. This is changed now and now it is also under Windows disabled by default. Alex svn path=/branches/KDE/4.1/kdelibs/; revision=836768 --- modules/FindKDE4Internal.cmake | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 34b67ac2..d8f91bfc 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -493,27 +493,25 @@ option(KDE4_ENABLE_FINAL "Enable final all-in-one compilation") option(KDE4_BUILD_TESTS "Build the tests") option(KDE4_ENABLE_HTMLHANDBOOK "Create targets htmlhandbook for creating the html versions of the docbook docs") +# This option enables the reduced link interface for libs on UNIX +# +# The purpose of the KDE4_DISABLE_PROPERTY_ variable is to be used as a prefix for +# the target property LINK_INTERFACE_LIBRARIES. If it is empty, the property will have its +# correct name, if it's not empty, it will be a different name, i.e. the actual property +# will not be set, i.e. disabled. See kdelibs/kdecore/CMakeLists.txt for an example. +# +# By default (i.e. also for Windows) make it non-empty, so the property name will +# change from "LINK_INTERFACE_LIBRARIES" to "DISABLED_LINK_INTERFACE_LIBRARIES", +# which is a different (non-existing) target property, and so setting that property +# won't have an effect +set(KDE4_DISABLE_PROPERTY_ "DISABLED_") -# this one enables the smaller link interface for libs on UNIX -set(KDE4_DISABLE_PROPERTY_ ) if(UNIX )# AND NOT APPLE) option(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT "Enable the experimental reduced library exports" FALSE) - # The purpose of the KDE4_DISABLE_PROPERTY_ variable is to be used as a prefix for - # the target property LINK_INTERFACE_LIBRARIES. If it is empty, the property will have its - # correct name, if it's not empty, it will be a different name, i.e. the actual property - # will not be set, i.e. disabled. See kdelibs/kdecore/CMakeLists.txt for an example. - # This will be removed again as soon as we use the reduced link interface as default. - # This won't cause any incompatibilties then because then cmake files which still - # have that prefix will work, since that prefix will just be empty. - # # If enabled, make it empty, so the property will keep it's actual name. + # and the LINK_INTERFACE_LIBRARIES property will be set. if (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) set(KDE4_DISABLE_PROPERTY_ ) - else (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) - # If disabled, make it non-empty, so the property name will change from "LINK_INTERFACE_LIBRARIES" - # to "DISABLED_LINK_INTERFACE_LIBRARIES", which is a different (non-existing) target property, and so - # setting that property won't have an effect - set(KDE4_DISABLE_PROPERTY_ "DISABLED_") endif (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) endif(UNIX)# AND NOT APPLE) -- cgit v1.2.1 From 5034e09467548941d9f6eb38d6019f82d0579030 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Wed, 23 Jul 2008 22:00:12 +0000 Subject: -make the reduced link interface also available under Windows, sync with trunk Alex svn path=/branches/KDE/4.1/kdelibs/; revision=837147 --- modules/FindKDE4Internal.cmake | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index d8f91bfc..d0ed0c46 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -506,16 +506,12 @@ option(KDE4_ENABLE_HTMLHANDBOOK "Create targets htmlhandbook for creating the h # won't have an effect set(KDE4_DISABLE_PROPERTY_ "DISABLED_") -if(UNIX )# AND NOT APPLE) - option(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT "Enable the experimental reduced library exports" FALSE) - # If enabled, make it empty, so the property will keep it's actual name. - # and the LINK_INTERFACE_LIBRARIES property will be set. - if (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) - set(KDE4_DISABLE_PROPERTY_ ) - endif (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) -endif(UNIX)# AND NOT APPLE) - - +option(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT "Enable the experimental reduced library exports" FALSE) +# If enabled, make it empty, so the property will keep it's actual name. +# and the LINK_INTERFACE_LIBRARIES property will be set. +if (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) + set(KDE4_DISABLE_PROPERTY_ ) +endif (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) if( KDE4_ENABLE_FINAL) -- cgit v1.2.1 From 76d4c6b036d153e1f3972b8097b93701e976f8f4 Mon Sep 17 00:00:00 2001 From: Matthias Kretz Date: Tue, 29 Jul 2008 15:14:21 +0000 Subject: backport: when using cmake 2.6.0 make sure it's using automoc 0.9.84 or later svn path=/branches/KDE/4.1/kdelibs/; revision=839227 --- modules/FindKDE4Internal.cmake | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index d0ed0c46..98b7d4d1 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -261,6 +261,19 @@ find_package(Qt4 REQUIRED) # automoc4 (from kdesupport) is now required, Alex find_package(Automoc4 REQUIRED) + +if (CMAKE_MAJOR_VERSION GREATER 4) + # cmake 2.6.0 and automoc4 0.9.83 didn't add the necessary definitions for backends to moc calls + if (NOT AUTOMOC4_VERSION) + # the version macro was added for 0.9.84 + set(AUTOMOC4_VERSION "0.9.83") + endif (NOT AUTOMOC4_VERSION) + macro_ensure_version("0.9.84" "${AUTOMOC4_VERSION}" _automoc4_version_ok) + if (NOT _automoc4_version_ok) + message(FATAL_ERROR "Your version of automoc4 is too old. You have ${AUTOMOC4_VERSION}, you need at least 0.9.84") + endif (NOT _automoc4_version_ok) +endif (CMAKE_MAJOR_VERSION GREATER 4) + # use automoc4 from kdesupport set(KDE4_AUTOMOC_EXECUTABLE "${AUTOMOC4_EXECUTABLE}" ) -- cgit v1.2.1 From 569a3323051e7ca448a3a368c299390ada2a33c3 Mon Sep 17 00:00:00 2001 From: Andreas Pakulat Date: Tue, 5 Aug 2008 08:11:56 +0000 Subject: Backport r842305: Fix my earlier mistake, Debugfull should be enabled for anything greater 2.5 (i.e. 2.6.0 and onwards) svn path=/branches/KDE/4.1/kdelibs/; revision=842307 --- modules/FindKDE4Internal.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 98b7d4d1..70ce60ac 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -946,9 +946,9 @@ endif(MSVC) if (CMAKE_COMPILER_IS_GNUCXX) - if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.6) + if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.5) set (CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} "Debugfull") - endif("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.6) + endif("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.5) set (KDE4_ENABLE_EXCEPTIONS -fexceptions) # Select flags. @@ -1057,9 +1057,9 @@ endif (CMAKE_COMPILER_IS_GNUCXX) if (CMAKE_C_COMPILER MATCHES "icc") - if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.6) + if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.5) set (CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} "Debugfull") - endif("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.6) + endif("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.5) set (KDE4_ENABLE_EXCEPTIONS -fexceptions) # Select flags. -- cgit v1.2.1 From 156e9c6ca12b571a26108d4ba4ca36ea740c685a Mon Sep 17 00:00:00 2001 From: David Faure Date: Mon, 11 Aug 2008 13:41:10 +0000 Subject: more output in the error message when automoc4config.cmake isn't found. Too bad this doesn't apply to trunk anymore... svn path=/branches/KDE/4.1/kdelibs/; revision=845330 --- modules/FindAutomoc4.cmake | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/modules/FindAutomoc4.cmake b/modules/FindAutomoc4.cmake index ad3ed05f..88a34ce1 100644 --- a/modules/FindAutomoc4.cmake +++ b/modules/FindAutomoc4.cmake @@ -28,11 +28,14 @@ else("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") 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 + 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 ${_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} + PATHS ${AUTOMOC4_SEARCH_PATHS} NO_DEFAULT_PATH ) endif("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") @@ -50,10 +53,10 @@ if (AUTOMOC4_FOUND) endif (NOT Automoc4_FIND_QUIETLY) else (AUTOMOC4_FOUND) if (Automoc4_FIND_REQUIRED) - message(FATAL_ERROR "Did not find automoc4 (part of kdesupport).") + message(FATAL_ERROR "Did not find Automoc4Config.cmake (part of kdesupport). Searched in ${AUTOMOC4_SEARCH_PATHS} using suffixes automoc4 lib/automoc4 lib64/automoc4.") else (Automoc4_FIND_REQUIRED) if (NOT Automoc4_FIND_QUIETLY) - message(STATUS "Did not find automoc4 (part of kdesupport).") + message(STATUS "Did not find Automoc4Config.cmake (part of kdesupport). Searched in ${AUTOMOC4_SEARCH_PATHS} using suffixes automoc4 lib/automoc4 lib64/automoc4.") endif (NOT Automoc4_FIND_QUIETLY) endif (Automoc4_FIND_REQUIRED) endif (AUTOMOC4_FOUND) -- cgit v1.2.1