diff options
author | Alexander Neundorf <neundorf@kde.org> | 2008-06-09 19:20:13 +0000 |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2008-06-09 19:20:13 +0000 |
commit | 5f2c4c2b074b49410b8d5cf3610330fe40cab527 (patch) | |
tree | cf20a08b1d4dda52f201ea4da57a705be2497569 | |
parent | 30ab610b893a9c90b9c46a1305ceb7b1dd125712 (diff) | |
download | extra-cmake-modules-5f2c4c2b074b49410b8d5cf3610330fe40cab527.tar.gz extra-cmake-modules-5f2c4c2b074b49410b8d5cf3610330fe40cab527.tar.bz2 |
just some cosmetics...
Alex
svn path=/trunk/KDE/kdelibs/; revision=818828
-rw-r--r-- | modules/FindKDE4Internal.cmake | 19 | ||||
-rw-r--r-- | modules/KDE4Macros.cmake | 18 |
2 files changed, 18 insertions, 19 deletions
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 2657940b..8b0803a8 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -879,21 +879,20 @@ if (CMAKE_SYSTEM_NAME MATCHES BSD) endif (CMAKE_SYSTEM_NAME MATCHES BSD) # compiler specific stuff, maybe this should be done differently, Alex -MACRO(KDE_CHECK_FLAG_EXISTS FLAG VAR DOC) - IF(NOT ${VAR} MATCHES "${FLAG}") - SET(${VAR} "${${VAR}} ${FLAG}" - CACHE STRING "Flags used by the linker during ${DOC} builds." FORCE) - ENDIF(NOT ${VAR} MATCHES "${FLAG}") -ENDMACRO(KDE_CHECK_FLAG_EXISTS FLAG VAR) +macro(KDE_CHECK_FLAG_EXISTS FLAG VAR DOC) + if(NOT ${VAR} MATCHES "${FLAG}") + set(${VAR} "${${VAR}} ${FLAG}" CACHE STRING "Flags used by the linker during ${DOC} builds." FORCE) + endif(NOT ${VAR} MATCHES "${FLAG}") +endmacro(KDE_CHECK_FLAG_EXISTS FLAG VAR) if (MSVC) set (KDE4_ENABLE_EXCEPTIONS -EHsc) # make sure that no header adds libcmt by default using #pragma comment(lib, "libcmt.lib") as done by mfc/afx.h - KDE_CHECK_FLAG_EXISTS("/NODEFAULTLIB:libcmt /DEFAULTLIB:msvcrt" CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "Release with Debug Info") - KDE_CHECK_FLAG_EXISTS("/NODEFAULTLIB:libcmt /DEFAULTLIB:msvcrt" CMAKE_EXE_LINKER_FLAGS_RELEASE "release") - KDE_CHECK_FLAG_EXISTS("/NODEFAULTLIB:libcmt /DEFAULTLIB:msvcrt" CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "release minsize") - KDE_CHECK_FLAG_EXISTS("/NODEFAULTLIB:libcmtd /DEFAULTLIB:msvcrtd" CMAKE_EXE_LINKER_FLAGS_DEBUG "debug") + kde_check_flag_exists("/NODEFAULTLIB:libcmt /DEFAULTLIB:msvcrt" CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "Release with Debug Info") + kde_check_flag_exists("/NODEFAULTLIB:libcmt /DEFAULTLIB:msvcrt" CMAKE_EXE_LINKER_FLAGS_RELEASE "release") + kde_check_flag_exists("/NODEFAULTLIB:libcmt /DEFAULTLIB:msvcrt" CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "release minsize") + kde_check_flag_exists("/NODEFAULTLIB:libcmtd /DEFAULTLIB:msvcrtd" CMAKE_EXE_LINKER_FLAGS_DEBUG "debug") endif(MSVC) diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index eb0de61a..b3c6899f 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -1138,8 +1138,8 @@ macro (KDE4_ADD_APP_ICON appsources pattern) list(APPEND ${appsources} ${_outfilename}.icns) # this doesn't seem to work for me - Use manual "install" instead - # TODO: test again with cmake 2.6 ? - # SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/${target}.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources) + # TODO: test again with cmake 2.6 ? + # SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/${target}.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources) install(FILES ${_outfilename}.icns DESTINATION ${BIN_INSTALL_DIR}/${target}.app/Contents/Resources/) @@ -1174,13 +1174,13 @@ macro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES _append_or_write _filename) get_cmake_property(allVars VARIABLES) set(allLibs "") foreach(currentVar ${allVars}) - string(REGEX REPLACE "^(.+)_LIB_DEPENDS$" "\\1" target "${currentVar}") - if(NOT "${target}" STREQUAL "${currentVar}") - get_target_property(interfaceLibs ${target} LINK_INTERFACE_LIBRARIES) - if(NOT "${interfaceLibs}" MATCHES "NOTFOUND") - file(APPEND "${_filename}" "SET(\"${currentVar}\" \"${interfaceLibs}\")\n") - endif(NOT "${interfaceLibs}" MATCHES "NOTFOUND") - endif(NOT "${target}" STREQUAL "${currentVar}") + string(REGEX REPLACE "^(.+)_LIB_DEPENDS$" "\\1" target "${currentVar}") + if(NOT "${target}" STREQUAL "${currentVar}") + get_target_property(interfaceLibs ${target} LINK_INTERFACE_LIBRARIES) + if(NOT "${interfaceLibs}" MATCHES "NOTFOUND") + file(APPEND "${_filename}" "SET(\"${currentVar}\" \"${interfaceLibs}\")\n") + endif(NOT "${interfaceLibs}" MATCHES "NOTFOUND") + endif(NOT "${target}" STREQUAL "${currentVar}") endforeach(currentVar ${allVars}) endif(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX)# AND NOT APPLE) |