diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 2 | ||||
-rw-r--r-- | Modules/CPackWIX.cmake | 51 | ||||
-rw-r--r-- | Modules/FindFreetype.cmake | 16 | ||||
-rw-r--r-- | Modules/FindQt4.cmake | 4 | ||||
-rw-r--r-- | Modules/FindSubversion.cmake | 2 | ||||
-rw-r--r-- | Modules/Qt4Macros.cmake | 1 |
6 files changed, 72 insertions, 4 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 518b8c6..2bcf3d1 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -232,7 +232,7 @@ Id flags: ${testflags} # ... # /path/to/cc ...CompilerId${lang}/... # to extract the compiler front-end for the language. - if("${CMAKE_${lang}_COMPILER_ID_OUTPUT}" MATCHES "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerId${lang}/\\./CompilerId${lang}[ \t\n\\\"]") + if("${CMAKE_${lang}_COMPILER_ID_OUTPUT}" MATCHES "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerId${lang}/(\\./)?CompilerId${lang}[ \t\n\\\"]") set(_comp "${CMAKE_MATCH_2}") if(EXISTS "${_comp}") set(CMAKE_${lang}_COMPILER_ID_TOOL "${_comp}" PARENT_SCOPE) diff --git a/Modules/CPackWIX.cmake b/Modules/CPackWIX.cmake index 237c5bc..d9e0ba7 100644 --- a/Modules/CPackWIX.cmake +++ b/Modules/CPackWIX.cmake @@ -116,6 +116,57 @@ # If this variable is not set, the default MSI template included with CMake # will be used. # +# .. variable:: CPACK_WIX_PATCH_FILE +# +# Optional XML file with fragments to be inserted into generated WiX sources +# +# This optional variable can be used to specify an XML file that the +# WiX generator will use to inject fragments into its generated +# source files. +# +# Patch files understood by the CPack WiX generator +# roughly follow this RELAX NG compact schema: +# +# .. code-block:: none +# +# start = CPackWiXPatch +# +# CPackWiXPatch = element CPackWiXPatch { CPackWiXFragment* } +# +# CPackWiXFragment = element CPackWiXFragment +# { +# attribute Id { string }, +# fragmentContent* +# } +# +# fragmentContent = element * - CPackWiXFragment +# { +# (attribute * { text } | text | fragmentContent)* +# } +# +# Currently fragments can be injected into most +# Component, File and Directory elements. +# +# The following example illustrates how this works. +# +# Given that the WiX generator creates the following XML element: +# +# .. code-block:: xml +# +# <Component Id="CM_CP_applications.bin.my_libapp.exe" Guid="*"/> +# +# The following XML patch file may be used to inject an Environment element +# into it: +# +# .. code-block:: xml +# +# <CPackWiXPatch> +# <CPackWiXFragment Id="CM_CP_applications.bin.my_libapp.exe"> +# <Environment Id="MyEnvironment" Action="set" +# Name="MyVariableName" Value="MyVariableValue"/> +# </CPackWiXFragment> +# </CPackWiXPatch> +# # .. variable:: CPACK_WIX_EXTRA_SOURCES # # Extra WiX source files diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake index 179dc00..6f03c86 100644 --- a/Modules/FindFreetype.cmake +++ b/Modules/FindFreetype.cmake @@ -65,7 +65,10 @@ find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h PATH_SUFFIXES include/freetype2 include ) -find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h +find_path(FREETYPE_INCLUDE_DIR_freetype2 + NAMES + freetype/config/ftheader.h + config/ftheader.h HINTS ENV FREETYPE_DIR PATHS @@ -97,11 +100,18 @@ find_library(FREETYPE_LIBRARY # set the user variables if(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2) set(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}") + list(REMOVE_DUPLICATES FREETYPE_INCLUDE_DIRS) endif() set(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}") -if(FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h") - file(STRINGS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h" freetype_version_str +if(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h") + set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h") +elseif(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h") + set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h") +endif() + +if(FREETYPE_INCLUDE_DIR_freetype2 AND FREETYPE_H) + file(STRINGS "${FREETYPE_H}" freetype_version_str REGEX "^#[\t ]*define[\t ]+FREETYPE_(MAJOR|MINOR|PATCH)[\t ]+[0-9]+$") unset(FREETYPE_VERSION_STRING) diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index 24747f7..28b8454 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -1203,6 +1203,10 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION) "${QT_MKSPECS_DIR}/default" ${QT_INCLUDE_DIR} ) + set_property(TARGET Qt4::QtCore APPEND PROPERTY + INTERFACE_COMPILE_DEFINITIONS + $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG> + ) set_property(TARGET Qt4::QtCore PROPERTY INTERFACE_QT_MAJOR_VERSION 4 ) diff --git a/Modules/FindSubversion.cmake b/Modules/FindSubversion.cmake index 2338721..0d13318 100644 --- a/Modules/FindSubversion.cmake +++ b/Modules/FindSubversion.cmake @@ -73,6 +73,8 @@ # License text for the above reference.) find_program(Subversion_SVN_EXECUTABLE svn + PATHS + [HKEY_LOCAL_MACHINE\\Software\\TortoiseSVN;Directory]/bin DOC "subversion command line client") mark_as_advanced(Subversion_SVN_EXECUTABLE) diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake index b5f005f..fd9819f 100644 --- a/Modules/Qt4Macros.cmake +++ b/Modules/Qt4Macros.cmake @@ -120,6 +120,7 @@ macro (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target) string (REPLACE ";" "\n" _moc_parameters "${_moc_parameters}") if(moc_target) + set (_moc_parameters_file ${_moc_parameters_file}$<$<BOOL:$<CONFIGURATION>>:_$<CONFIGURATION>>) set(targetincludes "$<TARGET_PROPERTY:${moc_target},INCLUDE_DIRECTORIES>") set(targetdefines "$<TARGET_PROPERTY:${moc_target},COMPILE_DEFINITIONS>") |