diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindFreetype.cmake | 73 | ||||
-rw-r--r-- | Modules/Platform/Windows-GNU.cmake | 4 | ||||
-rw-r--r-- | Modules/WriteCompilerDetectionHeader.cmake | 3 |
3 files changed, 54 insertions, 26 deletions
diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake index 1779b78..7d46d15 100644 --- a/Modules/FindFreetype.cmake +++ b/Modules/FindFreetype.cmake @@ -51,7 +51,9 @@ # wants explicit full paths and this trickery doesn't work too well. # I'm going to attempt to cut out the middleman and hope # everything still works. -find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h +find_path( + FREETYPE_INCLUDE_DIR_ft2build + ft2build.h HINTS ENV FREETYPE_DIR PATHS @@ -62,10 +64,14 @@ find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h ENV GTKMM_BASEPATH [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] - PATH_SUFFIXES include/freetype2 include freetype2 + PATH_SUFFIXES + include/freetype2 + include + freetype2 ) -find_path(FREETYPE_INCLUDE_DIR_freetype2 +find_path( + FREETYPE_INCLUDE_DIR_freetype2 NAMES freetype/config/ftheader.h config/ftheader.h @@ -79,14 +85,19 @@ find_path(FREETYPE_INCLUDE_DIR_freetype2 ENV GTKMM_BASEPATH [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] - PATH_SUFFIXES include/freetype2 include freetype2 + PATH_SUFFIXES + include/freetype2 + include + freetype2 ) find_library(FREETYPE_LIBRARY - NAMES freetype libfreetype freetype219 + NAMES + freetype + libfreetype + freetype219 HINTS ENV FREETYPE_DIR - PATH_SUFFIXES lib PATHS /usr/X11R6 /usr/local/X11R6 @@ -95,6 +106,8 @@ find_library(FREETYPE_LIBRARY ENV GTKMM_BASEPATH [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] + PATH_SUFFIXES + lib ) # set the user variables @@ -111,31 +124,41 @@ elseif(EXISTS "${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]+$") + file(STRINGS "${FREETYPE_H}" freetype_version_str + REGEX "^#[\t ]*define[\t ]+FREETYPE_(MAJOR|MINOR|PATCH)[\t ]+[0-9]+$") - unset(FREETYPE_VERSION_STRING) - foreach(VPART MAJOR MINOR PATCH) - foreach(VLINE ${freetype_version_str}) - if(VLINE MATCHES "^#[\t ]*define[\t ]+FREETYPE_${VPART}[\t ]+([0-9]+)$") - set(FREETYPE_VERSION_PART "${CMAKE_MATCH_1}") - if(FREETYPE_VERSION_STRING) - set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_STRING}.${FREETYPE_VERSION_PART}") - else() - set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_PART}") - endif() - unset(FREETYPE_VERSION_PART) - endif() - endforeach() + unset(FREETYPE_VERSION_STRING) + foreach(VPART MAJOR MINOR PATCH) + foreach(VLINE ${freetype_version_str}) + if(VLINE MATCHES "^#[\t ]*define[\t ]+FREETYPE_${VPART}[\t ]+([0-9]+)$") + set(FREETYPE_VERSION_PART "${CMAKE_MATCH_1}") + if(FREETYPE_VERSION_STRING) + set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_STRING}.${FREETYPE_VERSION_PART}") + else() + set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_PART}") + endif() + unset(FREETYPE_VERSION_PART) + endif() endforeach() + endforeach() endif() # handle the QUIETLY and REQUIRED arguments and set FREETYPE_FOUND to TRUE if # all listed variables are TRUE include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Freetype - REQUIRED_VARS FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS - VERSION_VAR FREETYPE_VERSION_STRING) -mark_as_advanced(FREETYPE_LIBRARY FREETYPE_INCLUDE_DIR_freetype2 FREETYPE_INCLUDE_DIR_ft2build) +find_package_handle_standard_args( + Freetype + REQUIRED_VARS + FREETYPE_LIBRARY + FREETYPE_INCLUDE_DIRS + VERSION_VAR + FREETYPE_VERSION_STRING +) + +mark_as_advanced( + FREETYPE_LIBRARY + FREETYPE_INCLUDE_DIR_freetype2 + FREETYPE_INCLUDE_DIR_ft2build +) diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake index 990acea..ffc5657 100644 --- a/Modules/Platform/Windows-GNU.cmake +++ b/Modules/Platform/Windows-GNU.cmake @@ -154,6 +154,7 @@ macro(__windows_compiler_gnu_abi lang) find_program(CMAKE_GNUtoMS_VCVARS NAMES vcvars32.bat DOC "Visual Studio vcvars32.bat" PATHS + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\12.0\\Setup\\VC;ProductDir]/bin" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VC;ProductDir]/bin" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VC;ProductDir]/bin" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup\\VC;ProductDir]/bin" @@ -163,9 +164,10 @@ macro(__windows_compiler_gnu_abi lang) ) set(CMAKE_GNUtoMS_ARCH x86) elseif("${CMAKE_SIZEOF_VOID_P}" EQUAL 8) - find_program(CMAKE_GNUtoMS_VCVARS NAMES vcvarsamd64.bat + find_program(CMAKE_GNUtoMS_VCVARS NAMES vcvars64.bat vcvarsamd64.bat DOC "Visual Studio vcvarsamd64.bat" PATHS + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\12.0\\Setup\\VC;ProductDir]/bin/amd64" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VC;ProductDir]/bin/amd64" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VC;ProductDir]/bin/amd64" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup\\VC;ProductDir]/bin/amd64" diff --git a/Modules/WriteCompilerDetectionHeader.cmake b/Modules/WriteCompilerDetectionHeader.cmake index d7b89cb..f80943d 100644 --- a/Modules/WriteCompilerDetectionHeader.cmake +++ b/Modules/WriteCompilerDetectionHeader.cmake @@ -46,6 +46,9 @@ # :prop_gbl:`CMAKE_C_KNOWN_FEATURES` and # :prop_gbl:`CMAKE_CXX_KNOWN_FEATURES` global properties. # +# See the :manual:`cmake-compile-features(7)` manual for information on +# compile features. +# # Feature Test Macros # =================== # |