summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2012-08-13 13:47:32 -0400
committerBrad King <brad.king@kitware.com>2012-08-13 14:19:16 -0400
commit77543bde41b0e52c3959016698b529835945d62d (patch)
treeff63e5fbec326c4a5d821e7496c6d2cb52f75b92 /Modules
parent7bbaa4283de26864b2e55e819db0884771585467 (diff)
downloadcmake-77543bde41b0e52c3959016698b529835945d62d.tar.gz
Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code: cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | xargs -0 sed -i -f convert.sed && rm convert.sed
Diffstat (limited to 'Modules')
-rw-r--r--Modules/AddFileDependencies.cmake18
-rw-r--r--Modules/CMakeASM-ATTInformation.cmake10
-rw-r--r--Modules/CMakeASMCompiler.cmake.in20
-rw-r--r--Modules/CMakeASMInformation.cmake152
-rw-r--r--Modules/CMakeASM_MASMInformation.cmake10
-rw-r--r--Modules/CMakeASM_NASMInformation.cmake12
-rw-r--r--Modules/CMakeBackwardCompatibilityC.cmake86
-rw-r--r--Modules/CMakeBackwardCompatibilityCXX.cmake58
-rw-r--r--Modules/CMakeBorlandFindMake.cmake4
-rw-r--r--Modules/CMakeCCompiler.cmake.in82
-rw-r--r--Modules/CMakeCInformation.cmake200
-rw-r--r--Modules/CMakeCXXCompiler.cmake.in84
-rw-r--r--Modules/CMakeCXXInformation.cmake306
-rw-r--r--Modules/CMakeClDeps.cmake28
-rw-r--r--Modules/CMakeCommonLanguageInclude.cmake44
-rw-r--r--Modules/CMakeDependentOption.cmake48
-rw-r--r--Modules/CMakeDetermineASM-ATTCompiler.cmake8
-rw-r--r--Modules/CMakeDetermineASMCompiler.cmake192
-rw-r--r--Modules/CMakeDetermineASM_MASMCompiler.cmake16
-rw-r--r--Modules/CMakeDetermineASM_NASMCompiler.cmake14
-rw-r--r--Modules/CMakeDetermineCCompiler.cmake162
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake170
-rw-r--r--Modules/CMakeDetermineCompilerABI.cmake134
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake312
-rw-r--r--Modules/CMakeDetermineFortranCompiler.cmake200
-rw-r--r--Modules/CMakeDetermineJavaCompiler.cmake84
-rw-r--r--Modules/CMakeDetermineRCCompiler.cmake70
-rw-r--r--Modules/CMakeDetermineSystem.cmake172
-rw-r--r--Modules/CMakeExpandImportedTargets.cmake2
-rw-r--r--Modules/CMakeExportBuildSettings.cmake20
-rw-r--r--Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake112
-rw-r--r--Modules/CMakeFindBinUtils.cmake46
-rw-r--r--Modules/CMakeFindCodeBlocks.cmake10
-rw-r--r--Modules/CMakeFindEclipseCDT4.cmake78
-rw-r--r--Modules/CMakeFindFrameworks.cmake26
-rw-r--r--Modules/CMakeFindKDevelop3.cmake8
-rw-r--r--Modules/CMakeFindWMake.cmake4
-rw-r--r--Modules/CMakeFindXCode.cmake4
-rw-r--r--Modules/CMakeForceCompiler.cmake64
-rw-r--r--Modules/CMakeFortranCompiler.cmake.in90
-rw-r--r--Modules/CMakeFortranInformation.cmake268
-rw-r--r--Modules/CMakeGenericSystem.cmake102
-rw-r--r--Modules/CMakeImportBuildSettings.cmake12
-rw-r--r--Modules/CMakeJOMFindMake.cmake4
-rw-r--r--Modules/CMakeJavaCompiler.cmake.in24
-rw-r--r--Modules/CMakeJavaInformation.cmake52
-rw-r--r--Modules/CMakeMSYSFindMake.cmake4
-rw-r--r--Modules/CMakeMinGWFindMake.cmake14
-rw-r--r--Modules/CMakeNMakeFindMake.cmake4
-rw-r--r--Modules/CMakeNinjaFindMake.cmake4
-rw-r--r--Modules/CMakePackageConfigHelpers.cmake10
-rw-r--r--Modules/CMakePrintSystemInformation.cmake46
-rw-r--r--Modules/CMakePushCheckState.cmake38
-rw-r--r--Modules/CMakeRCCompiler.cmake.in12
-rw-r--r--Modules/CMakeRCInformation.cmake30
-rw-r--r--Modules/CMakeSystem.cmake.in20
-rw-r--r--Modules/CMakeSystemSpecificInformation.cmake46
-rw-r--r--Modules/CMakeTestASM-ATTCompiler.cmake6
-rw-r--r--Modules/CMakeTestASMCompiler.cmake20
-rw-r--r--Modules/CMakeTestASM_MASMCompiler.cmake6
-rw-r--r--Modules/CMakeTestASM_NASMCompiler.cmake6
-rw-r--r--Modules/CMakeTestCCompiler.cmake60
-rw-r--r--Modules/CMakeTestCXXCompiler.cmake60
-rw-r--r--Modules/CMakeTestCompilerCommon.cmake10
-rw-r--r--Modules/CMakeTestFortranCompiler.cmake84
-rw-r--r--Modules/CMakeTestJavaCompiler.cmake2
-rw-r--r--Modules/CMakeTestRCCompiler.cmake2
-rw-r--r--Modules/CMakeUnixFindMake.cmake4
-rw-r--r--Modules/CMakeVS10FindMake.cmake14
-rw-r--r--Modules/CMakeVS11FindMake.cmake14
-rw-r--r--Modules/CMakeVS6BackwardCompatibility.cmake20
-rw-r--r--Modules/CMakeVS6FindMake.cmake8
-rw-r--r--Modules/CMakeVS71FindMake.cmake8
-rw-r--r--Modules/CMakeVS7BackwardCompatibility.cmake20
-rw-r--r--Modules/CMakeVS7FindMake.cmake8
-rw-r--r--Modules/CMakeVS8FindMake.cmake16
-rw-r--r--Modules/CMakeVS9FindMake.cmake16
-rw-r--r--Modules/CPack.cmake136
-rw-r--r--Modules/CPackComponent.cmake206
-rw-r--r--Modules/CPackDeb.cmake252
-rw-r--r--Modules/CPackRPM.cmake398
-rw-r--r--Modules/CPackZIP.cmake46
-rw-r--r--Modules/CTest.cmake270
-rw-r--r--Modules/CTestTargets.cmake78
-rw-r--r--Modules/CheckCCompilerFlag.cmake12
-rw-r--r--Modules/CheckCSourceCompiles.cmake88
-rw-r--r--Modules/CheckCSourceRuns.cmake70
-rw-r--r--Modules/CheckCXXCompilerFlag.cmake12
-rw-r--r--Modules/CheckCXXSourceCompiles.cmake88
-rw-r--r--Modules/CheckCXXSourceRuns.cmake70
-rw-r--r--Modules/CheckCXXSymbolExists.cmake6
-rw-r--r--Modules/CheckFortranFunctionExists.cmake4
-rw-r--r--Modules/CheckFunctionExists.cmake54
-rw-r--r--Modules/CheckIncludeFile.cmake60
-rw-r--r--Modules/CheckIncludeFileCXX.cmake60
-rw-r--r--Modules/CheckIncludeFiles.cmake74
-rw-r--r--Modules/CheckLibraryExists.cmake42
-rw-r--r--Modules/CheckSizeOf.cmake2
-rw-r--r--Modules/CheckStructHasMember.cmake16
-rw-r--r--Modules/CheckSymbolExists.cmake70
-rw-r--r--Modules/CheckVariableExists.cmake44
-rw-r--r--Modules/Compiler/Absoft-Fortran.cmake16
-rw-r--r--Modules/Compiler/GNU-Fortran.cmake10
-rw-r--r--Modules/Compiler/GNU.cmake2
-rw-r--r--Modules/Compiler/HP-ASM.cmake2
-rw-r--r--Modules/Compiler/HP-C.cmake6
-rw-r--r--Modules/Compiler/HP-CXX.cmake6
-rw-r--r--Modules/Compiler/HP-Fortran.cmake2
-rw-r--r--Modules/Compiler/Intel-ASM.cmake22
-rw-r--r--Modules/Compiler/Intel-C.cmake16
-rw-r--r--Modules/Compiler/Intel-CXX.cmake16
-rw-r--r--Modules/Compiler/Intel-Fortran.cmake14
-rw-r--r--Modules/Compiler/MIPSpro-C.cmake2
-rw-r--r--Modules/Compiler/MIPSpro-CXX.cmake2
-rw-r--r--Modules/Compiler/MIPSpro-Fortran.cmake2
-rw-r--r--Modules/Compiler/PGI-Fortran.cmake10
-rw-r--r--Modules/Compiler/PathScale-Fortran.cmake2
-rw-r--r--Modules/Compiler/SunPro-ASM.cmake30
-rw-r--r--Modules/Compiler/SunPro-C.cmake38
-rw-r--r--Modules/Compiler/SunPro-CXX.cmake40
-rw-r--r--Modules/Compiler/SunPro-Fortran.cmake26
-rw-r--r--Modules/Compiler/TinyCC-C.cmake12
-rw-r--r--Modules/Compiler/XL-ASM.cmake14
-rw-r--r--Modules/Compiler/XL-C.cmake2
-rw-r--r--Modules/Compiler/XL-CXX.cmake4
-rw-r--r--Modules/Compiler/XL-Fortran.cmake10
-rw-r--r--Modules/Dart.cmake80
-rw-r--r--Modules/DeployQt4.cmake4
-rw-r--r--Modules/Documentation.cmake28
-rw-r--r--Modules/FLTKCompatibility.cmake2
-rw-r--r--Modules/FeatureSummary.cmake378
-rw-r--r--Modules/FindASPELL.cmake10
-rw-r--r--Modules/FindAVIFile.cmake20
-rw-r--r--Modules/FindBISON.cmake132
-rw-r--r--Modules/FindBZip2.cmake32
-rw-r--r--Modules/FindBoost.cmake2
-rw-r--r--Modules/FindCABLE.cmake44
-rw-r--r--Modules/FindCUDA.cmake2
-rw-r--r--Modules/FindCURL.cmake38
-rw-r--r--Modules/FindCoin3D.cmake66
-rw-r--r--Modules/FindCurses.cmake134
-rw-r--r--Modules/FindCygwin.cmake8
-rw-r--r--Modules/FindDart.cmake6
-rw-r--r--Modules/FindDevIL.cmake18
-rw-r--r--Modules/FindDoxygen.cmake30
-rw-r--r--Modules/FindEXPAT.cmake16
-rw-r--r--Modules/FindFLEX.cmake106
-rw-r--r--Modules/FindFLTK.cmake298
-rw-r--r--Modules/FindFLTK2.cmake252
-rw-r--r--Modules/FindFreetype.cmake54
-rw-r--r--Modules/FindGCCXML.cmake4
-rw-r--r--Modules/FindGDAL.cmake8
-rw-r--r--Modules/FindGIF.cmake32
-rw-r--r--Modules/FindGLU.cmake12
-rw-r--r--Modules/FindGLUT.cmake44
-rw-r--r--Modules/FindGTK.cmake70
-rw-r--r--Modules/FindGettext.cmake224
-rw-r--r--Modules/FindGnuTLS.cmake34
-rw-r--r--Modules/FindGnuplot.cmake22
-rw-r--r--Modules/FindHSPELL.cmake20
-rw-r--r--Modules/FindHTMLHelp.cmake14
-rw-r--r--Modules/FindITK.cmake28
-rw-r--r--Modules/FindImageMagick.cmake148
-rw-r--r--Modules/FindJNI.cmake194
-rw-r--r--Modules/FindJPEG.cmake24
-rw-r--r--Modules/FindJasper.cmake32
-rw-r--r--Modules/FindJava.cmake76
-rw-r--r--Modules/FindKDE3.cmake228
-rw-r--r--Modules/FindKDE4.cmake86
-rw-r--r--Modules/FindLATEX.cmake46
-rw-r--r--Modules/FindLibLZMA.cmake36
-rw-r--r--Modules/FindLibXml2.cmake32
-rw-r--r--Modules/FindLibXslt.cmake34
-rw-r--r--Modules/FindLua50.cmake34
-rw-r--r--Modules/FindLua51.cmake34
-rw-r--r--Modules/FindMFC.cmake50
-rw-r--r--Modules/FindMPEG.cmake16
-rw-r--r--Modules/FindMPEG2.cmake24
-rw-r--r--Modules/FindMatlab.cmake74
-rw-r--r--Modules/FindMotif.cmake14
-rw-r--r--Modules/FindOpenAL.cmake8
-rw-r--r--Modules/FindOpenGL.cmake120
-rw-r--r--Modules/FindOpenSSL.cmake80
-rw-r--r--Modules/FindOpenSceneGraph.cmake2
-rw-r--r--Modules/FindPHP4.cmake38
-rw-r--r--Modules/FindPNG.cmake8
-rw-r--r--Modules/FindPackageHandleStandardArgs.cmake302
-rw-r--r--Modules/FindPackageMessage.cmake26
-rw-r--r--Modules/FindPerl.cmake46
-rw-r--r--Modules/FindPerlLibs.cmake2
-rw-r--r--Modules/FindPhysFS.cmake6
-rw-r--r--Modules/FindPike.cmake8
-rw-r--r--Modules/FindPostgreSQL.cmake4
-rw-r--r--Modules/FindProducer.cmake4
-rw-r--r--Modules/FindPythonLibs.cmake238
-rw-r--r--Modules/FindQt.cmake166
-rw-r--r--Modules/FindQt3.cmake216
-rw-r--r--Modules/FindQt4.cmake840
-rw-r--r--Modules/FindQuickTime.cmake16
-rw-r--r--Modules/FindRTI.cmake54
-rw-r--r--Modules/FindRuby.cmake224
-rw-r--r--Modules/FindSDL.cmake64
-rw-r--r--Modules/FindSDL_image.cmake6
-rw-r--r--Modules/FindSDL_mixer.cmake6
-rw-r--r--Modules/FindSDL_net.cmake6
-rw-r--r--Modules/FindSDL_sound.cmake152
-rw-r--r--Modules/FindSDL_ttf.cmake6
-rw-r--r--Modules/FindSWIG.cmake54
-rw-r--r--Modules/FindSelfPackers.cmake30
-rw-r--r--Modules/FindSquish.cmake98
-rw-r--r--Modules/FindSubversion.cmake80
-rw-r--r--Modules/FindTCL.cmake116
-rw-r--r--Modules/FindTIFF.cmake26
-rw-r--r--Modules/FindTclStub.cmake48
-rw-r--r--Modules/FindTclsh.cmake52
-rw-r--r--Modules/FindThreads.cmake188
-rw-r--r--Modules/FindUnixCommands.cmake26
-rw-r--r--Modules/FindVTK.cmake100
-rw-r--r--Modules/FindWget.cmake10
-rw-r--r--Modules/FindWish.cmake44
-rw-r--r--Modules/FindX11.cmake614
-rw-r--r--Modules/FindXMLRPC.cmake142
-rw-r--r--Modules/FindZLIB.cmake66
-rw-r--r--Modules/FindwxWidgets.cmake712
-rw-r--r--Modules/FindwxWindows.cmake400
-rw-r--r--Modules/ITKCompatibility.cmake2
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake316
-rw-r--r--Modules/KDE3Macros.cmake388
-rw-r--r--Modules/MacroAddFileDependencies.cmake20
-rw-r--r--Modules/Platform/AIX.cmake20
-rw-r--r--Modules/Platform/BSDOS.cmake2
-rw-r--r--Modules/Platform/BeOS.cmake20
-rw-r--r--Modules/Platform/BlueGeneL.cmake52
-rw-r--r--Modules/Platform/CYGWIN-GNU.cmake8
-rw-r--r--Modules/Platform/CYGWIN-windres.cmake2
-rw-r--r--Modules/Platform/CYGWIN.cmake26
-rw-r--r--Modules/Platform/Catamount.cmake40
-rw-r--r--Modules/Platform/Darwin-GNU.cmake2
-rw-r--r--Modules/Platform/Darwin-XL-C.cmake6
-rw-r--r--Modules/Platform/Darwin-XL-CXX.cmake6
-rw-r--r--Modules/Platform/Darwin-icc.cmake154
-rw-r--r--Modules/Platform/Darwin-icpc.cmake6
-rw-r--r--Modules/Platform/Darwin.cmake246
-rw-r--r--Modules/Platform/DragonFly.cmake2
-rw-r--r--Modules/Platform/FreeBSD.cmake38
-rw-r--r--Modules/Platform/GNU.cmake20
-rw-r--r--Modules/Platform/Generic-ADSP-ASM.cmake8
-rw-r--r--Modules/Platform/Generic-ADSP-C.cmake20
-rw-r--r--Modules/Platform/Generic-ADSP-CXX.cmake20
-rw-r--r--Modules/Platform/Generic-ADSP-Common.cmake130
-rw-r--r--Modules/Platform/Generic-SDCC-C.cmake54
-rw-r--r--Modules/Platform/Generic.cmake8
-rw-r--r--Modules/Platform/HP-UX.cmake48
-rw-r--r--Modules/Platform/Haiku.cmake40
-rw-r--r--Modules/Platform/IRIX.cmake54
-rw-r--r--Modules/Platform/IRIX64.cmake94
-rw-r--r--Modules/Platform/Linux-Clang-C.cmake2
-rw-r--r--Modules/Platform/Linux-Clang-CXX.cmake2
-rw-r--r--Modules/Platform/Linux-GNU-C.cmake2
-rw-r--r--Modules/Platform/Linux-GNU-CXX.cmake2
-rw-r--r--Modules/Platform/Linux-GNU-Fortran.cmake2
-rw-r--r--Modules/Platform/Linux-Intel-C.cmake2
-rw-r--r--Modules/Platform/Linux-Intel-CXX.cmake2
-rw-r--r--Modules/Platform/Linux-Intel-Fortran.cmake2
-rw-r--r--Modules/Platform/Linux-SunPro-CXX.cmake2
-rw-r--r--Modules/Platform/Linux-TinyCC-C.cmake8
-rw-r--r--Modules/Platform/Linux-XL-C.cmake2
-rw-r--r--Modules/Platform/Linux-XL-CXX.cmake2
-rw-r--r--Modules/Platform/Linux-XL-Fortran.cmake2
-rw-r--r--Modules/Platform/Linux-como.cmake10
-rw-r--r--Modules/Platform/Linux.cmake50
-rw-r--r--Modules/Platform/MP-RAS.cmake22
-rw-r--r--Modules/Platform/NetBSD.cmake28
-rw-r--r--Modules/Platform/OSF1.cmake76
-rw-r--r--Modules/Platform/OpenBSD.cmake14
-rw-r--r--Modules/Platform/OpenVMS.cmake8
-rw-r--r--Modules/Platform/QNX.cmake38
-rw-r--r--Modules/Platform/RISCos.cmake10
-rw-r--r--Modules/Platform/SCO_SV.cmake4
-rw-r--r--Modules/Platform/SINIX.cmake8
-rw-r--r--Modules/Platform/SunOS.cmake40
-rw-r--r--Modules/Platform/Tru64.cmake2
-rw-r--r--Modules/Platform/ULTRIX.cmake10
-rw-r--r--Modules/Platform/UNIX_SV.cmake10
-rw-r--r--Modules/Platform/UnixPaths.cmake30
-rw-r--r--Modules/Platform/UnixWare.cmake10
-rw-r--r--Modules/Platform/Windows-Embarcadero.cmake40
-rw-r--r--Modules/Platform/Windows-Intel-Fortran.cmake10
-rw-r--r--Modules/Platform/Windows-Intel.cmake98
-rw-r--r--Modules/Platform/Windows-cl.cmake378
-rw-r--r--Modules/Platform/Windows-cl.cmake.in28
-rw-r--r--Modules/Platform/Windows-df.cmake94
-rw-r--r--Modules/Platform/Windows-wcl386.cmake96
-rw-r--r--Modules/Platform/Windows-windres.cmake2
-rw-r--r--Modules/Platform/Windows.cmake48
-rw-r--r--Modules/Platform/WindowsPaths.cmake56
-rw-r--r--Modules/Platform/Xenix.cmake2
-rw-r--r--Modules/Platform/cl.cmake56
-rw-r--r--Modules/Platform/eCos.cmake88
-rw-r--r--Modules/Platform/gas.cmake20
-rw-r--r--Modules/Platform/kFreeBSD.cmake4
-rw-r--r--Modules/Platform/syllable.cmake28
-rw-r--r--Modules/Qt4ConfigDependentSettings.cmake330
-rw-r--r--Modules/Qt4Macros.cmake542
-rw-r--r--Modules/SystemInformation.cmake104
-rw-r--r--Modules/TestBigEndian.cmake120
-rw-r--r--Modules/TestCXXAcceptsFlag.cmake26
-rw-r--r--Modules/TestForANSIForScope.cmake26
-rw-r--r--Modules/TestForANSIStreamHeaders.cmake18
-rw-r--r--Modules/TestForSSTREAM.cmake26
-rw-r--r--Modules/TestForSTDNamespace.cmake26
-rw-r--r--Modules/UseEcos.cmake190
-rw-r--r--Modules/UsePkgConfig.cmake52
-rw-r--r--Modules/UseQt4.cmake148
-rw-r--r--Modules/UseSWIG.cmake258
-rw-r--r--Modules/UseVTK40.cmake8
-rw-r--r--Modules/UseVTKBuildSettings40.cmake34
-rw-r--r--Modules/UseVTKConfig40.cmake378
-rw-r--r--Modules/Use_wxWindows.cmake50
-rw-r--r--Modules/UsewxWidgets.cmake80
-rw-r--r--Modules/VTKCompatibility.cmake32
-rw-r--r--Modules/kde3uic.cmake10
322 files changed, 10683 insertions, 10683 deletions
diff --git a/Modules/AddFileDependencies.cmake b/Modules/AddFileDependencies.cmake
index f971e37f5c..af7f42f53b 100644
--- a/Modules/AddFileDependencies.cmake
+++ b/Modules/AddFileDependencies.cmake
@@ -15,15 +15,15 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-MACRO(ADD_FILE_DEPENDENCIES _file)
+macro(ADD_FILE_DEPENDENCIES _file)
- GET_SOURCE_FILE_PROPERTY(_deps ${_file} OBJECT_DEPENDS)
- IF (_deps)
- SET(_deps ${_deps} ${ARGN})
- ELSE (_deps)
- SET(_deps ${ARGN})
- ENDIF (_deps)
+ get_source_file_property(_deps ${_file} OBJECT_DEPENDS)
+ if (_deps)
+ set(_deps ${_deps} ${ARGN})
+ else (_deps)
+ set(_deps ${ARGN})
+ endif (_deps)
- SET_SOURCE_FILES_PROPERTIES(${_file} PROPERTIES OBJECT_DEPENDS "${_deps}")
+ set_source_files_properties(${_file} PROPERTIES OBJECT_DEPENDS "${_deps}")
-ENDMACRO(ADD_FILE_DEPENDENCIES)
+endmacro(ADD_FILE_DEPENDENCIES)
diff --git a/Modules/CMakeASM-ATTInformation.cmake b/Modules/CMakeASM-ATTInformation.cmake
index cb1f5d69c0..675c13bb36 100644
--- a/Modules/CMakeASM-ATTInformation.cmake
+++ b/Modules/CMakeASM-ATTInformation.cmake
@@ -14,12 +14,12 @@
# support for AT&T syntax assemblers, e.g. GNU as
-SET(ASM_DIALECT "-ATT")
+set(ASM_DIALECT "-ATT")
# *.S files are supposed to be preprocessed, so they should not be passed to
# assembler but should be processed by gcc
-SET(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;asm)
+set(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;asm)
-SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> -o <OBJECT> <SOURCE>")
+set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> -o <OBJECT> <SOURCE>")
-INCLUDE(CMakeASMInformation)
-SET(ASM_DIALECT)
+include(CMakeASMInformation)
+set(ASM_DIALECT)
diff --git a/Modules/CMakeASMCompiler.cmake.in b/Modules/CMakeASMCompiler.cmake.in
index 2dc24b06dc..8e58307e9f 100644
--- a/Modules/CMakeASMCompiler.cmake.in
+++ b/Modules/CMakeASMCompiler.cmake.in
@@ -1,12 +1,12 @@
-SET(CMAKE_ASM@ASM_DIALECT@_COMPILER "@_CMAKE_ASM_COMPILER@")
-SET(CMAKE_ASM@ASM_DIALECT@_COMPILER_ARG1 "@_CMAKE_ASM_COMPILER_ARG1@")
-SET(CMAKE_AR "@CMAKE_AR@")
-SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
-SET(CMAKE_LINKER "@CMAKE_LINKER@")
-SET(CMAKE_ASM@ASM_DIALECT@_COMPILER_LOADED 1)
-SET(CMAKE_ASM@ASM_DIALECT@_COMPILER_ID "@_CMAKE_ASM_COMPILER_ID@")
-SET(CMAKE_ASM@ASM_DIALECT@_COMPILER_ENV_VAR "@_CMAKE_ASM_COMPILER_ENV_VAR@")
+set(CMAKE_ASM@ASM_DIALECT@_COMPILER "@_CMAKE_ASM_COMPILER@")
+set(CMAKE_ASM@ASM_DIALECT@_COMPILER_ARG1 "@_CMAKE_ASM_COMPILER_ARG1@")
+set(CMAKE_AR "@CMAKE_AR@")
+set(CMAKE_RANLIB "@CMAKE_RANLIB@")
+set(CMAKE_LINKER "@CMAKE_LINKER@")
+set(CMAKE_ASM@ASM_DIALECT@_COMPILER_LOADED 1)
+set(CMAKE_ASM@ASM_DIALECT@_COMPILER_ID "@_CMAKE_ASM_COMPILER_ID@")
+set(CMAKE_ASM@ASM_DIALECT@_COMPILER_ENV_VAR "@_CMAKE_ASM_COMPILER_ENV_VAR@")
-SET(CMAKE_ASM@ASM_DIALECT@_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
-SET(CMAKE_ASM@ASM_DIALECT@_LINKER_PREFERENCE 0)
+set(CMAKE_ASM@ASM_DIALECT@_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
+set(CMAKE_ASM@ASM_DIALECT@_LINKER_PREFERENCE 0)
diff --git a/Modules/CMakeASMInformation.cmake b/Modules/CMakeASMInformation.cmake
index b5f2420339..69554e4cc5 100644
--- a/Modules/CMakeASMInformation.cmake
+++ b/Modules/CMakeASMInformation.cmake
@@ -12,76 +12,76 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-IF(UNIX)
- SET(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .o)
-ELSE(UNIX)
- SET(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .obj)
-ENDIF(UNIX)
+if(UNIX)
+ set(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .o)
+else(UNIX)
+ set(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .obj)
+endif(UNIX)
-SET(CMAKE_INCLUDE_FLAG_ASM${ASM_DIALECT} "-I") # -I
-SET(CMAKE_BASE_NAME)
-GET_FILENAME_COMPONENT(CMAKE_BASE_NAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME_WE)
+set(CMAKE_INCLUDE_FLAG_ASM${ASM_DIALECT} "-I") # -I
+set(CMAKE_BASE_NAME)
+get_filename_component(CMAKE_BASE_NAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME_WE)
-IF("${CMAKE_BASE_NAME}" STREQUAL "as")
- SET(CMAKE_BASE_NAME gas)
-ENDIF("${CMAKE_BASE_NAME}" STREQUAL "as")
+if("${CMAKE_BASE_NAME}" STREQUAL "as")
+ set(CMAKE_BASE_NAME gas)
+endif("${CMAKE_BASE_NAME}" STREQUAL "as")
# Load compiler-specific information.
-SET(_INCLUDED_FILE "")
-IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
- INCLUDE(Compiler/${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
-ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
-IF(NOT _INCLUDED_FILE)
- IF("ASM${ASM_DIALECT}" STREQUAL "ASM")
- MESSAGE(STATUS "Warning: Did not find file Compiler/${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT}")
- ENDIF("ASM${ASM_DIALECT}" STREQUAL "ASM")
- INCLUDE(Platform/${CMAKE_BASE_NAME} OPTIONAL)
-ENDIF(NOT _INCLUDED_FILE)
-
-IF(CMAKE_SYSTEM_PROCESSOR)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
- IF(NOT _INCLUDED_FILE)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
- ENDIF(NOT _INCLUDED_FILE)
-ENDIF(CMAKE_SYSTEM_PROCESSOR)
-
-INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
-IF(NOT _INCLUDED_FILE)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
-ENDIF(NOT _INCLUDED_FILE)
+set(_INCLUDED_FILE "")
+if(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
+ include(Compiler/${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
+endif(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
+if(NOT _INCLUDED_FILE)
+ if("ASM${ASM_DIALECT}" STREQUAL "ASM")
+ message(STATUS "Warning: Did not find file Compiler/${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT}")
+ endif("ASM${ASM_DIALECT}" STREQUAL "ASM")
+ include(Platform/${CMAKE_BASE_NAME} OPTIONAL)
+endif(NOT _INCLUDED_FILE)
+
+if(CMAKE_SYSTEM_PROCESSOR)
+ include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
+ if(NOT _INCLUDED_FILE)
+ include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
+ endif(NOT _INCLUDED_FILE)
+endif(CMAKE_SYSTEM_PROCESSOR)
+
+include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
+if(NOT _INCLUDED_FILE)
+ include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
+endif(NOT _INCLUDED_FILE)
# Set default assembler file extensions:
-IF(NOT CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS)
- SET(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;S;asm)
-ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS)
+if(NOT CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS)
+ set(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;S;asm)
+endif(NOT CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS)
# Support for CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT and friends:
-SET(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT "$ENV{ASM${ASM_DIALECT}FLAGS} ${CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT}")
+set(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT "$ENV{ASM${ASM_DIALECT}FLAGS} ${CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT}")
# avoid just having a space as the initial value for the cache
-IF(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT STREQUAL " ")
- SET(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT)
-ENDIF(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT STREQUAL " ")
-SET (CMAKE_ASM${ASM_DIALECT}_FLAGS "${CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT}" CACHE STRING
+if(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT STREQUAL " ")
+ set(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT)
+endif(CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT STREQUAL " ")
+set (CMAKE_ASM${ASM_DIALECT}_FLAGS "${CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT}" CACHE STRING
"Flags used by the assembler during all build types.")
-IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
+if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
# default build type is none
- IF(NOT CMAKE_NO_BUILD_TYPE)
- SET (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING
+ if(NOT CMAKE_NO_BUILD_TYPE)
+ set (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING
"Choose the type of build, options are: None, Debug Release RelWithDebInfo MinSizeRel.")
- ENDIF(NOT CMAKE_NO_BUILD_TYPE)
- SET (CMAKE_ASM${ASM_DIALECT}_FLAGS_DEBUG "${CMAKE_ASM${ASM_DIALECT}_FLAGS_DEBUG_INIT}" CACHE STRING
+ endif(NOT CMAKE_NO_BUILD_TYPE)
+ set (CMAKE_ASM${ASM_DIALECT}_FLAGS_DEBUG "${CMAKE_ASM${ASM_DIALECT}_FLAGS_DEBUG_INIT}" CACHE STRING
"Flags used by the assembler during debug builds.")
- SET (CMAKE_ASM${ASM_DIALECT}_FLAGS_MINSIZEREL "${CMAKE_ASM${ASM_DIALECT}_FLAGS_MINSIZEREL_INIT}" CACHE STRING
+ set (CMAKE_ASM${ASM_DIALECT}_FLAGS_MINSIZEREL "${CMAKE_ASM${ASM_DIALECT}_FLAGS_MINSIZEREL_INIT}" CACHE STRING
"Flags used by the assembler during release minsize builds.")
- SET (CMAKE_ASM${ASM_DIALECT}_FLAGS_RELEASE "${CMAKE_ASM${ASM_DIALECT}_FLAGS_RELEASE_INIT}" CACHE STRING
+ set (CMAKE_ASM${ASM_DIALECT}_FLAGS_RELEASE "${CMAKE_ASM${ASM_DIALECT}_FLAGS_RELEASE_INIT}" CACHE STRING
"Flags used by the assembler during release builds.")
- SET (CMAKE_ASM${ASM_DIALECT}_FLAGS_RELWITHDEBINFO "${CMAKE_ASM${ASM_DIALECT}_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
+ set (CMAKE_ASM${ASM_DIALECT}_FLAGS_RELWITHDEBINFO "${CMAKE_ASM${ASM_DIALECT}_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
"Flags used by the assembler during Release with Debug Info builds.")
-ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
+endif(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
-MARK_AS_ADVANCED(CMAKE_ASM${ASM_DIALECT}_FLAGS
+mark_as_advanced(CMAKE_ASM${ASM_DIALECT}_FLAGS
CMAKE_ASM${ASM_DIALECT}_FLAGS_DEBUG
CMAKE_ASM${ASM_DIALECT}_FLAGS_MINSIZEREL
CMAKE_ASM${ASM_DIALECT}_FLAGS_RELEASE
@@ -89,42 +89,42 @@ MARK_AS_ADVANCED(CMAKE_ASM${ASM_DIALECT}_FLAGS
)
-IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT)
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
-ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT)
+if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT)
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
+endif(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT)
-IF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY)
- SET(CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY
+if(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY)
+ set(CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY
"<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> "
"<CMAKE_RANLIB> <TARGET> ")
-ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY)
+endif(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY)
-IF(NOT CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE)
- SET(CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE
+if(NOT CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE)
+ set(CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE
"<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> <CMAKE_ASM${ASM_DIALECT}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
-ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE)
+endif(NOT CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE)
-IF(NOT CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG)
- SET(CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_ASM${ASM_DIALECT}_FLAG})
-ENDIF()
+if(NOT CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG)
+ set(CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_ASM${ASM_DIALECT}_FLAG})
+endif()
-IF(NOT CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG_SEP)
- SET(CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_ASM${ASM_DIALECT}_FLAG_SEP})
-ENDIF()
+if(NOT CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG_SEP)
+ set(CMAKE_EXECUTABLE_RUNTIME_ASM${ASM_DIALECT}_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_ASM${ASM_DIALECT}_FLAG_SEP})
+endif()
-IF(NOT CMAKE_EXECUTABLE_RPATH_LINK_ASM${ASM_DIALECT}_FLAG)
- SET(CMAKE_EXECUTABLE_RPATH_LINK_ASM${ASM_DIALECT}_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_ASM${ASM_DIALECT}_FLAG})
-ENDIF()
+if(NOT CMAKE_EXECUTABLE_RPATH_LINK_ASM${ASM_DIALECT}_FLAG)
+ set(CMAKE_EXECUTABLE_RPATH_LINK_ASM${ASM_DIALECT}_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_ASM${ASM_DIALECT}_FLAG})
+endif()
# to be done
-IF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
- SET(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
-ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
+if(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
+ set(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
+endif(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
-IF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE)
- SET(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE)
-ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE)
+if(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE)
+ set(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE)
+endif(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE)
-SET(CMAKE_ASM${ASM_DIALECT}_INFOMATION_LOADED 1)
+set(CMAKE_ASM${ASM_DIALECT}_INFOMATION_LOADED 1)
diff --git a/Modules/CMakeASM_MASMInformation.cmake b/Modules/CMakeASM_MASMInformation.cmake
index 4e1386fab9..eb105ab10e 100644
--- a/Modules/CMakeASM_MASMInformation.cmake
+++ b/Modules/CMakeASM_MASMInformation.cmake
@@ -14,11 +14,11 @@
# support for the MS assembler, masm and masm64
-SET(ASM_DIALECT "_MASM")
+set(ASM_DIALECT "_MASM")
-SET(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS asm)
+set(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS asm)
-SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> /c /Fo <OBJECT> <SOURCE>")
+set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> /c /Fo <OBJECT> <SOURCE>")
-INCLUDE(CMakeASMInformation)
-SET(ASM_DIALECT)
+include(CMakeASMInformation)
+set(ASM_DIALECT)
diff --git a/Modules/CMakeASM_NASMInformation.cmake b/Modules/CMakeASM_NASMInformation.cmake
index 9da7d306c2..7058fc7ae4 100644
--- a/Modules/CMakeASM_NASMInformation.cmake
+++ b/Modules/CMakeASM_NASMInformation.cmake
@@ -19,21 +19,21 @@ set(CMAKE_ASM_NASM_SOURCE_FILE_EXTENSIONS nasm asm)
if(NOT CMAKE_ASM_NASM_OBJECT_FORMAT)
if(WIN32)
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
- SET(CMAKE_ASM_NASM_OBJECT_FORMAT win64)
+ set(CMAKE_ASM_NASM_OBJECT_FORMAT win64)
else()
- SET(CMAKE_ASM_NASM_OBJECT_FORMAT win32)
+ set(CMAKE_ASM_NASM_OBJECT_FORMAT win32)
endif()
elseif(APPLE)
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
- SET(CMAKE_ASM_NASM_OBJECT_FORMAT macho64)
+ set(CMAKE_ASM_NASM_OBJECT_FORMAT macho64)
else()
- SET(CMAKE_ASM_NASM_OBJECT_FORMAT macho)
+ set(CMAKE_ASM_NASM_OBJECT_FORMAT macho)
endif()
else()
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
- SET(CMAKE_ASM_NASM_OBJECT_FORMAT elf64)
+ set(CMAKE_ASM_NASM_OBJECT_FORMAT elf64)
else()
- SET(CMAKE_ASM_NASM_OBJECT_FORMAT elf)
+ set(CMAKE_ASM_NASM_OBJECT_FORMAT elf)
endif()
endif()
endif()
diff --git a/Modules/CMakeBackwardCompatibilityC.cmake b/Modules/CMakeBackwardCompatibilityC.cmake
index 60dcb6c083..90ad12e02a 100644
--- a/Modules/CMakeBackwardCompatibilityC.cmake
+++ b/Modules/CMakeBackwardCompatibilityC.cmake
@@ -13,28 +13,28 @@
# License text for the above reference.)
# Nothing here yet
-IF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
- INCLUDE(CMakeVS7BackwardCompatibility)
- SET(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
-ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
-IF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
- INCLUDE(CMakeVS6BackwardCompatibility)
- SET(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
-ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
-
-IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
+if(CMAKE_GENERATOR MATCHES "Visual Studio 7")
+ include(CMakeVS7BackwardCompatibility)
+ set(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
+endif(CMAKE_GENERATOR MATCHES "Visual Studio 7")
+if(CMAKE_GENERATOR MATCHES "Visual Studio 6")
+ include(CMakeVS6BackwardCompatibility)
+ set(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
+endif(CMAKE_GENERATOR MATCHES "Visual Studio 6")
+
+if(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
# Old CMake versions did not support OS X universal binaries anyway,
# so just get through this with at least some size for the types.
- LIST(LENGTH CMAKE_OSX_ARCHITECTURES NUM_ARCHS)
- IF(${NUM_ARCHS} GREATER 1)
- IF(NOT DEFINED CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
- MESSAGE(WARNING "This module does not work with OS X universal binaries.")
- SET(__ERASE_CMAKE_TRY_COMPILE_OSX_ARCHITECTURES 1)
- LIST(GET CMAKE_OSX_ARCHITECTURES 0 CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
- ENDIF()
- ENDIF()
-
- INCLUDE (CheckTypeSize)
+ list(LENGTH CMAKE_OSX_ARCHITECTURES NUM_ARCHS)
+ if(${NUM_ARCHS} GREATER 1)
+ if(NOT DEFINED CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
+ message(WARNING "This module does not work with OS X universal binaries.")
+ set(__ERASE_CMAKE_TRY_COMPILE_OSX_ARCHITECTURES 1)
+ list(GET CMAKE_OSX_ARCHITECTURES 0 CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
+ endif()
+ endif()
+
+ include (CheckTypeSize)
CHECK_TYPE_SIZE(int CMAKE_SIZEOF_INT)
CHECK_TYPE_SIZE(long CMAKE_SIZEOF_LONG)
CHECK_TYPE_SIZE("void*" CMAKE_SIZEOF_VOID_P)
@@ -43,52 +43,52 @@ IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
CHECK_TYPE_SIZE(float CMAKE_SIZEOF_FLOAT)
CHECK_TYPE_SIZE(double CMAKE_SIZEOF_DOUBLE)
- INCLUDE (CheckIncludeFile)
+ include (CheckIncludeFile)
CHECK_INCLUDE_FILE("limits.h" CMAKE_HAVE_LIMITS_H)
CHECK_INCLUDE_FILE("unistd.h" CMAKE_HAVE_UNISTD_H)
CHECK_INCLUDE_FILE("pthread.h" CMAKE_HAVE_PTHREAD_H)
- INCLUDE (CheckIncludeFiles)
+ include (CheckIncludeFiles)
CHECK_INCLUDE_FILES("sys/types.h;sys/prctl.h" CMAKE_HAVE_SYS_PRCTL_H)
- INCLUDE (TestBigEndian)
+ include (TestBigEndian)
TEST_BIG_ENDIAN(CMAKE_WORDS_BIGENDIAN)
- INCLUDE (FindX11)
+ include (FindX11)
- IF("${X11_X11_INCLUDE_PATH}" MATCHES "^/usr/include$")
- SET (CMAKE_X_CFLAGS "" CACHE STRING "X11 extra flags.")
- ELSE("${X11_X11_INCLUDE_PATH}" MATCHES "^/usr/include$")
- SET (CMAKE_X_CFLAGS "-I${X11_X11_INCLUDE_PATH}" CACHE STRING
+ if("${X11_X11_INCLUDE_PATH}" MATCHES "^/usr/include$")
+ set (CMAKE_X_CFLAGS "" CACHE STRING "X11 extra flags.")
+ else("${X11_X11_INCLUDE_PATH}" MATCHES "^/usr/include$")
+ set (CMAKE_X_CFLAGS "-I${X11_X11_INCLUDE_PATH}" CACHE STRING
"X11 extra flags.")
- ENDIF("${X11_X11_INCLUDE_PATH}" MATCHES "^/usr/include$")
- SET (CMAKE_X_LIBS "${X11_LIBRARIES}" CACHE STRING
+ endif("${X11_X11_INCLUDE_PATH}" MATCHES "^/usr/include$")
+ set (CMAKE_X_LIBS "${X11_LIBRARIES}" CACHE STRING
"Libraries and options used in X11 programs.")
- SET (CMAKE_HAS_X "${X11_FOUND}" CACHE INTERNAL "Is X11 around.")
+ set (CMAKE_HAS_X "${X11_FOUND}" CACHE INTERNAL "Is X11 around.")
- INCLUDE (FindThreads)
+ include (FindThreads)
- SET (CMAKE_THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}" CACHE STRING
+ set (CMAKE_THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}" CACHE STRING
"Thread library used.")
- SET (CMAKE_USE_PTHREADS "${CMAKE_USE_PTHREADS_INIT}" CACHE BOOL
+ set (CMAKE_USE_PTHREADS "${CMAKE_USE_PTHREADS_INIT}" CACHE BOOL
"Use the pthreads library.")
- SET (CMAKE_USE_WIN32_THREADS "${CMAKE_USE_WIN32_THREADS_INIT}" CACHE BOOL
+ set (CMAKE_USE_WIN32_THREADS "${CMAKE_USE_WIN32_THREADS_INIT}" CACHE BOOL
"Use the win32 thread library.")
- SET (CMAKE_HP_PTHREADS ${CMAKE_HP_PTHREADS_INIT} CACHE BOOL
+ set (CMAKE_HP_PTHREADS ${CMAKE_HP_PTHREADS_INIT} CACHE BOOL
"Use HP pthreads.")
- SET (CMAKE_USE_SPROC ${CMAKE_USE_SPROC_INIT} CACHE BOOL
+ set (CMAKE_USE_SPROC ${CMAKE_USE_SPROC_INIT} CACHE BOOL
"Use sproc libs.")
- IF(__ERASE_CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
- SET(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
- SET(__ERASE_CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
- ENDIF()
-ENDIF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
+ if(__ERASE_CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
+ set(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
+ set(__ERASE_CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
+ endif()
+endif(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
-MARK_AS_ADVANCED(
+mark_as_advanced(
CMAKE_HP_PTHREADS
CMAKE_THREAD_LIBS
CMAKE_USE_PTHREADS
diff --git a/Modules/CMakeBackwardCompatibilityCXX.cmake b/Modules/CMakeBackwardCompatibilityCXX.cmake
index 839c21d5af..6888636b99 100644
--- a/Modules/CMakeBackwardCompatibilityCXX.cmake
+++ b/Modules/CMakeBackwardCompatibilityCXX.cmake
@@ -1,10 +1,10 @@
# - define a bunch of backwards compatibility variables
# CMAKE_ANSI_CXXFLAGS - flag for ansi c++
# CMAKE_HAS_ANSI_STRING_STREAM - has <strstream>
-# INCLUDE(TestForANSIStreamHeaders)
-# INCLUDE(CheckIncludeFileCXX)
-# INCLUDE(TestForSTDNamespace)
-# INCLUDE(TestForANSIForScope)
+# include(TestForANSIStreamHeaders)
+# include(CheckIncludeFileCXX)
+# include(TestForSTDNamespace)
+# include(TestForANSIForScope)
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
@@ -19,36 +19,36 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
+if(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
# check for some ANSI flags in the CXX compiler if it is not gnu
- IF(NOT CMAKE_COMPILER_IS_GNUCXX)
- INCLUDE(TestCXXAcceptsFlag)
- SET(CMAKE_TRY_ANSI_CXX_FLAGS "")
- IF(CMAKE_SYSTEM MATCHES "IRIX.*")
- SET(CMAKE_TRY_ANSI_CXX_FLAGS "-LANG:std")
- ENDIF(CMAKE_SYSTEM MATCHES "IRIX.*")
- IF(CMAKE_SYSTEM MATCHES "OSF.*")
- SET(CMAKE_TRY_ANSI_CXX_FLAGS "-std strict_ansi -nopure_cname")
- ENDIF(CMAKE_SYSTEM MATCHES "OSF.*")
+ if(NOT CMAKE_COMPILER_IS_GNUCXX)
+ include(TestCXXAcceptsFlag)
+ set(CMAKE_TRY_ANSI_CXX_FLAGS "")
+ if(CMAKE_SYSTEM MATCHES "IRIX.*")
+ set(CMAKE_TRY_ANSI_CXX_FLAGS "-LANG:std")
+ endif(CMAKE_SYSTEM MATCHES "IRIX.*")
+ if(CMAKE_SYSTEM MATCHES "OSF.*")
+ set(CMAKE_TRY_ANSI_CXX_FLAGS "-std strict_ansi -nopure_cname")
+ endif(CMAKE_SYSTEM MATCHES "OSF.*")
# if CMAKE_TRY_ANSI_CXX_FLAGS has something in it, see
# if the compiler accepts it
- IF( CMAKE_TRY_ANSI_CXX_FLAGS MATCHES ".+")
+ if( CMAKE_TRY_ANSI_CXX_FLAGS MATCHES ".+")
CHECK_CXX_ACCEPTS_FLAG(${CMAKE_TRY_ANSI_CXX_FLAGS} CMAKE_CXX_ACCEPTS_FLAGS)
# if the compiler liked the flag then set CMAKE_ANSI_CXXFLAGS
# to the flag
- IF(CMAKE_CXX_ACCEPTS_FLAGS)
- SET(CMAKE_ANSI_CXXFLAGS ${CMAKE_TRY_ANSI_CXX_FLAGS} CACHE INTERNAL
+ if(CMAKE_CXX_ACCEPTS_FLAGS)
+ set(CMAKE_ANSI_CXXFLAGS ${CMAKE_TRY_ANSI_CXX_FLAGS} CACHE INTERNAL
"What flags are required by the c++ compiler to make it ansi." )
- ENDIF(CMAKE_CXX_ACCEPTS_FLAGS)
- ENDIF( CMAKE_TRY_ANSI_CXX_FLAGS MATCHES ".+")
- ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
- SET(CMAKE_CXX_FLAGS_SAVE ${CMAKE_CXX_FLAGS})
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}")
- INCLUDE(TestForANSIStreamHeaders)
- INCLUDE(CheckIncludeFileCXX)
- INCLUDE(TestForSTDNamespace)
- INCLUDE(TestForANSIForScope)
- INCLUDE(TestForSSTREAM)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_SAVE}")
-ENDIF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
+ endif(CMAKE_CXX_ACCEPTS_FLAGS)
+ endif( CMAKE_TRY_ANSI_CXX_FLAGS MATCHES ".+")
+ endif(NOT CMAKE_COMPILER_IS_GNUCXX)
+ set(CMAKE_CXX_FLAGS_SAVE ${CMAKE_CXX_FLAGS})
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}")
+ include(TestForANSIStreamHeaders)
+ include(CheckIncludeFileCXX)
+ include(TestForSTDNamespace)
+ include(TestForANSIForScope)
+ include(TestForSSTREAM)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_SAVE}")
+endif(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
diff --git a/Modules/CMakeBorlandFindMake.cmake b/Modules/CMakeBorlandFindMake.cmake
index 1ef28df834..43b31c6950 100644
--- a/Modules/CMakeBorlandFindMake.cmake
+++ b/Modules/CMakeBorlandFindMake.cmake
@@ -12,6 +12,6 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-SET (CMAKE_MAKE_PROGRAM "make" CACHE STRING
+set (CMAKE_MAKE_PROGRAM "make" CACHE STRING
"Program used to build from makefiles.")
-MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
+mark_as_advanced(CMAKE_MAKE_PROGRAM)
diff --git a/Modules/CMakeCCompiler.cmake.in b/Modules/CMakeCCompiler.cmake.in
index ded8cf6ab1..6166ec0c10 100644
--- a/Modules/CMakeCCompiler.cmake.in
+++ b/Modules/CMakeCCompiler.cmake.in
@@ -1,53 +1,53 @@
-SET(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@")
-SET(CMAKE_C_COMPILER_ARG1 "@CMAKE_C_COMPILER_ARG1@")
-SET(CMAKE_C_COMPILER_ID "@CMAKE_C_COMPILER_ID@")
-SET(CMAKE_C_COMPILER_VERSION "@CMAKE_C_COMPILER_VERSION@")
-SET(CMAKE_C_PLATFORM_ID "@CMAKE_C_PLATFORM_ID@")
+set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@")
+set(CMAKE_C_COMPILER_ARG1 "@CMAKE_C_COMPILER_ARG1@")
+set(CMAKE_C_COMPILER_ID "@CMAKE_C_COMPILER_ID@")
+set(CMAKE_C_COMPILER_VERSION "@CMAKE_C_COMPILER_VERSION@")
+set(CMAKE_C_PLATFORM_ID "@CMAKE_C_PLATFORM_ID@")
@SET_MSVC_C_ARCHITECTURE_ID@
-SET(CMAKE_AR "@CMAKE_AR@")
-SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
-SET(CMAKE_LINKER "@CMAKE_LINKER@")
-SET(CMAKE_COMPILER_IS_GNUCC @CMAKE_COMPILER_IS_GNUCC@)
-SET(CMAKE_C_COMPILER_LOADED 1)
-SET(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@)
-SET(CMAKE_COMPILER_IS_CYGWIN @CMAKE_COMPILER_IS_CYGWIN@)
-IF(CMAKE_COMPILER_IS_CYGWIN)
- SET(CYGWIN 1)
- SET(UNIX 1)
-ENDIF(CMAKE_COMPILER_IS_CYGWIN)
-
-SET(CMAKE_C_COMPILER_ENV_VAR "CC")
-
-IF(CMAKE_COMPILER_IS_MINGW)
- SET(MINGW 1)
-ENDIF(CMAKE_COMPILER_IS_MINGW)
-SET(CMAKE_C_COMPILER_ID_RUN 1)
-SET(CMAKE_C_SOURCE_FILE_EXTENSIONS c)
-SET(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
-SET(CMAKE_C_LINKER_PREFERENCE 10)
+set(CMAKE_AR "@CMAKE_AR@")
+set(CMAKE_RANLIB "@CMAKE_RANLIB@")
+set(CMAKE_LINKER "@CMAKE_LINKER@")
+set(CMAKE_COMPILER_IS_GNUCC @CMAKE_COMPILER_IS_GNUCC@)
+set(CMAKE_C_COMPILER_LOADED 1)
+set(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@)
+set(CMAKE_COMPILER_IS_CYGWIN @CMAKE_COMPILER_IS_CYGWIN@)
+if(CMAKE_COMPILER_IS_CYGWIN)
+ set(CYGWIN 1)
+ set(UNIX 1)
+endif(CMAKE_COMPILER_IS_CYGWIN)
+
+set(CMAKE_C_COMPILER_ENV_VAR "CC")
+
+if(CMAKE_COMPILER_IS_MINGW)
+ set(MINGW 1)
+endif(CMAKE_COMPILER_IS_MINGW)
+set(CMAKE_C_COMPILER_ID_RUN 1)
+set(CMAKE_C_SOURCE_FILE_EXTENSIONS c)
+set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
+set(CMAKE_C_LINKER_PREFERENCE 10)
# Save compiler ABI information.
-SET(CMAKE_C_SIZEOF_DATA_PTR "@CMAKE_C_SIZEOF_DATA_PTR@")
-SET(CMAKE_C_COMPILER_ABI "@CMAKE_C_COMPILER_ABI@")
-SET(CMAKE_C_LIBRARY_ARCHITECTURE "@CMAKE_C_LIBRARY_ARCHITECTURE@")
+set(CMAKE_C_SIZEOF_DATA_PTR "@CMAKE_C_SIZEOF_DATA_PTR@")
+set(CMAKE_C_COMPILER_ABI "@CMAKE_C_COMPILER_ABI@")
+set(CMAKE_C_LIBRARY_ARCHITECTURE "@CMAKE_C_LIBRARY_ARCHITECTURE@")
-IF(CMAKE_C_SIZEOF_DATA_PTR)
- SET(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
-ENDIF(CMAKE_C_SIZEOF_DATA_PTR)
+if(CMAKE_C_SIZEOF_DATA_PTR)
+ set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
+endif(CMAKE_C_SIZEOF_DATA_PTR)
-IF(CMAKE_C_COMPILER_ABI)
- SET(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
-ENDIF(CMAKE_C_COMPILER_ABI)
+if(CMAKE_C_COMPILER_ABI)
+ set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
+endif(CMAKE_C_COMPILER_ABI)
-IF(CMAKE_C_LIBRARY_ARCHITECTURE)
- SET(CMAKE_LIBRARY_ARCHITECTURE "@CMAKE_C_LIBRARY_ARCHITECTURE@")
-ENDIF()
+if(CMAKE_C_LIBRARY_ARCHITECTURE)
+ set(CMAKE_LIBRARY_ARCHITECTURE "@CMAKE_C_LIBRARY_ARCHITECTURE@")
+endif()
-SET(CMAKE_C_HAS_ISYSROOT "@CMAKE_C_HAS_ISYSROOT@")
+set(CMAKE_C_HAS_ISYSROOT "@CMAKE_C_HAS_ISYSROOT@")
@CMAKE_C_OSX_DEPLOYMENT_TARGET_FLAG_CODE@
-SET(CMAKE_C_IMPLICIT_LINK_LIBRARIES "@CMAKE_C_IMPLICIT_LINK_LIBRARIES@")
-SET(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "@CMAKE_C_IMPLICIT_LINK_DIRECTORIES@")
+set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "@CMAKE_C_IMPLICIT_LINK_LIBRARIES@")
+set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "@CMAKE_C_IMPLICIT_LINK_DIRECTORIES@")
@SET_CMAKE_CMCLDEPS_EXECUTABLE@
@SET_CMAKE_CL_SHOWINCLUDE_PREFIX@
diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake
index fab5807314..f0b7fe87bc 100644
--- a/Modules/CMakeCInformation.cmake
+++ b/Modules/CMakeCInformation.cmake
@@ -20,60 +20,60 @@
# some compilers use different extensions (e.g. sdcc uses .rel)
# so set the extension here first so it can be overridden by the compiler specific file
-IF(UNIX)
- SET(CMAKE_C_OUTPUT_EXTENSION .o)
-ELSE(UNIX)
- SET(CMAKE_C_OUTPUT_EXTENSION .obj)
-ENDIF(UNIX)
+if(UNIX)
+ set(CMAKE_C_OUTPUT_EXTENSION .o)
+else(UNIX)
+ set(CMAKE_C_OUTPUT_EXTENSION .obj)
+endif(UNIX)
-SET(_INCLUDED_FILE 0)
+set(_INCLUDED_FILE 0)
# Load compiler-specific information.
-IF(CMAKE_C_COMPILER_ID)
- INCLUDE(Compiler/${CMAKE_C_COMPILER_ID}-C OPTIONAL)
-ENDIF(CMAKE_C_COMPILER_ID)
+if(CMAKE_C_COMPILER_ID)
+ include(Compiler/${CMAKE_C_COMPILER_ID}-C OPTIONAL)
+endif(CMAKE_C_COMPILER_ID)
-SET(CMAKE_BASE_NAME)
-GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_C_COMPILER} NAME_WE)
-IF(CMAKE_COMPILER_IS_GNUCC)
- SET(CMAKE_BASE_NAME gcc)
-ENDIF(CMAKE_COMPILER_IS_GNUCC)
+set(CMAKE_BASE_NAME)
+get_filename_component(CMAKE_BASE_NAME ${CMAKE_C_COMPILER} NAME_WE)
+if(CMAKE_COMPILER_IS_GNUCC)
+ set(CMAKE_BASE_NAME gcc)
+endif(CMAKE_COMPILER_IS_GNUCC)
# load a hardware specific file, mostly useful for embedded compilers
-IF(CMAKE_SYSTEM_PROCESSOR)
- IF(CMAKE_C_COMPILER_ID)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
- ENDIF(CMAKE_C_COMPILER_ID)
- IF (NOT _INCLUDED_FILE)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
- ENDIF (NOT _INCLUDED_FILE)
-ENDIF(CMAKE_SYSTEM_PROCESSOR)
+if(CMAKE_SYSTEM_PROCESSOR)
+ if(CMAKE_C_COMPILER_ID)
+ include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
+ endif(CMAKE_C_COMPILER_ID)
+ if (NOT _INCLUDED_FILE)
+ include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
+ endif (NOT _INCLUDED_FILE)
+endif(CMAKE_SYSTEM_PROCESSOR)
# load the system- and compiler specific files
-IF(CMAKE_C_COMPILER_ID)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C
+if(CMAKE_C_COMPILER_ID)
+ include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C
OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
-ENDIF(CMAKE_C_COMPILER_ID)
-IF (NOT _INCLUDED_FILE)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}
+endif(CMAKE_C_COMPILER_ID)
+if (NOT _INCLUDED_FILE)
+ include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}
OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
-ENDIF (NOT _INCLUDED_FILE)
+endif (NOT _INCLUDED_FILE)
# We specify the compiler information in the system file for some
# platforms, but this language may not have been enabled when the file
# was first included. Include it again to get the language info.
# Remove this when all compiler info is removed from system files.
-IF (NOT _INCLUDED_FILE)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL)
-ENDIF (NOT _INCLUDED_FILE)
+if (NOT _INCLUDED_FILE)
+ include(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL)
+endif (NOT _INCLUDED_FILE)
-IF(CMAKE_C_SIZEOF_DATA_PTR)
- FOREACH(f ${CMAKE_C_ABI_FILES})
- INCLUDE(${f})
- ENDFOREACH()
- UNSET(CMAKE_C_ABI_FILES)
-ENDIF()
+if(CMAKE_C_SIZEOF_DATA_PTR)
+ foreach(f ${CMAKE_C_ABI_FILES})
+ include(${f})
+ endforeach()
+ unset(CMAKE_C_ABI_FILES)
+endif()
# This should be included before the _INIT variables are
# used to initialize the cache. Since the rule variables
@@ -81,58 +81,58 @@ ENDIF()
# But, it should still be after the platform file so changes can
# be made to those values.
-IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
+if(CMAKE_USER_MAKE_RULES_OVERRIDE)
# Save the full path of the file so try_compile can use it.
- INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE} RESULT_VARIABLE _override)
- SET(CMAKE_USER_MAKE_RULES_OVERRIDE "${_override}")
-ENDIF()
+ include(${CMAKE_USER_MAKE_RULES_OVERRIDE} RESULT_VARIABLE _override)
+ set(CMAKE_USER_MAKE_RULES_OVERRIDE "${_override}")
+endif()
-IF(CMAKE_USER_MAKE_RULES_OVERRIDE_C)
+if(CMAKE_USER_MAKE_RULES_OVERRIDE_C)
# Save the full path of the file so try_compile can use it.
- INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_C} RESULT_VARIABLE _override)
- SET(CMAKE_USER_MAKE_RULES_OVERRIDE_C "${_override}")
-ENDIF()
+ include(${CMAKE_USER_MAKE_RULES_OVERRIDE_C} RESULT_VARIABLE _override)
+ set(CMAKE_USER_MAKE_RULES_OVERRIDE_C "${_override}")
+endif()
# for most systems a module is the same as a shared library
# so unless the variable CMAKE_MODULE_EXISTS is set just
# copy the values from the LIBRARY variables
-IF(NOT CMAKE_MODULE_EXISTS)
- SET(CMAKE_SHARED_MODULE_C_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
- SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
-ENDIF(NOT CMAKE_MODULE_EXISTS)
+if(NOT CMAKE_MODULE_EXISTS)
+ set(CMAKE_SHARED_MODULE_C_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
+ set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
+endif(NOT CMAKE_MODULE_EXISTS)
-SET(CMAKE_C_FLAGS_INIT "$ENV{CFLAGS} ${CMAKE_C_FLAGS_INIT}")
+set(CMAKE_C_FLAGS_INIT "$ENV{CFLAGS} ${CMAKE_C_FLAGS_INIT}")
# avoid just having a space as the initial value for the cache
-IF(CMAKE_C_FLAGS_INIT STREQUAL " ")
- SET(CMAKE_C_FLAGS_INIT)
-ENDIF(CMAKE_C_FLAGS_INIT STREQUAL " ")
-SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_INIT}" CACHE STRING
+if(CMAKE_C_FLAGS_INIT STREQUAL " ")
+ set(CMAKE_C_FLAGS_INIT)
+endif(CMAKE_C_FLAGS_INIT STREQUAL " ")
+set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_INIT}" CACHE STRING
"Flags used by the compiler during all build types.")
-IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
+if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
# default build type is none
- IF(NOT CMAKE_NO_BUILD_TYPE)
- SET (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING
+ if(NOT CMAKE_NO_BUILD_TYPE)
+ set (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
- ENDIF(NOT CMAKE_NO_BUILD_TYPE)
- SET (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG_INIT}" CACHE STRING
+ endif(NOT CMAKE_NO_BUILD_TYPE)
+ set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG_INIT}" CACHE STRING
"Flags used by the compiler during debug builds.")
- SET (CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL_INIT}" CACHE STRING
+ set (CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL_INIT}" CACHE STRING
"Flags used by the compiler during release minsize builds.")
- SET (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE_INIT}" CACHE STRING
+ set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE_INIT}" CACHE STRING
"Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).")
- SET (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
+ set (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
"Flags used by the compiler during Release with Debug Info builds.")
-ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
+endif(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
-IF(CMAKE_C_STANDARD_LIBRARIES_INIT)
- SET(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES_INIT}"
+if(CMAKE_C_STANDARD_LIBRARIES_INIT)
+ set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES_INIT}"
CACHE STRING "Libraries linked by defalut with all C applications.")
- MARK_AS_ADVANCED(CMAKE_C_STANDARD_LIBRARIES)
-ENDIF(CMAKE_C_STANDARD_LIBRARIES_INIT)
+ mark_as_advanced(CMAKE_C_STANDARD_LIBRARIES)
+endif(CMAKE_C_STANDARD_LIBRARIES_INIT)
-INCLUDE(CMakeCommonLanguageInclude)
+include(CMakeCommonLanguageInclude)
# now define the following rule variables
@@ -162,58 +162,58 @@ INCLUDE(CMakeCommonLanguageInclude)
# create a C shared library
-IF(NOT CMAKE_C_CREATE_SHARED_LIBRARY)
- SET(CMAKE_C_CREATE_SHARED_LIBRARY
+if(NOT CMAKE_C_CREATE_SHARED_LIBRARY)
+ set(CMAKE_C_CREATE_SHARED_LIBRARY
"<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
-ENDIF(NOT CMAKE_C_CREATE_SHARED_LIBRARY)
+endif(NOT CMAKE_C_CREATE_SHARED_LIBRARY)
# create a C shared module just copy the shared library rule
-IF(NOT CMAKE_C_CREATE_SHARED_MODULE)
- SET(CMAKE_C_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_LIBRARY})
-ENDIF(NOT CMAKE_C_CREATE_SHARED_MODULE)
+if(NOT CMAKE_C_CREATE_SHARED_MODULE)
+ set(CMAKE_C_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_LIBRARY})
+endif(NOT CMAKE_C_CREATE_SHARED_MODULE)
# Create a static archive incrementally for large object file counts.
# If CMAKE_C_CREATE_STATIC_LIBRARY is set it will override these.
-IF(NOT DEFINED CMAKE_C_ARCHIVE_CREATE)
- SET(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
-ENDIF()
-IF(NOT DEFINED CMAKE_C_ARCHIVE_APPEND)
- SET(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
-ENDIF()
-IF(NOT DEFINED CMAKE_C_ARCHIVE_FINISH)
- SET(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
-ENDIF()
+if(NOT DEFINED CMAKE_C_ARCHIVE_CREATE)
+ set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
+endif()
+if(NOT DEFINED CMAKE_C_ARCHIVE_APPEND)
+ set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
+endif()
+if(NOT DEFINED CMAKE_C_ARCHIVE_FINISH)
+ set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
+endif()
# compile a C file into an object file
-IF(NOT CMAKE_C_COMPILE_OBJECT)
- SET(CMAKE_C_COMPILE_OBJECT
+if(NOT CMAKE_C_COMPILE_OBJECT)
+ set(CMAKE_C_COMPILE_OBJECT
"<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
-ENDIF(NOT CMAKE_C_COMPILE_OBJECT)
+endif(NOT CMAKE_C_COMPILE_OBJECT)
-IF(NOT CMAKE_C_LINK_EXECUTABLE)
- SET(CMAKE_C_LINK_EXECUTABLE
+if(NOT CMAKE_C_LINK_EXECUTABLE)
+ set(CMAKE_C_LINK_EXECUTABLE
"<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
-ENDIF(NOT CMAKE_C_LINK_EXECUTABLE)
+endif(NOT CMAKE_C_LINK_EXECUTABLE)
-IF(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG)
- SET(CMAKE_EXECUTABLE_RUNTIME_C_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
-ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG)
+if(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG)
+ set(CMAKE_EXECUTABLE_RUNTIME_C_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
+endif(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG)
-IF(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG_SEP)
- SET(CMAKE_EXECUTABLE_RUNTIME_C_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
-ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG_SEP)
+if(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG_SEP)
+ set(CMAKE_EXECUTABLE_RUNTIME_C_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
+endif(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG_SEP)
-IF(NOT CMAKE_EXECUTABLE_RPATH_LINK_C_FLAG)
- SET(CMAKE_EXECUTABLE_RPATH_LINK_C_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG})
-ENDIF(NOT CMAKE_EXECUTABLE_RPATH_LINK_C_FLAG)
+if(NOT CMAKE_EXECUTABLE_RPATH_LINK_C_FLAG)
+ set(CMAKE_EXECUTABLE_RPATH_LINK_C_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG})
+endif(NOT CMAKE_EXECUTABLE_RPATH_LINK_C_FLAG)
-MARK_AS_ADVANCED(
+mark_as_advanced(
CMAKE_C_FLAGS
CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELWITHDEBINFO
)
-SET(CMAKE_C_INFORMATION_LOADED 1)
+set(CMAKE_C_INFORMATION_LOADED 1)
diff --git a/Modules/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in
index 5b6376a32a..3cef7f82d4 100644
--- a/Modules/CMakeCXXCompiler.cmake.in
+++ b/Modules/CMakeCXXCompiler.cmake.in
@@ -1,54 +1,54 @@
-SET(CMAKE_CXX_COMPILER "@CMAKE_CXX_COMPILER@")
-SET(CMAKE_CXX_COMPILER_ARG1 "@CMAKE_CXX_COMPILER_ARG1@")
-SET(CMAKE_CXX_COMPILER_ID "@CMAKE_CXX_COMPILER_ID@")
-SET(CMAKE_CXX_COMPILER_VERSION "@CMAKE_CXX_COMPILER_VERSION@")
-SET(CMAKE_CXX_PLATFORM_ID "@CMAKE_CXX_PLATFORM_ID@")
+set(CMAKE_CXX_COMPILER "@CMAKE_CXX_COMPILER@")
+set(CMAKE_CXX_COMPILER_ARG1 "@CMAKE_CXX_COMPILER_ARG1@")
+set(CMAKE_CXX_COMPILER_ID "@CMAKE_CXX_COMPILER_ID@")
+set(CMAKE_CXX_COMPILER_VERSION "@CMAKE_CXX_COMPILER_VERSION@")
+set(CMAKE_CXX_PLATFORM_ID "@CMAKE_CXX_PLATFORM_ID@")
@SET_MSVC_CXX_ARCHITECTURE_ID@
-SET(CMAKE_AR "@CMAKE_AR@")
-SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
-SET(CMAKE_LINKER "@CMAKE_LINKER@")
-SET(CMAKE_COMPILER_IS_GNUCXX @CMAKE_COMPILER_IS_GNUCXX@)
-SET(CMAKE_CXX_COMPILER_LOADED 1)
-SET(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@)
-SET(CMAKE_COMPILER_IS_CYGWIN @CMAKE_COMPILER_IS_CYGWIN@)
-IF(CMAKE_COMPILER_IS_CYGWIN)
- SET(CYGWIN 1)
- SET(UNIX 1)
-ENDIF(CMAKE_COMPILER_IS_CYGWIN)
-
-SET(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
-
-IF(CMAKE_COMPILER_IS_MINGW)
- SET(MINGW 1)
-ENDIF(CMAKE_COMPILER_IS_MINGW)
-SET(CMAKE_CXX_COMPILER_ID_RUN 1)
-SET(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
-SET(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP)
-SET(CMAKE_CXX_LINKER_PREFERENCE 30)
-SET(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
+set(CMAKE_AR "@CMAKE_AR@")
+set(CMAKE_RANLIB "@CMAKE_RANLIB@")
+set(CMAKE_LINKER "@CMAKE_LINKER@")
+set(CMAKE_COMPILER_IS_GNUCXX @CMAKE_COMPILER_IS_GNUCXX@)
+set(CMAKE_CXX_COMPILER_LOADED 1)
+set(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@)
+set(CMAKE_COMPILER_IS_CYGWIN @CMAKE_COMPILER_IS_CYGWIN@)
+if(CMAKE_COMPILER_IS_CYGWIN)
+ set(CYGWIN 1)
+ set(UNIX 1)
+endif(CMAKE_COMPILER_IS_CYGWIN)
+
+set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
+
+if(CMAKE_COMPILER_IS_MINGW)
+ set(MINGW 1)
+endif(CMAKE_COMPILER_IS_MINGW)
+set(CMAKE_CXX_COMPILER_ID_RUN 1)
+set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
+set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP)
+set(CMAKE_CXX_LINKER_PREFERENCE 30)
+set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
# Save compiler ABI information.
-SET(CMAKE_CXX_SIZEOF_DATA_PTR "@CMAKE_CXX_SIZEOF_DATA_PTR@")
-SET(CMAKE_CXX_COMPILER_ABI "@CMAKE_CXX_COMPILER_ABI@")
-SET(CMAKE_CXX_LIBRARY_ARCHITECTURE "@CMAKE_CXX_LIBRARY_ARCHITECTURE@")
+set(CMAKE_CXX_SIZEOF_DATA_PTR "@CMAKE_CXX_SIZEOF_DATA_PTR@")
+set(CMAKE_CXX_COMPILER_ABI "@CMAKE_CXX_COMPILER_ABI@")
+set(CMAKE_CXX_LIBRARY_ARCHITECTURE "@CMAKE_CXX_LIBRARY_ARCHITECTURE@")
-IF(CMAKE_CXX_SIZEOF_DATA_PTR)
- SET(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
-ENDIF(CMAKE_CXX_SIZEOF_DATA_PTR)
+if(CMAKE_CXX_SIZEOF_DATA_PTR)
+ set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
+endif(CMAKE_CXX_SIZEOF_DATA_PTR)
-IF(CMAKE_CXX_COMPILER_ABI)
- SET(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
-ENDIF(CMAKE_CXX_COMPILER_ABI)
+if(CMAKE_CXX_COMPILER_ABI)
+ set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
+endif(CMAKE_CXX_COMPILER_ABI)
-IF(CMAKE_CXX_LIBRARY_ARCHITECTURE)
- SET(CMAKE_LIBRARY_ARCHITECTURE "@CMAKE_CXX_LIBRARY_ARCHITECTURE@")
-ENDIF()
+if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
+ set(CMAKE_LIBRARY_ARCHITECTURE "@CMAKE_CXX_LIBRARY_ARCHITECTURE@")
+endif()
-SET(CMAKE_CXX_HAS_ISYSROOT "@CMAKE_CXX_HAS_ISYSROOT@")
+set(CMAKE_CXX_HAS_ISYSROOT "@CMAKE_CXX_HAS_ISYSROOT@")
@CMAKE_CXX_OSX_DEPLOYMENT_TARGET_FLAG_CODE@
-SET(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "@CMAKE_CXX_IMPLICIT_LINK_LIBRARIES@")
-SET(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "@CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES@")
+set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "@CMAKE_CXX_IMPLICIT_LINK_LIBRARIES@")
+set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "@CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES@")
@SET_CMAKE_CMCLDEPS_EXECUTABLE@
@SET_CMAKE_CL_SHOWINCLUDE_PREFIX@
diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake
index 7d38c64b89..961d9cddf4 100644
--- a/Modules/CMakeCXXInformation.cmake
+++ b/Modules/CMakeCXXInformation.cmake
@@ -20,59 +20,59 @@
# some compilers use different extensions (e.g. sdcc uses .rel)
# so set the extension here first so it can be overridden by the compiler specific file
-IF(UNIX)
- SET(CMAKE_CXX_OUTPUT_EXTENSION .o)
-ELSE(UNIX)
- SET(CMAKE_CXX_OUTPUT_EXTENSION .obj)
-ENDIF(UNIX)
+if(UNIX)
+ set(CMAKE_CXX_OUTPUT_EXTENSION .o)
+else(UNIX)
+ set(CMAKE_CXX_OUTPUT_EXTENSION .obj)
+endif(UNIX)
-SET(_INCLUDED_FILE 0)
+set(_INCLUDED_FILE 0)
# Load compiler-specific information.
-IF(CMAKE_CXX_COMPILER_ID)
- INCLUDE(Compiler/${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL)
-ENDIF(CMAKE_CXX_COMPILER_ID)
+if(CMAKE_CXX_COMPILER_ID)
+ include(Compiler/${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL)
+endif(CMAKE_CXX_COMPILER_ID)
-SET(CMAKE_BASE_NAME)
-GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
+set(CMAKE_BASE_NAME)
+get_filename_component(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
# since the gnu compiler has several names force g++
-IF(CMAKE_COMPILER_IS_GNUCXX)
- SET(CMAKE_BASE_NAME g++)
-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+if(CMAKE_COMPILER_IS_GNUCXX)
+ set(CMAKE_BASE_NAME g++)
+endif(CMAKE_COMPILER_IS_GNUCXX)
# load a hardware specific file, mostly useful for embedded compilers
-IF(CMAKE_SYSTEM_PROCESSOR)
- IF(CMAKE_CXX_COMPILER_ID)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
- ENDIF(CMAKE_CXX_COMPILER_ID)
- IF (NOT _INCLUDED_FILE)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
- ENDIF (NOT _INCLUDED_FILE)
-ENDIF(CMAKE_SYSTEM_PROCESSOR)
+if(CMAKE_SYSTEM_PROCESSOR)
+ if(CMAKE_CXX_COMPILER_ID)
+ include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
+ endif(CMAKE_CXX_COMPILER_ID)
+ if (NOT _INCLUDED_FILE)
+ include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
+ endif (NOT _INCLUDED_FILE)
+endif(CMAKE_SYSTEM_PROCESSOR)
# load the system- and compiler specific files
-IF(CMAKE_CXX_COMPILER_ID)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
-ENDIF(CMAKE_CXX_COMPILER_ID)
-IF (NOT _INCLUDED_FILE)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL
+if(CMAKE_CXX_COMPILER_ID)
+ include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
+endif(CMAKE_CXX_COMPILER_ID)
+if (NOT _INCLUDED_FILE)
+ include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL
RESULT_VARIABLE _INCLUDED_FILE)
-ENDIF (NOT _INCLUDED_FILE)
+endif (NOT _INCLUDED_FILE)
# We specify the compiler information in the system file for some
# platforms, but this language may not have been enabled when the file
# was first included. Include it again to get the language info.
# Remove this when all compiler info is removed from system files.
-IF (NOT _INCLUDED_FILE)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL)
-ENDIF (NOT _INCLUDED_FILE)
+if (NOT _INCLUDED_FILE)
+ include(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL)
+endif (NOT _INCLUDED_FILE)
-IF(CMAKE_CXX_SIZEOF_DATA_PTR)
- FOREACH(f ${CMAKE_CXX_ABI_FILES})
- INCLUDE(${f})
- ENDFOREACH()
- UNSET(CMAKE_CXX_ABI_FILES)
-ENDIF()
+if(CMAKE_CXX_SIZEOF_DATA_PTR)
+ foreach(f ${CMAKE_CXX_ABI_FILES})
+ include(${f})
+ endforeach()
+ unset(CMAKE_CXX_ABI_FILES)
+endif()
# This should be included before the _INIT variables are
# used to initialize the cache. Since the rule variables
@@ -80,150 +80,150 @@ ENDIF()
# But, it should still be after the platform file so changes can
# be made to those values.
-IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
+if(CMAKE_USER_MAKE_RULES_OVERRIDE)
# Save the full path of the file so try_compile can use it.
- INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE} RESULT_VARIABLE _override)
- SET(CMAKE_USER_MAKE_RULES_OVERRIDE "${_override}")
-ENDIF()
+ include(${CMAKE_USER_MAKE_RULES_OVERRIDE} RESULT_VARIABLE _override)
+ set(CMAKE_USER_MAKE_RULES_OVERRIDE "${_override}")
+endif()
-IF(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX)
+if(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX)
# Save the full path of the file so try_compile can use it.
- INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_CXX} RESULT_VARIABLE _override)
- SET(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX "${_override}")
-ENDIF()
+ include(${CMAKE_USER_MAKE_RULES_OVERRIDE_CXX} RESULT_VARIABLE _override)
+ set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX "${_override}")
+endif()
# Create a set of shared library variable specific to C++
# For 90% of the systems, these are the same flags as the C versions
# so if these are not set just copy the flags from the c version
-IF(NOT CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS)
- SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS)
+if(NOT CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS)
+ set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
+endif(NOT CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS)
-IF(NOT CMAKE_CXX_COMPILE_OPTIONS_PIC)
- SET(CMAKE_CXX_COMPILE_OPTIONS_PIC ${CMAKE_C_COMPILE_OPTIONS_PIC})
-ENDIF(NOT CMAKE_CXX_COMPILE_OPTIONS_PIC)
+if(NOT CMAKE_CXX_COMPILE_OPTIONS_PIC)
+ set(CMAKE_CXX_COMPILE_OPTIONS_PIC ${CMAKE_C_COMPILE_OPTIONS_PIC})
+endif(NOT CMAKE_CXX_COMPILE_OPTIONS_PIC)
-IF(NOT CMAKE_CXX_COMPILE_OPTIONS_PIE)
- SET(CMAKE_CXX_COMPILE_OPTIONS_PIE ${CMAKE_C_COMPILE_OPTIONS_PIE})
-ENDIF(NOT CMAKE_CXX_COMPILE_OPTIONS_PIE)
+if(NOT CMAKE_CXX_COMPILE_OPTIONS_PIE)
+ set(CMAKE_CXX_COMPILE_OPTIONS_PIE ${CMAKE_C_COMPILE_OPTIONS_PIE})
+endif(NOT CMAKE_CXX_COMPILE_OPTIONS_PIE)
-IF(NOT CMAKE_CXX_COMPILE_OPTIONS_DLL)
- SET(CMAKE_CXX_COMPILE_OPTIONS_DLL ${CMAKE_C_COMPILE_OPTIONS_DLL})
-ENDIF(NOT CMAKE_CXX_COMPILE_OPTIONS_DLL)
+if(NOT CMAKE_CXX_COMPILE_OPTIONS_DLL)
+ set(CMAKE_CXX_COMPILE_OPTIONS_DLL ${CMAKE_C_COMPILE_OPTIONS_DLL})
+endif(NOT CMAKE_CXX_COMPILE_OPTIONS_DLL)
-IF(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS)
- SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS)
+if(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS)
+ set(CMAKE_SHARED_LIBRARY_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
+endif(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS)
-IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
- SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS})
-ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
+if(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
+ set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS})
+endif(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
-IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG)
- SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG)
+if(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG)
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
+endif(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG)
-IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP)
- SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP)
+if(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP)
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
+endif(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP)
-IF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG)
- SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG})
-ENDIF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG)
+if(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG)
+ set(CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG})
+endif(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG)
-IF(NOT DEFINED CMAKE_EXE_EXPORTS_CXX_FLAG)
- SET(CMAKE_EXE_EXPORTS_CXX_FLAG ${CMAKE_EXE_EXPORTS_C_FLAG})
-ENDIF()
+if(NOT DEFINED CMAKE_EXE_EXPORTS_CXX_FLAG)
+ set(CMAKE_EXE_EXPORTS_CXX_FLAG ${CMAKE_EXE_EXPORTS_C_FLAG})
+endif()
-IF(NOT DEFINED CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG)
- SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_SONAME_C_FLAG})
-ENDIF()
+if(NOT DEFINED CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG)
+ set(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_SONAME_C_FLAG})
+endif()
-IF(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG)
- SET(CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG})
-ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG)
+if(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG)
+ set(CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG})
+endif(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG)
-IF(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG_SEP)
- SET(CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP})
-ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG_SEP)
+if(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG_SEP)
+ set(CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP})
+endif(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG_SEP)
-IF(NOT CMAKE_EXECUTABLE_RPATH_LINK_CXX_FLAG)
- SET(CMAKE_EXECUTABLE_RPATH_LINK_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG})
-ENDIF(NOT CMAKE_EXECUTABLE_RPATH_LINK_CXX_FLAG)
+if(NOT CMAKE_EXECUTABLE_RPATH_LINK_CXX_FLAG)
+ set(CMAKE_EXECUTABLE_RPATH_LINK_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG})
+endif(NOT CMAKE_EXECUTABLE_RPATH_LINK_CXX_FLAG)
-IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_WITH_RUNTIME_PATH)
- SET(CMAKE_SHARED_LIBRARY_LINK_CXX_WITH_RUNTIME_PATH ${CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH})
-ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_WITH_RUNTIME_PATH)
+if(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_WITH_RUNTIME_PATH)
+ set(CMAKE_SHARED_LIBRARY_LINK_CXX_WITH_RUNTIME_PATH ${CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH})
+endif(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_WITH_RUNTIME_PATH)
-IF(NOT CMAKE_INCLUDE_FLAG_CXX)
- SET(CMAKE_INCLUDE_FLAG_CXX ${CMAKE_INCLUDE_FLAG_C})
-ENDIF(NOT CMAKE_INCLUDE_FLAG_CXX)
+if(NOT CMAKE_INCLUDE_FLAG_CXX)
+ set(CMAKE_INCLUDE_FLAG_CXX ${CMAKE_INCLUDE_FLAG_C})
+endif(NOT CMAKE_INCLUDE_FLAG_CXX)
-IF(NOT CMAKE_INCLUDE_FLAG_SEP_CXX)
- SET(CMAKE_INCLUDE_FLAG_SEP_CXX ${CMAKE_INCLUDE_FLAG_SEP_C})
-ENDIF(NOT CMAKE_INCLUDE_FLAG_SEP_CXX)
+if(NOT CMAKE_INCLUDE_FLAG_SEP_CXX)
+ set(CMAKE_INCLUDE_FLAG_SEP_CXX ${CMAKE_INCLUDE_FLAG_SEP_C})
+endif(NOT CMAKE_INCLUDE_FLAG_SEP_CXX)
# for most systems a module is the same as a shared library
# so unless the variable CMAKE_MODULE_EXISTS is set just
# copy the values from the LIBRARY variables
-IF(NOT CMAKE_MODULE_EXISTS)
- SET(CMAKE_SHARED_MODULE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS})
- SET(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS})
-ENDIF(NOT CMAKE_MODULE_EXISTS)
+if(NOT CMAKE_MODULE_EXISTS)
+ set(CMAKE_SHARED_MODULE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS})
+ set(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS})
+endif(NOT CMAKE_MODULE_EXISTS)
# repeat for modules
-IF(NOT CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS)
- SET(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS)
+if(NOT CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS)
+ set(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS})
+endif(NOT CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS)
-IF(NOT CMAKE_SHARED_MODULE_CXX_FLAGS)
- SET(CMAKE_SHARED_MODULE_CXX_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS})
-ENDIF(NOT CMAKE_SHARED_MODULE_CXX_FLAGS)
+if(NOT CMAKE_SHARED_MODULE_CXX_FLAGS)
+ set(CMAKE_SHARED_MODULE_CXX_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS})
+endif(NOT CMAKE_SHARED_MODULE_CXX_FLAGS)
# Initialize CXX link type selection flags from C versions.
-FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
- IF(NOT CMAKE_${type}_LINK_STATIC_CXX_FLAGS)
- SET(CMAKE_${type}_LINK_STATIC_CXX_FLAGS
+foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
+ if(NOT CMAKE_${type}_LINK_STATIC_CXX_FLAGS)
+ set(CMAKE_${type}_LINK_STATIC_CXX_FLAGS
${CMAKE_${type}_LINK_STATIC_C_FLAGS})
- ENDIF(NOT CMAKE_${type}_LINK_STATIC_CXX_FLAGS)
- IF(NOT CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS)
- SET(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS
+ endif(NOT CMAKE_${type}_LINK_STATIC_CXX_FLAGS)
+ if(NOT CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS)
+ set(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS
${CMAKE_${type}_LINK_DYNAMIC_C_FLAGS})
- ENDIF(NOT CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS)
-ENDFOREACH(type)
+ endif(NOT CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS)
+endforeach(type)
# add the flags to the cache based
# on the initial values computed in the platform/*.cmake files
# use _INIT variables so that this only happens the first time
# and you can set these flags in the cmake cache
-SET(CMAKE_CXX_FLAGS_INIT "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS_INIT}")
+set(CMAKE_CXX_FLAGS_INIT "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS_INIT}")
# avoid just having a space as the initial value for the cache
-IF(CMAKE_CXX_FLAGS_INIT STREQUAL " ")
- SET(CMAKE_CXX_FLAGS_INIT)
-ENDIF(CMAKE_CXX_FLAGS_INIT STREQUAL " ")
-SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT}" CACHE STRING
+if(CMAKE_CXX_FLAGS_INIT STREQUAL " ")
+ set(CMAKE_CXX_FLAGS_INIT)
+endif(CMAKE_CXX_FLAGS_INIT STREQUAL " ")
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT}" CACHE STRING
"Flags used by the compiler during all build types.")
-IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
- SET (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG_INIT}" CACHE STRING
+if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
+ set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG_INIT}" CACHE STRING
"Flags used by the compiler during debug builds.")
- SET (CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT}" CACHE STRING
+ set (CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT}" CACHE STRING
"Flags used by the compiler during release minsize builds.")
- SET (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE_INIT}" CACHE STRING
+ set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE_INIT}" CACHE STRING
"Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).")
- SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
+ set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
"Flags used by the compiler during Release with Debug Info builds.")
-ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
+endif(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
-IF(CMAKE_CXX_STANDARD_LIBRARIES_INIT)
- SET(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES_INIT}"
+if(CMAKE_CXX_STANDARD_LIBRARIES_INIT)
+ set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES_INIT}"
CACHE STRING "Libraries linked by defalut with all C++ applications.")
- MARK_AS_ADVANCED(CMAKE_CXX_STANDARD_LIBRARIES)
-ENDIF(CMAKE_CXX_STANDARD_LIBRARIES_INIT)
+ mark_as_advanced(CMAKE_CXX_STANDARD_LIBRARIES)
+endif(CMAKE_CXX_STANDARD_LIBRARIES_INIT)
-INCLUDE(CMakeCommonLanguageInclude)
+include(CMakeCommonLanguageInclude)
# now define the following rules:
# CMAKE_CXX_CREATE_SHARED_LIBRARY
@@ -252,41 +252,41 @@ INCLUDE(CMakeCommonLanguageInclude)
# create a shared C++ library
-IF(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
- SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
+if(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
+ set(CMAKE_CXX_CREATE_SHARED_LIBRARY
"<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
-ENDIF(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
+endif(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
# create a c++ shared module copy the shared library rule by default
-IF(NOT CMAKE_CXX_CREATE_SHARED_MODULE)
- SET(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
-ENDIF(NOT CMAKE_CXX_CREATE_SHARED_MODULE)
+if(NOT CMAKE_CXX_CREATE_SHARED_MODULE)
+ set(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
+endif(NOT CMAKE_CXX_CREATE_SHARED_MODULE)
# Create a static archive incrementally for large object file counts.
# If CMAKE_CXX_CREATE_STATIC_LIBRARY is set it will override these.
-IF(NOT DEFINED CMAKE_CXX_ARCHIVE_CREATE)
- SET(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
-ENDIF()
-IF(NOT DEFINED CMAKE_CXX_ARCHIVE_APPEND)
- SET(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
-ENDIF()
-IF(NOT DEFINED CMAKE_CXX_ARCHIVE_FINISH)
- SET(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
-ENDIF()
+if(NOT DEFINED CMAKE_CXX_ARCHIVE_CREATE)
+ set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
+endif()
+if(NOT DEFINED CMAKE_CXX_ARCHIVE_APPEND)
+ set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
+endif()
+if(NOT DEFINED CMAKE_CXX_ARCHIVE_FINISH)
+ set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
+endif()
# compile a C++ file into an object file
-IF(NOT CMAKE_CXX_COMPILE_OBJECT)
- SET(CMAKE_CXX_COMPILE_OBJECT
+if(NOT CMAKE_CXX_COMPILE_OBJECT)
+ set(CMAKE_CXX_COMPILE_OBJECT
"<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
-ENDIF(NOT CMAKE_CXX_COMPILE_OBJECT)
+endif(NOT CMAKE_CXX_COMPILE_OBJECT)
-IF(NOT CMAKE_CXX_LINK_EXECUTABLE)
- SET(CMAKE_CXX_LINK_EXECUTABLE
+if(NOT CMAKE_CXX_LINK_EXECUTABLE)
+ set(CMAKE_CXX_LINK_EXECUTABLE
"<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
-ENDIF(NOT CMAKE_CXX_LINK_EXECUTABLE)
+endif(NOT CMAKE_CXX_LINK_EXECUTABLE)
-MARK_AS_ADVANCED(
+mark_as_advanced(
CMAKE_BUILD_TOOL
CMAKE_VERBOSE_MAKEFILE
CMAKE_CXX_FLAGS
@@ -295,5 +295,5 @@ CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_DEBUG)
-SET(CMAKE_CXX_INFORMATION_LOADED 1)
+set(CMAKE_CXX_INFORMATION_LOADED 1)
diff --git a/Modules/CMakeClDeps.cmake b/Modules/CMakeClDeps.cmake
index 6815e2b758..b52641c531 100644
--- a/Modules/CMakeClDeps.cmake
+++ b/Modules/CMakeClDeps.cmake
@@ -20,18 +20,18 @@
# in front of each include path, so it can remove it.
#
-IF(MSVC_C_ARCHITECTURE_ID AND CMAKE_GENERATOR MATCHES "Ninja" AND CMAKE_C_COMPILER AND CMAKE_COMMAND)
- STRING(REPLACE "cmake.exe" "cmcldeps.exe" CMAKE_CMCLDEPS_EXECUTABLE ${CMAKE_COMMAND})
- SET(showdir ${CMAKE_BINARY_DIR}/CMakeFiles/ShowIncludes)
- FILE(WRITE ${showdir}/foo.h "\n")
- FILE(WRITE ${showdir}/main.c "#include \"foo.h\" \nint main(){}\n")
- EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} /nologo /showIncludes ${showdir}/main.c
+if(MSVC_C_ARCHITECTURE_ID AND CMAKE_GENERATOR MATCHES "Ninja" AND CMAKE_C_COMPILER AND CMAKE_COMMAND)
+ string(REPLACE "cmake.exe" "cmcldeps.exe" CMAKE_CMCLDEPS_EXECUTABLE ${CMAKE_COMMAND})
+ set(showdir ${CMAKE_BINARY_DIR}/CMakeFiles/ShowIncludes)
+ file(WRITE ${showdir}/foo.h "\n")
+ file(WRITE ${showdir}/main.c "#include \"foo.h\" \nint main(){}\n")
+ execute_process(COMMAND ${CMAKE_C_COMPILER} /nologo /showIncludes ${showdir}/main.c
WORKING_DIRECTORY ${showdir} OUTPUT_VARIABLE showOut)
- STRING(REPLACE main.c "" showOut1 ${showOut})
- STRING(REPLACE "/" "\\" header1 ${showdir}/foo.h)
- STRING(TOLOWER ${header1} header2)
- STRING(REPLACE ${header2} "" showOut2 ${showOut1})
- STRING(REPLACE "\n" "" showOut3 ${showOut2})
- SET(SET_CMAKE_CMCLDEPS_EXECUTABLE "SET(CMAKE_CMCLDEPS_EXECUTABLE \"${CMAKE_CMCLDEPS_EXECUTABLE}\")")
- SET(SET_CMAKE_CL_SHOWINCLUDE_PREFIX "SET(CMAKE_CL_SHOWINCLUDE_PREFIX \"${showOut3}\")")
-ENDIF()
+ string(REPLACE main.c "" showOut1 ${showOut})
+ string(REPLACE "/" "\\" header1 ${showdir}/foo.h)
+ string(TOLOWER ${header1} header2)
+ string(REPLACE ${header2} "" showOut2 ${showOut1})
+ string(REPLACE "\n" "" showOut3 ${showOut2})
+ set(SET_CMAKE_CMCLDEPS_EXECUTABLE "set(CMAKE_CMCLDEPS_EXECUTABLE \"${CMAKE_CMCLDEPS_EXECUTABLE}\")")
+ set(SET_CMAKE_CL_SHOWINCLUDE_PREFIX "set(CMAKE_CL_SHOWINCLUDE_PREFIX \"${showOut3}\")")
+endif()
diff --git a/Modules/CMakeCommonLanguageInclude.cmake b/Modules/CMakeCommonLanguageInclude.cmake
index aa129de684..99b5f1177b 100644
--- a/Modules/CMakeCommonLanguageInclude.cmake
+++ b/Modules/CMakeCommonLanguageInclude.cmake
@@ -16,72 +16,72 @@
# cache values that can be initialized in the platform-compiler.cmake file
# it may be included by more than one language.
-SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}"
+set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}"
CACHE STRING "Flags used by the linker.")
-IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
+if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
# default build type is none
- IF(NOT CMAKE_NO_BUILD_TYPE)
- SET (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING
+ if(NOT CMAKE_NO_BUILD_TYPE)
+ set (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
- ENDIF(NOT CMAKE_NO_BUILD_TYPE)
+ endif(NOT CMAKE_NO_BUILD_TYPE)
- SET (CMAKE_EXE_LINKER_FLAGS_DEBUG ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT} CACHE STRING
+ set (CMAKE_EXE_LINKER_FLAGS_DEBUG ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT} CACHE STRING
"Flags used by the linker during debug builds.")
- SET (CMAKE_EXE_LINKER_FLAGS_MINSIZEREL ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT} CACHE STRING
+ set (CMAKE_EXE_LINKER_FLAGS_MINSIZEREL ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT} CACHE STRING
"Flags used by the linker during release minsize builds.")
- SET (CMAKE_EXE_LINKER_FLAGS_RELEASE ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT} CACHE STRING
+ set (CMAKE_EXE_LINKER_FLAGS_RELEASE ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT} CACHE STRING
"Flags used by the linker during release builds.")
- SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
+ set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING
"Flags used by the linker during Release with Debug Info builds.")
- SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT} CACHE STRING
+ set (CMAKE_SHARED_LINKER_FLAGS_DEBUG ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT} CACHE STRING
"Flags used by the linker during debug builds.")
- SET (CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL ${CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL_INIT}
+ set (CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL ${CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL_INIT}
CACHE STRING
"Flags used by the linker during release minsize builds.")
- SET (CMAKE_SHARED_LINKER_FLAGS_RELEASE ${CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT} CACHE STRING
+ set (CMAKE_SHARED_LINKER_FLAGS_RELEASE ${CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT} CACHE STRING
"Flags used by the linker during release builds.")
- SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
+ set (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING
"Flags used by the linker during Release with Debug Info builds.")
- SET (CMAKE_MODULE_LINKER_FLAGS_DEBUG ${CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT} CACHE STRING
+ set (CMAKE_MODULE_LINKER_FLAGS_DEBUG ${CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT} CACHE STRING
"Flags used by the linker during debug builds.")
- SET (CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL ${CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL_INIT}
+ set (CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL ${CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL_INIT}
CACHE STRING
"Flags used by the linker during release minsize builds.")
- SET (CMAKE_MODULE_LINKER_FLAGS_RELEASE ${CMAKE_MODULE_LINKER_FLAGS_RELEASE_INIT} CACHE STRING
+ set (CMAKE_MODULE_LINKER_FLAGS_RELEASE ${CMAKE_MODULE_LINKER_FLAGS_RELEASE_INIT} CACHE STRING
"Flags used by the linker during release builds.")
- SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
+ set (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING
"Flags used by the linker during Release with Debug Info builds.")
-ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
+endif(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
# shared linker flags
-SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS_INIT} $ENV{LDFLAGS}"
+set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS_INIT} $ENV{LDFLAGS}"
CACHE STRING "Flags used by the linker during the creation of dll's.")
# module linker flags
-SET (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}"
+set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS_INIT} $ENV{LDFLAGS}"
CACHE STRING "Flags used by the linker during the creation of modules.")
-SET(CMAKE_BUILD_TOOL ${CMAKE_MAKE_PROGRAM} CACHE INTERNAL
+set(CMAKE_BUILD_TOOL ${CMAKE_MAKE_PROGRAM} CACHE INTERNAL
"What is the target build tool cmake is generating for.")
-MARK_AS_ADVANCED(
+mark_as_advanced(
CMAKE_BUILD_TOOL
CMAKE_VERBOSE_MAKEFILE
diff --git a/Modules/CMakeDependentOption.cmake b/Modules/CMakeDependentOption.cmake
index 8b8dc07fb9..98cae45e56 100644
--- a/Modules/CMakeDependentOption.cmake
+++ b/Modules/CMakeDependentOption.cmake
@@ -25,27 +25,27 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-MACRO(CMAKE_DEPENDENT_OPTION option doc default depends force)
- IF(${option}_ISSET MATCHES "^${option}_ISSET$")
- SET(${option}_AVAILABLE 1)
- FOREACH(d ${depends})
- STRING(REGEX REPLACE " +" ";" CMAKE_DEPENDENT_OPTION_DEP "${d}")
- IF(${CMAKE_DEPENDENT_OPTION_DEP})
- ELSE(${CMAKE_DEPENDENT_OPTION_DEP})
- SET(${option}_AVAILABLE 0)
- ENDIF(${CMAKE_DEPENDENT_OPTION_DEP})
- ENDFOREACH(d)
- IF(${option}_AVAILABLE)
- OPTION(${option} "${doc}" "${default}")
- SET(${option} "${${option}}" CACHE BOOL "${doc}" FORCE)
- ELSE(${option}_AVAILABLE)
- IF(${option} MATCHES "^${option}$")
- ELSE(${option} MATCHES "^${option}$")
- SET(${option} "${${option}}" CACHE INTERNAL "${doc}")
- ENDIF(${option} MATCHES "^${option}$")
- SET(${option} ${force})
- ENDIF(${option}_AVAILABLE)
- ELSE(${option}_ISSET MATCHES "^${option}_ISSET$")
- SET(${option} "${${option}_ISSET}")
- ENDIF(${option}_ISSET MATCHES "^${option}_ISSET$")
-ENDMACRO(CMAKE_DEPENDENT_OPTION)
+macro(CMAKE_DEPENDENT_OPTION option doc default depends force)
+ if(${option}_ISSET MATCHES "^${option}_ISSET$")
+ set(${option}_AVAILABLE 1)
+ foreach(d ${depends})
+ string(REGEX REPLACE " +" ";" CMAKE_DEPENDENT_OPTION_DEP "${d}")
+ if(${CMAKE_DEPENDENT_OPTION_DEP})
+ else(${CMAKE_DEPENDENT_OPTION_DEP})
+ set(${option}_AVAILABLE 0)
+ endif(${CMAKE_DEPENDENT_OPTION_DEP})
+ endforeach(d)
+ if(${option}_AVAILABLE)
+ option(${option} "${doc}" "${default}")
+ set(${option} "${${option}}" CACHE BOOL "${doc}" FORCE)
+ else(${option}_AVAILABLE)
+ if(${option} MATCHES "^${option}$")
+ else(${option} MATCHES "^${option}$")
+ set(${option} "${${option}}" CACHE INTERNAL "${doc}")
+ endif(${option} MATCHES "^${option}$")
+ set(${option} ${force})
+ endif(${option}_AVAILABLE)
+ else(${option}_ISSET MATCHES "^${option}_ISSET$")
+ set(${option} "${${option}_ISSET}")
+ endif(${option}_ISSET MATCHES "^${option}_ISSET$")
+endmacro(CMAKE_DEPENDENT_OPTION)
diff --git a/Modules/CMakeDetermineASM-ATTCompiler.cmake b/Modules/CMakeDetermineASM-ATTCompiler.cmake
index 9dd2f11de5..cec09e9857 100644
--- a/Modules/CMakeDetermineASM-ATTCompiler.cmake
+++ b/Modules/CMakeDetermineASM-ATTCompiler.cmake
@@ -14,7 +14,7 @@
# determine the compiler to use for ASM using AT&T syntax, e.g. GNU as
-SET(ASM_DIALECT "-ATT")
-SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ${_CMAKE_TOOLCHAIN_PREFIX}gas ${_CMAKE_TOOLCHAIN_PREFIX}as)
-INCLUDE(CMakeDetermineASMCompiler)
-SET(ASM_DIALECT)
+set(ASM_DIALECT "-ATT")
+set(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ${_CMAKE_TOOLCHAIN_PREFIX}gas ${_CMAKE_TOOLCHAIN_PREFIX}as)
+include(CMakeDetermineASMCompiler)
+set(ASM_DIALECT)
diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake
index 7da6ac04aa..ad6616cbc0 100644
--- a/Modules/CMakeDetermineASMCompiler.cmake
+++ b/Modules/CMakeDetermineASMCompiler.cmake
@@ -14,40 +14,40 @@
# determine the compiler to use for ASM programs
-INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake)
+include(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake)
-IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
+if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
# prefer the environment variable ASM
- IF($ENV{ASM${ASM_DIALECT}} MATCHES ".+")
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT "$ENV{ASM${ASM_DIALECT}}")
- ENDIF($ENV{ASM${ASM_DIALECT}} MATCHES ".+")
+ if($ENV{ASM${ASM_DIALECT}} MATCHES ".+")
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT "$ENV{ASM${ASM_DIALECT}}")
+ endif($ENV{ASM${ASM_DIALECT}} MATCHES ".+")
# finally list compilers to try
- IF("ASM${ASM_DIALECT}" STREQUAL "ASM") # the generic assembler support
- IF(NOT CMAKE_ASM_COMPILER_INIT)
- IF(CMAKE_C_COMPILER)
- SET(CMAKE_ASM_COMPILER "${CMAKE_C_COMPILER}" CACHE FILEPATH "The ASM compiler")
- SET(CMAKE_ASM_COMPILER_ID "${CMAKE_C_COMPILER_ID}")
- ELSEIF(CMAKE_CXX_COMPILER)
- SET(CMAKE_ASM_COMPILER "${CMAKE_CXX_COMPILER}" CACHE FILEPATH "The ASM compiler")
- SET(CMAKE_ASM_COMPILER_ID "${CMAKE_CXX_COMPILER_ID}")
- ELSE()
+ if("ASM${ASM_DIALECT}" STREQUAL "ASM") # the generic assembler support
+ if(NOT CMAKE_ASM_COMPILER_INIT)
+ if(CMAKE_C_COMPILER)
+ set(CMAKE_ASM_COMPILER "${CMAKE_C_COMPILER}" CACHE FILEPATH "The ASM compiler")
+ set(CMAKE_ASM_COMPILER_ID "${CMAKE_C_COMPILER_ID}")
+ elseif(CMAKE_CXX_COMPILER)
+ set(CMAKE_ASM_COMPILER "${CMAKE_CXX_COMPILER}" CACHE FILEPATH "The ASM compiler")
+ set(CMAKE_ASM_COMPILER_ID "${CMAKE_CXX_COMPILER_ID}")
+ else()
# List all default C and CXX compilers
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST
${_CMAKE_TOOLCHAIN_PREFIX}cc ${_CMAKE_TOOLCHAIN_PREFIX}gcc cl bcc xlc
CC ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ aCC cl bcc xlC)
- ENDIF()
- ENDIF()
- ELSE() # some specific assembler "dialect"
- IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
- MESSAGE(FATAL_ERROR "CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT must be preset !")
- ENDIF()
- ENDIF()
+ endif()
+ endif()
+ else() # some specific assembler "dialect"
+ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
+ message(FATAL_ERROR "CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT must be preset !")
+ endif()
+ endif()
# Find the compiler.
_cmake_find_compiler(ASM${ASM_DIALECT})
-ELSE(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
+else(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
# we only get here if CMAKE_ASM${ASM_DIALECT}_COMPILER was specified using -D or a pre-made CMakeCache.txt
# (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
@@ -56,63 +56,63 @@ ELSE(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
# now try to find it with the full path
# if it is found, force it into the cache,
# if not, don't overwrite the setting (which was given by the user) with "NOTFOUND"
- GET_FILENAME_COMPONENT(_CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH)
- IF(NOT _CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH)
- FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER})
- MARK_AS_ADVANCED(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH)
- IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH)
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER ${CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH} CACHE FILEPATH "Assembler" FORCE)
- ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH)
- ENDIF(NOT _CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH)
-ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
-MARK_AS_ADVANCED(CMAKE_ASM${ASM_DIALECT}_COMPILER)
+ get_filename_component(_CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH)
+ if(NOT _CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH)
+ find_program(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER})
+ mark_as_advanced(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH)
+ if(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH)
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER ${CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH} CACHE FILEPATH "Assembler" FORCE)
+ endif(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH)
+ endif(NOT _CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH)
+endif(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
+mark_as_advanced(CMAKE_ASM${ASM_DIALECT}_COMPILER)
-IF (NOT _CMAKE_TOOLCHAIN_LOCATION)
- GET_FILENAME_COMPONENT(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH)
-ENDIF (NOT _CMAKE_TOOLCHAIN_LOCATION)
+if (NOT _CMAKE_TOOLCHAIN_LOCATION)
+ get_filename_component(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH)
+endif (NOT _CMAKE_TOOLCHAIN_LOCATION)
-IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
+if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
# Table of per-vendor compiler id flags with expected output.
- LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS GNU )
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_GNU "--version")
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_GNU "(GNU assembler)|(GCC)|(Free Software Foundation)")
+ list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS GNU )
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_GNU "--version")
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_GNU "(GNU assembler)|(GCC)|(Free Software Foundation)")
- LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS HP )
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_HP "-V")
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_HP "HP C")
+ list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS HP )
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_HP "-V")
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_HP "HP C")
- LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS Intel )
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_Intel "--version")
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_Intel "(ICC)")
+ list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS Intel )
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_Intel "--version")
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_Intel "(ICC)")
- LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS SunPro )
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_SunPro "-V")
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_SunPro "Sun C")
+ list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS SunPro )
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_SunPro "-V")
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_SunPro "Sun C")
- LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS XL )
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_XL "-qversion")
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_XL "XL C")
+ list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS XL )
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_XL "-qversion")
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_XL "XL C")
- LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS MSVC )
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_MSVC "/?")
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_MSVC "Microsoft")
+ list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS MSVC )
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_MSVC "/?")
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_MSVC "Microsoft")
- LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS TI_DSP )
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_TI_DSP "-h")
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_TI_DSP "Texas Instruments")
+ list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS TI_DSP )
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_TI_DSP "-h")
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_TI_DSP "Texas Instruments")
- INCLUDE(CMakeDetermineCompilerId)
+ include(CMakeDetermineCompilerId)
CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT})
-ENDIF()
+endif()
-IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
- MESSAGE(STATUS "The ASM${ASM_DIALECT} compiler identification is ${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}")
-ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
- MESSAGE(STATUS "The ASM${ASM_DIALECT} compiler identification is unknown")
-ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
+if(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
+ message(STATUS "The ASM${ASM_DIALECT} compiler identification is ${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}")
+else(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
+ message(STATUS "The ASM${ASM_DIALECT} compiler identification is unknown")
+endif(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
@@ -123,48 +123,48 @@ ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
# NAME_WE cannot be used since then this test will fail for names lile
# "arm-unknown-nto-qnx6.3.0-gas.exe", where BASENAME would be
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
-IF (NOT _CMAKE_TOOLCHAIN_PREFIX)
- GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME)
- IF (COMPILER_BASENAME MATCHES "^(.+-)g?as(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
- SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
- ENDIF (COMPILER_BASENAME MATCHES "^(.+-)g?as(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
-ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX)
+if (NOT _CMAKE_TOOLCHAIN_PREFIX)
+ get_filename_component(COMPILER_BASENAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME)
+ if (COMPILER_BASENAME MATCHES "^(.+-)g?as(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
+ set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
+ endif (COMPILER_BASENAME MATCHES "^(.+-)g?as(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
+endif (NOT _CMAKE_TOOLCHAIN_PREFIX)
# Now try the C compiler regexp:
-IF (NOT _CMAKE_TOOLCHAIN_PREFIX)
- IF (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
- SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
- ENDIF (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
-ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX)
+if (NOT _CMAKE_TOOLCHAIN_PREFIX)
+ if (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
+ set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
+ endif (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
+endif (NOT _CMAKE_TOOLCHAIN_PREFIX)
# Finally try the CXX compiler regexp:
-IF (NOT _CMAKE_TOOLCHAIN_PREFIX)
- IF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
- SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
- ENDIF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
-ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX)
+if (NOT _CMAKE_TOOLCHAIN_PREFIX)
+ if (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
+ set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
+ endif (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
+endif (NOT _CMAKE_TOOLCHAIN_PREFIX)
-INCLUDE(CMakeFindBinUtils)
+include(CMakeFindBinUtils)
-SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR "ASM${ASM_DIALECT}")
+set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR "ASM${ASM_DIALECT}")
-IF(CMAKE_ASM${ASM_DIALECT}_COMPILER)
- MESSAGE(STATUS "Found assembler: ${CMAKE_ASM${ASM_DIALECT}_COMPILER}")
-ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER)
- MESSAGE(STATUS "Didn't find assembler")
-ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER)
+if(CMAKE_ASM${ASM_DIALECT}_COMPILER)
+ message(STATUS "Found assembler: ${CMAKE_ASM${ASM_DIALECT}_COMPILER}")
+else(CMAKE_ASM${ASM_DIALECT}_COMPILER)
+ message(STATUS "Didn't find assembler")
+endif(CMAKE_ASM${ASM_DIALECT}_COMPILER)
-SET(_CMAKE_ASM_COMPILER "${CMAKE_ASM${ASM_DIALECT}_COMPILER}")
-SET(_CMAKE_ASM_COMPILER_ID "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}")
-SET(_CMAKE_ASM_COMPILER_ARG1 "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1}")
-SET(_CMAKE_ASM_COMPILER_ENV_VAR "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR}")
+set(_CMAKE_ASM_COMPILER "${CMAKE_ASM${ASM_DIALECT}_COMPILER}")
+set(_CMAKE_ASM_COMPILER_ID "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}")
+set(_CMAKE_ASM_COMPILER_ARG1 "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1}")
+set(_CMAKE_ASM_COMPILER_ENV_VAR "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR}")
# configure variables set in this file for fast reload later on
-CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeASMCompiler.cmake.in
+configure_file(${CMAKE_ROOT}/Modules/CMakeASMCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeASM${ASM_DIALECT}Compiler.cmake IMMEDIATE @ONLY)
-SET(_CMAKE_ASM_COMPILER)
-SET(_CMAKE_ASM_COMPILER_ARG1)
-SET(_CMAKE_ASM_COMPILER_ENV_VAR)
+set(_CMAKE_ASM_COMPILER)
+set(_CMAKE_ASM_COMPILER_ARG1)
+set(_CMAKE_ASM_COMPILER_ENV_VAR)
diff --git a/Modules/CMakeDetermineASM_MASMCompiler.cmake b/Modules/CMakeDetermineASM_MASMCompiler.cmake
index e23f7db4cf..364953791b 100644
--- a/Modules/CMakeDetermineASM_MASMCompiler.cmake
+++ b/Modules/CMakeDetermineASM_MASMCompiler.cmake
@@ -14,14 +14,14 @@
# Find the MS assembler (masm or masm64)
-SET(ASM_DIALECT "_MASM")
+set(ASM_DIALECT "_MASM")
# if we are using the 64bit cl compiler, assume we also want the 64bit assembler
-IF(CMAKE_CL_64)
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ml64)
-ELSE(CMAKE_CL_64)
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ml)
-ENDIF(CMAKE_CL_64)
+if(CMAKE_CL_64)
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ml64)
+else(CMAKE_CL_64)
+ set(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ml)
+endif(CMAKE_CL_64)
-INCLUDE(CMakeDetermineASMCompiler)
-SET(ASM_DIALECT)
+include(CMakeDetermineASMCompiler)
+set(ASM_DIALECT)
diff --git a/Modules/CMakeDetermineASM_NASMCompiler.cmake b/Modules/CMakeDetermineASM_NASMCompiler.cmake
index d184c0a810..a9a9e052a6 100644
--- a/Modules/CMakeDetermineASM_NASMCompiler.cmake
+++ b/Modules/CMakeDetermineASM_NASMCompiler.cmake
@@ -14,14 +14,14 @@
# Find the nasm assembler. yasm (http://www.tortall.net/projects/yasm/) is nasm compatible
-SET(CMAKE_ASM_NASM_COMPILER_INIT nasm yasm)
+set(CMAKE_ASM_NASM_COMPILER_INIT nasm yasm)
-IF(NOT CMAKE_ASM_NASM_COMPILER)
- FIND_PROGRAM(CMAKE_ASM_NASM_COMPILER nasm
+if(NOT CMAKE_ASM_NASM_COMPILER)
+ find_program(CMAKE_ASM_NASM_COMPILER nasm
"$ENV{ProgramFiles}/NASM")
-ENDIF(NOT CMAKE_ASM_NASM_COMPILER)
+endif(NOT CMAKE_ASM_NASM_COMPILER)
# Load the generic DetermineASM compiler file with the DIALECT set properly:
-SET(ASM_DIALECT "_NASM")
-INCLUDE(CMakeDetermineASMCompiler)
-SET(ASM_DIALECT)
+set(ASM_DIALECT "_NASM")
+include(CMakeDetermineASMCompiler)
+set(ASM_DIALECT)
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index 3ce968c02d..6bed021682 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -31,89 +31,89 @@
# If not already set before, it also sets
# _CMAKE_TOOLCHAIN_PREFIX
-INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake)
+include(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake)
# Load system-specific compiler preferences for this language.
-INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-C OPTIONAL)
-IF(NOT CMAKE_C_COMPILER_NAMES)
- SET(CMAKE_C_COMPILER_NAMES cc)
-ENDIF()
+include(Platform/${CMAKE_SYSTEM_NAME}-C OPTIONAL)
+if(NOT CMAKE_C_COMPILER_NAMES)
+ set(CMAKE_C_COMPILER_NAMES cc)
+endif()
-IF(NOT CMAKE_C_COMPILER)
- SET(CMAKE_C_COMPILER_INIT NOTFOUND)
+if(NOT CMAKE_C_COMPILER)
+ set(CMAKE_C_COMPILER_INIT NOTFOUND)
# prefer the environment variable CC
- IF($ENV{CC} MATCHES ".+")
- GET_FILENAME_COMPONENT(CMAKE_C_COMPILER_INIT $ENV{CC} PROGRAM PROGRAM_ARGS CMAKE_C_FLAGS_ENV_INIT)
- IF(CMAKE_C_FLAGS_ENV_INIT)
- SET(CMAKE_C_COMPILER_ARG1 "${CMAKE_C_FLAGS_ENV_INIT}" CACHE STRING "First argument to C compiler")
- ENDIF(CMAKE_C_FLAGS_ENV_INIT)
- IF(NOT EXISTS ${CMAKE_C_COMPILER_INIT})
- MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable CC:\n$ENV{CC}.")
- ENDIF(NOT EXISTS ${CMAKE_C_COMPILER_INIT})
- ENDIF($ENV{CC} MATCHES ".+")
+ if($ENV{CC} MATCHES ".+")
+ get_filename_component(CMAKE_C_COMPILER_INIT $ENV{CC} PROGRAM PROGRAM_ARGS CMAKE_C_FLAGS_ENV_INIT)
+ if(CMAKE_C_FLAGS_ENV_INIT)
+ set(CMAKE_C_COMPILER_ARG1 "${CMAKE_C_FLAGS_ENV_INIT}" CACHE STRING "First argument to C compiler")
+ endif(CMAKE_C_FLAGS_ENV_INIT)
+ if(NOT EXISTS ${CMAKE_C_COMPILER_INIT})
+ message(FATAL_ERROR "Could not find compiler set in environment variable CC:\n$ENV{CC}.")
+ endif(NOT EXISTS ${CMAKE_C_COMPILER_INIT})
+ endif($ENV{CC} MATCHES ".+")
# next try prefer the compiler specified by the generator
- IF(CMAKE_GENERATOR_CC)
- IF(NOT CMAKE_C_COMPILER_INIT)
- SET(CMAKE_C_COMPILER_INIT ${CMAKE_GENERATOR_CC})
- ENDIF(NOT CMAKE_C_COMPILER_INIT)
- ENDIF(CMAKE_GENERATOR_CC)
+ if(CMAKE_GENERATOR_CC)
+ if(NOT CMAKE_C_COMPILER_INIT)
+ set(CMAKE_C_COMPILER_INIT ${CMAKE_GENERATOR_CC})
+ endif(NOT CMAKE_C_COMPILER_INIT)
+ endif(CMAKE_GENERATOR_CC)
# finally list compilers to try
- IF(NOT CMAKE_C_COMPILER_INIT)
- SET(CMAKE_C_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}cc ${_CMAKE_TOOLCHAIN_PREFIX}gcc cl bcc xlc clang)
- ENDIF()
+ if(NOT CMAKE_C_COMPILER_INIT)
+ set(CMAKE_C_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}cc ${_CMAKE_TOOLCHAIN_PREFIX}gcc cl bcc xlc clang)
+ endif()
_cmake_find_compiler(C)
-ELSE(NOT CMAKE_C_COMPILER)
+else(NOT CMAKE_C_COMPILER)
# we only get here if CMAKE_C_COMPILER was specified using -D or a pre-made CMakeCache.txt
# (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
# if CMAKE_C_COMPILER is a list of length 2, use the first item as
# CMAKE_C_COMPILER and the 2nd one as CMAKE_C_COMPILER_ARG1
- LIST(LENGTH CMAKE_C_COMPILER _CMAKE_C_COMPILER_LIST_LENGTH)
- IF("${_CMAKE_C_COMPILER_LIST_LENGTH}" EQUAL 2)
- LIST(GET CMAKE_C_COMPILER 1 CMAKE_C_COMPILER_ARG1)
- LIST(GET CMAKE_C_COMPILER 0 CMAKE_C_COMPILER)
- ENDIF("${_CMAKE_C_COMPILER_LIST_LENGTH}" EQUAL 2)
+ list(LENGTH CMAKE_C_COMPILER _CMAKE_C_COMPILER_LIST_LENGTH)
+ if("${_CMAKE_C_COMPILER_LIST_LENGTH}" EQUAL 2)
+ list(GET CMAKE_C_COMPILER 1 CMAKE_C_COMPILER_ARG1)
+ list(GET CMAKE_C_COMPILER 0 CMAKE_C_COMPILER)
+ endif("${_CMAKE_C_COMPILER_LIST_LENGTH}" EQUAL 2)
# if a compiler was specified by the user but without path,
# now try to find it with the full path
# if it is found, force it into the cache,
# if not, don't overwrite the setting (which was given by the user) with "NOTFOUND"
# if the C compiler already had a path, reuse it for searching the CXX compiler
- GET_FILENAME_COMPONENT(_CMAKE_USER_C_COMPILER_PATH "${CMAKE_C_COMPILER}" PATH)
- IF(NOT _CMAKE_USER_C_COMPILER_PATH)
- FIND_PROGRAM(CMAKE_C_COMPILER_WITH_PATH NAMES ${CMAKE_C_COMPILER})
- MARK_AS_ADVANCED(CMAKE_C_COMPILER_WITH_PATH)
- IF(CMAKE_C_COMPILER_WITH_PATH)
- SET(CMAKE_C_COMPILER ${CMAKE_C_COMPILER_WITH_PATH} CACHE STRING "C compiler" FORCE)
- ENDIF(CMAKE_C_COMPILER_WITH_PATH)
- ENDIF(NOT _CMAKE_USER_C_COMPILER_PATH)
-ENDIF(NOT CMAKE_C_COMPILER)
-MARK_AS_ADVANCED(CMAKE_C_COMPILER)
-
-IF (NOT _CMAKE_TOOLCHAIN_LOCATION)
- GET_FILENAME_COMPONENT(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_C_COMPILER}" PATH)
-ENDIF (NOT _CMAKE_TOOLCHAIN_LOCATION)
+ get_filename_component(_CMAKE_USER_C_COMPILER_PATH "${CMAKE_C_COMPILER}" PATH)
+ if(NOT _CMAKE_USER_C_COMPILER_PATH)
+ find_program(CMAKE_C_COMPILER_WITH_PATH NAMES ${CMAKE_C_COMPILER})
+ mark_as_advanced(CMAKE_C_COMPILER_WITH_PATH)
+ if(CMAKE_C_COMPILER_WITH_PATH)
+ set(CMAKE_C_COMPILER ${CMAKE_C_COMPILER_WITH_PATH} CACHE STRING "C compiler" FORCE)
+ endif(CMAKE_C_COMPILER_WITH_PATH)
+ endif(NOT _CMAKE_USER_C_COMPILER_PATH)
+endif(NOT CMAKE_C_COMPILER)
+mark_as_advanced(CMAKE_C_COMPILER)
+
+if (NOT _CMAKE_TOOLCHAIN_LOCATION)
+ get_filename_component(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_C_COMPILER}" PATH)
+endif (NOT _CMAKE_TOOLCHAIN_LOCATION)
# Build a small source file to identify the compiler.
-IF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
- SET(CMAKE_C_COMPILER_ID_RUN 1)
- SET(CMAKE_C_PLATFORM_ID "Windows")
- SET(CMAKE_C_COMPILER_ID "MSVC")
-ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
+if(${CMAKE_GENERATOR} MATCHES "Visual Studio")
+ set(CMAKE_C_COMPILER_ID_RUN 1)
+ set(CMAKE_C_PLATFORM_ID "Windows")
+ set(CMAKE_C_COMPILER_ID "MSVC")
+endif(${CMAKE_GENERATOR} MATCHES "Visual Studio")
-IF(NOT CMAKE_C_COMPILER_ID_RUN)
- SET(CMAKE_C_COMPILER_ID_RUN 1)
+if(NOT CMAKE_C_COMPILER_ID_RUN)
+ set(CMAKE_C_COMPILER_ID_RUN 1)
# Each entry in this list is a set of extra flags to try
# adding to the compile line to see if it helps produce
# a valid identification file.
- SET(CMAKE_C_COMPILER_ID_TEST_FLAGS
+ set(CMAKE_C_COMPILER_ID_TEST_FLAGS
# Try compiling to an object file only.
"-c"
@@ -122,22 +122,22 @@ IF(NOT CMAKE_C_COMPILER_ID_RUN)
)
# Try to identify the compiler.
- SET(CMAKE_C_COMPILER_ID)
- FILE(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in
+ set(CMAKE_C_COMPILER_ID)
+ file(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in
CMAKE_C_COMPILER_ID_PLATFORM_CONTENT)
- INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
+ include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
CMAKE_DETERMINE_COMPILER_ID(C CFLAGS CMakeCCompilerId.c)
# Set old compiler and platform id variables.
- IF("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
- SET(CMAKE_COMPILER_IS_GNUCC 1)
- ENDIF("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
- IF("${CMAKE_C_PLATFORM_ID}" MATCHES "MinGW")
- SET(CMAKE_COMPILER_IS_MINGW 1)
- ELSEIF("${CMAKE_C_PLATFORM_ID}" MATCHES "Cygwin")
- SET(CMAKE_COMPILER_IS_CYGWIN 1)
- ENDIF("${CMAKE_C_PLATFORM_ID}" MATCHES "MinGW")
-ENDIF(NOT CMAKE_C_COMPILER_ID_RUN)
+ if("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
+ set(CMAKE_COMPILER_IS_GNUCC 1)
+ endif("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
+ if("${CMAKE_C_PLATFORM_ID}" MATCHES "MinGW")
+ set(CMAKE_COMPILER_IS_MINGW 1)
+ elseif("${CMAKE_C_PLATFORM_ID}" MATCHES "Cygwin")
+ set(CMAKE_COMPILER_IS_CYGWIN 1)
+ endif("${CMAKE_C_PLATFORM_ID}" MATCHES "MinGW")
+endif(NOT CMAKE_C_COMPILER_ID_RUN)
# If we have a gcc cross compiler, they have usually some prefix, like
# e.g. powerpc-linux-gcc, arm-elf-gcc or i586-mingw32msvc-gcc, optionally
@@ -146,33 +146,33 @@ ENDIF(NOT CMAKE_C_COMPILER_ID_RUN)
# NAME_WE cannot be used since then this test will fail for names lile
# "arm-unknown-nto-qnx6.3.0-gcc.exe", where BASENAME would be
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
-IF (CMAKE_CROSSCOMPILING
+if (CMAKE_CROSSCOMPILING
AND "${CMAKE_C_COMPILER_ID}" MATCHES "GNU"
AND NOT _CMAKE_TOOLCHAIN_PREFIX)
- GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME)
- IF (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
- SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
- ENDIF (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
+ get_filename_component(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME)
+ if (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
+ set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
+ endif (COMPILER_BASENAME MATCHES "^(.+-)g?cc(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
# if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils
# but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.)
- IF ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
- SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
- ENDIF ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
+ if ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
+ set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
+ endif ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
-ENDIF (CMAKE_CROSSCOMPILING
+endif (CMAKE_CROSSCOMPILING
AND "${CMAKE_C_COMPILER_ID}" MATCHES "GNU"
AND NOT _CMAKE_TOOLCHAIN_PREFIX)
-INCLUDE(${CMAKE_ROOT}/Modules/CMakeClDeps.cmake)
-INCLUDE(CMakeFindBinUtils)
-IF(MSVC_C_ARCHITECTURE_ID)
- SET(SET_MSVC_C_ARCHITECTURE_ID
- "SET(MSVC_C_ARCHITECTURE_ID ${MSVC_C_ARCHITECTURE_ID})")
-ENDIF(MSVC_C_ARCHITECTURE_ID)
+include(${CMAKE_ROOT}/Modules/CMakeClDeps.cmake)
+include(CMakeFindBinUtils)
+if(MSVC_C_ARCHITECTURE_ID)
+ set(SET_MSVC_C_ARCHITECTURE_ID
+ "set(MSVC_C_ARCHITECTURE_ID ${MSVC_C_ARCHITECTURE_ID})")
+endif(MSVC_C_ARCHITECTURE_ID)
# configure variables set in this file for fast reload later on
-CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
+configure_file(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
"${CMAKE_PLATFORM_ROOT_BIN}/CMakeCCompiler.cmake"
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
-SET(CMAKE_C_COMPILER_ENV_VAR "CC")
+set(CMAKE_C_COMPILER_ENV_VAR "CC")
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 0116d341ab..aaabb201c1 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -30,42 +30,42 @@
# If not already set before, it also sets
# _CMAKE_TOOLCHAIN_PREFIX
-INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake)
+include(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake)
# Load system-specific compiler preferences for this language.
-INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-CXX OPTIONAL)
-IF(NOT CMAKE_CXX_COMPILER_NAMES)
- SET(CMAKE_CXX_COMPILER_NAMES CC)
-ENDIF()
+include(Platform/${CMAKE_SYSTEM_NAME}-CXX OPTIONAL)
+if(NOT CMAKE_CXX_COMPILER_NAMES)
+ set(CMAKE_CXX_COMPILER_NAMES CC)
+endif()
-IF(NOT CMAKE_CXX_COMPILER)
- SET(CMAKE_CXX_COMPILER_INIT NOTFOUND)
+if(NOT CMAKE_CXX_COMPILER)
+ set(CMAKE_CXX_COMPILER_INIT NOTFOUND)
# prefer the environment variable CXX
- IF($ENV{CXX} MATCHES ".+")
- GET_FILENAME_COMPONENT(CMAKE_CXX_COMPILER_INIT $ENV{CXX} PROGRAM PROGRAM_ARGS CMAKE_CXX_FLAGS_ENV_INIT)
- IF(CMAKE_CXX_FLAGS_ENV_INIT)
- SET(CMAKE_CXX_COMPILER_ARG1 "${CMAKE_CXX_FLAGS_ENV_INIT}" CACHE STRING "First argument to CXX compiler")
- ENDIF(CMAKE_CXX_FLAGS_ENV_INIT)
- IF(NOT EXISTS ${CMAKE_CXX_COMPILER_INIT})
- MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable CXX:\n$ENV{CXX}.\n${CMAKE_CXX_COMPILER_INIT}")
- ENDIF(NOT EXISTS ${CMAKE_CXX_COMPILER_INIT})
- ENDIF($ENV{CXX} MATCHES ".+")
+ if($ENV{CXX} MATCHES ".+")
+ get_filename_component(CMAKE_CXX_COMPILER_INIT $ENV{CXX} PROGRAM PROGRAM_ARGS CMAKE_CXX_FLAGS_ENV_INIT)
+ if(CMAKE_CXX_FLAGS_ENV_INIT)
+ set(CMAKE_CXX_COMPILER_ARG1 "${CMAKE_CXX_FLAGS_ENV_INIT}" CACHE STRING "First argument to CXX compiler")
+ endif(CMAKE_CXX_FLAGS_ENV_INIT)
+ if(NOT EXISTS ${CMAKE_CXX_COMPILER_INIT})
+ message(FATAL_ERROR "Could not find compiler set in environment variable CXX:\n$ENV{CXX}.\n${CMAKE_CXX_COMPILER_INIT}")
+ endif(NOT EXISTS ${CMAKE_CXX_COMPILER_INIT})
+ endif($ENV{CXX} MATCHES ".+")
# next prefer the generator specified compiler
- IF(CMAKE_GENERATOR_CXX)
- IF(NOT CMAKE_CXX_COMPILER_INIT)
- SET(CMAKE_CXX_COMPILER_INIT ${CMAKE_GENERATOR_CXX})
- ENDIF(NOT CMAKE_CXX_COMPILER_INIT)
- ENDIF(CMAKE_GENERATOR_CXX)
+ if(CMAKE_GENERATOR_CXX)
+ if(NOT CMAKE_CXX_COMPILER_INIT)
+ set(CMAKE_CXX_COMPILER_INIT ${CMAKE_GENERATOR_CXX})
+ endif(NOT CMAKE_CXX_COMPILER_INIT)
+ endif(CMAKE_GENERATOR_CXX)
# finally list compilers to try
- IF(NOT CMAKE_CXX_COMPILER_INIT)
- SET(CMAKE_CXX_COMPILER_LIST CC ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ aCC cl bcc xlC clang++)
- ENDIF()
+ if(NOT CMAKE_CXX_COMPILER_INIT)
+ set(CMAKE_CXX_COMPILER_LIST CC ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ aCC cl bcc xlC clang++)
+ endif()
_cmake_find_compiler(CXX)
-ELSE(NOT CMAKE_CXX_COMPILER)
+else(NOT CMAKE_CXX_COMPILER)
# we only get here if CMAKE_CXX_COMPILER was specified using -D or a pre-made CMakeCache.txt
# (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
@@ -73,31 +73,31 @@ ELSE(NOT CMAKE_CXX_COMPILER)
# if CMAKE_CXX_COMPILER is a list of length 2, use the first item as
# CMAKE_CXX_COMPILER and the 2nd one as CMAKE_CXX_COMPILER_ARG1
- LIST(LENGTH CMAKE_CXX_COMPILER _CMAKE_CXX_COMPILER_LIST_LENGTH)
- IF("${_CMAKE_CXX_COMPILER_LIST_LENGTH}" EQUAL 2)
- LIST(GET CMAKE_CXX_COMPILER 1 CMAKE_CXX_COMPILER_ARG1)
- LIST(GET CMAKE_CXX_COMPILER 0 CMAKE_CXX_COMPILER)
- ENDIF("${_CMAKE_CXX_COMPILER_LIST_LENGTH}" EQUAL 2)
+ list(LENGTH CMAKE_CXX_COMPILER _CMAKE_CXX_COMPILER_LIST_LENGTH)
+ if("${_CMAKE_CXX_COMPILER_LIST_LENGTH}" EQUAL 2)
+ list(GET CMAKE_CXX_COMPILER 1 CMAKE_CXX_COMPILER_ARG1)
+ list(GET CMAKE_CXX_COMPILER 0 CMAKE_CXX_COMPILER)
+ endif("${_CMAKE_CXX_COMPILER_LIST_LENGTH}" EQUAL 2)
# if a compiler was specified by the user but without path,
# now try to find it with the full path
# if it is found, force it into the cache,
# if not, don't overwrite the setting (which was given by the user) with "NOTFOUND"
# if the CXX compiler already had a path, reuse it for searching the C compiler
- GET_FILENAME_COMPONENT(_CMAKE_USER_CXX_COMPILER_PATH "${CMAKE_CXX_COMPILER}" PATH)
- IF(NOT _CMAKE_USER_CXX_COMPILER_PATH)
- FIND_PROGRAM(CMAKE_CXX_COMPILER_WITH_PATH NAMES ${CMAKE_CXX_COMPILER})
- MARK_AS_ADVANCED(CMAKE_CXX_COMPILER_WITH_PATH)
- IF(CMAKE_CXX_COMPILER_WITH_PATH)
- SET(CMAKE_CXX_COMPILER ${CMAKE_CXX_COMPILER_WITH_PATH} CACHE STRING "CXX compiler" FORCE)
- ENDIF(CMAKE_CXX_COMPILER_WITH_PATH)
- ENDIF(NOT _CMAKE_USER_CXX_COMPILER_PATH)
-ENDIF(NOT CMAKE_CXX_COMPILER)
-MARK_AS_ADVANCED(CMAKE_CXX_COMPILER)
-
-IF (NOT _CMAKE_TOOLCHAIN_LOCATION)
- GET_FILENAME_COMPONENT(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_CXX_COMPILER}" PATH)
-ENDIF (NOT _CMAKE_TOOLCHAIN_LOCATION)
+ get_filename_component(_CMAKE_USER_CXX_COMPILER_PATH "${CMAKE_CXX_COMPILER}" PATH)
+ if(NOT _CMAKE_USER_CXX_COMPILER_PATH)
+ find_program(CMAKE_CXX_COMPILER_WITH_PATH NAMES ${CMAKE_CXX_COMPILER})
+ mark_as_advanced(CMAKE_CXX_COMPILER_WITH_PATH)
+ if(CMAKE_CXX_COMPILER_WITH_PATH)
+ set(CMAKE_CXX_COMPILER ${CMAKE_CXX_COMPILER_WITH_PATH} CACHE STRING "CXX compiler" FORCE)
+ endif(CMAKE_CXX_COMPILER_WITH_PATH)
+ endif(NOT _CMAKE_USER_CXX_COMPILER_PATH)
+endif(NOT CMAKE_CXX_COMPILER)
+mark_as_advanced(CMAKE_CXX_COMPILER)
+
+if (NOT _CMAKE_TOOLCHAIN_LOCATION)
+ get_filename_component(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_CXX_COMPILER}" PATH)
+endif (NOT _CMAKE_TOOLCHAIN_LOCATION)
# This block was used before the compiler was identified by building a
# source file. Unless g++ crashes when building a small C++
@@ -106,45 +106,45 @@ ENDIF (NOT _CMAKE_TOOLCHAIN_LOCATION)
# The g++ that comes with BeOS 5 segfaults if you run "g++ -E"
# ("gcc -E" is fine), which throws up a system dialog box that hangs cmake
# until the user clicks "OK"...so for now, we just assume it's g++.
-# IF(BEOS)
-# SET(CMAKE_COMPILER_IS_GNUCXX 1)
-# SET(CMAKE_COMPILER_IS_GNUCXX_RUN 1)
-# ENDIF(BEOS)
+# if(BEOS)
+# set(CMAKE_COMPILER_IS_GNUCXX 1)
+# set(CMAKE_COMPILER_IS_GNUCXX_RUN 1)
+# endif(BEOS)
# Build a small source file to identify the compiler.
-IF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
- SET(CMAKE_CXX_COMPILER_ID_RUN 1)
- SET(CMAKE_CXX_PLATFORM_ID "Windows")
- SET(CMAKE_CXX_COMPILER_ID "MSVC")
-ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
-IF(NOT CMAKE_CXX_COMPILER_ID_RUN)
- SET(CMAKE_CXX_COMPILER_ID_RUN 1)
+if(${CMAKE_GENERATOR} MATCHES "Visual Studio")
+ set(CMAKE_CXX_COMPILER_ID_RUN 1)
+ set(CMAKE_CXX_PLATFORM_ID "Windows")
+ set(CMAKE_CXX_COMPILER_ID "MSVC")
+endif(${CMAKE_GENERATOR} MATCHES "Visual Studio")
+if(NOT CMAKE_CXX_COMPILER_ID_RUN)
+ set(CMAKE_CXX_COMPILER_ID_RUN 1)
# Each entry in this list is a set of extra flags to try
# adding to the compile line to see if it helps produce
# a valid identification file.
- SET(CMAKE_CXX_COMPILER_ID_TEST_FLAGS
+ set(CMAKE_CXX_COMPILER_ID_TEST_FLAGS
# Try compiling to an object file only.
"-c"
)
# Try to identify the compiler.
- SET(CMAKE_CXX_COMPILER_ID)
- FILE(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in
+ set(CMAKE_CXX_COMPILER_ID)
+ file(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in
CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT)
- INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
+ include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
CMAKE_DETERMINE_COMPILER_ID(CXX CXXFLAGS CMakeCXXCompilerId.cpp)
# Set old compiler and platform id variables.
- IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
- SET(CMAKE_COMPILER_IS_GNUCXX 1)
- ENDIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
- IF("${CMAKE_CXX_PLATFORM_ID}" MATCHES "MinGW")
- SET(CMAKE_COMPILER_IS_MINGW 1)
- ELSEIF("${CMAKE_CXX_PLATFORM_ID}" MATCHES "Cygwin")
- SET(CMAKE_COMPILER_IS_CYGWIN 1)
- ENDIF("${CMAKE_CXX_PLATFORM_ID}" MATCHES "MinGW")
-ENDIF(NOT CMAKE_CXX_COMPILER_ID_RUN)
+ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
+ set(CMAKE_COMPILER_IS_GNUCXX 1)
+ endif("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
+ if("${CMAKE_CXX_PLATFORM_ID}" MATCHES "MinGW")
+ set(CMAKE_COMPILER_IS_MINGW 1)
+ elseif("${CMAKE_CXX_PLATFORM_ID}" MATCHES "Cygwin")
+ set(CMAKE_COMPILER_IS_CYGWIN 1)
+ endif("${CMAKE_CXX_PLATFORM_ID}" MATCHES "MinGW")
+endif(NOT CMAKE_CXX_COMPILER_ID_RUN)
# if we have a g++ cross compiler, they have usually some prefix, like
# e.g. powerpc-linux-g++, arm-elf-g++ or i586-mingw32msvc-g++ , optionally
@@ -153,34 +153,34 @@ ENDIF(NOT CMAKE_CXX_COMPILER_ID_RUN)
# NAME_WE cannot be used since then this test will fail for names lile
# "arm-unknown-nto-qnx6.3.0-gcc.exe", where BASENAME would be
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
-IF (CMAKE_CROSSCOMPILING
+if (CMAKE_CROSSCOMPILING
AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU"
AND NOT _CMAKE_TOOLCHAIN_PREFIX)
- GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_CXX_COMPILER}" NAME)
- IF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
- SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
- ENDIF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
+ get_filename_component(COMPILER_BASENAME "${CMAKE_CXX_COMPILER}" NAME)
+ if (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
+ set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
+ endif (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
# if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils
# but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.)
- IF ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
- SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
- ENDIF ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
+ if ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
+ set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
+ endif ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
-ENDIF (CMAKE_CROSSCOMPILING
+endif (CMAKE_CROSSCOMPILING
AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU"
AND NOT _CMAKE_TOOLCHAIN_PREFIX)
-INCLUDE(${CMAKE_ROOT}/Modules/CMakeClDeps.cmake)
-INCLUDE(CMakeFindBinUtils)
-IF(MSVC_CXX_ARCHITECTURE_ID)
- SET(SET_MSVC_CXX_ARCHITECTURE_ID
- "SET(MSVC_CXX_ARCHITECTURE_ID ${MSVC_CXX_ARCHITECTURE_ID})")
-ENDIF(MSVC_CXX_ARCHITECTURE_ID)
+include(${CMAKE_ROOT}/Modules/CMakeClDeps.cmake)
+include(CMakeFindBinUtils)
+if(MSVC_CXX_ARCHITECTURE_ID)
+ set(SET_MSVC_CXX_ARCHITECTURE_ID
+ "set(MSVC_CXX_ARCHITECTURE_ID ${MSVC_CXX_ARCHITECTURE_ID})")
+endif(MSVC_CXX_ARCHITECTURE_ID)
# configure all variables set in this file
-CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
+configure_file(${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
-SET(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
+set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake
index 1c9899e64d..b79afdf54e 100644
--- a/Modules/CMakeDetermineCompilerABI.cmake
+++ b/Modules/CMakeDetermineCompilerABI.cmake
@@ -16,19 +16,19 @@
# This is used internally by CMake and should not be included by user
# code.
-INCLUDE(${CMAKE_ROOT}/Modules/CMakeParseImplicitLinkInfo.cmake)
+include(${CMAKE_ROOT}/Modules/CMakeParseImplicitLinkInfo.cmake)
-FUNCTION(CMAKE_DETERMINE_COMPILER_ABI lang src)
- IF(NOT DEFINED CMAKE_DETERMINE_${lang}_ABI_COMPILED)
- MESSAGE(STATUS "Detecting ${lang} compiler ABI info")
+function(CMAKE_DETERMINE_COMPILER_ABI lang src)
+ if(NOT DEFINED CMAKE_DETERMINE_${lang}_ABI_COMPILED)
+ message(STATUS "Detecting ${lang} compiler ABI info")
# Compile the ABI identification source.
- SET(BIN "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeDetermineCompilerABI_${lang}.bin")
- SET(CMAKE_FLAGS )
- IF(DEFINED CMAKE_${lang}_VERBOSE_FLAG)
- SET(CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_${lang}_VERBOSE_FLAG}")
- ENDIF()
- TRY_COMPILE(CMAKE_DETERMINE_${lang}_ABI_COMPILED
+ set(BIN "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeDetermineCompilerABI_${lang}.bin")
+ set(CMAKE_FLAGS )
+ if(DEFINED CMAKE_${lang}_VERBOSE_FLAG)
+ set(CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_${lang}_VERBOSE_FLAG}")
+ endif()
+ try_compile(CMAKE_DETERMINE_${lang}_ABI_COMPILED
${CMAKE_BINARY_DIR} ${src}
CMAKE_FLAGS "${CMAKE_FLAGS}"
"-DCMAKE_${lang}_STANDARD_LIBRARIES="
@@ -41,40 +41,40 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ABI lang src)
)
# Load the resulting information strings.
- IF(CMAKE_DETERMINE_${lang}_ABI_COMPILED)
- MESSAGE(STATUS "Detecting ${lang} compiler ABI info - done")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ if(CMAKE_DETERMINE_${lang}_ABI_COMPILED)
+ message(STATUS "Detecting ${lang} compiler ABI info - done")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Detecting ${lang} compiler ABI info compiled with the following output:\n${OUTPUT}\n\n")
- FILE(STRINGS "${BIN}" ABI_STRINGS LIMIT_COUNT 2 REGEX "INFO:[^[]*\\[")
- FOREACH(info ${ABI_STRINGS})
- IF("${info}" MATCHES ".*INFO:sizeof_dptr\\[0*([^]]*)\\].*")
- STRING(REGEX REPLACE ".*INFO:sizeof_dptr\\[0*([^]]*)\\].*" "\\1" ABI_SIZEOF_DPTR "${info}")
- ENDIF("${info}" MATCHES ".*INFO:sizeof_dptr\\[0*([^]]*)\\].*")
- IF("${info}" MATCHES ".*INFO:abi\\[([^]]*)\\].*")
- STRING(REGEX REPLACE ".*INFO:abi\\[([^]]*)\\].*" "\\1" ABI_NAME "${info}")
- ENDIF("${info}" MATCHES ".*INFO:abi\\[([^]]*)\\].*")
- ENDFOREACH(info)
+ file(STRINGS "${BIN}" ABI_STRINGS LIMIT_COUNT 2 REGEX "INFO:[^[]*\\[")
+ foreach(info ${ABI_STRINGS})
+ if("${info}" MATCHES ".*INFO:sizeof_dptr\\[0*([^]]*)\\].*")
+ string(REGEX REPLACE ".*INFO:sizeof_dptr\\[0*([^]]*)\\].*" "\\1" ABI_SIZEOF_DPTR "${info}")
+ endif("${info}" MATCHES ".*INFO:sizeof_dptr\\[0*([^]]*)\\].*")
+ if("${info}" MATCHES ".*INFO:abi\\[([^]]*)\\].*")
+ string(REGEX REPLACE ".*INFO:abi\\[([^]]*)\\].*" "\\1" ABI_NAME "${info}")
+ endif("${info}" MATCHES ".*INFO:abi\\[([^]]*)\\].*")
+ endforeach(info)
- IF(ABI_SIZEOF_DPTR)
- SET(CMAKE_${lang}_SIZEOF_DATA_PTR "${ABI_SIZEOF_DPTR}" PARENT_SCOPE)
- ELSEIF(CMAKE_${lang}_SIZEOF_DATA_PTR_DEFAULT)
- SET(CMAKE_${lang}_SIZEOF_DATA_PTR "${CMAKE_${lang}_SIZEOF_DATA_PTR_DEFAULT}" PARENT_SCOPE)
- ENDIF(ABI_SIZEOF_DPTR)
+ if(ABI_SIZEOF_DPTR)
+ set(CMAKE_${lang}_SIZEOF_DATA_PTR "${ABI_SIZEOF_DPTR}" PARENT_SCOPE)
+ elseif(CMAKE_${lang}_SIZEOF_DATA_PTR_DEFAULT)
+ set(CMAKE_${lang}_SIZEOF_DATA_PTR "${CMAKE_${lang}_SIZEOF_DATA_PTR_DEFAULT}" PARENT_SCOPE)
+ endif(ABI_SIZEOF_DPTR)
- IF(ABI_NAME)
- SET(CMAKE_${lang}_COMPILER_ABI "${ABI_NAME}" PARENT_SCOPE)
- ENDIF(ABI_NAME)
+ if(ABI_NAME)
+ set(CMAKE_${lang}_COMPILER_ABI "${ABI_NAME}" PARENT_SCOPE)
+ endif(ABI_NAME)
# Parse implicit linker information for this language, if available.
- SET(implicit_dirs "")
- SET(implicit_libs "")
- SET(MULTI_ARCH FALSE)
- IF(DEFINED CMAKE_OSX_ARCHITECTURES)
- IF( "${CMAKE_OSX_ARCHITECTURES}" MATCHES ";" )
- SET(MULTI_ARCH TRUE)
- ENDIF()
- ENDIF()
- IF(CMAKE_${lang}_VERBOSE_FLAG
+ set(implicit_dirs "")
+ set(implicit_libs "")
+ set(MULTI_ARCH FALSE)
+ if(DEFINED CMAKE_OSX_ARCHITECTURES)
+ if( "${CMAKE_OSX_ARCHITECTURES}" MATCHES ";" )
+ set(MULTI_ARCH TRUE)
+ endif()
+ endif()
+ if(CMAKE_${lang}_VERBOSE_FLAG
# Implicit link information cannot be used explicitly for
# multiple OS X architectures, so we skip it.
AND NOT MULTI_ARCH
@@ -82,50 +82,50 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ABI lang src)
AND NOT "${CMAKE_GENERATOR}" MATCHES Xcode)
CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs log
"${CMAKE_${lang}_IMPLICIT_OBJECT_REGEX}")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Parsed ${lang} implicit link information from above output:\n${log}\n\n")
- ENDIF()
+ endif()
# for VS IDE Intel Fortran we have to figure out the
# implicit link path for the fortran run time using
# a try-compile
- IF("${lang}" MATCHES "Fortran"
+ if("${lang}" MATCHES "Fortran"
AND "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
- SET(_desc "Determine Intel Fortran Compiler Implicit Link Path")
- MESSAGE(STATUS "${_desc}")
+ set(_desc "Determine Intel Fortran Compiler Implicit Link Path")
+ message(STATUS "${_desc}")
# Build a sample project which reports symbols.
- TRY_COMPILE(IFORT_LIB_PATH_COMPILED
+ try_compile(IFORT_LIB_PATH_COMPILED
${CMAKE_BINARY_DIR}/CMakeFiles/IntelVSImplicitPath
${CMAKE_ROOT}/Modules/IntelVSImplicitPath
IntelFortranImplicit
CMAKE_FLAGS
"-DCMAKE_Fortran_FLAGS:STRING=${CMAKE_Fortran_FLAGS}"
OUTPUT_VARIABLE _output)
- FILE(WRITE
+ file(WRITE
"${CMAKE_BINARY_DIR}/CMakeFiles/IntelVSImplicitPath/output.txt"
"${_output}")
- INCLUDE(${CMAKE_BINARY_DIR}/CMakeFiles/IntelVSImplicitPath/output.cmake OPTIONAL)
- SET(_desc "Determine Intel Fortran Compiler Implicit Link Path -- done")
- MESSAGE(STATUS "${_desc}")
- ENDIF()
+ include(${CMAKE_BINARY_DIR}/CMakeFiles/IntelVSImplicitPath/output.cmake OPTIONAL)
+ set(_desc "Determine Intel Fortran Compiler Implicit Link Path -- done")
+ message(STATUS "${_desc}")
+ endif()
- SET(CMAKE_${lang}_IMPLICIT_LINK_LIBRARIES "${implicit_libs}" PARENT_SCOPE)
- SET(CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES "${implicit_dirs}" PARENT_SCOPE)
+ set(CMAKE_${lang}_IMPLICIT_LINK_LIBRARIES "${implicit_libs}" PARENT_SCOPE)
+ set(CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES "${implicit_dirs}" PARENT_SCOPE)
# Detect library architecture directory name.
- IF(CMAKE_LIBRARY_ARCHITECTURE_REGEX)
- FOREACH(dir ${implicit_dirs})
- IF("${dir}" MATCHES "/lib/${CMAKE_LIBRARY_ARCHITECTURE_REGEX}$")
- GET_FILENAME_COMPONENT(arch "${dir}" NAME)
- SET(CMAKE_${lang}_LIBRARY_ARCHITECTURE "${arch}" PARENT_SCOPE)
- BREAK()
- ENDIF()
- ENDFOREACH()
- ENDIF()
+ if(CMAKE_LIBRARY_ARCHITECTURE_REGEX)
+ foreach(dir ${implicit_dirs})
+ if("${dir}" MATCHES "/lib/${CMAKE_LIBRARY_ARCHITECTURE_REGEX}$")
+ get_filename_component(arch "${dir}" NAME)
+ set(CMAKE_${lang}_LIBRARY_ARCHITECTURE "${arch}" PARENT_SCOPE)
+ break()
+ endif()
+ endforeach()
+ endif()
- ELSE(CMAKE_DETERMINE_${lang}_ABI_COMPILED)
- MESSAGE(STATUS "Detecting ${lang} compiler ABI info - failed")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ else(CMAKE_DETERMINE_${lang}_ABI_COMPILED)
+ message(STATUS "Detecting ${lang} compiler ABI info - failed")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Detecting ${lang} compiler ABI info failed to compile with the following output:\n${OUTPUT}\n\n")
- ENDIF(CMAKE_DETERMINE_${lang}_ABI_COMPILED)
- ENDIF(NOT DEFINED CMAKE_DETERMINE_${lang}_ABI_COMPILED)
-ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ABI)
+ endif(CMAKE_DETERMINE_${lang}_ABI_COMPILED)
+ endif(NOT DEFINED CMAKE_DETERMINE_${lang}_ABI_COMPILED)
+endfunction(CMAKE_DETERMINE_COMPILER_ABI)
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 67f5a5906f..6fd0add59b 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -16,90 +16,90 @@
# used internally by CMake and should not be included by user code.
# If successful, sets CMAKE_<lang>_COMPILER_ID and CMAKE_<lang>_PLATFORM_ID
-FUNCTION(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
+function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
# Make sure the compiler arguments are clean.
- STRING(STRIP "${CMAKE_${lang}_COMPILER_ARG1}" CMAKE_${lang}_COMPILER_ID_ARG1)
- STRING(REGEX REPLACE " +" ";" CMAKE_${lang}_COMPILER_ID_ARG1 "${CMAKE_${lang}_COMPILER_ID_ARG1}")
+ string(STRIP "${CMAKE_${lang}_COMPILER_ARG1}" CMAKE_${lang}_COMPILER_ID_ARG1)
+ string(REGEX REPLACE " +" ";" CMAKE_${lang}_COMPILER_ID_ARG1 "${CMAKE_${lang}_COMPILER_ID_ARG1}")
# Make sure user-specified compiler flags are used.
- IF(CMAKE_${lang}_FLAGS)
- SET(CMAKE_${lang}_COMPILER_ID_FLAGS ${CMAKE_${lang}_FLAGS})
- ELSE(CMAKE_${lang}_FLAGS)
- SET(CMAKE_${lang}_COMPILER_ID_FLAGS $ENV{${flagvar}})
- ENDIF(CMAKE_${lang}_FLAGS)
- STRING(REGEX REPLACE " " ";" CMAKE_${lang}_COMPILER_ID_FLAGS_LIST "${CMAKE_${lang}_COMPILER_ID_FLAGS}")
+ if(CMAKE_${lang}_FLAGS)
+ set(CMAKE_${lang}_COMPILER_ID_FLAGS ${CMAKE_${lang}_FLAGS})
+ else(CMAKE_${lang}_FLAGS)
+ set(CMAKE_${lang}_COMPILER_ID_FLAGS $ENV{${flagvar}})
+ endif(CMAKE_${lang}_FLAGS)
+ string(REGEX REPLACE " " ";" CMAKE_${lang}_COMPILER_ID_FLAGS_LIST "${CMAKE_${lang}_COMPILER_ID_FLAGS}")
# Compute the directory in which to run the test.
- SET(CMAKE_${lang}_COMPILER_ID_DIR ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CompilerId${lang})
+ set(CMAKE_${lang}_COMPILER_ID_DIR ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CompilerId${lang})
# Try building with no extra flags and then try each set
# of helper flags. Stop when the compiler is identified.
- FOREACH(flags "" ${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS})
- IF(NOT CMAKE_${lang}_COMPILER_ID)
+ foreach(flags "" ${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS})
+ if(NOT CMAKE_${lang}_COMPILER_ID)
CMAKE_DETERMINE_COMPILER_ID_BUILD("${lang}" "${flags}" "${src}")
- FOREACH(file ${COMPILER_${lang}_PRODUCED_FILES})
+ foreach(file ${COMPILER_${lang}_PRODUCED_FILES})
CMAKE_DETERMINE_COMPILER_ID_CHECK("${lang}" "${CMAKE_${lang}_COMPILER_ID_DIR}/${file}" "${src}")
- ENDFOREACH(file)
- ENDIF(NOT CMAKE_${lang}_COMPILER_ID)
- ENDFOREACH(flags)
+ endforeach(file)
+ endif(NOT CMAKE_${lang}_COMPILER_ID)
+ endforeach(flags)
# If the compiler is still unknown, try to query its vendor.
- IF(NOT CMAKE_${lang}_COMPILER_ID)
+ if(NOT CMAKE_${lang}_COMPILER_ID)
CMAKE_DETERMINE_COMPILER_ID_VENDOR(${lang})
- ENDIF()
+ endif()
# if the format is unknown after all files have been checked, put "Unknown" in the cache
- IF(NOT CMAKE_EXECUTABLE_FORMAT)
- SET(CMAKE_EXECUTABLE_FORMAT "Unknown" CACHE INTERNAL "Executable file format")
- ENDIF(NOT CMAKE_EXECUTABLE_FORMAT)
+ if(NOT CMAKE_EXECUTABLE_FORMAT)
+ set(CMAKE_EXECUTABLE_FORMAT "Unknown" CACHE INTERNAL "Executable file format")
+ endif(NOT CMAKE_EXECUTABLE_FORMAT)
# Display the final identification result.
- IF(CMAKE_${lang}_COMPILER_ID)
- IF(CMAKE_${lang}_COMPILER_VERSION)
- SET(_version " ${CMAKE_${lang}_COMPILER_VERSION}")
- ELSE()
- SET(_version "")
- ENDIF()
- MESSAGE(STATUS "The ${lang} compiler identification is "
+ if(CMAKE_${lang}_COMPILER_ID)
+ if(CMAKE_${lang}_COMPILER_VERSION)
+ set(_version " ${CMAKE_${lang}_COMPILER_VERSION}")
+ else()
+ set(_version "")
+ endif()
+ message(STATUS "The ${lang} compiler identification is "
"${CMAKE_${lang}_COMPILER_ID}${_version}")
- ELSE(CMAKE_${lang}_COMPILER_ID)
- MESSAGE(STATUS "The ${lang} compiler identification is unknown")
- ENDIF(CMAKE_${lang}_COMPILER_ID)
+ else(CMAKE_${lang}_COMPILER_ID)
+ message(STATUS "The ${lang} compiler identification is unknown")
+ endif(CMAKE_${lang}_COMPILER_ID)
- SET(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
- SET(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE)
- SET(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}"
+ set(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
+ set(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE)
+ set(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}"
PARENT_SCOPE)
- SET(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE)
-ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID)
+ set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE)
+endfunction(CMAKE_DETERMINE_COMPILER_ID)
#-----------------------------------------------------------------------------
# Function to write the compiler id source file.
-FUNCTION(CMAKE_DETERMINE_COMPILER_ID_WRITE lang src)
- FILE(READ ${CMAKE_ROOT}/Modules/${src}.in ID_CONTENT_IN)
- STRING(CONFIGURE "${ID_CONTENT_IN}" ID_CONTENT_OUT @ONLY)
- FILE(WRITE ${CMAKE_${lang}_COMPILER_ID_DIR}/${src} "${ID_CONTENT_OUT}")
-ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_WRITE)
+function(CMAKE_DETERMINE_COMPILER_ID_WRITE lang src)
+ file(READ ${CMAKE_ROOT}/Modules/${src}.in ID_CONTENT_IN)
+ string(CONFIGURE "${ID_CONTENT_IN}" ID_CONTENT_OUT @ONLY)
+ file(WRITE ${CMAKE_${lang}_COMPILER_ID_DIR}/${src} "${ID_CONTENT_OUT}")
+endfunction(CMAKE_DETERMINE_COMPILER_ID_WRITE)
#-----------------------------------------------------------------------------
# Function to build the compiler id source file and look for output
# files.
-FUNCTION(CMAKE_DETERMINE_COMPILER_ID_BUILD lang testflags src)
+function(CMAKE_DETERMINE_COMPILER_ID_BUILD lang testflags src)
# Create a clean working directory.
- FILE(REMOVE_RECURSE ${CMAKE_${lang}_COMPILER_ID_DIR})
- FILE(MAKE_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR})
+ file(REMOVE_RECURSE ${CMAKE_${lang}_COMPILER_ID_DIR})
+ file(MAKE_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR})
CMAKE_DETERMINE_COMPILER_ID_WRITE("${lang}" "${src}")
# Construct a description of this test case.
- SET(COMPILER_DESCRIPTION
+ set(COMPILER_DESCRIPTION
"Compiler: ${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_COMPILER_ID_ARG1}
Build flags: ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}
Id flags: ${testflags}
")
# Compile the compiler identification source.
- IF(COMMAND EXECUTE_PROCESS)
- EXECUTE_PROCESS(
+ if(COMMAND EXECUTE_PROCESS)
+ execute_process(
COMMAND ${CMAKE_${lang}_COMPILER}
${CMAKE_${lang}_COMPILER_ID_ARG1}
${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}
@@ -110,8 +110,8 @@ Id flags: ${testflags}
ERROR_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
RESULT_VARIABLE CMAKE_${lang}_COMPILER_ID_RESULT
)
- ELSE(COMMAND EXECUTE_PROCESS)
- EXEC_PROGRAM(
+ else(COMMAND EXECUTE_PROCESS)
+ exec_program(
${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_COMPILER_ID_DIR}
ARGS ${CMAKE_${lang}_COMPILER_ID_ARG1}
${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}
@@ -120,12 +120,12 @@ Id flags: ${testflags}
OUTPUT_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
RETURN_VALUE CMAKE_${lang}_COMPILER_ID_RESULT
)
- ENDIF(COMMAND EXECUTE_PROCESS)
+ endif(COMMAND EXECUTE_PROCESS)
# Check the result of compilation.
- IF(CMAKE_${lang}_COMPILER_ID_RESULT)
+ if(CMAKE_${lang}_COMPILER_ID_RESULT)
# Compilation failed.
- SET(MSG
+ set(MSG
"Compiling the ${lang} compiler identification source file \"${src}\" failed.
${COMPILER_DESCRIPTION}
The output was:
@@ -133,16 +133,16 @@ ${CMAKE_${lang}_COMPILER_ID_RESULT}
${CMAKE_${lang}_COMPILER_ID_OUTPUT}
")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "${MSG}")
- #IF(NOT CMAKE_${lang}_COMPILER_ID_ALLOW_FAIL)
- # MESSAGE(FATAL_ERROR "${MSG}")
- #ENDIF(NOT CMAKE_${lang}_COMPILER_ID_ALLOW_FAIL)
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "${MSG}")
+ #if(NOT CMAKE_${lang}_COMPILER_ID_ALLOW_FAIL)
+ # message(FATAL_ERROR "${MSG}")
+ #endif(NOT CMAKE_${lang}_COMPILER_ID_ALLOW_FAIL)
# No output files should be inspected.
- SET(COMPILER_${lang}_PRODUCED_FILES)
- ELSE(CMAKE_${lang}_COMPILER_ID_RESULT)
+ set(COMPILER_${lang}_PRODUCED_FILES)
+ else(CMAKE_${lang}_COMPILER_ID_RESULT)
# Compilation succeeded.
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Compiling the ${lang} compiler identification source file \"${src}\" succeeded.
${COMPILER_DESCRIPTION}
The output was:
@@ -153,120 +153,120 @@ ${CMAKE_${lang}_COMPILER_ID_OUTPUT}
# Find the executable produced by the compiler, try all files in the
# binary dir.
- FILE(GLOB COMPILER_${lang}_PRODUCED_FILES
+ file(GLOB COMPILER_${lang}_PRODUCED_FILES
RELATIVE ${CMAKE_${lang}_COMPILER_ID_DIR}
${CMAKE_${lang}_COMPILER_ID_DIR}/*)
- LIST(REMOVE_ITEM COMPILER_${lang}_PRODUCED_FILES "${src}")
- FOREACH(file ${COMPILER_${lang}_PRODUCED_FILES})
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ list(REMOVE_ITEM COMPILER_${lang}_PRODUCED_FILES "${src}")
+ foreach(file ${COMPILER_${lang}_PRODUCED_FILES})
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Compilation of the ${lang} compiler identification source \""
"${src}\" produced \"${file}\"\n\n")
- ENDFOREACH(file)
+ endforeach(file)
- IF(NOT COMPILER_${lang}_PRODUCED_FILES)
+ if(NOT COMPILER_${lang}_PRODUCED_FILES)
# No executable was found.
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Compilation of the ${lang} compiler identification source \""
"${src}\" did not produce an executable in \""
"${CMAKE_${lang}_COMPILER_ID_DIR}\".\n\n")
- ENDIF(NOT COMPILER_${lang}_PRODUCED_FILES)
- ENDIF(CMAKE_${lang}_COMPILER_ID_RESULT)
+ endif(NOT COMPILER_${lang}_PRODUCED_FILES)
+ endif(CMAKE_${lang}_COMPILER_ID_RESULT)
# Return the files produced by the compilation.
- SET(COMPILER_${lang}_PRODUCED_FILES "${COMPILER_${lang}_PRODUCED_FILES}" PARENT_SCOPE)
-ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_BUILD lang testflags src)
+ set(COMPILER_${lang}_PRODUCED_FILES "${COMPILER_${lang}_PRODUCED_FILES}" PARENT_SCOPE)
+endfunction(CMAKE_DETERMINE_COMPILER_ID_BUILD lang testflags src)
#-----------------------------------------------------------------------------
# Function to extract the compiler id from an executable.
-FUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
+function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
# Look for a compiler id if not yet known.
- IF(NOT CMAKE_${lang}_COMPILER_ID)
+ if(NOT CMAKE_${lang}_COMPILER_ID)
# Read the compiler identification string from the executable file.
- SET(COMPILER_ID)
- SET(COMPILER_VERSION)
- SET(PLATFORM_ID)
- FILE(STRINGS ${file}
+ set(COMPILER_ID)
+ set(COMPILER_VERSION)
+ set(PLATFORM_ID)
+ file(STRINGS ${file}
CMAKE_${lang}_COMPILER_ID_STRINGS LIMIT_COUNT 4 REGEX "INFO:")
- SET(HAVE_COMPILER_TWICE 0)
- FOREACH(info ${CMAKE_${lang}_COMPILER_ID_STRINGS})
- IF("${info}" MATCHES ".*INFO:compiler\\[([^]\"]*)\\].*")
- IF(COMPILER_ID)
- SET(COMPILER_ID_TWICE 1)
- ENDIF(COMPILER_ID)
- STRING(REGEX REPLACE ".*INFO:compiler\\[([^]]*)\\].*" "\\1"
+ set(HAVE_COMPILER_TWICE 0)
+ foreach(info ${CMAKE_${lang}_COMPILER_ID_STRINGS})
+ if("${info}" MATCHES ".*INFO:compiler\\[([^]\"]*)\\].*")
+ if(COMPILER_ID)
+ set(COMPILER_ID_TWICE 1)
+ endif(COMPILER_ID)
+ string(REGEX REPLACE ".*INFO:compiler\\[([^]]*)\\].*" "\\1"
COMPILER_ID "${info}")
- ENDIF("${info}" MATCHES ".*INFO:compiler\\[([^]\"]*)\\].*")
- IF("${info}" MATCHES ".*INFO:platform\\[([^]\"]*)\\].*")
- STRING(REGEX REPLACE ".*INFO:platform\\[([^]]*)\\].*" "\\1"
+ endif("${info}" MATCHES ".*INFO:compiler\\[([^]\"]*)\\].*")
+ if("${info}" MATCHES ".*INFO:platform\\[([^]\"]*)\\].*")
+ string(REGEX REPLACE ".*INFO:platform\\[([^]]*)\\].*" "\\1"
PLATFORM_ID "${info}")
- ENDIF("${info}" MATCHES ".*INFO:platform\\[([^]\"]*)\\].*")
- IF("${info}" MATCHES ".*INFO:arch\\[([^]\"]*)\\].*")
- STRING(REGEX REPLACE ".*INFO:arch\\[([^]]*)\\].*" "\\1"
+ endif("${info}" MATCHES ".*INFO:platform\\[([^]\"]*)\\].*")
+ if("${info}" MATCHES ".*INFO:arch\\[([^]\"]*)\\].*")
+ string(REGEX REPLACE ".*INFO:arch\\[([^]]*)\\].*" "\\1"
ARCHITECTURE_ID "${info}")
- ENDIF("${info}" MATCHES ".*INFO:arch\\[([^]\"]*)\\].*")
- IF("${info}" MATCHES ".*INFO:compiler_version\\[([^]\"]*)\\].*")
- STRING(REGEX REPLACE ".*INFO:compiler_version\\[([^]]*)\\].*" "\\1" COMPILER_VERSION "${info}")
- STRING(REGEX REPLACE "^0+([0-9])" "\\1" COMPILER_VERSION "${COMPILER_VERSION}")
- STRING(REGEX REPLACE "\\.0+([0-9])" ".\\1" COMPILER_VERSION "${COMPILER_VERSION}")
- ENDIF("${info}" MATCHES ".*INFO:compiler_version\\[([^]\"]*)\\].*")
- ENDFOREACH(info)
+ endif("${info}" MATCHES ".*INFO:arch\\[([^]\"]*)\\].*")
+ if("${info}" MATCHES ".*INFO:compiler_version\\[([^]\"]*)\\].*")
+ string(REGEX REPLACE ".*INFO:compiler_version\\[([^]]*)\\].*" "\\1" COMPILER_VERSION "${info}")
+ string(REGEX REPLACE "^0+([0-9])" "\\1" COMPILER_VERSION "${COMPILER_VERSION}")
+ string(REGEX REPLACE "\\.0+([0-9])" ".\\1" COMPILER_VERSION "${COMPILER_VERSION}")
+ endif("${info}" MATCHES ".*INFO:compiler_version\\[([^]\"]*)\\].*")
+ endforeach(info)
# Check if a valid compiler and platform were found.
- IF(COMPILER_ID AND NOT COMPILER_ID_TWICE)
- SET(CMAKE_${lang}_COMPILER_ID "${COMPILER_ID}")
- SET(CMAKE_${lang}_PLATFORM_ID "${PLATFORM_ID}")
- SET(MSVC_${lang}_ARCHITECTURE_ID "${ARCHITECTURE_ID}")
- SET(CMAKE_${lang}_COMPILER_VERSION "${COMPILER_VERSION}")
- ENDIF(COMPILER_ID AND NOT COMPILER_ID_TWICE)
+ if(COMPILER_ID AND NOT COMPILER_ID_TWICE)
+ set(CMAKE_${lang}_COMPILER_ID "${COMPILER_ID}")
+ set(CMAKE_${lang}_PLATFORM_ID "${PLATFORM_ID}")
+ set(MSVC_${lang}_ARCHITECTURE_ID "${ARCHITECTURE_ID}")
+ set(CMAKE_${lang}_COMPILER_VERSION "${COMPILER_VERSION}")
+ endif(COMPILER_ID AND NOT COMPILER_ID_TWICE)
# Check the compiler identification string.
- IF(CMAKE_${lang}_COMPILER_ID)
+ if(CMAKE_${lang}_COMPILER_ID)
# The compiler identification was found.
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"The ${lang} compiler identification is ${CMAKE_${lang}_COMPILER_ID}, found in \""
"${file}\"\n\n")
- ELSE(CMAKE_${lang}_COMPILER_ID)
+ else(CMAKE_${lang}_COMPILER_ID)
# The compiler identification could not be found.
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"The ${lang} compiler identification could not be found in \""
"${file}\"\n\n")
- ENDIF(CMAKE_${lang}_COMPILER_ID)
- ENDIF(NOT CMAKE_${lang}_COMPILER_ID)
+ endif(CMAKE_${lang}_COMPILER_ID)
+ endif(NOT CMAKE_${lang}_COMPILER_ID)
# try to figure out the executable format: ELF, COFF, Mach-O
- IF(NOT CMAKE_EXECUTABLE_FORMAT)
- FILE(READ ${file} CMAKE_EXECUTABLE_MAGIC LIMIT 4 HEX)
+ if(NOT CMAKE_EXECUTABLE_FORMAT)
+ file(READ ${file} CMAKE_EXECUTABLE_MAGIC LIMIT 4 HEX)
# ELF files start with 0x7f"ELF"
- IF("${CMAKE_EXECUTABLE_MAGIC}" STREQUAL "7f454c46")
- SET(CMAKE_EXECUTABLE_FORMAT "ELF" CACHE INTERNAL "Executable file format")
- ENDIF("${CMAKE_EXECUTABLE_MAGIC}" STREQUAL "7f454c46")
+ if("${CMAKE_EXECUTABLE_MAGIC}" STREQUAL "7f454c46")
+ set(CMAKE_EXECUTABLE_FORMAT "ELF" CACHE INTERNAL "Executable file format")
+ endif("${CMAKE_EXECUTABLE_MAGIC}" STREQUAL "7f454c46")
# # COFF (.exe) files start with "MZ"
-# IF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "4d5a....")
-# SET(CMAKE_EXECUTABLE_FORMAT "COFF" CACHE STRING "Executable file format")
-# ENDIF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "4d5a....")
+# if("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "4d5a....")
+# set(CMAKE_EXECUTABLE_FORMAT "COFF" CACHE STRING "Executable file format")
+# endif("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "4d5a....")
#
# # Mach-O files start with CAFEBABE or FEEDFACE, according to http://radio.weblogs.com/0100490/2003/01/28.html
-# IF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "cafebabe")
-# SET(CMAKE_EXECUTABLE_FORMAT "MACHO" CACHE STRING "Executable file format")
-# ENDIF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "cafebabe")
-# IF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "feedface")
-# SET(CMAKE_EXECUTABLE_FORMAT "MACHO" CACHE STRING "Executable file format")
-# ENDIF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "feedface")
-
- ENDIF(NOT CMAKE_EXECUTABLE_FORMAT)
- IF(NOT DEFINED CMAKE_EXECUTABLE_FORMAT)
- SET(CMAKE_EXECUTABLE_FORMAT)
- ENDIF()
+# if("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "cafebabe")
+# set(CMAKE_EXECUTABLE_FORMAT "MACHO" CACHE STRING "Executable file format")
+# endif("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "cafebabe")
+# if("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "feedface")
+# set(CMAKE_EXECUTABLE_FORMAT "MACHO" CACHE STRING "Executable file format")
+# endif("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "feedface")
+
+ endif(NOT CMAKE_EXECUTABLE_FORMAT)
+ if(NOT DEFINED CMAKE_EXECUTABLE_FORMAT)
+ set(CMAKE_EXECUTABLE_FORMAT)
+ endif()
# Return the information extracted.
- SET(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
- SET(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE)
- SET(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}"
+ set(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
+ set(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE)
+ set(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}"
PARENT_SCOPE)
- SET(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE)
- SET(CMAKE_EXECUTABLE_FORMAT "${CMAKE_EXECUTABLE_FORMAT}" PARENT_SCOPE)
-ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang)
+ set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE)
+ set(CMAKE_EXECUTABLE_FORMAT "${CMAKE_EXECUTABLE_FORMAT}" PARENT_SCOPE)
+endfunction(CMAKE_DETERMINE_COMPILER_ID_CHECK lang)
#-----------------------------------------------------------------------------
# Function to query the compiler vendor.
@@ -276,22 +276,22 @@ ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang)
# set(CMAKE_${lang}_COMPILER_ID_VENDOR_REGEX_${vendor} "Some Vendor Output")
# We try running the compiler with the flag for each vendor and
# matching its regular expression in the output.
-FUNCTION(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang)
+function(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang)
- IF(NOT CMAKE_${lang}_COMPILER_ID_DIR)
+ if(NOT CMAKE_${lang}_COMPILER_ID_DIR)
# We get here when this function is called not from within CMAKE_DETERMINE_COMPILER_ID()
# This is done e.g. for detecting the compiler ID for assemblers.
# Compute the directory in which to run the test and Create a clean working directory.
- SET(CMAKE_${lang}_COMPILER_ID_DIR ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CompilerId${lang})
- FILE(REMOVE_RECURSE ${CMAKE_${lang}_COMPILER_ID_DIR})
- FILE(MAKE_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR})
- ENDIF(NOT CMAKE_${lang}_COMPILER_ID_DIR)
+ set(CMAKE_${lang}_COMPILER_ID_DIR ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CompilerId${lang})
+ file(REMOVE_RECURSE ${CMAKE_${lang}_COMPILER_ID_DIR})
+ file(MAKE_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR})
+ endif(NOT CMAKE_${lang}_COMPILER_ID_DIR)
- FOREACH(vendor ${CMAKE_${lang}_COMPILER_ID_VENDORS})
- SET(flags ${CMAKE_${lang}_COMPILER_ID_VENDOR_FLAGS_${vendor}})
- SET(regex ${CMAKE_${lang}_COMPILER_ID_VENDOR_REGEX_${vendor}})
- EXECUTE_PROCESS(
+ foreach(vendor ${CMAKE_${lang}_COMPILER_ID_VENDORS})
+ set(flags ${CMAKE_${lang}_COMPILER_ID_VENDOR_FLAGS_${vendor}})
+ set(regex ${CMAKE_${lang}_COMPILER_ID_VENDOR_REGEX_${vendor}})
+ execute_process(
COMMAND ${CMAKE_${lang}_COMPILER}
${CMAKE_${lang}_COMPILER_ID_ARG1}
${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST}
@@ -302,22 +302,22 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang)
TIMEOUT 10
)
- IF("${output}" MATCHES "${regex}")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ if("${output}" MATCHES "${regex}")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Checking whether the ${lang} compiler is ${vendor} using \"${flags}\" "
"matched \"${regex}\":\n${output}")
- SET(CMAKE_${lang}_COMPILER_ID "${vendor}" PARENT_SCOPE)
- BREAK()
- ELSE()
- IF("${result}" MATCHES "timeout")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ set(CMAKE_${lang}_COMPILER_ID "${vendor}" PARENT_SCOPE)
+ break()
+ else()
+ if("${result}" MATCHES "timeout")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Checking whether the ${lang} compiler is ${vendor} using \"${flags}\" "
"terminated after 10 s due to timeout.")
- ELSE()
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ else()
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Checking whether the ${lang} compiler is ${vendor} using \"${flags}\" "
"did not match \"${regex}\":\n${output}")
- ENDIF()
- ENDIF()
- ENDFOREACH()
-ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_VENDOR)
+ endif()
+ endif()
+ endforeach()
+endfunction(CMAKE_DETERMINE_COMPILER_ID_VENDOR)
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index 766289ec3e..c8e561256a 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -19,34 +19,34 @@
# the cmake variable CMAKE_GENERATOR_FC which can be defined by a generator
# as a default compiler
-INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake)
-INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-Fortran OPTIONAL)
-IF(NOT CMAKE_Fortran_COMPILER_NAMES)
- SET(CMAKE_Fortran_COMPILER_NAMES f95)
-ENDIF()
+include(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake)
+include(Platform/${CMAKE_SYSTEM_NAME}-Fortran OPTIONAL)
+if(NOT CMAKE_Fortran_COMPILER_NAMES)
+ set(CMAKE_Fortran_COMPILER_NAMES f95)
+endif()
-IF(NOT CMAKE_Fortran_COMPILER)
+if(NOT CMAKE_Fortran_COMPILER)
# prefer the environment variable CC
- IF($ENV{FC} MATCHES ".+")
- GET_FILENAME_COMPONENT(CMAKE_Fortran_COMPILER_INIT $ENV{FC} PROGRAM PROGRAM_ARGS CMAKE_Fortran_FLAGS_ENV_INIT)
- IF(CMAKE_Fortran_FLAGS_ENV_INIT)
- SET(CMAKE_Fortran_COMPILER_ARG1 "${CMAKE_Fortran_FLAGS_ENV_INIT}" CACHE STRING "First argument to Fortran compiler")
- ENDIF(CMAKE_Fortran_FLAGS_ENV_INIT)
- IF(EXISTS ${CMAKE_Fortran_COMPILER_INIT})
- ELSE(EXISTS ${CMAKE_Fortran_COMPILER_INIT})
- MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable FC:\n$ENV{FC}.")
- ENDIF(EXISTS ${CMAKE_Fortran_COMPILER_INIT})
- ENDIF($ENV{FC} MATCHES ".+")
+ if($ENV{FC} MATCHES ".+")
+ get_filename_component(CMAKE_Fortran_COMPILER_INIT $ENV{FC} PROGRAM PROGRAM_ARGS CMAKE_Fortran_FLAGS_ENV_INIT)
+ if(CMAKE_Fortran_FLAGS_ENV_INIT)
+ set(CMAKE_Fortran_COMPILER_ARG1 "${CMAKE_Fortran_FLAGS_ENV_INIT}" CACHE STRING "First argument to Fortran compiler")
+ endif(CMAKE_Fortran_FLAGS_ENV_INIT)
+ if(EXISTS ${CMAKE_Fortran_COMPILER_INIT})
+ else(EXISTS ${CMAKE_Fortran_COMPILER_INIT})
+ message(FATAL_ERROR "Could not find compiler set in environment variable FC:\n$ENV{FC}.")
+ endif(EXISTS ${CMAKE_Fortran_COMPILER_INIT})
+ endif($ENV{FC} MATCHES ".+")
# next try prefer the compiler specified by the generator
- IF(CMAKE_GENERATOR_FC)
- IF(NOT CMAKE_Fortran_COMPILER_INIT)
- SET(CMAKE_Fortran_COMPILER_INIT ${CMAKE_GENERATOR_FC})
- ENDIF(NOT CMAKE_Fortran_COMPILER_INIT)
- ENDIF(CMAKE_GENERATOR_FC)
+ if(CMAKE_GENERATOR_FC)
+ if(NOT CMAKE_Fortran_COMPILER_INIT)
+ set(CMAKE_Fortran_COMPILER_INIT ${CMAKE_GENERATOR_FC})
+ endif(NOT CMAKE_Fortran_COMPILER_INIT)
+ endif(CMAKE_GENERATOR_FC)
# finally list compilers to try
- IF(NOT CMAKE_Fortran_COMPILER_INIT)
+ if(NOT CMAKE_Fortran_COMPILER_INIT)
# Known compilers:
# f77/f90/f95: generic compiler names
# g77: GNU Fortran 77 compiler
@@ -67,68 +67,68 @@ IF(NOT CMAKE_Fortran_COMPILER)
# The order is 95 or newer compilers first, then 90,
# then 77 or older compilers, gnu is always last in the group,
# so if you paid for a compiler it is picked by default.
- SET(CMAKE_Fortran_COMPILER_LIST
+ set(CMAKE_Fortran_COMPILER_LIST
ifort ifc af95 af90 efc f95 pathf2003 pathf95 pgf95 pgfortran lf95 xlf95
fort gfortran gfortran-4 g95 f90 pathf90 pgf90 xlf90 epcf90 fort77
frt pgf77 xlf fl32 af77 g77 f77
)
# Vendor-specific compiler names.
- SET(_Fortran_COMPILER_NAMES_GNU gfortran gfortran-4 g95 g77)
- SET(_Fortran_COMPILER_NAMES_Intel ifort ifc efc)
- SET(_Fortran_COMPILER_NAMES_Absoft af95 af90 af77)
- SET(_Fortran_COMPILER_NAMES_PGI pgf95 pgfortran pgf90 pgf77)
- SET(_Fortran_COMPILER_NAMES_PathScale pathf2003 pathf95 pathf90)
- SET(_Fortran_COMPILER_NAMES_XL xlf)
- SET(_Fortran_COMPILER_NAMES_VisualAge xlf95 xlf90 xlf)
- ENDIF()
+ set(_Fortran_COMPILER_NAMES_GNU gfortran gfortran-4 g95 g77)
+ set(_Fortran_COMPILER_NAMES_Intel ifort ifc efc)
+ set(_Fortran_COMPILER_NAMES_Absoft af95 af90 af77)
+ set(_Fortran_COMPILER_NAMES_PGI pgf95 pgfortran pgf90 pgf77)
+ set(_Fortran_COMPILER_NAMES_PathScale pathf2003 pathf95 pathf90)
+ set(_Fortran_COMPILER_NAMES_XL xlf)
+ set(_Fortran_COMPILER_NAMES_VisualAge xlf95 xlf90 xlf)
+ endif()
_cmake_find_compiler(Fortran)
-ELSE(NOT CMAKE_Fortran_COMPILER)
+else(NOT CMAKE_Fortran_COMPILER)
# we only get here if CMAKE_Fortran_COMPILER was specified using -D or a pre-made CMakeCache.txt
# (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
# if CMAKE_Fortran_COMPILER is a list of length 2, use the first item as
# CMAKE_Fortran_COMPILER and the 2nd one as CMAKE_Fortran_COMPILER_ARG1
- LIST(LENGTH CMAKE_Fortran_COMPILER _CMAKE_Fortran_COMPILER_LIST_LENGTH)
- IF("${_CMAKE_Fortran_COMPILER_LIST_LENGTH}" EQUAL 2)
- LIST(GET CMAKE_Fortran_COMPILER 1 CMAKE_Fortran_COMPILER_ARG1)
- LIST(GET CMAKE_Fortran_COMPILER 0 CMAKE_Fortran_COMPILER)
- ENDIF("${_CMAKE_Fortran_COMPILER_LIST_LENGTH}" EQUAL 2)
+ list(LENGTH CMAKE_Fortran_COMPILER _CMAKE_Fortran_COMPILER_LIST_LENGTH)
+ if("${_CMAKE_Fortran_COMPILER_LIST_LENGTH}" EQUAL 2)
+ list(GET CMAKE_Fortran_COMPILER 1 CMAKE_Fortran_COMPILER_ARG1)
+ list(GET CMAKE_Fortran_COMPILER 0 CMAKE_Fortran_COMPILER)
+ endif("${_CMAKE_Fortran_COMPILER_LIST_LENGTH}" EQUAL 2)
# if a compiler was specified by the user but without path,
# now try to find it with the full path
# if it is found, force it into the cache,
# if not, don't overwrite the setting (which was given by the user) with "NOTFOUND"
# if the C compiler already had a path, reuse it for searching the CXX compiler
- GET_FILENAME_COMPONENT(_CMAKE_USER_Fortran_COMPILER_PATH "${CMAKE_Fortran_COMPILER}" PATH)
- IF(NOT _CMAKE_USER_Fortran_COMPILER_PATH)
- FIND_PROGRAM(CMAKE_Fortran_COMPILER_WITH_PATH NAMES ${CMAKE_Fortran_COMPILER})
- MARK_AS_ADVANCED(CMAKE_Fortran_COMPILER_WITH_PATH)
- IF(CMAKE_Fortran_COMPILER_WITH_PATH)
- SET(CMAKE_Fortran_COMPILER ${CMAKE_Fortran_COMPILER_WITH_PATH}
+ get_filename_component(_CMAKE_USER_Fortran_COMPILER_PATH "${CMAKE_Fortran_COMPILER}" PATH)
+ if(NOT _CMAKE_USER_Fortran_COMPILER_PATH)
+ find_program(CMAKE_Fortran_COMPILER_WITH_PATH NAMES ${CMAKE_Fortran_COMPILER})
+ mark_as_advanced(CMAKE_Fortran_COMPILER_WITH_PATH)
+ if(CMAKE_Fortran_COMPILER_WITH_PATH)
+ set(CMAKE_Fortran_COMPILER ${CMAKE_Fortran_COMPILER_WITH_PATH}
CACHE STRING "Fortran compiler" FORCE)
- ENDIF(CMAKE_Fortran_COMPILER_WITH_PATH)
- ENDIF(NOT _CMAKE_USER_Fortran_COMPILER_PATH)
-ENDIF(NOT CMAKE_Fortran_COMPILER)
+ endif(CMAKE_Fortran_COMPILER_WITH_PATH)
+ endif(NOT _CMAKE_USER_Fortran_COMPILER_PATH)
+endif(NOT CMAKE_Fortran_COMPILER)
-MARK_AS_ADVANCED(CMAKE_Fortran_COMPILER)
+mark_as_advanced(CMAKE_Fortran_COMPILER)
# Build a small source file to identify the compiler.
-IF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
- SET(CMAKE_Fortran_COMPILER_ID_RUN 1)
- SET(CMAKE_Fortran_PLATFORM_ID "Windows")
- SET(CMAKE_Fortran_COMPILER_ID "Intel")
-ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
+if(${CMAKE_GENERATOR} MATCHES "Visual Studio")
+ set(CMAKE_Fortran_COMPILER_ID_RUN 1)
+ set(CMAKE_Fortran_PLATFORM_ID "Windows")
+ set(CMAKE_Fortran_COMPILER_ID "Intel")
+endif(${CMAKE_GENERATOR} MATCHES "Visual Studio")
-IF(NOT CMAKE_Fortran_COMPILER_ID_RUN)
- SET(CMAKE_Fortran_COMPILER_ID_RUN 1)
+if(NOT CMAKE_Fortran_COMPILER_ID_RUN)
+ set(CMAKE_Fortran_COMPILER_ID_RUN 1)
# Each entry in this list is a set of extra flags to try
# adding to the compile line to see if it helps produce
# a valid identification executable.
- SET(CMAKE_Fortran_COMPILER_ID_TEST_FLAGS
+ set(CMAKE_Fortran_COMPILER_ID_TEST_FLAGS
# Try compiling to an object file only.
"-c"
@@ -137,65 +137,65 @@ IF(NOT CMAKE_Fortran_COMPILER_ID_RUN)
)
# Table of per-vendor compiler id flags with expected output.
- LIST(APPEND CMAKE_Fortran_COMPILER_ID_VENDORS Compaq)
- SET(CMAKE_Fortran_COMPILER_ID_VENDOR_FLAGS_Compaq "-what")
- SET(CMAKE_Fortran_COMPILER_ID_VENDOR_REGEX_Compaq "Compaq Visual Fortran")
- LIST(APPEND CMAKE_Fortran_COMPILER_ID_VENDORS NAG) # Numerical Algorithms Group
- SET(CMAKE_Fortran_COMPILER_ID_VENDOR_FLAGS_NAG "-V")
- SET(CMAKE_Fortran_COMPILER_ID_VENDOR_REGEX_NAG "NAG Fortran Compiler")
+ list(APPEND CMAKE_Fortran_COMPILER_ID_VENDORS Compaq)
+ set(CMAKE_Fortran_COMPILER_ID_VENDOR_FLAGS_Compaq "-what")
+ set(CMAKE_Fortran_COMPILER_ID_VENDOR_REGEX_Compaq "Compaq Visual Fortran")
+ list(APPEND CMAKE_Fortran_COMPILER_ID_VENDORS NAG) # Numerical Algorithms Group
+ set(CMAKE_Fortran_COMPILER_ID_VENDOR_FLAGS_NAG "-V")
+ set(CMAKE_Fortran_COMPILER_ID_VENDOR_REGEX_NAG "NAG Fortran Compiler")
# Try to identify the compiler.
- SET(CMAKE_Fortran_COMPILER_ID)
- INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
+ set(CMAKE_Fortran_COMPILER_ID)
+ include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
CMAKE_DETERMINE_COMPILER_ID(Fortran FFLAGS CMakeFortranCompilerId.F)
# Fall back to old is-GNU test.
- IF(NOT CMAKE_Fortran_COMPILER_ID)
- EXEC_PROGRAM(${CMAKE_Fortran_COMPILER}
+ if(NOT CMAKE_Fortran_COMPILER_ID)
+ exec_program(${CMAKE_Fortran_COMPILER}
ARGS ${CMAKE_Fortran_COMPILER_ID_FLAGS_LIST} -E "\"${CMAKE_ROOT}/Modules/CMakeTestGNU.c\""
OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RETURN_VALUE CMAKE_COMPILER_RETURN)
- IF(NOT CMAKE_COMPILER_RETURN)
- IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
- SET(CMAKE_Fortran_COMPILER_ID "GNU")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ if(NOT CMAKE_COMPILER_RETURN)
+ if("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
+ set(CMAKE_Fortran_COMPILER_ID "GNU")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran compiler is GNU succeeded with "
"the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
- ELSE("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ else("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran compiler is GNU failed with "
"the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
- ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
- IF(NOT CMAKE_Fortran_PLATFORM_ID)
- IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_MINGW.*" )
- SET(CMAKE_Fortran_PLATFORM_ID "MinGW")
- ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_MINGW.*" )
- IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_CYGWIN.*" )
- SET(CMAKE_Fortran_PLATFORM_ID "Cygwin")
- ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_CYGWIN.*" )
- ENDIF(NOT CMAKE_Fortran_PLATFORM_ID)
- ENDIF(NOT CMAKE_COMPILER_RETURN)
- ENDIF(NOT CMAKE_Fortran_COMPILER_ID)
+ endif("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
+ if(NOT CMAKE_Fortran_PLATFORM_ID)
+ if("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_MINGW.*" )
+ set(CMAKE_Fortran_PLATFORM_ID "MinGW")
+ endif("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_MINGW.*" )
+ if("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_CYGWIN.*" )
+ set(CMAKE_Fortran_PLATFORM_ID "Cygwin")
+ endif("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_CYGWIN.*" )
+ endif(NOT CMAKE_Fortran_PLATFORM_ID)
+ endif(NOT CMAKE_COMPILER_RETURN)
+ endif(NOT CMAKE_Fortran_COMPILER_ID)
# Set old compiler and platform id variables.
- IF("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
- SET(CMAKE_COMPILER_IS_GNUG77 1)
- ENDIF("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
- IF("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "MinGW")
- SET(CMAKE_COMPILER_IS_MINGW 1)
- ELSEIF("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "Cygwin")
- SET(CMAKE_COMPILER_IS_CYGWIN 1)
- ENDIF("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "MinGW")
-ENDIF(NOT CMAKE_Fortran_COMPILER_ID_RUN)
-
-INCLUDE(CMakeFindBinUtils)
-
-IF(MSVC_Fortran_ARCHITECTURE_ID)
- SET(SET_MSVC_Fortran_ARCHITECTURE_ID
- "SET(MSVC_Fortran_ARCHITECTURE_ID ${MSVC_Fortran_ARCHITECTURE_ID})")
-ENDIF()
+ if("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
+ set(CMAKE_COMPILER_IS_GNUG77 1)
+ endif("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
+ if("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "MinGW")
+ set(CMAKE_COMPILER_IS_MINGW 1)
+ elseif("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "Cygwin")
+ set(CMAKE_COMPILER_IS_CYGWIN 1)
+ endif("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "MinGW")
+endif(NOT CMAKE_Fortran_COMPILER_ID_RUN)
+
+include(CMakeFindBinUtils)
+
+if(MSVC_Fortran_ARCHITECTURE_ID)
+ set(SET_MSVC_Fortran_ARCHITECTURE_ID
+ "set(MSVC_Fortran_ARCHITECTURE_ID ${MSVC_Fortran_ARCHITECTURE_ID})")
+endif()
# configure variables set in this file for fast reload later on
-CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeFortranCompiler.cmake.in
+configure_file(${CMAKE_ROOT}/Modules/CMakeFortranCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeFortranCompiler.cmake
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
-SET(CMAKE_Fortran_COMPILER_ENV_VAR "FC")
+set(CMAKE_Fortran_COMPILER_ENV_VAR "FC")
diff --git a/Modules/CMakeDetermineJavaCompiler.cmake b/Modules/CMakeDetermineJavaCompiler.cmake
index e899a1e603..f35b9ff5e5 100644
--- a/Modules/CMakeDetermineJavaCompiler.cmake
+++ b/Modules/CMakeDetermineJavaCompiler.cmake
@@ -16,33 +16,33 @@
# NOTE, a generator may set CMAKE_Java_COMPILER before
# loading this file to force a compiler.
-IF(NOT CMAKE_Java_COMPILER)
+if(NOT CMAKE_Java_COMPILER)
# prefer the environment variable CC
- IF($ENV{JAVA_COMPILER} MATCHES ".+")
- GET_FILENAME_COMPONENT(CMAKE_Java_COMPILER_INIT $ENV{JAVA_COMPILER} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT)
- IF(CMAKE_Java_FLAGS_ENV_INIT)
- SET(CMAKE_Java_COMPILER_ARG1 "${CMAKE_Java_FLAGS_ENV_INIT}" CACHE STRING "First argument to Java compiler")
- ENDIF(CMAKE_Java_FLAGS_ENV_INIT)
- IF(NOT EXISTS ${CMAKE_Java_COMPILER_INIT})
- MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_COMPILER:\n$ENV{JAVA_COMPILER}.")
- ENDIF(NOT EXISTS ${CMAKE_Java_COMPILER_INIT})
- ENDIF($ENV{JAVA_COMPILER} MATCHES ".+")
+ if($ENV{JAVA_COMPILER} MATCHES ".+")
+ get_filename_component(CMAKE_Java_COMPILER_INIT $ENV{JAVA_COMPILER} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT)
+ if(CMAKE_Java_FLAGS_ENV_INIT)
+ set(CMAKE_Java_COMPILER_ARG1 "${CMAKE_Java_FLAGS_ENV_INIT}" CACHE STRING "First argument to Java compiler")
+ endif(CMAKE_Java_FLAGS_ENV_INIT)
+ if(NOT EXISTS ${CMAKE_Java_COMPILER_INIT})
+ message(SEND_ERROR "Could not find compiler set in environment variable JAVA_COMPILER:\n$ENV{JAVA_COMPILER}.")
+ endif(NOT EXISTS ${CMAKE_Java_COMPILER_INIT})
+ endif($ENV{JAVA_COMPILER} MATCHES ".+")
- IF($ENV{JAVA_RUNTIME} MATCHES ".+")
- GET_FILENAME_COMPONENT(CMAKE_Java_RUNTIME_INIT $ENV{JAVA_RUNTIME} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT)
- IF(NOT EXISTS ${CMAKE_Java_RUNTIME_INIT})
- MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_RUNTIME:\n$ENV{JAVA_RUNTIME}.")
- ENDIF(NOT EXISTS ${CMAKE_Java_RUNTIME_INIT})
- ENDIF($ENV{JAVA_RUNTIME} MATCHES ".+")
+ if($ENV{JAVA_RUNTIME} MATCHES ".+")
+ get_filename_component(CMAKE_Java_RUNTIME_INIT $ENV{JAVA_RUNTIME} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT)
+ if(NOT EXISTS ${CMAKE_Java_RUNTIME_INIT})
+ message(SEND_ERROR "Could not find compiler set in environment variable JAVA_RUNTIME:\n$ENV{JAVA_RUNTIME}.")
+ endif(NOT EXISTS ${CMAKE_Java_RUNTIME_INIT})
+ endif($ENV{JAVA_RUNTIME} MATCHES ".+")
- IF($ENV{JAVA_ARCHIVE} MATCHES ".+")
- GET_FILENAME_COMPONENT(CMAKE_Java_ARCHIVE_INIT $ENV{JAVA_ARCHIVE} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT)
- IF(NOT EXISTS ${CMAKE_Java_ARCHIVE_INIT})
- MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_ARCHIVE:\n$ENV{JAVA_ARCHIVE}.")
- ENDIF(NOT EXISTS ${CMAKE_Java_ARCHIVE_INIT})
- ENDIF($ENV{JAVA_ARCHIVE} MATCHES ".+")
+ if($ENV{JAVA_ARCHIVE} MATCHES ".+")
+ get_filename_component(CMAKE_Java_ARCHIVE_INIT $ENV{JAVA_ARCHIVE} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT)
+ if(NOT EXISTS ${CMAKE_Java_ARCHIVE_INIT})
+ message(SEND_ERROR "Could not find compiler set in environment variable JAVA_ARCHIVE:\n$ENV{JAVA_ARCHIVE}.")
+ endif(NOT EXISTS ${CMAKE_Java_ARCHIVE_INIT})
+ endif($ENV{JAVA_ARCHIVE} MATCHES ".+")
- SET(Java_BIN_PATH
+ set(Java_BIN_PATH
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\2.0;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.9;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.8;JavaHome]/bin"
@@ -65,38 +65,38 @@ IF(NOT CMAKE_Java_COMPILER)
/opt/sun-jdk-1.5.0.04/bin
)
# if no compiler has been specified yet, then look for one
- IF(CMAKE_Java_COMPILER_INIT)
- SET(CMAKE_Java_COMPILER ${CMAKE_Java_COMPILER_INIT} CACHE PATH "Java Compiler")
- ELSE(CMAKE_Java_COMPILER_INIT)
- FIND_PROGRAM(CMAKE_Java_COMPILER
+ if(CMAKE_Java_COMPILER_INIT)
+ set(CMAKE_Java_COMPILER ${CMAKE_Java_COMPILER_INIT} CACHE PATH "Java Compiler")
+ else(CMAKE_Java_COMPILER_INIT)
+ find_program(CMAKE_Java_COMPILER
NAMES javac
PATHS ${Java_BIN_PATH}
)
- ENDIF(CMAKE_Java_COMPILER_INIT)
+ endif(CMAKE_Java_COMPILER_INIT)
# if no runtime has been specified yet, then look for one
- IF(CMAKE_Java_RUNTIME_INIT)
- SET(CMAKE_Java_RUNTIME ${CMAKE_Java_RUNTIME_INIT} CACHE PATH "Java Compiler")
- ELSE(CMAKE_Java_RUNTIME_INIT)
- FIND_PROGRAM(CMAKE_Java_RUNTIME
+ if(CMAKE_Java_RUNTIME_INIT)
+ set(CMAKE_Java_RUNTIME ${CMAKE_Java_RUNTIME_INIT} CACHE PATH "Java Compiler")
+ else(CMAKE_Java_RUNTIME_INIT)
+ find_program(CMAKE_Java_RUNTIME
NAMES java
PATHS ${Java_BIN_PATH}
)
- ENDIF(CMAKE_Java_RUNTIME_INIT)
+ endif(CMAKE_Java_RUNTIME_INIT)
# if no archive has been specified yet, then look for one
- IF(CMAKE_Java_ARCHIVE_INIT)
- SET(CMAKE_Java_ARCHIVE ${CMAKE_Java_ARCHIVE_INIT} CACHE PATH "Java Compiler")
- ELSE(CMAKE_Java_ARCHIVE_INIT)
- FIND_PROGRAM(CMAKE_Java_ARCHIVE
+ if(CMAKE_Java_ARCHIVE_INIT)
+ set(CMAKE_Java_ARCHIVE ${CMAKE_Java_ARCHIVE_INIT} CACHE PATH "Java Compiler")
+ else(CMAKE_Java_ARCHIVE_INIT)
+ find_program(CMAKE_Java_ARCHIVE
NAMES jar
PATHS ${Java_BIN_PATH}
)
- ENDIF(CMAKE_Java_ARCHIVE_INIT)
-ENDIF(NOT CMAKE_Java_COMPILER)
-MARK_AS_ADVANCED(CMAKE_Java_COMPILER)
+ endif(CMAKE_Java_ARCHIVE_INIT)
+endif(NOT CMAKE_Java_COMPILER)
+mark_as_advanced(CMAKE_Java_COMPILER)
# configure variables set in this file for fast reload later on
-CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeJavaCompiler.cmake.in
+configure_file(${CMAKE_ROOT}/Modules/CMakeJavaCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeJavaCompiler.cmake IMMEDIATE @ONLY)
-SET(CMAKE_Java_COMPILER_ENV_VAR "JAVA_COMPILER")
+set(CMAKE_Java_COMPILER_ENV_VAR "JAVA_COMPILER")
diff --git a/Modules/CMakeDetermineRCCompiler.cmake b/Modules/CMakeDetermineRCCompiler.cmake
index 4662e3ad21..41a7af5f48 100644
--- a/Modules/CMakeDetermineRCCompiler.cmake
+++ b/Modules/CMakeDetermineRCCompiler.cmake
@@ -18,50 +18,50 @@
# use environment variable CCC first if defined by user, next use
# the cmake variable CMAKE_GENERATOR_CC which can be defined by a generator
# as a default compiler
-IF(NOT CMAKE_RC_COMPILER)
+if(NOT CMAKE_RC_COMPILER)
# prefer the environment variable CC
- IF($ENV{RC} MATCHES ".+")
- GET_FILENAME_COMPONENT(CMAKE_RC_COMPILER_INIT $ENV{RC} PROGRAM PROGRAM_ARGS CMAKE_RC_FLAGS_ENV_INIT)
- IF(CMAKE_RC_FLAGS_ENV_INIT)
- SET(CMAKE_RC_COMPILER_ARG1 "${CMAKE_RC_FLAGS_ENV_INIT}" CACHE STRING "First argument to RC compiler")
- ENDIF(CMAKE_RC_FLAGS_ENV_INIT)
- IF(EXISTS ${CMAKE_RC_COMPILER_INIT})
- ELSE(EXISTS ${CMAKE_RC_COMPILER_INIT})
- MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable RC:\n$ENV{RC}.")
- ENDIF(EXISTS ${CMAKE_RC_COMPILER_INIT})
- ENDIF($ENV{RC} MATCHES ".+")
+ if($ENV{RC} MATCHES ".+")
+ get_filename_component(CMAKE_RC_COMPILER_INIT $ENV{RC} PROGRAM PROGRAM_ARGS CMAKE_RC_FLAGS_ENV_INIT)
+ if(CMAKE_RC_FLAGS_ENV_INIT)
+ set(CMAKE_RC_COMPILER_ARG1 "${CMAKE_RC_FLAGS_ENV_INIT}" CACHE STRING "First argument to RC compiler")
+ endif(CMAKE_RC_FLAGS_ENV_INIT)
+ if(EXISTS ${CMAKE_RC_COMPILER_INIT})
+ else(EXISTS ${CMAKE_RC_COMPILER_INIT})
+ message(FATAL_ERROR "Could not find compiler set in environment variable RC:\n$ENV{RC}.")
+ endif(EXISTS ${CMAKE_RC_COMPILER_INIT})
+ endif($ENV{RC} MATCHES ".+")
# next try prefer the compiler specified by the generator
- IF(CMAKE_GENERATOR_RC)
- IF(NOT CMAKE_RC_COMPILER_INIT)
- SET(CMAKE_RC_COMPILER_INIT ${CMAKE_GENERATOR_RC})
- ENDIF(NOT CMAKE_RC_COMPILER_INIT)
- ENDIF(CMAKE_GENERATOR_RC)
+ if(CMAKE_GENERATOR_RC)
+ if(NOT CMAKE_RC_COMPILER_INIT)
+ set(CMAKE_RC_COMPILER_INIT ${CMAKE_GENERATOR_RC})
+ endif(NOT CMAKE_RC_COMPILER_INIT)
+ endif(CMAKE_GENERATOR_RC)
# finally list compilers to try
- IF(CMAKE_RC_COMPILER_INIT)
- SET(CMAKE_RC_COMPILER_LIST ${CMAKE_RC_COMPILER_INIT})
- ELSE(CMAKE_RC_COMPILER_INIT)
- SET(CMAKE_RC_COMPILER_LIST rc)
- ENDIF(CMAKE_RC_COMPILER_INIT)
+ if(CMAKE_RC_COMPILER_INIT)
+ set(CMAKE_RC_COMPILER_LIST ${CMAKE_RC_COMPILER_INIT})
+ else(CMAKE_RC_COMPILER_INIT)
+ set(CMAKE_RC_COMPILER_LIST rc)
+ endif(CMAKE_RC_COMPILER_INIT)
# Find the compiler.
- FIND_PROGRAM(CMAKE_RC_COMPILER NAMES ${CMAKE_RC_COMPILER_LIST} DOC "RC compiler")
- IF(CMAKE_RC_COMPILER_INIT AND NOT CMAKE_RC_COMPILER)
- SET(CMAKE_RC_COMPILER "${CMAKE_RC_COMPILER_INIT}" CACHE FILEPATH "RC compiler" FORCE)
- ENDIF(CMAKE_RC_COMPILER_INIT AND NOT CMAKE_RC_COMPILER)
-ENDIF(NOT CMAKE_RC_COMPILER)
+ find_program(CMAKE_RC_COMPILER NAMES ${CMAKE_RC_COMPILER_LIST} DOC "RC compiler")
+ if(CMAKE_RC_COMPILER_INIT AND NOT CMAKE_RC_COMPILER)
+ set(CMAKE_RC_COMPILER "${CMAKE_RC_COMPILER_INIT}" CACHE FILEPATH "RC compiler" FORCE)
+ endif(CMAKE_RC_COMPILER_INIT AND NOT CMAKE_RC_COMPILER)
+endif(NOT CMAKE_RC_COMPILER)
-MARK_AS_ADVANCED(CMAKE_RC_COMPILER)
+mark_as_advanced(CMAKE_RC_COMPILER)
-GET_FILENAME_COMPONENT(_CMAKE_RC_COMPILER_NAME_WE ${CMAKE_RC_COMPILER} NAME_WE)
-IF(_CMAKE_RC_COMPILER_NAME_WE STREQUAL "windres")
- SET(CMAKE_RC_OUTPUT_EXTENSION .obj)
-ELSE()
- SET(CMAKE_RC_OUTPUT_EXTENSION .res)
-ENDIF()
+get_filename_component(_CMAKE_RC_COMPILER_NAME_WE ${CMAKE_RC_COMPILER} NAME_WE)
+if(_CMAKE_RC_COMPILER_NAME_WE STREQUAL "windres")
+ set(CMAKE_RC_OUTPUT_EXTENSION .obj)
+else()
+ set(CMAKE_RC_OUTPUT_EXTENSION .res)
+endif()
# configure variables set in this file for fast reload later on
-CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeRCCompiler.cmake.in
+configure_file(${CMAKE_ROOT}/Modules/CMakeRCCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeRCCompiler.cmake IMMEDIATE)
-SET(CMAKE_RC_COMPILER_ENV_VAR "RC")
+set(CMAKE_RC_COMPILER_ENV_VAR "RC")
diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake
index c89ccd17d1..a72bd5f965 100644
--- a/Modules/CMakeDetermineSystem.cmake
+++ b/Modules/CMakeDetermineSystem.cmake
@@ -42,135 +42,135 @@
# find out on which system cmake runs
-IF(CMAKE_HOST_UNIX)
- FIND_PROGRAM(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin )
- IF(CMAKE_UNAME)
- EXEC_PROGRAM(uname ARGS -s OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_NAME)
- EXEC_PROGRAM(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
- IF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*")
- EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
+if(CMAKE_HOST_UNIX)
+ find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin )
+ if(CMAKE_UNAME)
+ exec_program(uname ARGS -s OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_NAME)
+ exec_program(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
+ if(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*")
+ exec_program(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
RETURN_VALUE val)
- ELSEIF(CMAKE_HOST_SYSTEM_NAME MATCHES "OpenBSD")
- EXEC_PROGRAM(arch ARGS -s OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
+ elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "OpenBSD")
+ exec_program(arch ARGS -s OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
RETURN_VALUE val)
- ELSE()
- EXEC_PROGRAM(uname ARGS -p OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
+ else()
+ exec_program(uname ARGS -p OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
RETURN_VALUE val)
- IF("${val}" GREATER 0)
- EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
+ if("${val}" GREATER 0)
+ exec_program(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
RETURN_VALUE val)
- ENDIF("${val}" GREATER 0)
- ENDIF()
+ endif("${val}" GREATER 0)
+ endif()
# check the return of the last uname -m or -p
- IF("${val}" GREATER 0)
- SET(CMAKE_HOST_SYSTEM_PROCESSOR "unknown")
- ENDIF("${val}" GREATER 0)
- SET(CMAKE_UNAME ${CMAKE_UNAME} CACHE INTERNAL "uname command")
+ if("${val}" GREATER 0)
+ set(CMAKE_HOST_SYSTEM_PROCESSOR "unknown")
+ endif("${val}" GREATER 0)
+ set(CMAKE_UNAME ${CMAKE_UNAME} CACHE INTERNAL "uname command")
# processor may have double quote in the name, and that needs to be removed
- STRING(REGEX REPLACE "\"" "" CMAKE_HOST_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}")
- STRING(REGEX REPLACE "/" "_" CMAKE_HOST_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}")
- ENDIF(CMAKE_UNAME)
-ELSE(CMAKE_HOST_UNIX)
- IF(CMAKE_HOST_WIN32)
- SET (CMAKE_HOST_SYSTEM_NAME "Windows")
- SET (CMAKE_HOST_SYSTEM_PROCESSOR "$ENV{PROCESSOR_ARCHITECTURE}")
- ENDIF(CMAKE_HOST_WIN32)
-ENDIF(CMAKE_HOST_UNIX)
+ string(REGEX REPLACE "\"" "" CMAKE_HOST_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}")
+ string(REGEX REPLACE "/" "_" CMAKE_HOST_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}")
+ endif(CMAKE_UNAME)
+else(CMAKE_HOST_UNIX)
+ if(CMAKE_HOST_WIN32)
+ set (CMAKE_HOST_SYSTEM_NAME "Windows")
+ set (CMAKE_HOST_SYSTEM_PROCESSOR "$ENV{PROCESSOR_ARCHITECTURE}")
+ endif(CMAKE_HOST_WIN32)
+endif(CMAKE_HOST_UNIX)
# if a toolchain file is used, the user wants to cross compile.
# in this case read the toolchain file and keep the CMAKE_HOST_SYSTEM_*
# variables around so they can be used in CMakeLists.txt.
# In all other cases, the host and target platform are the same.
-IF(CMAKE_TOOLCHAIN_FILE)
+if(CMAKE_TOOLCHAIN_FILE)
# at first try to load it as path relative to the directory from which cmake has been run
- INCLUDE("${CMAKE_BINARY_DIR}/${CMAKE_TOOLCHAIN_FILE}" OPTIONAL RESULT_VARIABLE _INCLUDED_TOOLCHAIN_FILE)
- IF(NOT _INCLUDED_TOOLCHAIN_FILE)
+ include("${CMAKE_BINARY_DIR}/${CMAKE_TOOLCHAIN_FILE}" OPTIONAL RESULT_VARIABLE _INCLUDED_TOOLCHAIN_FILE)
+ if(NOT _INCLUDED_TOOLCHAIN_FILE)
# if the file isn't found there, check the default locations
- INCLUDE("${CMAKE_TOOLCHAIN_FILE}" OPTIONAL RESULT_VARIABLE _INCLUDED_TOOLCHAIN_FILE)
- ENDIF(NOT _INCLUDED_TOOLCHAIN_FILE)
+ include("${CMAKE_TOOLCHAIN_FILE}" OPTIONAL RESULT_VARIABLE _INCLUDED_TOOLCHAIN_FILE)
+ endif(NOT _INCLUDED_TOOLCHAIN_FILE)
- IF(_INCLUDED_TOOLCHAIN_FILE)
- SET(CMAKE_TOOLCHAIN_FILE "${_INCLUDED_TOOLCHAIN_FILE}" CACHE FILEPATH "The CMake toolchain file" FORCE)
- ELSE(_INCLUDED_TOOLCHAIN_FILE)
- MESSAGE(FATAL_ERROR "Could not find toolchain file: ${CMAKE_TOOLCHAIN_FILE}")
- SET(CMAKE_TOOLCHAIN_FILE "NOTFOUND" CACHE FILEPATH "The CMake toolchain file" FORCE)
- ENDIF(_INCLUDED_TOOLCHAIN_FILE)
-ENDIF(CMAKE_TOOLCHAIN_FILE)
+ if(_INCLUDED_TOOLCHAIN_FILE)
+ set(CMAKE_TOOLCHAIN_FILE "${_INCLUDED_TOOLCHAIN_FILE}" CACHE FILEPATH "The CMake toolchain file" FORCE)
+ else(_INCLUDED_TOOLCHAIN_FILE)
+ message(FATAL_ERROR "Could not find toolchain file: ${CMAKE_TOOLCHAIN_FILE}")
+ set(CMAKE_TOOLCHAIN_FILE "NOTFOUND" CACHE FILEPATH "The CMake toolchain file" FORCE)
+ endif(_INCLUDED_TOOLCHAIN_FILE)
+endif(CMAKE_TOOLCHAIN_FILE)
# if CMAKE_SYSTEM_NAME is here already set, either it comes from a toolchain file
# or it was set via -DCMAKE_SYSTEM_NAME=...
# if that's the case, assume we are crosscompiling
-IF(CMAKE_SYSTEM_NAME)
- IF(NOT DEFINED CMAKE_CROSSCOMPILING)
- SET(CMAKE_CROSSCOMPILING TRUE)
- ENDIF(NOT DEFINED CMAKE_CROSSCOMPILING)
- SET(PRESET_CMAKE_SYSTEM_NAME TRUE)
-ELSE(CMAKE_SYSTEM_NAME)
- SET(CMAKE_SYSTEM_NAME "${CMAKE_HOST_SYSTEM_NAME}")
- SET(CMAKE_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
- SET(CMAKE_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}")
- SET(CMAKE_CROSSCOMPILING FALSE)
- SET(PRESET_CMAKE_SYSTEM_NAME FALSE)
-ENDIF(CMAKE_SYSTEM_NAME)
-
-
-MACRO(ADJUST_CMAKE_SYSTEM_VARIABLES _PREFIX)
- IF(NOT ${_PREFIX}_NAME)
- SET(${_PREFIX}_NAME "UnknownOS")
- ENDIF(NOT ${_PREFIX}_NAME)
+if(CMAKE_SYSTEM_NAME)
+ if(NOT DEFINED CMAKE_CROSSCOMPILING)
+ set(CMAKE_CROSSCOMPILING TRUE)
+ endif(NOT DEFINED CMAKE_CROSSCOMPILING)
+ set(PRESET_CMAKE_SYSTEM_NAME TRUE)
+else(CMAKE_SYSTEM_NAME)
+ set(CMAKE_SYSTEM_NAME "${CMAKE_HOST_SYSTEM_NAME}")
+ set(CMAKE_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
+ set(CMAKE_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}")
+ set(CMAKE_CROSSCOMPILING FALSE)
+ set(PRESET_CMAKE_SYSTEM_NAME FALSE)
+endif(CMAKE_SYSTEM_NAME)
+
+
+macro(ADJUST_CMAKE_SYSTEM_VARIABLES _PREFIX)
+ if(NOT ${_PREFIX}_NAME)
+ set(${_PREFIX}_NAME "UnknownOS")
+ endif(NOT ${_PREFIX}_NAME)
# fix for BSD/OS , remove the /
- IF(${_PREFIX}_NAME MATCHES BSD.OS)
- SET(${_PREFIX}_NAME BSDOS)
- ENDIF(${_PREFIX}_NAME MATCHES BSD.OS)
+ if(${_PREFIX}_NAME MATCHES BSD.OS)
+ set(${_PREFIX}_NAME BSDOS)
+ endif(${_PREFIX}_NAME MATCHES BSD.OS)
# fix for GNU/kFreeBSD, remove the GNU/
- IF(${_PREFIX}_NAME MATCHES kFreeBSD)
- SET(${_PREFIX}_NAME kFreeBSD)
- ENDIF(${_PREFIX}_NAME MATCHES kFreeBSD)
+ if(${_PREFIX}_NAME MATCHES kFreeBSD)
+ set(${_PREFIX}_NAME kFreeBSD)
+ endif(${_PREFIX}_NAME MATCHES kFreeBSD)
# fix for CYGWIN which has windows version in it
- IF(${_PREFIX}_NAME MATCHES CYGWIN)
- SET(${_PREFIX}_NAME CYGWIN)
- ENDIF(${_PREFIX}_NAME MATCHES CYGWIN)
+ if(${_PREFIX}_NAME MATCHES CYGWIN)
+ set(${_PREFIX}_NAME CYGWIN)
+ endif(${_PREFIX}_NAME MATCHES CYGWIN)
# set CMAKE_SYSTEM to the CMAKE_SYSTEM_NAME
- SET(${_PREFIX} ${${_PREFIX}_NAME})
+ set(${_PREFIX} ${${_PREFIX}_NAME})
# if there is a CMAKE_SYSTEM_VERSION then add a -${CMAKE_SYSTEM_VERSION}
- IF(${_PREFIX}_VERSION)
- SET(${_PREFIX} ${${_PREFIX}}-${${_PREFIX}_VERSION})
- ENDIF(${_PREFIX}_VERSION)
+ if(${_PREFIX}_VERSION)
+ set(${_PREFIX} ${${_PREFIX}}-${${_PREFIX}_VERSION})
+ endif(${_PREFIX}_VERSION)
-ENDMACRO(ADJUST_CMAKE_SYSTEM_VARIABLES _PREFIX)
+endmacro(ADJUST_CMAKE_SYSTEM_VARIABLES _PREFIX)
ADJUST_CMAKE_SYSTEM_VARIABLES(CMAKE_SYSTEM)
ADJUST_CMAKE_SYSTEM_VARIABLES(CMAKE_HOST_SYSTEM)
# this file is also executed from cpack, then we don't need to generate these files
# in this case there is no CMAKE_BINARY_DIR
-IF(CMAKE_BINARY_DIR)
+if(CMAKE_BINARY_DIR)
# write entry to the log file
- IF(PRESET_CMAKE_SYSTEM_NAME)
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ if(PRESET_CMAKE_SYSTEM_NAME)
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"The target system is: ${CMAKE_SYSTEM_NAME} - ${CMAKE_SYSTEM_VERSION} - ${CMAKE_SYSTEM_PROCESSOR}\n")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"The host system is: ${CMAKE_HOST_SYSTEM_NAME} - ${CMAKE_HOST_SYSTEM_VERSION} - ${CMAKE_HOST_SYSTEM_PROCESSOR}\n")
- ELSE(PRESET_CMAKE_SYSTEM_NAME)
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ else(PRESET_CMAKE_SYSTEM_NAME)
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"The system is: ${CMAKE_SYSTEM_NAME} - ${CMAKE_SYSTEM_VERSION} - ${CMAKE_SYSTEM_PROCESSOR}\n")
- ENDIF(PRESET_CMAKE_SYSTEM_NAME)
+ endif(PRESET_CMAKE_SYSTEM_NAME)
# if a toolchain file is used, it needs to be included in the configured file,
- # so settings done there are also available if they don't go in the cache and in TRY_COMPILE()
- SET(INCLUDE_CMAKE_TOOLCHAIN_FILE_IF_REQUIRED)
- IF(DEFINED CMAKE_TOOLCHAIN_FILE)
- SET(INCLUDE_CMAKE_TOOLCHAIN_FILE_IF_REQUIRED "INCLUDE(\"${CMAKE_TOOLCHAIN_FILE}\")")
- ENDIF(DEFINED CMAKE_TOOLCHAIN_FILE)
+ # so settings done there are also available if they don't go in the cache and in try_compile()
+ set(INCLUDE_CMAKE_TOOLCHAIN_FILE_IF_REQUIRED)
+ if(DEFINED CMAKE_TOOLCHAIN_FILE)
+ set(INCLUDE_CMAKE_TOOLCHAIN_FILE_IF_REQUIRED "include(\"${CMAKE_TOOLCHAIN_FILE}\")")
+ endif(DEFINED CMAKE_TOOLCHAIN_FILE)
# configure variables set in this file for fast reload, the template file is defined at the top of this file
- CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeSystem.cmake.in
+ configure_file(${CMAKE_ROOT}/Modules/CMakeSystem.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeSystem.cmake
IMMEDIATE @ONLY)
-ENDIF(CMAKE_BINARY_DIR)
+endif(CMAKE_BINARY_DIR)
diff --git a/Modules/CMakeExpandImportedTargets.cmake b/Modules/CMakeExpandImportedTargets.cmake
index fba071a068..d698ad8b6b 100644
--- a/Modules/CMakeExpandImportedTargets.cmake
+++ b/Modules/CMakeExpandImportedTargets.cmake
@@ -10,7 +10,7 @@
# the first configuration from ${CMAKE_CONFIGURATION_TYPES} if set, otherwise
# ${CMAKE_BUILD_TYPE}.
# This macro is used by all Check*.cmake files which use
-# TRY_COMPILE() or TRY_RUN() and support CMAKE_REQUIRED_LIBRARIES , so that
+# try_compile() or try_run() and support CMAKE_REQUIRED_LIBRARIES , so that
# these checks support imported targets in CMAKE_REQUIRED_LIBRARIES:
# cmake_expand_imported_targets(expandedLibs LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}
# CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}" )
diff --git a/Modules/CMakeExportBuildSettings.cmake b/Modules/CMakeExportBuildSettings.cmake
index 8d316b9413..7392e6beca 100644
--- a/Modules/CMakeExportBuildSettings.cmake
+++ b/Modules/CMakeExportBuildSettings.cmake
@@ -13,24 +13,24 @@
# License text for the above reference.)
# This module is purposely no longer documented. It does nothing useful.
-IF(NOT "${CMAKE_MINIMUM_REQUIRED_VERSION}" VERSION_LESS 2.7)
- MESSAGE(FATAL_ERROR
+if(NOT "${CMAKE_MINIMUM_REQUIRED_VERSION}" VERSION_LESS 2.7)
+ message(FATAL_ERROR
"The functionality of this module has been dropped as of CMake 2.8. "
"It was deemed harmful (confusing users by changing their compiler). "
"Please remove calls to the CMAKE_EXPORT_BUILD_SETTINGS macro and "
"stop including this module. "
"If this project generates any files for use by external projects, "
"remove any use of the CMakeImportBuildSettings module from them.")
-ENDIF()
+endif()
# This macro used to store build settings of a project in a file to be
# loaded by another project using CMAKE_IMPORT_BUILD_SETTINGS. Now it
# creates a file that refuses to load (with comment explaining why).
-MACRO(CMAKE_EXPORT_BUILD_SETTINGS SETTINGS_FILE)
- IF(${SETTINGS_FILE} MATCHES ".+")
- CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeBuildSettings.cmake.in
+macro(CMAKE_EXPORT_BUILD_SETTINGS SETTINGS_FILE)
+ if(${SETTINGS_FILE} MATCHES ".+")
+ configure_file(${CMAKE_ROOT}/Modules/CMakeBuildSettings.cmake.in
${SETTINGS_FILE} @ONLY IMMEDIATE)
- ELSE(${SETTINGS_FILE} MATCHES ".+")
- MESSAGE(SEND_ERROR "CMAKE_EXPORT_BUILD_SETTINGS called with no argument.")
- ENDIF(${SETTINGS_FILE} MATCHES ".+")
-ENDMACRO(CMAKE_EXPORT_BUILD_SETTINGS)
+ else(${SETTINGS_FILE} MATCHES ".+")
+ message(SEND_ERROR "CMAKE_EXPORT_BUILD_SETTINGS called with no argument.")
+ endif(${SETTINGS_FILE} MATCHES ".+")
+endmacro(CMAKE_EXPORT_BUILD_SETTINGS)
diff --git a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
index 455f95fe39..0fe2abbe5c 100644
--- a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
+++ b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
@@ -18,39 +18,39 @@
# so that they can find the headers at runtime and parsing etc. works better
# This is done here by actually running gcc with the options so it prints its
# system include directories, which are parsed then and stored in the cache.
-MACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _resultIncludeDirs _resultDefines)
- SET(${_resultIncludeDirs})
- SET(_gccOutput)
- FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy" "\n" )
-
- IF (${_lang} STREQUAL "c++")
- SET(_compilerExecutable "${CMAKE_CXX_COMPILER}")
- SET(_arg1 "${CMAKE_CXX_COMPILER_ARG1}")
- ELSE ()
- SET(_compilerExecutable "${CMAKE_C_COMPILER}")
- SET(_arg1 "${CMAKE_C_COMPILER_ARG1}")
- ENDIF ()
- EXECUTE_PROCESS(COMMAND ${_compilerExecutable} ${_arg1} -v -E -x ${_lang} -dD dummy
+macro(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _resultIncludeDirs _resultDefines)
+ set(${_resultIncludeDirs})
+ set(_gccOutput)
+ file(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy" "\n" )
+
+ if (${_lang} STREQUAL "c++")
+ set(_compilerExecutable "${CMAKE_CXX_COMPILER}")
+ set(_arg1 "${CMAKE_CXX_COMPILER_ARG1}")
+ else ()
+ set(_compilerExecutable "${CMAKE_C_COMPILER}")
+ set(_arg1 "${CMAKE_C_COMPILER_ARG1}")
+ endif ()
+ execute_process(COMMAND ${_compilerExecutable} ${_arg1} -v -E -x ${_lang} -dD dummy
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles
ERROR_VARIABLE _gccOutput
OUTPUT_VARIABLE _gccStdout )
- FILE(REMOVE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy")
+ file(REMOVE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy")
# First find the system include dirs:
- IF( "${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+ *\n) *End of (search) list" )
+ if( "${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+ *\n) *End of (search) list" )
# split the output into lines and then remove leading and trailing spaces from each of them:
- STRING(REGEX MATCHALL "[^\n]+\n" _includeLines "${CMAKE_MATCH_1}")
- FOREACH(nextLine ${_includeLines})
- STRING(STRIP "${nextLine}" _includePath)
- LIST(APPEND ${_resultIncludeDirs} "${_includePath}")
- ENDFOREACH(nextLine)
+ string(REGEX MATCHALL "[^\n]+\n" _includeLines "${CMAKE_MATCH_1}")
+ foreach(nextLine ${_includeLines})
+ string(STRIP "${nextLine}" _includePath)
+ list(APPEND ${_resultIncludeDirs} "${_includePath}")
+ endforeach(nextLine)
- ENDIF()
+ endif()
# now find the builtin macros:
- STRING(REGEX MATCHALL "#define[^\n]+\n" _defineLines "${_gccStdout}")
+ string(REGEX MATCHALL "#define[^\n]+\n" _defineLines "${_gccStdout}")
# A few example lines which the regexp below has to match properly:
# #define MAX(a,b) ((a) > (b) ? (a) : (b))
# #define __fastcall __attribute__((__fastcall__))
@@ -59,51 +59,51 @@ MACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _resultIncludeDirs _resultDefines
# #define __UINTMAX_TYPE__ long long unsigned int
# #define __i386__ 1
- FOREACH(nextLine ${_defineLines})
- STRING(REGEX MATCH "^#define +([A-Za-z_][A-Za-z0-9_]*)(\\([^\\)]+\\))? +(.+) *$" _dummy "${nextLine}")
- SET(_name "${CMAKE_MATCH_1}${CMAKE_MATCH_2}")
- STRING(STRIP "${CMAKE_MATCH_3}" _value)
- #MESSAGE(STATUS "m1: -${CMAKE_MATCH_1}- m2: -${CMAKE_MATCH_2}- m3: -${CMAKE_MATCH_3}-")
+ foreach(nextLine ${_defineLines})
+ string(REGEX MATCH "^#define +([A-Za-z_][A-Za-z0-9_]*)(\\([^\\)]+\\))? +(.+) *$" _dummy "${nextLine}")
+ set(_name "${CMAKE_MATCH_1}${CMAKE_MATCH_2}")
+ string(STRIP "${CMAKE_MATCH_3}" _value)
+ #message(STATUS "m1: -${CMAKE_MATCH_1}- m2: -${CMAKE_MATCH_2}- m3: -${CMAKE_MATCH_3}-")
- LIST(APPEND ${_resultDefines} "${_name}")
- IF(_value)
- LIST(APPEND ${_resultDefines} "${_value}")
- ELSE()
- LIST(APPEND ${_resultDefines} " ")
- ENDIF()
- ENDFOREACH(nextLine)
+ list(APPEND ${_resultDefines} "${_name}")
+ if(_value)
+ list(APPEND ${_resultDefines} "${_value}")
+ else()
+ list(APPEND ${_resultDefines} " ")
+ endif()
+ endforeach(nextLine)
-ENDMACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang)
+endmacro(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang)
# Save the current LC_ALL, LC_MESSAGES, and LANG environment variables and set them
# to "C" that way GCC's "search starts here" text is in English and we can grok it.
-SET(_orig_lc_all $ENV{LC_ALL})
-SET(_orig_lc_messages $ENV{LC_MESSAGES})
-SET(_orig_lang $ENV{LANG})
+set(_orig_lc_all $ENV{LC_ALL})
+set(_orig_lc_messages $ENV{LC_MESSAGES})
+set(_orig_lang $ENV{LANG})
-SET(ENV{LC_ALL} C)
-SET(ENV{LC_MESSAGES} C)
-SET(ENV{LANG} C)
+set(ENV{LC_ALL} C)
+set(ENV{LC_MESSAGES} C)
+set(ENV{LANG} C)
# Now check for C, works for gcc and Intel compiler at least
-IF (NOT CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS)
- IF ("${CMAKE_C_COMPILER_ID}" MATCHES GNU OR "${CMAKE_C_COMPILER_ID}" MATCHES Intel)
+if (NOT CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS)
+ if ("${CMAKE_C_COMPILER_ID}" MATCHES GNU OR "${CMAKE_C_COMPILER_ID}" MATCHES Intel)
_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c _dirs _defines)
- SET(CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "C compiler system include directories")
- SET(CMAKE_EXTRA_GENERATOR_C_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "C compiler system defined macros")
- ENDIF ()
-ENDIF ()
+ set(CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "C compiler system include directories")
+ set(CMAKE_EXTRA_GENERATOR_C_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "C compiler system defined macros")
+ endif ()
+endif ()
# And now the same for C++
-IF (NOT CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS)
- IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Intel)
+if (NOT CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS)
+ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU OR "${CMAKE_CXX_COMPILER_ID}" MATCHES Intel)
_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c++ _dirs _defines)
- SET(CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "CXX compiler system include directories")
- SET(CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "CXX compiler system defined macros")
- ENDIF ()
-ENDIF ()
+ set(CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "CXX compiler system include directories")
+ set(CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "CXX compiler system defined macros")
+ endif ()
+endif ()
# Restore original LC_ALL, LC_MESSAGES, and LANG
-SET(ENV{LC_ALL} ${_orig_lc_all})
-SET(ENV{LC_MESSAGES} ${_orig_lc_messages})
-SET(ENV{LANG} ${_orig_lang})
+set(ENV{LC_ALL} ${_orig_lc_all})
+set(ENV{LC_MESSAGES} ${_orig_lc_messages})
+set(ENV{LANG} ${_orig_lang})
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake
index a5202f4027..71537fff35 100644
--- a/Modules/CMakeFindBinUtils.cmake
+++ b/Modules/CMakeFindBinUtils.cmake
@@ -30,46 +30,46 @@
# License text for the above reference.)
# if it's the MS C/CXX compiler, search for link
-IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
+if("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
- FIND_PROGRAM(CMAKE_LINKER NAMES link HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
+ find_program(CMAKE_LINKER NAMES link HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
- MARK_AS_ADVANCED(CMAKE_LINKER)
+ mark_as_advanced(CMAKE_LINKER)
# in all other cases search for ar, ranlib, etc.
-ELSE("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
+else("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
- FIND_PROGRAM(CMAKE_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
+ find_program(CMAKE_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
- FIND_PROGRAM(CMAKE_RANLIB NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ranlib HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
- IF(NOT CMAKE_RANLIB)
- SET(CMAKE_RANLIB : CACHE INTERNAL "noop for ranlib")
- ENDIF(NOT CMAKE_RANLIB)
+ find_program(CMAKE_RANLIB NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ranlib HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
+ if(NOT CMAKE_RANLIB)
+ set(CMAKE_RANLIB : CACHE INTERNAL "noop for ranlib")
+ endif(NOT CMAKE_RANLIB)
- FIND_PROGRAM(CMAKE_STRIP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}strip HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
- FIND_PROGRAM(CMAKE_LINKER NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ld HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
- FIND_PROGRAM(CMAKE_NM NAMES ${_CMAKE_TOOLCHAIN_PREFIX}nm HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
- FIND_PROGRAM(CMAKE_OBJDUMP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objdump HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
- FIND_PROGRAM(CMAKE_OBJCOPY NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objcopy HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
+ find_program(CMAKE_STRIP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}strip HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
+ find_program(CMAKE_LINKER NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ld HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
+ find_program(CMAKE_NM NAMES ${_CMAKE_TOOLCHAIN_PREFIX}nm HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
+ find_program(CMAKE_OBJDUMP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objdump HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
+ find_program(CMAKE_OBJCOPY NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objcopy HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
- MARK_AS_ADVANCED(CMAKE_AR CMAKE_RANLIB CMAKE_STRIP CMAKE_LINKER CMAKE_NM CMAKE_OBJDUMP CMAKE_OBJCOPY)
+ mark_as_advanced(CMAKE_AR CMAKE_RANLIB CMAKE_STRIP CMAKE_LINKER CMAKE_NM CMAKE_OBJDUMP CMAKE_OBJCOPY)
-ENDIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
+endif("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
# on Apple there really should be install_name_tool
-IF(APPLE)
- FIND_PROGRAM(CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
+if(APPLE)
+ find_program(CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
- IF(NOT CMAKE_INSTALL_NAME_TOOL)
- MESSAGE(FATAL_ERROR "Could not find install_name_tool, please check your installation.")
- ENDIF(NOT CMAKE_INSTALL_NAME_TOOL)
+ if(NOT CMAKE_INSTALL_NAME_TOOL)
+ message(FATAL_ERROR "Could not find install_name_tool, please check your installation.")
+ endif(NOT CMAKE_INSTALL_NAME_TOOL)
- MARK_AS_ADVANCED(CMAKE_INSTALL_NAME_TOOL)
-ENDIF(APPLE)
+ mark_as_advanced(CMAKE_INSTALL_NAME_TOOL)
+endif(APPLE)
diff --git a/Modules/CMakeFindCodeBlocks.cmake b/Modules/CMakeFindCodeBlocks.cmake
index 23f2c821da..6ca7c19838 100644
--- a/Modules/CMakeFindCodeBlocks.cmake
+++ b/Modules/CMakeFindCodeBlocks.cmake
@@ -15,11 +15,11 @@
# This file is included in CMakeSystemSpecificInformation.cmake if
# the CodeBlocks extra generator has been selected.
-FIND_PROGRAM(CMAKE_CODEBLOCKS_EXECUTABLE NAMES codeblocks DOC "The CodeBlocks executable")
+find_program(CMAKE_CODEBLOCKS_EXECUTABLE NAMES codeblocks DOC "The CodeBlocks executable")
-IF(CMAKE_CODEBLOCKS_EXECUTABLE)
- SET(CMAKE_OPEN_PROJECT_COMMAND "${CMAKE_CODEBLOCKS_EXECUTABLE} <PROJECT_FILE>" )
-ENDIF(CMAKE_CODEBLOCKS_EXECUTABLE)
+if(CMAKE_CODEBLOCKS_EXECUTABLE)
+ set(CMAKE_OPEN_PROJECT_COMMAND "${CMAKE_CODEBLOCKS_EXECUTABLE} <PROJECT_FILE>" )
+endif(CMAKE_CODEBLOCKS_EXECUTABLE)
# Determine builtin macros and include dirs:
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake)
diff --git a/Modules/CMakeFindEclipseCDT4.cmake b/Modules/CMakeFindEclipseCDT4.cmake
index 86c1a1bc22..37b72fa382 100644
--- a/Modules/CMakeFindEclipseCDT4.cmake
+++ b/Modules/CMakeFindEclipseCDT4.cmake
@@ -15,42 +15,42 @@
# This file is included in CMakeSystemSpecificInformation.cmake if
# the Eclipse CDT4 extra generator has been selected.
-FIND_PROGRAM(CMAKE_ECLIPSE_EXECUTABLE NAMES eclipse DOC "The Eclipse executable")
+find_program(CMAKE_ECLIPSE_EXECUTABLE NAMES eclipse DOC "The Eclipse executable")
-FUNCTION(_FIND_ECLIPSE_VERSION)
+function(_FIND_ECLIPSE_VERSION)
# This code is in a function so the variables used here have only local scope
- IF(CMAKE_ECLIPSE_EXECUTABLE)
+ if(CMAKE_ECLIPSE_EXECUTABLE)
# use REALPATH to resolve symlinks (http://public.kitware.com/Bug/view.php?id=13036)
- GET_FILENAME_COMPONENT(_REALPATH_CMAKE_ECLIPSE_EXECUTABLE "${CMAKE_ECLIPSE_EXECUTABLE}" REALPATH)
- GET_FILENAME_COMPONENT(_ECLIPSE_DIR "${_REALPATH_CMAKE_ECLIPSE_EXECUTABLE}" PATH)
- FILE(GLOB _ECLIPSE_FEATURE_DIR "${_ECLIPSE_DIR}/features/org.eclipse.platform*")
- IF(APPLE AND NOT _ECLIPSE_FEATURE_DIR)
- FILE(GLOB _ECLIPSE_FEATURE_DIR "${_ECLIPSE_DIR}/../../../features/org.eclipse.platform*")
- ENDIF()
- IF("${_ECLIPSE_FEATURE_DIR}" MATCHES ".+org.eclipse.platform_([0-9]+\\.[0-9]+).+")
- SET(_ECLIPSE_VERSION ${CMAKE_MATCH_1})
- ENDIF()
- ENDIF()
+ get_filename_component(_REALPATH_CMAKE_ECLIPSE_EXECUTABLE "${CMAKE_ECLIPSE_EXECUTABLE}" REALPATH)
+ get_filename_component(_ECLIPSE_DIR "${_REALPATH_CMAKE_ECLIPSE_EXECUTABLE}" PATH)
+ file(GLOB _ECLIPSE_FEATURE_DIR "${_ECLIPSE_DIR}/features/org.eclipse.platform*")
+ if(APPLE AND NOT _ECLIPSE_FEATURE_DIR)
+ file(GLOB _ECLIPSE_FEATURE_DIR "${_ECLIPSE_DIR}/../../../features/org.eclipse.platform*")
+ endif()
+ if("${_ECLIPSE_FEATURE_DIR}" MATCHES ".+org.eclipse.platform_([0-9]+\\.[0-9]+).+")
+ set(_ECLIPSE_VERSION ${CMAKE_MATCH_1})
+ endif()
+ endif()
# Set up a map with the names of the Eclipse releases:
- SET(_ECLIPSE_VERSION_NAME_ "Unknown" )
- SET(_ECLIPSE_VERSION_NAME_3.2 "Callisto" )
- SET(_ECLIPSE_VERSION_NAME_3.3 "Europa" )
- SET(_ECLIPSE_VERSION_NAME_3.4 "Ganymede" )
- SET(_ECLIPSE_VERSION_NAME_3.5 "Galileo" )
- SET(_ECLIPSE_VERSION_NAME_3.6 "Helios" )
- SET(_ECLIPSE_VERSION_NAME_3.7 "Indigo" )
- SET(_ECLIPSE_VERSION_NAME_4.2 "Juno" )
+ set(_ECLIPSE_VERSION_NAME_ "Unknown" )
+ set(_ECLIPSE_VERSION_NAME_3.2 "Callisto" )
+ set(_ECLIPSE_VERSION_NAME_3.3 "Europa" )
+ set(_ECLIPSE_VERSION_NAME_3.4 "Ganymede" )
+ set(_ECLIPSE_VERSION_NAME_3.5 "Galileo" )
+ set(_ECLIPSE_VERSION_NAME_3.6 "Helios" )
+ set(_ECLIPSE_VERSION_NAME_3.7 "Indigo" )
+ set(_ECLIPSE_VERSION_NAME_4.2 "Juno" )
- IF(_ECLIPSE_VERSION)
- MESSAGE(STATUS "Found Eclipse version ${_ECLIPSE_VERSION} (${_ECLIPSE_VERSION_NAME_${_ECLIPSE_VERSION}})")
- ELSE()
- SET(_ECLIPSE_VERSION "3.6" )
- MESSAGE(STATUS "Could not determine Eclipse version, assuming at least ${_ECLIPSE_VERSION} (${_ECLIPSE_VERSION_NAME_${_ECLIPSE_VERSION}}). Adjust CMAKE_ECLIPSE_VERSION if this is wrong.")
- ENDIF()
+ if(_ECLIPSE_VERSION)
+ message(STATUS "Found Eclipse version ${_ECLIPSE_VERSION} (${_ECLIPSE_VERSION_NAME_${_ECLIPSE_VERSION}})")
+ else()
+ set(_ECLIPSE_VERSION "3.6" )
+ message(STATUS "Could not determine Eclipse version, assuming at least ${_ECLIPSE_VERSION} (${_ECLIPSE_VERSION_NAME_${_ECLIPSE_VERSION}}). Adjust CMAKE_ECLIPSE_VERSION if this is wrong.")
+ endif()
- SET(CMAKE_ECLIPSE_VERSION "${_ECLIPSE_VERSION} (${_ECLIPSE_VERSION_NAME_${_ECLIPSE_VERSION}})" CACHE STRING "The version of Eclipse. If Eclipse has not been found, 3.6 (Helios) is assumed.")
- SET_PROPERTY(CACHE CMAKE_ECLIPSE_VERSION PROPERTY STRINGS "3.2 (${_ECLIPSE_VERSION_NAME_3.2})"
+ set(CMAKE_ECLIPSE_VERSION "${_ECLIPSE_VERSION} (${_ECLIPSE_VERSION_NAME_${_ECLIPSE_VERSION}})" CACHE STRING "The version of Eclipse. If Eclipse has not been found, 3.6 (Helios) is assumed.")
+ set_property(CACHE CMAKE_ECLIPSE_VERSION PROPERTY STRINGS "3.2 (${_ECLIPSE_VERSION_NAME_3.2})"
"3.3 (${_ECLIPSE_VERSION_NAME_3.3})"
"3.4 (${_ECLIPSE_VERSION_NAME_3.4})"
"3.5 (${_ECLIPSE_VERSION_NAME_3.5})"
@@ -58,28 +58,28 @@ FUNCTION(_FIND_ECLIPSE_VERSION)
"3.7 (${_ECLIPSE_VERSION_NAME_3.7})"
"4.2 (${_ECLIPSE_VERSION_NAME_4.2})"
)
-ENDFUNCTION()
+endfunction()
_FIND_ECLIPSE_VERSION()
# Try to find out how many CPUs we have and set the -j argument for make accordingly
-SET(_CMAKE_ECLIPSE_INITIAL_MAKE_ARGS "")
+set(_CMAKE_ECLIPSE_INITIAL_MAKE_ARGS "")
-INCLUDE(ProcessorCount)
+include(ProcessorCount)
PROCESSORCOUNT(_CMAKE_ECLIPSE_PROCESSOR_COUNT)
# Only set -j if we are under UNIX and if the make-tool used actually has "make" in the name
# (we may also get here in the future e.g. for ninja)
-IF("${_CMAKE_ECLIPSE_PROCESSOR_COUNT}" GREATER 1 AND UNIX AND "${CMAKE_MAKE_PROGRAM}" MATCHES make)
- SET(_CMAKE_ECLIPSE_INITIAL_MAKE_ARGS "-j${_CMAKE_ECLIPSE_PROCESSOR_COUNT}")
-ENDIF()
+if("${_CMAKE_ECLIPSE_PROCESSOR_COUNT}" GREATER 1 AND UNIX AND "${CMAKE_MAKE_PROGRAM}" MATCHES make)
+ set(_CMAKE_ECLIPSE_INITIAL_MAKE_ARGS "-j${_CMAKE_ECLIPSE_PROCESSOR_COUNT}")
+endif()
# This variable is used by the Eclipse generator and appended to the make invocation commands.
-SET(CMAKE_ECLIPSE_MAKE_ARGUMENTS "${_CMAKE_ECLIPSE_INITIAL_MAKE_ARGS}" CACHE STRING "Additional command line arguments when Eclipse invokes make. Enter e.g. -j<some_number> to get parallel builds")
+set(CMAKE_ECLIPSE_MAKE_ARGUMENTS "${_CMAKE_ECLIPSE_INITIAL_MAKE_ARGS}" CACHE STRING "Additional command line arguments when Eclipse invokes make. Enter e.g. -j<some_number> to get parallel builds")
# This variable is used by the Eclipse generator in out-of-source builds only.
-SET(CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT FALSE CACHE BOOL "If enabled, CMake will generate a source project for Eclipse in CMAKE_SOURCE_DIR")
-MARK_AS_ADVANCED(CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT)
+set(CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT FALSE CACHE BOOL "If enabled, CMake will generate a source project for Eclipse in CMAKE_SOURCE_DIR")
+mark_as_advanced(CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT)
# Determine builtin macros and include dirs:
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake)
diff --git a/Modules/CMakeFindFrameworks.cmake b/Modules/CMakeFindFrameworks.cmake
index 001da20f3b..b47f444484 100644
--- a/Modules/CMakeFindFrameworks.cmake
+++ b/Modules/CMakeFindFrameworks.cmake
@@ -13,20 +13,20 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-IF(NOT CMAKE_FIND_FRAMEWORKS_INCLUDED)
- SET(CMAKE_FIND_FRAMEWORKS_INCLUDED 1)
- MACRO(CMAKE_FIND_FRAMEWORKS fwk)
- SET(${fwk}_FRAMEWORKS)
- IF(APPLE)
- FOREACH(dir
+if(NOT CMAKE_FIND_FRAMEWORKS_INCLUDED)
+ set(CMAKE_FIND_FRAMEWORKS_INCLUDED 1)
+ macro(CMAKE_FIND_FRAMEWORKS fwk)
+ set(${fwk}_FRAMEWORKS)
+ if(APPLE)
+ foreach(dir
~/Library/Frameworks/${fwk}.framework
/Library/Frameworks/${fwk}.framework
/System/Library/Frameworks/${fwk}.framework
/Network/Library/Frameworks/${fwk}.framework)
- IF(EXISTS ${dir})
- SET(${fwk}_FRAMEWORKS ${${fwk}_FRAMEWORKS} ${dir})
- ENDIF(EXISTS ${dir})
- ENDFOREACH(dir)
- ENDIF(APPLE)
- ENDMACRO(CMAKE_FIND_FRAMEWORKS)
-ENDIF(NOT CMAKE_FIND_FRAMEWORKS_INCLUDED)
+ if(EXISTS ${dir})
+ set(${fwk}_FRAMEWORKS ${${fwk}_FRAMEWORKS} ${dir})
+ endif(EXISTS ${dir})
+ endforeach(dir)
+ endif(APPLE)
+ endmacro(CMAKE_FIND_FRAMEWORKS)
+endif(NOT CMAKE_FIND_FRAMEWORKS_INCLUDED)
diff --git a/Modules/CMakeFindKDevelop3.cmake b/Modules/CMakeFindKDevelop3.cmake
index 331dc6ef95..dd144842c0 100644
--- a/Modules/CMakeFindKDevelop3.cmake
+++ b/Modules/CMakeFindKDevelop3.cmake
@@ -15,9 +15,9 @@
# This file is included in CMakeSystemSpecificInformation.cmake if
# the KDevelop3 extra generator has been selected.
-FIND_PROGRAM(CMAKE_KDEVELOP3_EXECUTABLE NAMES kdevelop DOC "The KDevelop3 executable")
+find_program(CMAKE_KDEVELOP3_EXECUTABLE NAMES kdevelop DOC "The KDevelop3 executable")
-IF(CMAKE_KDEVELOP3_EXECUTABLE)
- SET(CMAKE_OPEN_PROJECT_COMMAND "${CMAKE_KDEVELOP3_EXECUTABLE} <PROJECT_FILE>" )
-ENDIF(CMAKE_KDEVELOP3_EXECUTABLE)
+if(CMAKE_KDEVELOP3_EXECUTABLE)
+ set(CMAKE_OPEN_PROJECT_COMMAND "${CMAKE_KDEVELOP3_EXECUTABLE} <PROJECT_FILE>" )
+endif(CMAKE_KDEVELOP3_EXECUTABLE)
diff --git a/Modules/CMakeFindWMake.cmake b/Modules/CMakeFindWMake.cmake
index 6972c4c409..60275aea4e 100644
--- a/Modules/CMakeFindWMake.cmake
+++ b/Modules/CMakeFindWMake.cmake
@@ -12,6 +12,6 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-SET (CMAKE_MAKE_PROGRAM "wmake" CACHE STRING
+set (CMAKE_MAKE_PROGRAM "wmake" CACHE STRING
"Program used to build from makefiles.")
-MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
+mark_as_advanced(CMAKE_MAKE_PROGRAM)
diff --git a/Modules/CMakeFindXCode.cmake b/Modules/CMakeFindXCode.cmake
index 53967b52a7..5c4f596393 100644
--- a/Modules/CMakeFindXCode.cmake
+++ b/Modules/CMakeFindXCode.cmake
@@ -12,9 +12,9 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PROGRAM(CMAKE_MAKE_PROGRAM
+find_program(CMAKE_MAKE_PROGRAM
NAMES xcodebuild
PATHS
/usr/bin
)
-MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
+mark_as_advanced(CMAKE_MAKE_PROGRAM)
diff --git a/Modules/CMakeForceCompiler.cmake b/Modules/CMakeForceCompiler.cmake
index 2a839fd931..c56406bb84 100644
--- a/Modules/CMakeForceCompiler.cmake
+++ b/Modules/CMakeForceCompiler.cmake
@@ -24,8 +24,8 @@
# information tests.
#
# So a simple toolchain file could look like this:
-# INCLUDE (CMakeForceCompiler)
-# SET(CMAKE_SYSTEM_NAME Generic)
+# include (CMakeForceCompiler)
+# set(CMAKE_SYSTEM_NAME Generic)
# CMAKE_FORCE_C_COMPILER (chc12 MetrowerksHicross)
# CMAKE_FORCE_CXX_COMPILER (chc12 MetrowerksHicross)
@@ -42,41 +42,41 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-MACRO(CMAKE_FORCE_C_COMPILER compiler id)
- SET(CMAKE_C_COMPILER "${compiler}")
- SET(CMAKE_C_COMPILER_ID_RUN TRUE)
- SET(CMAKE_C_COMPILER_ID ${id})
- SET(CMAKE_C_COMPILER_WORKS TRUE)
- SET(CMAKE_C_COMPILER_FORCED TRUE)
+macro(CMAKE_FORCE_C_COMPILER compiler id)
+ set(CMAKE_C_COMPILER "${compiler}")
+ set(CMAKE_C_COMPILER_ID_RUN TRUE)
+ set(CMAKE_C_COMPILER_ID ${id})
+ set(CMAKE_C_COMPILER_WORKS TRUE)
+ set(CMAKE_C_COMPILER_FORCED TRUE)
# Set old compiler id variables.
- IF("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
- SET(CMAKE_COMPILER_IS_GNUCC 1)
- ENDIF("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
-ENDMACRO(CMAKE_FORCE_C_COMPILER)
+ if("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
+ set(CMAKE_COMPILER_IS_GNUCC 1)
+ endif("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
+endmacro(CMAKE_FORCE_C_COMPILER)
-MACRO(CMAKE_FORCE_CXX_COMPILER compiler id)
- SET(CMAKE_CXX_COMPILER "${compiler}")
- SET(CMAKE_CXX_COMPILER_ID_RUN TRUE)
- SET(CMAKE_CXX_COMPILER_ID ${id})
- SET(CMAKE_CXX_COMPILER_WORKS TRUE)
- SET(CMAKE_CXX_COMPILER_FORCED TRUE)
+macro(CMAKE_FORCE_CXX_COMPILER compiler id)
+ set(CMAKE_CXX_COMPILER "${compiler}")
+ set(CMAKE_CXX_COMPILER_ID_RUN TRUE)
+ set(CMAKE_CXX_COMPILER_ID ${id})
+ set(CMAKE_CXX_COMPILER_WORKS TRUE)
+ set(CMAKE_CXX_COMPILER_FORCED TRUE)
# Set old compiler id variables.
- IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
- SET(CMAKE_COMPILER_IS_GNUCXX 1)
- ENDIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
-ENDMACRO(CMAKE_FORCE_CXX_COMPILER)
+ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
+ set(CMAKE_COMPILER_IS_GNUCXX 1)
+ endif("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
+endmacro(CMAKE_FORCE_CXX_COMPILER)
-MACRO(CMAKE_FORCE_Fortran_COMPILER compiler id)
- SET(CMAKE_Fortran_COMPILER "${compiler}")
- SET(CMAKE_Fortran_COMPILER_ID_RUN TRUE)
- SET(CMAKE_Fortran_COMPILER_ID ${id})
- SET(CMAKE_Fortran_COMPILER_WORKS TRUE)
- SET(CMAKE_Fortran_COMPILER_FORCED TRUE)
+macro(CMAKE_FORCE_Fortran_COMPILER compiler id)
+ set(CMAKE_Fortran_COMPILER "${compiler}")
+ set(CMAKE_Fortran_COMPILER_ID_RUN TRUE)
+ set(CMAKE_Fortran_COMPILER_ID ${id})
+ set(CMAKE_Fortran_COMPILER_WORKS TRUE)
+ set(CMAKE_Fortran_COMPILER_FORCED TRUE)
# Set old compiler id variables.
- IF("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
- SET(CMAKE_COMPILER_IS_GNUG77 1)
- ENDIF("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
-ENDMACRO(CMAKE_FORCE_Fortran_COMPILER)
+ if("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
+ set(CMAKE_COMPILER_IS_GNUG77 1)
+ endif("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
+endmacro(CMAKE_FORCE_Fortran_COMPILER)
diff --git a/Modules/CMakeFortranCompiler.cmake.in b/Modules/CMakeFortranCompiler.cmake.in
index 53d95525f2..d5905123c3 100644
--- a/Modules/CMakeFortranCompiler.cmake.in
+++ b/Modules/CMakeFortranCompiler.cmake.in
@@ -1,52 +1,52 @@
-SET(CMAKE_Fortran_COMPILER "@CMAKE_Fortran_COMPILER@")
-SET(CMAKE_Fortran_COMPILER_ARG1 "@CMAKE_Fortran_COMPILER_ARG1@")
-SET(CMAKE_Fortran_COMPILER_ID "@CMAKE_Fortran_COMPILER_ID@")
-SET(CMAKE_Fortran_PLATFORM_ID "@CMAKE_Fortran_PLATFORM_ID@")
+set(CMAKE_Fortran_COMPILER "@CMAKE_Fortran_COMPILER@")
+set(CMAKE_Fortran_COMPILER_ARG1 "@CMAKE_Fortran_COMPILER_ARG1@")
+set(CMAKE_Fortran_COMPILER_ID "@CMAKE_Fortran_COMPILER_ID@")
+set(CMAKE_Fortran_PLATFORM_ID "@CMAKE_Fortran_PLATFORM_ID@")
@SET_MSVC_Fortran_ARCHITECTURE_ID@
-SET(CMAKE_AR "@CMAKE_AR@")
-SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
-SET(CMAKE_COMPILER_IS_GNUG77 @CMAKE_COMPILER_IS_GNUG77@)
-SET(CMAKE_Fortran_COMPILER_LOADED 1)
-SET(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@)
-SET(CMAKE_COMPILER_IS_CYGWIN @CMAKE_COMPILER_IS_CYGWIN@)
-IF(CMAKE_COMPILER_IS_CYGWIN)
- SET(CYGWIN 1)
- SET(UNIX 1)
-ENDIF(CMAKE_COMPILER_IS_CYGWIN)
-
-SET(CMAKE_Fortran_COMPILER_ENV_VAR "FC")
-
-SET(CMAKE_Fortran_COMPILER_SUPPORTS_F90 @CMAKE_Fortran_COMPILER_SUPPORTS_F90@)
-
-IF(CMAKE_COMPILER_IS_MINGW)
- SET(MINGW 1)
-ENDIF(CMAKE_COMPILER_IS_MINGW)
-SET(CMAKE_Fortran_COMPILER_ID_RUN 1)
-SET(CMAKE_Fortran_SOURCE_FILE_EXTENSIONS f;F;f77;F77;f90;F90;for;For;FOR;f95;F95)
-SET(CMAKE_Fortran_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
-SET(CMAKE_Fortran_LINKER_PREFERENCE 20)
-IF(UNIX)
- SET(CMAKE_Fortran_OUTPUT_EXTENSION .o)
-ELSE(UNIX)
- SET(CMAKE_Fortran_OUTPUT_EXTENSION .obj)
-ENDIF(UNIX)
+set(CMAKE_AR "@CMAKE_AR@")
+set(CMAKE_RANLIB "@CMAKE_RANLIB@")
+set(CMAKE_COMPILER_IS_GNUG77 @CMAKE_COMPILER_IS_GNUG77@)
+set(CMAKE_Fortran_COMPILER_LOADED 1)
+set(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@)
+set(CMAKE_COMPILER_IS_CYGWIN @CMAKE_COMPILER_IS_CYGWIN@)
+if(CMAKE_COMPILER_IS_CYGWIN)
+ set(CYGWIN 1)
+ set(UNIX 1)
+endif(CMAKE_COMPILER_IS_CYGWIN)
+
+set(CMAKE_Fortran_COMPILER_ENV_VAR "FC")
+
+set(CMAKE_Fortran_COMPILER_SUPPORTS_F90 @CMAKE_Fortran_COMPILER_SUPPORTS_F90@)
+
+if(CMAKE_COMPILER_IS_MINGW)
+ set(MINGW 1)
+endif(CMAKE_COMPILER_IS_MINGW)
+set(CMAKE_Fortran_COMPILER_ID_RUN 1)
+set(CMAKE_Fortran_SOURCE_FILE_EXTENSIONS f;F;f77;F77;f90;F90;for;For;FOR;f95;F95)
+set(CMAKE_Fortran_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
+set(CMAKE_Fortran_LINKER_PREFERENCE 20)
+if(UNIX)
+ set(CMAKE_Fortran_OUTPUT_EXTENSION .o)
+else(UNIX)
+ set(CMAKE_Fortran_OUTPUT_EXTENSION .obj)
+endif(UNIX)
# Save compiler ABI information.
-SET(CMAKE_Fortran_SIZEOF_DATA_PTR "@CMAKE_Fortran_SIZEOF_DATA_PTR@")
-SET(CMAKE_Fortran_COMPILER_ABI "@CMAKE_Fortran_COMPILER_ABI@")
-SET(CMAKE_Fortran_LIBRARY_ARCHITECTURE "@CMAKE_Fortran_LIBRARY_ARCHITECTURE@")
+set(CMAKE_Fortran_SIZEOF_DATA_PTR "@CMAKE_Fortran_SIZEOF_DATA_PTR@")
+set(CMAKE_Fortran_COMPILER_ABI "@CMAKE_Fortran_COMPILER_ABI@")
+set(CMAKE_Fortran_LIBRARY_ARCHITECTURE "@CMAKE_Fortran_LIBRARY_ARCHITECTURE@")
-IF(CMAKE_Fortran_SIZEOF_DATA_PTR AND NOT CMAKE_SIZEOF_VOID_P)
- SET(CMAKE_SIZEOF_VOID_P "${CMAKE_Fortran_SIZEOF_DATA_PTR}")
-ENDIF()
+if(CMAKE_Fortran_SIZEOF_DATA_PTR AND NOT CMAKE_SIZEOF_VOID_P)
+ set(CMAKE_SIZEOF_VOID_P "${CMAKE_Fortran_SIZEOF_DATA_PTR}")
+endif()
-IF(CMAKE_Fortran_COMPILER_ABI)
- SET(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_Fortran_COMPILER_ABI}")
-ENDIF(CMAKE_Fortran_COMPILER_ABI)
+if(CMAKE_Fortran_COMPILER_ABI)
+ set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_Fortran_COMPILER_ABI}")
+endif(CMAKE_Fortran_COMPILER_ABI)
-IF(CMAKE_Fortran_LIBRARY_ARCHITECTURE)
- SET(CMAKE_LIBRARY_ARCHITECTURE "@CMAKE_Fortran_LIBRARY_ARCHITECTURE@")
-ENDIF()
+if(CMAKE_Fortran_LIBRARY_ARCHITECTURE)
+ set(CMAKE_LIBRARY_ARCHITECTURE "@CMAKE_Fortran_LIBRARY_ARCHITECTURE@")
+endif()
-SET(CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "@CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES@")
-SET(CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES "@CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES@")
+set(CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "@CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES@")
+set(CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES "@CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES@")
diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake
index b965e83689..c63b3dced5 100644
--- a/Modules/CMakeFortranInformation.cmake
+++ b/Modules/CMakeFortranInformation.cmake
@@ -16,40 +16,40 @@
# It also loads the available platform file for the system-compiler
# if it exists.
-SET(_INCLUDED_FILE 0)
+set(_INCLUDED_FILE 0)
# Load compiler-specific information.
-IF(CMAKE_Fortran_COMPILER_ID)
- INCLUDE(Compiler/${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL)
-ENDIF(CMAKE_Fortran_COMPILER_ID)
+if(CMAKE_Fortran_COMPILER_ID)
+ include(Compiler/${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL)
+endif(CMAKE_Fortran_COMPILER_ID)
-SET(CMAKE_BASE_NAME)
-GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER} NAME_WE)
+set(CMAKE_BASE_NAME)
+get_filename_component(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER} NAME_WE)
# since the gnu compiler has several names force g++
-IF(CMAKE_COMPILER_IS_GNUG77)
- SET(CMAKE_BASE_NAME g77)
-ENDIF(CMAKE_COMPILER_IS_GNUG77)
-IF(CMAKE_Fortran_COMPILER_ID)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
-ENDIF(CMAKE_Fortran_COMPILER_ID)
-IF (NOT _INCLUDED_FILE)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL
+if(CMAKE_COMPILER_IS_GNUG77)
+ set(CMAKE_BASE_NAME g77)
+endif(CMAKE_COMPILER_IS_GNUG77)
+if(CMAKE_Fortran_COMPILER_ID)
+ include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
+endif(CMAKE_Fortran_COMPILER_ID)
+if (NOT _INCLUDED_FILE)
+ include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL
RESULT_VARIABLE _INCLUDED_FILE)
-ENDIF (NOT _INCLUDED_FILE)
+endif (NOT _INCLUDED_FILE)
# We specify the compiler information in the system file for some
# platforms, but this language may not have been enabled when the file
# was first included. Include it again to get the language info.
# Remove this when all compiler info is removed from system files.
-IF (NOT _INCLUDED_FILE)
- INCLUDE(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL)
-ENDIF (NOT _INCLUDED_FILE)
+if (NOT _INCLUDED_FILE)
+ include(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL)
+endif (NOT _INCLUDED_FILE)
-IF(CMAKE_Fortran_SIZEOF_DATA_PTR)
- FOREACH(f ${CMAKE_Fortran_ABI_FILES})
- INCLUDE(${f})
- ENDFOREACH()
- UNSET(CMAKE_Fortran_ABI_FILES)
-ENDIF()
+if(CMAKE_Fortran_SIZEOF_DATA_PTR)
+ foreach(f ${CMAKE_Fortran_ABI_FILES})
+ include(${f})
+ endforeach()
+ unset(CMAKE_Fortran_ABI_FILES)
+endif()
# This should be included before the _INIT variables are
# used to initialize the cache. Since the rule variables
@@ -57,122 +57,122 @@ ENDIF()
# But, it should still be after the platform file so changes can
# be made to those values.
-IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
+if(CMAKE_USER_MAKE_RULES_OVERRIDE)
# Save the full path of the file so try_compile can use it.
- INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE} RESULT_VARIABLE _override)
- SET(CMAKE_USER_MAKE_RULES_OVERRIDE "${_override}")
-ENDIF()
+ include(${CMAKE_USER_MAKE_RULES_OVERRIDE} RESULT_VARIABLE _override)
+ set(CMAKE_USER_MAKE_RULES_OVERRIDE "${_override}")
+endif()
-IF(CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran)
+if(CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran)
# Save the full path of the file so try_compile can use it.
- INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran} RESULT_VARIABLE _override)
- SET(CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran "${_override}")
-ENDIF()
+ include(${CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran} RESULT_VARIABLE _override)
+ set(CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran "${_override}")
+endif()
# Fortran needs cmake to do a requires step during its build process to
# catch any modules
-SET(CMAKE_NEEDS_REQUIRES_STEP_Fortran_FLAG 1)
+set(CMAKE_NEEDS_REQUIRES_STEP_Fortran_FLAG 1)
-IF(NOT CMAKE_Fortran_COMPILE_OPTIONS_PIC)
- SET(CMAKE_Fortran_COMPILE_OPTIONS_PIC ${CMAKE_C_COMPILE_OPTIONS_PIC})
-ENDIF(NOT CMAKE_Fortran_COMPILE_OPTIONS_PIC)
+if(NOT CMAKE_Fortran_COMPILE_OPTIONS_PIC)
+ set(CMAKE_Fortran_COMPILE_OPTIONS_PIC ${CMAKE_C_COMPILE_OPTIONS_PIC})
+endif(NOT CMAKE_Fortran_COMPILE_OPTIONS_PIC)
-IF(NOT CMAKE_Fortran_COMPILE_OPTIONS_PIE)
- SET(CMAKE_Fortran_COMPILE_OPTIONS_PIE ${CMAKE_C_COMPILE_OPTIONS_PIE})
-ENDIF(NOT CMAKE_Fortran_COMPILE_OPTIONS_PIE)
+if(NOT CMAKE_Fortran_COMPILE_OPTIONS_PIE)
+ set(CMAKE_Fortran_COMPILE_OPTIONS_PIE ${CMAKE_C_COMPILE_OPTIONS_PIE})
+endif(NOT CMAKE_Fortran_COMPILE_OPTIONS_PIE)
-IF(NOT CMAKE_Fortran_COMPILE_OPTIONS_DLL)
- SET(CMAKE_Fortran_COMPILE_OPTIONS_DLL ${CMAKE_C_COMPILE_OPTIONS_DLL})
-ENDIF(NOT CMAKE_Fortran_COMPILE_OPTIONS_DLL)
+if(NOT CMAKE_Fortran_COMPILE_OPTIONS_DLL)
+ set(CMAKE_Fortran_COMPILE_OPTIONS_DLL ${CMAKE_C_COMPILE_OPTIONS_DLL})
+endif(NOT CMAKE_Fortran_COMPILE_OPTIONS_DLL)
# Create a set of shared library variable specific to Fortran
# For 90% of the systems, these are the same flags as the C versions
# so if these are not set just copy the flags from the c version
-IF(NOT DEFINED CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS)
- SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
-ENDIF()
+if(NOT DEFINED CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS)
+ set(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
+endif()
-IF(NOT DEFINED CMAKE_SHARED_LIBRARY_Fortran_FLAGS)
- SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
-ENDIF()
+if(NOT DEFINED CMAKE_SHARED_LIBRARY_Fortran_FLAGS)
+ set(CMAKE_SHARED_LIBRARY_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
+endif()
-IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
- SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS})
-ENDIF()
+if(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
+ set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS})
+endif()
-IF(NOT DEFINED CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG)
- SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
-ENDIF()
+if(NOT DEFINED CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG)
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
+endif()
-IF(NOT DEFINED CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP)
- SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
-ENDIF()
+if(NOT DEFINED CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP)
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
+endif()
-IF(NOT DEFINED CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG)
- SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG})
-ENDIF()
+if(NOT DEFINED CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG)
+ set(CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG})
+endif()
-IF(NOT DEFINED CMAKE_EXE_EXPORTS_Fortran_FLAG)
- SET(CMAKE_EXE_EXPORTS_Fortran_FLAG ${CMAKE_EXE_EXPORTS_C_FLAG})
-ENDIF()
+if(NOT DEFINED CMAKE_EXE_EXPORTS_Fortran_FLAG)
+ set(CMAKE_EXE_EXPORTS_Fortran_FLAG ${CMAKE_EXE_EXPORTS_C_FLAG})
+endif()
-IF(NOT DEFINED CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG)
- SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_SONAME_C_FLAG})
-ENDIF()
+if(NOT DEFINED CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG)
+ set(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_SONAME_C_FLAG})
+endif()
# for most systems a module is the same as a shared library
# so unless the variable CMAKE_MODULE_EXISTS is set just
# copy the values from the LIBRARY variables
-IF(NOT CMAKE_MODULE_EXISTS)
- SET(CMAKE_SHARED_MODULE_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_Fortran_FLAGS})
- SET(CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS})
-ENDIF(NOT CMAKE_MODULE_EXISTS)
+if(NOT CMAKE_MODULE_EXISTS)
+ set(CMAKE_SHARED_MODULE_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_Fortran_FLAGS})
+ set(CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS})
+endif(NOT CMAKE_MODULE_EXISTS)
# repeat for modules
-IF(NOT DEFINED CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS)
- SET(CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS})
-ENDIF()
+if(NOT DEFINED CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS)
+ set(CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS})
+endif()
-IF(NOT DEFINED CMAKE_SHARED_MODULE_Fortran_FLAGS)
- SET(CMAKE_SHARED_MODULE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS})
-ENDIF()
+if(NOT DEFINED CMAKE_SHARED_MODULE_Fortran_FLAGS)
+ set(CMAKE_SHARED_MODULE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS})
+endif()
-IF(NOT DEFINED CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG)
- SET(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG})
-ENDIF()
+if(NOT DEFINED CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG)
+ set(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG})
+endif()
-IF(NOT DEFINED CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP)
- SET(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP})
-ENDIF()
+if(NOT DEFINED CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP)
+ set(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP})
+endif()
-IF(NOT DEFINED CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG)
- SET(CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG})
-ENDIF()
+if(NOT DEFINED CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG)
+ set(CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG})
+endif()
-IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH)
- SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH ${CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH})
-ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH)
+if(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH)
+ set(CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH ${CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH})
+endif(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH)
-IF(NOT CMAKE_INCLUDE_FLAG_Fortran)
- SET(CMAKE_INCLUDE_FLAG_Fortran ${CMAKE_INCLUDE_FLAG_C})
-ENDIF(NOT CMAKE_INCLUDE_FLAG_Fortran)
+if(NOT CMAKE_INCLUDE_FLAG_Fortran)
+ set(CMAKE_INCLUDE_FLAG_Fortran ${CMAKE_INCLUDE_FLAG_C})
+endif(NOT CMAKE_INCLUDE_FLAG_Fortran)
-IF(NOT CMAKE_INCLUDE_FLAG_SEP_Fortran)
- SET(CMAKE_INCLUDE_FLAG_SEP_Fortran ${CMAKE_INCLUDE_FLAG_SEP_C})
-ENDIF(NOT CMAKE_INCLUDE_FLAG_SEP_Fortran)
+if(NOT CMAKE_INCLUDE_FLAG_SEP_Fortran)
+ set(CMAKE_INCLUDE_FLAG_SEP_Fortran ${CMAKE_INCLUDE_FLAG_SEP_C})
+endif(NOT CMAKE_INCLUDE_FLAG_SEP_Fortran)
-SET(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
+set(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
-SET(CMAKE_Fortran_FLAGS_INIT "$ENV{FFLAGS} ${CMAKE_Fortran_FLAGS_INIT}")
+set(CMAKE_Fortran_FLAGS_INIT "$ENV{FFLAGS} ${CMAKE_Fortran_FLAGS_INIT}")
# avoid just having a space as the initial value for the cache
-IF(CMAKE_Fortran_FLAGS_INIT STREQUAL " ")
- SET(CMAKE_Fortran_FLAGS_INIT)
-ENDIF(CMAKE_Fortran_FLAGS_INIT STREQUAL " ")
-SET (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS_INIT}" CACHE STRING
+if(CMAKE_Fortran_FLAGS_INIT STREQUAL " ")
+ set(CMAKE_Fortran_FLAGS_INIT)
+endif(CMAKE_Fortran_FLAGS_INIT STREQUAL " ")
+set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS_INIT}" CACHE STRING
"Flags for Fortran compiler.")
-INCLUDE(CMakeCommonLanguageInclude)
+include(CMakeCommonLanguageInclude)
# now define the following rule variables
# CMAKE_Fortran_CREATE_SHARED_LIBRARY
@@ -181,60 +181,60 @@ INCLUDE(CMakeCommonLanguageInclude)
# CMAKE_Fortran_LINK_EXECUTABLE
# create a Fortran shared library
-IF(NOT CMAKE_Fortran_CREATE_SHARED_LIBRARY)
- SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
+if(NOT CMAKE_Fortran_CREATE_SHARED_LIBRARY)
+ set(CMAKE_Fortran_CREATE_SHARED_LIBRARY
"<CMAKE_Fortran_COMPILER> <CMAKE_SHARED_LIBRARY_Fortran_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
-ENDIF(NOT CMAKE_Fortran_CREATE_SHARED_LIBRARY)
+endif(NOT CMAKE_Fortran_CREATE_SHARED_LIBRARY)
# create a Fortran shared module just copy the shared library rule
-IF(NOT CMAKE_Fortran_CREATE_SHARED_MODULE)
- SET(CMAKE_Fortran_CREATE_SHARED_MODULE ${CMAKE_Fortran_CREATE_SHARED_LIBRARY})
-ENDIF(NOT CMAKE_Fortran_CREATE_SHARED_MODULE)
+if(NOT CMAKE_Fortran_CREATE_SHARED_MODULE)
+ set(CMAKE_Fortran_CREATE_SHARED_MODULE ${CMAKE_Fortran_CREATE_SHARED_LIBRARY})
+endif(NOT CMAKE_Fortran_CREATE_SHARED_MODULE)
# Create a static archive incrementally for large object file counts.
# If CMAKE_Fortran_CREATE_STATIC_LIBRARY is set it will override these.
-IF(NOT DEFINED CMAKE_Fortran_ARCHIVE_CREATE)
- SET(CMAKE_Fortran_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
-ENDIF()
-IF(NOT DEFINED CMAKE_Fortran_ARCHIVE_APPEND)
- SET(CMAKE_Fortran_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
-ENDIF()
-IF(NOT DEFINED CMAKE_Fortran_ARCHIVE_FINISH)
- SET(CMAKE_Fortran_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
-ENDIF()
+if(NOT DEFINED CMAKE_Fortran_ARCHIVE_CREATE)
+ set(CMAKE_Fortran_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
+endif()
+if(NOT DEFINED CMAKE_Fortran_ARCHIVE_APPEND)
+ set(CMAKE_Fortran_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
+endif()
+if(NOT DEFINED CMAKE_Fortran_ARCHIVE_FINISH)
+ set(CMAKE_Fortran_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
+endif()
# compile a Fortran file into an object file
# (put -o after -c to workaround bug in at least one mpif77 wrapper)
-IF(NOT CMAKE_Fortran_COMPILE_OBJECT)
- SET(CMAKE_Fortran_COMPILE_OBJECT
+if(NOT CMAKE_Fortran_COMPILE_OBJECT)
+ set(CMAKE_Fortran_COMPILE_OBJECT
"<CMAKE_Fortran_COMPILER> <DEFINES> <FLAGS> -c <SOURCE> -o <OBJECT>")
-ENDIF(NOT CMAKE_Fortran_COMPILE_OBJECT)
+endif(NOT CMAKE_Fortran_COMPILE_OBJECT)
# link a fortran program
-IF(NOT CMAKE_Fortran_LINK_EXECUTABLE)
- SET(CMAKE_Fortran_LINK_EXECUTABLE
+if(NOT CMAKE_Fortran_LINK_EXECUTABLE)
+ set(CMAKE_Fortran_LINK_EXECUTABLE
"<CMAKE_Fortran_COMPILER> <CMAKE_Fortran_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
-ENDIF(NOT CMAKE_Fortran_LINK_EXECUTABLE)
+endif(NOT CMAKE_Fortran_LINK_EXECUTABLE)
-IF(CMAKE_Fortran_STANDARD_LIBRARIES_INIT)
- SET(CMAKE_Fortran_STANDARD_LIBRARIES "${CMAKE_Fortran_STANDARD_LIBRARIES_INIT}"
+if(CMAKE_Fortran_STANDARD_LIBRARIES_INIT)
+ set(CMAKE_Fortran_STANDARD_LIBRARIES "${CMAKE_Fortran_STANDARD_LIBRARIES_INIT}"
CACHE STRING "Libraries linked by defalut with all Fortran applications.")
- MARK_AS_ADVANCED(CMAKE_Fortran_STANDARD_LIBRARIES)
-ENDIF(CMAKE_Fortran_STANDARD_LIBRARIES_INIT)
+ mark_as_advanced(CMAKE_Fortran_STANDARD_LIBRARIES)
+endif(CMAKE_Fortran_STANDARD_LIBRARIES_INIT)
-IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
- SET (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG_INIT}" CACHE STRING
+if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
+ set (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG_INIT}" CACHE STRING
"Flags used by the compiler during debug builds.")
- SET (CMAKE_Fortran_FLAGS_MINSIZEREL "${CMAKE_Fortran_FLAGS_MINSIZEREL_INIT}" CACHE STRING
+ set (CMAKE_Fortran_FLAGS_MINSIZEREL "${CMAKE_Fortran_FLAGS_MINSIZEREL_INIT}" CACHE STRING
"Flags used by the compiler during release minsize builds.")
- SET (CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE_INIT}" CACHE STRING
+ set (CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE_INIT}" CACHE STRING
"Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).")
- SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO "${CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
+ set (CMAKE_Fortran_FLAGS_RELWITHDEBINFO "${CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
"Flags used by the compiler during Release with Debug Info builds.")
-ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
+endif(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
-MARK_AS_ADVANCED(
+mark_as_advanced(
CMAKE_Fortran_FLAGS
CMAKE_Fortran_FLAGS_DEBUG
CMAKE_Fortran_FLAGS_MINSIZEREL
@@ -242,4 +242,4 @@ CMAKE_Fortran_FLAGS_RELEASE
CMAKE_Fortran_FLAGS_RELWITHDEBINFO)
# set this variable so we can avoid loading this more than once.
-SET(CMAKE_Fortran_INFORMATION_LOADED 1)
+set(CMAKE_Fortran_INFORMATION_LOADED 1)
diff --git a/Modules/CMakeGenericSystem.cmake b/Modules/CMakeGenericSystem.cmake
index 0ccbfac562..91904d7a56 100644
--- a/Modules/CMakeGenericSystem.cmake
+++ b/Modules/CMakeGenericSystem.cmake
@@ -12,60 +12,60 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
-SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
-SET(CMAKE_INCLUDE_FLAG_C "-I") # -I
-SET(CMAKE_INCLUDE_FLAG_C_SEP "") # , or empty
-SET(CMAKE_LIBRARY_PATH_FLAG "-L")
-SET(CMAKE_LIBRARY_PATH_TERMINATOR "") # for the Digital Mars D compiler the link paths have to be terminated with a "/"
-SET(CMAKE_LINK_LIBRARY_FLAG "-l")
-
-SET(CMAKE_LINK_LIBRARY_SUFFIX "")
-SET(CMAKE_STATIC_LIBRARY_PREFIX "lib")
-SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
-SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
-SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so") # .so
-SET(CMAKE_EXECUTABLE_SUFFIX "") # .exe
-SET(CMAKE_DL_LIBS "dl")
-
-SET(CMAKE_FIND_LIBRARY_PREFIXES "lib")
-SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a")
+set(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
+set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
+set(CMAKE_INCLUDE_FLAG_C "-I") # -I
+set(CMAKE_INCLUDE_FLAG_C_SEP "") # , or empty
+set(CMAKE_LIBRARY_PATH_FLAG "-L")
+set(CMAKE_LIBRARY_PATH_TERMINATOR "") # for the Digital Mars D compiler the link paths have to be terminated with a "/"
+set(CMAKE_LINK_LIBRARY_FLAG "-l")
+
+set(CMAKE_LINK_LIBRARY_SUFFIX "")
+set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
+set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
+set(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
+set(CMAKE_SHARED_LIBRARY_SUFFIX ".so") # .so
+set(CMAKE_EXECUTABLE_SUFFIX "") # .exe
+set(CMAKE_DL_LIBS "dl")
+
+set(CMAKE_FIND_LIBRARY_PREFIXES "lib")
+set(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a")
# basically all general purpose OSs support shared libs
-SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)
+set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)
-SET (CMAKE_SKIP_RPATH "NO" CACHE BOOL
+set (CMAKE_SKIP_RPATH "NO" CACHE BOOL
"If set, runtime paths are not added when using shared libraries.")
-SET (CMAKE_SKIP_INSTALL_RPATH "NO" CACHE BOOL
+set (CMAKE_SKIP_INSTALL_RPATH "NO" CACHE BOOL
"If set, runtime paths are not added when installing shared libraries, but are added when building.")
-SET(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
+set(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
-IF(CMAKE_GENERATOR MATCHES "Makefiles")
- SET(CMAKE_COLOR_MAKEFILE ON CACHE BOOL
+if(CMAKE_GENERATOR MATCHES "Makefiles")
+ set(CMAKE_COLOR_MAKEFILE ON CACHE BOOL
"Enable/Disable color output during build."
)
- MARK_AS_ADVANCED(CMAKE_COLOR_MAKEFILE)
- IF(DEFINED CMAKE_RULE_MESSAGES)
- SET_PROPERTY(GLOBAL PROPERTY RULE_MESSAGES ${CMAKE_RULE_MESSAGES})
- ENDIF(DEFINED CMAKE_RULE_MESSAGES)
- IF(CMAKE_GENERATOR MATCHES "Unix Makefiles")
- SET(CMAKE_EXPORT_COMPILE_COMMANDS OFF CACHE BOOL
+ mark_as_advanced(CMAKE_COLOR_MAKEFILE)
+ if(DEFINED CMAKE_RULE_MESSAGES)
+ set_property(GLOBAL PROPERTY RULE_MESSAGES ${CMAKE_RULE_MESSAGES})
+ endif(DEFINED CMAKE_RULE_MESSAGES)
+ if(CMAKE_GENERATOR MATCHES "Unix Makefiles")
+ set(CMAKE_EXPORT_COMPILE_COMMANDS OFF CACHE BOOL
"Enable/Disable output of compile commands during generation."
)
- MARK_AS_ADVANCED(CMAKE_EXPORT_COMPILE_COMMANDS)
- ENDIF(CMAKE_GENERATOR MATCHES "Unix Makefiles")
-ENDIF(CMAKE_GENERATOR MATCHES "Makefiles")
+ mark_as_advanced(CMAKE_EXPORT_COMPILE_COMMANDS)
+ endif(CMAKE_GENERATOR MATCHES "Unix Makefiles")
+endif(CMAKE_GENERATOR MATCHES "Makefiles")
-IF(CMAKE_GENERATOR MATCHES "Ninja")
- SET(CMAKE_EXPORT_COMPILE_COMMANDS OFF CACHE BOOL
+if(CMAKE_GENERATOR MATCHES "Ninja")
+ set(CMAKE_EXPORT_COMPILE_COMMANDS OFF CACHE BOOL
"Enable/Disable output of compile commands during generation."
)
- MARK_AS_ADVANCED(CMAKE_EXPORT_COMPILE_COMMANDS)
-ENDIF(CMAKE_GENERATOR MATCHES "Ninja")
+ mark_as_advanced(CMAKE_EXPORT_COMPILE_COMMANDS)
+endif(CMAKE_GENERATOR MATCHES "Ninja")
# GetDefaultWindowsPrefixBase
#
@@ -160,27 +160,27 @@ endfunction()
# was initialized by the block below. This is useful for user
# projects to change the default prefix while still allowing the
# command line to override it.
-IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
- SET(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 1)
-ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
+if(NOT DEFINED CMAKE_INSTALL_PREFIX)
+ set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 1)
+endif(NOT DEFINED CMAKE_INSTALL_PREFIX)
# Choose a default install prefix for this platform.
-IF(CMAKE_HOST_UNIX)
- SET(CMAKE_INSTALL_PREFIX "/usr/local"
+if(CMAKE_HOST_UNIX)
+ set(CMAKE_INSTALL_PREFIX "/usr/local"
CACHE PATH "Install path prefix, prepended onto install directories.")
-ELSE(CMAKE_HOST_UNIX)
+else(CMAKE_HOST_UNIX)
GetDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES)
- SET(CMAKE_INSTALL_PREFIX
+ set(CMAKE_INSTALL_PREFIX
"${CMAKE_GENERIC_PROGRAM_FILES}/${PROJECT_NAME}"
CACHE PATH "Install path prefix, prepended onto install directories.")
- SET(CMAKE_GENERIC_PROGRAM_FILES)
-ENDIF(CMAKE_HOST_UNIX)
+ set(CMAKE_GENERIC_PROGRAM_FILES)
+endif(CMAKE_HOST_UNIX)
# Set a variable which will be used as component name in install() commands
# where no COMPONENT has been given:
-SET(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "Unspecified")
+set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "Unspecified")
-MARK_AS_ADVANCED(
+mark_as_advanced(
CMAKE_SKIP_RPATH
CMAKE_SKIP_INSTALL_RPATH
CMAKE_VERBOSE_MAKEFILE
diff --git a/Modules/CMakeImportBuildSettings.cmake b/Modules/CMakeImportBuildSettings.cmake
index 848d89445a..f0080ecd5d 100644
--- a/Modules/CMakeImportBuildSettings.cmake
+++ b/Modules/CMakeImportBuildSettings.cmake
@@ -16,9 +16,9 @@
# This macro used to load build settings from another project that
# stored settings using the CMAKE_EXPORT_BUILD_SETTINGS macro.
-MACRO(CMAKE_IMPORT_BUILD_SETTINGS SETTINGS_FILE)
- IF(${SETTINGS_FILE} MATCHES ".+")
- ELSE(${SETTINGS_FILE} MATCHES ".+")
- MESSAGE(SEND_ERROR "CMAKE_IMPORT_BUILD_SETTINGS called with no argument.")
- ENDIF(${SETTINGS_FILE} MATCHES ".+")
-ENDMACRO(CMAKE_IMPORT_BUILD_SETTINGS)
+macro(CMAKE_IMPORT_BUILD_SETTINGS SETTINGS_FILE)
+ if(${SETTINGS_FILE} MATCHES ".+")
+ else(${SETTINGS_FILE} MATCHES ".+")
+ message(SEND_ERROR "CMAKE_IMPORT_BUILD_SETTINGS called with no argument.")
+ endif(${SETTINGS_FILE} MATCHES ".+")
+endmacro(CMAKE_IMPORT_BUILD_SETTINGS)
diff --git a/Modules/CMakeJOMFindMake.cmake b/Modules/CMakeJOMFindMake.cmake
index 617f3bb909..cb3cf12c81 100644
--- a/Modules/CMakeJOMFindMake.cmake
+++ b/Modules/CMakeJOMFindMake.cmake
@@ -13,6 +13,6 @@
# License text for the above reference.)
-SET (CMAKE_MAKE_PROGRAM "jom" CACHE STRING
+set (CMAKE_MAKE_PROGRAM "jom" CACHE STRING
"Program used to build from makefiles.")
-MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
+mark_as_advanced(CMAKE_MAKE_PROGRAM)
diff --git a/Modules/CMakeJavaCompiler.cmake.in b/Modules/CMakeJavaCompiler.cmake.in
index 79c9288bcf..cd4158c8e7 100644
--- a/Modules/CMakeJavaCompiler.cmake.in
+++ b/Modules/CMakeJavaCompiler.cmake.in
@@ -1,13 +1,13 @@
-SET(CMAKE_Java_COMPILER "@CMAKE_Java_COMPILER@")
-SET(CMAKE_Java_COMPILER_ARG1 "@CMAKE_Java_COMPILER_ARG1@")
-SET(CMAKE_Java_RUNTIME "@CMAKE_Java_RUNTIME@")
-SET(CMAKE_Java_ARCHIVE "@CMAKE_Java_ARCHIVE@")
-SET(CMAKE_Java_COMPILER_LOADED 1)
+set(CMAKE_Java_COMPILER "@CMAKE_Java_COMPILER@")
+set(CMAKE_Java_COMPILER_ARG1 "@CMAKE_Java_COMPILER_ARG1@")
+set(CMAKE_Java_RUNTIME "@CMAKE_Java_RUNTIME@")
+set(CMAKE_Java_ARCHIVE "@CMAKE_Java_ARCHIVE@")
+set(CMAKE_Java_COMPILER_LOADED 1)
-SET(CMAKE_Java_SOURCE_FILE_EXTENSIONS java)
-SET(CMAKE_Java_LINKER_PREFERENCE 40)
-SET(CMAKE_Java_OUTPUT_EXTENSION .class)
-SET(CMAKE_Java_OUTPUT_EXTENSION_REPLACE 1)
-SET(CMAKE_STATIC_LIBRARY_PREFIX_Java "")
-SET(CMAKE_STATIC_LIBRARY_SUFFIX_Java ".jar")
-SET(CMAKE_Java_COMPILER_ENV_VAR "JAVA_COMPILER")
+set(CMAKE_Java_SOURCE_FILE_EXTENSIONS java)
+set(CMAKE_Java_LINKER_PREFERENCE 40)
+set(CMAKE_Java_OUTPUT_EXTENSION .class)
+set(CMAKE_Java_OUTPUT_EXTENSION_REPLACE 1)
+set(CMAKE_STATIC_LIBRARY_PREFIX_Java "")
+set(CMAKE_STATIC_LIBRARY_SUFFIX_Java ".jar")
+set(CMAKE_Java_COMPILER_ENV_VAR "JAVA_COMPILER")
diff --git a/Modules/CMakeJavaInformation.cmake b/Modules/CMakeJavaInformation.cmake
index 7f812bd32c..79208ca510 100644
--- a/Modules/CMakeJavaInformation.cmake
+++ b/Modules/CMakeJavaInformation.cmake
@@ -18,42 +18,42 @@
# But, it should still be after the platform file so changes can
# be made to those values.
-IF(CMAKE_USER_MAKE_RULES_OVERRIDE)
+if(CMAKE_USER_MAKE_RULES_OVERRIDE)
# Save the full path of the file so try_compile can use it.
- INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE} RESULT_VARIABLE _override)
- SET(CMAKE_USER_MAKE_RULES_OVERRIDE "${_override}")
-ENDIF()
+ include(${CMAKE_USER_MAKE_RULES_OVERRIDE} RESULT_VARIABLE _override)
+ set(CMAKE_USER_MAKE_RULES_OVERRIDE "${_override}")
+endif()
-IF(CMAKE_USER_MAKE_RULES_OVERRIDE_Java)
+if(CMAKE_USER_MAKE_RULES_OVERRIDE_Java)
# Save the full path of the file so try_compile can use it.
- INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_Java} RESULT_VARIABLE _override)
- SET(CMAKE_USER_MAKE_RULES_OVERRIDE_Java "${_override}")
-ENDIF()
+ include(${CMAKE_USER_MAKE_RULES_OVERRIDE_Java} RESULT_VARIABLE _override)
+ set(CMAKE_USER_MAKE_RULES_OVERRIDE_Java "${_override}")
+endif()
# this is a place holder if java needed flags for javac they would go here.
-IF(NOT CMAKE_Java_CREATE_STATIC_LIBRARY)
-# IF(WIN32)
-# SET(class_files_mask "*.class")
-# ELSE(WIN32)
- SET(class_files_mask ".")
-# ENDIF(WIN32)
-
- SET(CMAKE_Java_CREATE_STATIC_LIBRARY
+if(NOT CMAKE_Java_CREATE_STATIC_LIBRARY)
+# if(WIN32)
+# set(class_files_mask "*.class")
+# else(WIN32)
+ set(class_files_mask ".")
+# endif(WIN32)
+
+ set(CMAKE_Java_CREATE_STATIC_LIBRARY
"<CMAKE_Java_ARCHIVE> -cf <TARGET> -C <OBJECT_DIR> ${class_files_mask}")
# "${class_files_mask}" should really be "<OBJECTS>" but compling a *.java
# file can create more than one *.class file...
-ENDIF(NOT CMAKE_Java_CREATE_STATIC_LIBRARY)
+endif(NOT CMAKE_Java_CREATE_STATIC_LIBRARY)
# compile a Java file into an object file
-IF(NOT CMAKE_Java_COMPILE_OBJECT)
- SET(CMAKE_Java_COMPILE_OBJECT
+if(NOT CMAKE_Java_COMPILE_OBJECT)
+ set(CMAKE_Java_COMPILE_OBJECT
"<CMAKE_Java_COMPILER> <FLAGS> <SOURCE> -d <OBJECT_DIR>")
-ENDIF(NOT CMAKE_Java_COMPILE_OBJECT)
+endif(NOT CMAKE_Java_COMPILE_OBJECT)
# set java include flag option and the separator for multiple include paths
-SET(CMAKE_INCLUDE_FLAG_Java "-classpath ")
-IF(WIN32 AND NOT CYGWIN)
- SET(CMAKE_INCLUDE_FLAG_SEP_Java ";")
-ELSE(WIN32 AND NOT CYGWIN)
- SET(CMAKE_INCLUDE_FLAG_SEP_Java ":")
-ENDIF(WIN32 AND NOT CYGWIN)
+set(CMAKE_INCLUDE_FLAG_Java "-classpath ")
+if(WIN32 AND NOT CYGWIN)
+ set(CMAKE_INCLUDE_FLAG_SEP_Java ";")
+else(WIN32 AND NOT CYGWIN)
+ set(CMAKE_INCLUDE_FLAG_SEP_Java ":")
+endif(WIN32 AND NOT CYGWIN)
diff --git a/Modules/CMakeMSYSFindMake.cmake b/Modules/CMakeMSYSFindMake.cmake
index 29dc2c0255..bc0f89fffd 100644
--- a/Modules/CMakeMSYSFindMake.cmake
+++ b/Modules/CMakeMSYSFindMake.cmake
@@ -12,9 +12,9 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PROGRAM(CMAKE_MAKE_PROGRAM make
+find_program(CMAKE_MAKE_PROGRAM make
PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MSYS-1.0_is1;Inno Setup: App Path]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MinGW;InstallLocation]/bin"
c:/msys/1.0/bin /msys/1.0/bin)
-MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
+mark_as_advanced(CMAKE_MAKE_PROGRAM)
diff --git a/Modules/CMakeMinGWFindMake.cmake b/Modules/CMakeMinGWFindMake.cmake
index 61ddb8c6ce..9081e68c14 100644
--- a/Modules/CMakeMinGWFindMake.cmake
+++ b/Modules/CMakeMinGWFindMake.cmake
@@ -12,13 +12,13 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PROGRAM(CMAKE_MAKE_PROGRAM mingw32-make.exe PATHS
+find_program(CMAKE_MAKE_PROGRAM mingw32-make.exe PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MinGW;InstallLocation]/bin"
c:/MinGW/bin /MinGW/bin)
-FIND_PROGRAM(CMAKE_SH sh.exe )
-IF(CMAKE_SH)
- MESSAGE(FATAL_ERROR "sh.exe was found in your PATH, here:\n${CMAKE_SH}\nFor MinGW make to work correctly sh.exe must NOT be in your path.\nRun cmake from a shell that does not have sh.exe in your PATH.\nIf you want to use a UNIX shell, then use MSYS Makefiles.\n")
- SET(CMAKE_MAKE_PROGRAM NOTFOUND)
-ENDIF(CMAKE_SH)
+find_program(CMAKE_SH sh.exe )
+if(CMAKE_SH)
+ message(FATAL_ERROR "sh.exe was found in your PATH, here:\n${CMAKE_SH}\nFor MinGW make to work correctly sh.exe must NOT be in your path.\nRun cmake from a shell that does not have sh.exe in your PATH.\nIf you want to use a UNIX shell, then use MSYS Makefiles.\n")
+ set(CMAKE_MAKE_PROGRAM NOTFOUND)
+endif(CMAKE_SH)
-MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM CMAKE_SH)
+mark_as_advanced(CMAKE_MAKE_PROGRAM CMAKE_SH)
diff --git a/Modules/CMakeNMakeFindMake.cmake b/Modules/CMakeNMakeFindMake.cmake
index f6472170cf..d807df82b4 100644
--- a/Modules/CMakeNMakeFindMake.cmake
+++ b/Modules/CMakeNMakeFindMake.cmake
@@ -13,6 +13,6 @@
# License text for the above reference.)
-SET (CMAKE_MAKE_PROGRAM "nmake" CACHE STRING
+set (CMAKE_MAKE_PROGRAM "nmake" CACHE STRING
"Program used to build from makefiles.")
-MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
+mark_as_advanced(CMAKE_MAKE_PROGRAM)
diff --git a/Modules/CMakeNinjaFindMake.cmake b/Modules/CMakeNinjaFindMake.cmake
index f15c3e0d44..c3ca7671c5 100644
--- a/Modules/CMakeNinjaFindMake.cmake
+++ b/Modules/CMakeNinjaFindMake.cmake
@@ -12,6 +12,6 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PROGRAM(CMAKE_MAKE_PROGRAM ninja
+find_program(CMAKE_MAKE_PROGRAM ninja
DOC "Program used to build from build.ninja files.")
-MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
+mark_as_advanced(CMAKE_MAKE_PROGRAM)
diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake
index 48039e522c..457a7ae6d4 100644
--- a/Modules/CMakePackageConfigHelpers.cmake
+++ b/Modules/CMakePackageConfigHelpers.cmake
@@ -6,7 +6,7 @@
# [NO_CHECK_REQUIRED_COMPONENTS_MACRO])
#
# CONFIGURE_PACKAGE_CONFIG_FILE() should be used instead of the plain
-# CONFIGURE_FILE() command when creating the <Name>Config.cmake or <Name>-config.cmake
+# configure_file() command when creating the <Name>Config.cmake or <Name>-config.cmake
# file for installing a project or library. It helps making the resulting package
# relocatable by avoiding hardcoded paths in the installed Config.cmake file.
#
@@ -31,12 +31,12 @@
# Usage:
# 1. write a FooConfig.cmake.in file as you are used to
# 2. insert a line containing only the string "@PACKAGE_INIT@"
-# 3. instead of SET(FOO_DIR "@SOME_INSTALL_DIR@"), use SET(FOO_DIR "@PACKAGE_SOME_INSTALL_DIR@")
+# 3. instead of set(FOO_DIR "@SOME_INSTALL_DIR@"), use set(FOO_DIR "@PACKAGE_SOME_INSTALL_DIR@")
# (this must be after the @PACKAGE_INIT@ line)
-# 4. instead of using the normal CONFIGURE_FILE(), use CONFIGURE_PACKAGE_CONFIG_FILE()
+# 4. instead of using the normal configure_file(), use CONFIGURE_PACKAGE_CONFIG_FILE()
#
# The <input> and <output> arguments are the input and output file, the same way
-# as in CONFIGURE_FILE().
+# as in configure_file().
#
# The <path> given to INSTALL_DESTINATION must be the destination where the FooConfig.cmake
# file will be installed to. This can either be a relative or absolute path, both work.
@@ -77,7 +77,7 @@
# WRITE_BASIC_PACKAGE_VERSION_FILE( filename VERSION major.minor.patch COMPATIBILITY (AnyNewerVersion|SameMajorVersion|ExactVersion) )
#
# Writes a file for use as <package>ConfigVersion.cmake file to <filename>.
-# See the documentation of FIND_PACKAGE() for details on this.
+# See the documentation of find_package() for details on this.
# filename is the output filename, it should be in the build tree.
# major.minor.patch is the version number of the project to be installed
# The COMPATIBILITY mode AnyNewerVersion means that the installed package version
diff --git a/Modules/CMakePrintSystemInformation.cmake b/Modules/CMakePrintSystemInformation.cmake
index 2c5d0f2ae5..e0c73346b7 100644
--- a/Modules/CMakePrintSystemInformation.cmake
+++ b/Modules/CMakePrintSystemInformation.cmake
@@ -16,31 +16,31 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-MESSAGE("CMAKE_SYSTEM is ${CMAKE_SYSTEM} ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION}")
-MESSAGE("CMAKE_SYSTEM file is ${CMAKE_SYSTEM_INFO_FILE}")
-MESSAGE("CMAKE_C_COMPILER is ${CMAKE_C_COMPILER}")
-MESSAGE("CMAKE_CXX_COMPILER is ${CMAKE_CXX_COMPILER}")
+message("CMAKE_SYSTEM is ${CMAKE_SYSTEM} ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION}")
+message("CMAKE_SYSTEM file is ${CMAKE_SYSTEM_INFO_FILE}")
+message("CMAKE_C_COMPILER is ${CMAKE_C_COMPILER}")
+message("CMAKE_CXX_COMPILER is ${CMAKE_CXX_COMPILER}")
-MESSAGE("CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS is ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}")
-MESSAGE("CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS is ${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}")
-MESSAGE("CMAKE_DL_LIBS is ${CMAKE_DL_LIBS}")
-MESSAGE("CMAKE_SHARED_LIBRARY_PREFIX is ${CMAKE_SHARED_LIBRARY_PREFIX}")
-MESSAGE("CMAKE_SHARED_LIBRARY_SUFFIX is ${CMAKE_SHARED_LIBRARY_SUFFIX}")
-MESSAGE("CMAKE_COMPILER_IS_GNUCC = ${CMAKE_COMPILER_IS_GNUCC}")
-MESSAGE("CMAKE_COMPILER_IS_GNUCXX = ${CMAKE_COMPILER_IS_GNUCXX}")
+message("CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS is ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}")
+message("CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS is ${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}")
+message("CMAKE_DL_LIBS is ${CMAKE_DL_LIBS}")
+message("CMAKE_SHARED_LIBRARY_PREFIX is ${CMAKE_SHARED_LIBRARY_PREFIX}")
+message("CMAKE_SHARED_LIBRARY_SUFFIX is ${CMAKE_SHARED_LIBRARY_SUFFIX}")
+message("CMAKE_COMPILER_IS_GNUCC = ${CMAKE_COMPILER_IS_GNUCC}")
+message("CMAKE_COMPILER_IS_GNUCXX = ${CMAKE_COMPILER_IS_GNUCXX}")
-MESSAGE("CMAKE_CXX_CREATE_SHARED_LIBRARY is ${CMAKE_CXX_CREATE_SHARED_LIBRARY}")
-MESSAGE("CMAKE_CXX_CREATE_SHARED_MODULE is ${CMAKE_CXX_CREATE_SHARED_MODULE}")
-MESSAGE("CMAKE_CXX_CREATE_STATIC_LIBRARY is ${CMAKE_CXX_CREATE_STATIC_LIBRARY}")
-MESSAGE("CMAKE_CXX_COMPILE_OBJECT is ${CMAKE_CXX_COMPILE_OBJECT}")
-MESSAGE("CMAKE_CXX_LINK_EXECUTABLE ${CMAKE_CXX_LINK_EXECUTABLE}")
+message("CMAKE_CXX_CREATE_SHARED_LIBRARY is ${CMAKE_CXX_CREATE_SHARED_LIBRARY}")
+message("CMAKE_CXX_CREATE_SHARED_MODULE is ${CMAKE_CXX_CREATE_SHARED_MODULE}")
+message("CMAKE_CXX_CREATE_STATIC_LIBRARY is ${CMAKE_CXX_CREATE_STATIC_LIBRARY}")
+message("CMAKE_CXX_COMPILE_OBJECT is ${CMAKE_CXX_COMPILE_OBJECT}")
+message("CMAKE_CXX_LINK_EXECUTABLE ${CMAKE_CXX_LINK_EXECUTABLE}")
-MESSAGE("CMAKE_C_CREATE_SHARED_LIBRARY is ${CMAKE_C_CREATE_SHARED_LIBRARY}")
-MESSAGE("CMAKE_C_CREATE_SHARED_MODULE is ${CMAKE_C_CREATE_SHARED_MODULE}")
-MESSAGE("CMAKE_C_CREATE_STATIC_LIBRARY is ${CMAKE_C_CREATE_STATIC_LIBRARY}")
-MESSAGE("CMAKE_C_COMPILE_OBJECT is ${CMAKE_C_COMPILE_OBJECT}")
-MESSAGE("CMAKE_C_LINK_EXECUTABLE ${CMAKE_C_LINK_EXECUTABLE}")
+message("CMAKE_C_CREATE_SHARED_LIBRARY is ${CMAKE_C_CREATE_SHARED_LIBRARY}")
+message("CMAKE_C_CREATE_SHARED_MODULE is ${CMAKE_C_CREATE_SHARED_MODULE}")
+message("CMAKE_C_CREATE_STATIC_LIBRARY is ${CMAKE_C_CREATE_STATIC_LIBRARY}")
+message("CMAKE_C_COMPILE_OBJECT is ${CMAKE_C_COMPILE_OBJECT}")
+message("CMAKE_C_LINK_EXECUTABLE ${CMAKE_C_LINK_EXECUTABLE}")
-MESSAGE("CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE ${CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE}")
-MESSAGE("CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE ${CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE}")
+message("CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE ${CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE}")
+message("CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE ${CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE}")
diff --git a/Modules/CMakePushCheckState.cmake b/Modules/CMakePushCheckState.cmake
index 0a42128183..fa6e81c6cb 100644
--- a/Modules/CMakePushCheckState.cmake
+++ b/Modules/CMakePushCheckState.cmake
@@ -31,31 +31,31 @@
# License text for the above reference.)
-MACRO(CMAKE_PUSH_CHECK_STATE)
+macro(CMAKE_PUSH_CHECK_STATE)
- IF(NOT DEFINED _CMAKE_PUSH_CHECK_STATE_COUNTER)
- SET(_CMAKE_PUSH_CHECK_STATE_COUNTER 0)
- ENDIF()
+ if(NOT DEFINED _CMAKE_PUSH_CHECK_STATE_COUNTER)
+ set(_CMAKE_PUSH_CHECK_STATE_COUNTER 0)
+ endif()
- MATH(EXPR _CMAKE_PUSH_CHECK_STATE_COUNTER "${_CMAKE_PUSH_CHECK_STATE_COUNTER}+1")
+ math(EXPR _CMAKE_PUSH_CHECK_STATE_COUNTER "${_CMAKE_PUSH_CHECK_STATE_COUNTER}+1")
- SET(_CMAKE_REQUIRED_INCLUDES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_INCLUDES})
- SET(_CMAKE_REQUIRED_DEFINITIONS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_DEFINITIONS})
- SET(_CMAKE_REQUIRED_LIBRARIES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_LIBRARIES})
- SET(_CMAKE_REQUIRED_FLAGS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_FLAGS})
-ENDMACRO(CMAKE_PUSH_CHECK_STATE)
+ set(_CMAKE_REQUIRED_INCLUDES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_INCLUDES})
+ set(_CMAKE_REQUIRED_DEFINITIONS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_DEFINITIONS})
+ set(_CMAKE_REQUIRED_LIBRARIES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_LIBRARIES})
+ set(_CMAKE_REQUIRED_FLAGS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER} ${CMAKE_REQUIRED_FLAGS})
+endmacro(CMAKE_PUSH_CHECK_STATE)
-MACRO(CMAKE_POP_CHECK_STATE)
+macro(CMAKE_POP_CHECK_STATE)
# don't pop more than we pushed
- IF("${_CMAKE_PUSH_CHECK_STATE_COUNTER}" GREATER "0")
+ if("${_CMAKE_PUSH_CHECK_STATE_COUNTER}" GREATER "0")
- SET(CMAKE_REQUIRED_INCLUDES ${_CMAKE_REQUIRED_INCLUDES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}})
- SET(CMAKE_REQUIRED_DEFINITIONS ${_CMAKE_REQUIRED_DEFINITIONS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}})
- SET(CMAKE_REQUIRED_LIBRARIES ${_CMAKE_REQUIRED_LIBRARIES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}})
- SET(CMAKE_REQUIRED_FLAGS ${_CMAKE_REQUIRED_FLAGS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}})
+ set(CMAKE_REQUIRED_INCLUDES ${_CMAKE_REQUIRED_INCLUDES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}})
+ set(CMAKE_REQUIRED_DEFINITIONS ${_CMAKE_REQUIRED_DEFINITIONS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}})
+ set(CMAKE_REQUIRED_LIBRARIES ${_CMAKE_REQUIRED_LIBRARIES_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}})
+ set(CMAKE_REQUIRED_FLAGS ${_CMAKE_REQUIRED_FLAGS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}})
- MATH(EXPR _CMAKE_PUSH_CHECK_STATE_COUNTER "${_CMAKE_PUSH_CHECK_STATE_COUNTER}-1")
- ENDIF()
+ math(EXPR _CMAKE_PUSH_CHECK_STATE_COUNTER "${_CMAKE_PUSH_CHECK_STATE_COUNTER}-1")
+ endif()
-ENDMACRO(CMAKE_POP_CHECK_STATE)
+endmacro(CMAKE_POP_CHECK_STATE)
diff --git a/Modules/CMakeRCCompiler.cmake.in b/Modules/CMakeRCCompiler.cmake.in
index 83428e2eb0..0fc3142203 100644
--- a/Modules/CMakeRCCompiler.cmake.in
+++ b/Modules/CMakeRCCompiler.cmake.in
@@ -1,6 +1,6 @@
-SET(CMAKE_RC_COMPILER "@CMAKE_RC_COMPILER@")
-SET(CMAKE_RC_COMPILER_ARG1 "@CMAKE_RC_COMPILER_ARG1@")
-SET(CMAKE_RC_COMPILER_LOADED 1)
-SET(CMAKE_RC_SOURCE_FILE_EXTENSIONS rc)
-SET(CMAKE_RC_OUTPUT_EXTENSION @CMAKE_RC_OUTPUT_EXTENSION@)
-SET(CMAKE_RC_COMPILER_ENV_VAR "RC")
+set(CMAKE_RC_COMPILER "@CMAKE_RC_COMPILER@")
+set(CMAKE_RC_COMPILER_ARG1 "@CMAKE_RC_COMPILER_ARG1@")
+set(CMAKE_RC_COMPILER_LOADED 1)
+set(CMAKE_RC_SOURCE_FILE_EXTENSIONS rc)
+set(CMAKE_RC_OUTPUT_EXTENSION @CMAKE_RC_OUTPUT_EXTENSION@)
+set(CMAKE_RC_COMPILER_ENV_VAR "RC")
diff --git a/Modules/CMakeRCInformation.cmake b/Modules/CMakeRCInformation.cmake
index 859fe1158a..2f1387c37d 100644
--- a/Modules/CMakeRCInformation.cmake
+++ b/Modules/CMakeRCInformation.cmake
@@ -18,36 +18,36 @@
# if it exists.
# make sure we don't use CMAKE_BASE_NAME from somewhere else
-SET(CMAKE_BASE_NAME)
-GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE)
-IF("${CMAKE_BASE_NAME}" MATCHES "windres")
- SET(CMAKE_BASE_NAME "windres")
-ENDIF()
-SET(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE
+set(CMAKE_BASE_NAME)
+get_filename_component(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE)
+if("${CMAKE_BASE_NAME}" MATCHES "windres")
+ set(CMAKE_BASE_NAME "windres")
+endif()
+set(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
-INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
+include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
-SET (CMAKE_RC_FLAGS "$ENV{RCFLAGS} ${CMAKE_RC_FLAGS_INIT}" CACHE STRING
+set (CMAKE_RC_FLAGS "$ENV{RCFLAGS} ${CMAKE_RC_FLAGS_INIT}" CACHE STRING
"Flags for Fortran compiler.")
# These are the only types of flags that should be passed to the rc
# command, if COMPILE_FLAGS is used on a target this will be used
# to filter out any other flags
-SET(CMAKE_RC_FLAG_REGEX "^[-/](D|I)")
+set(CMAKE_RC_FLAG_REGEX "^[-/](D|I)")
# now define the following rule variables
# CMAKE_RC_COMPILE_OBJECT
-SET(CMAKE_INCLUDE_FLAG_RC "-I")
+set(CMAKE_INCLUDE_FLAG_RC "-I")
# compile a Resource file into an object file
-IF(NOT CMAKE_RC_COMPILE_OBJECT)
- SET(CMAKE_RC_COMPILE_OBJECT
+if(NOT CMAKE_RC_COMPILE_OBJECT)
+ set(CMAKE_RC_COMPILE_OBJECT
"<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> /fo<OBJECT> <SOURCE>")
-ENDIF(NOT CMAKE_RC_COMPILE_OBJECT)
+endif(NOT CMAKE_RC_COMPILE_OBJECT)
-MARK_AS_ADVANCED(
+mark_as_advanced(
CMAKE_RC_FLAGS
)
# set this variable so we can avoid loading this more than once.
-SET(CMAKE_RC_INFORMATION_LOADED 1)
+set(CMAKE_RC_INFORMATION_LOADED 1)
diff --git a/Modules/CMakeSystem.cmake.in b/Modules/CMakeSystem.cmake.in
index a9f3a552d4..7e2a3584b4 100644
--- a/Modules/CMakeSystem.cmake.in
+++ b/Modules/CMakeSystem.cmake.in
@@ -1,15 +1,15 @@
@INCLUDE_CMAKE_TOOLCHAIN_FILE_IF_REQUIRED@
-SET(CMAKE_SYSTEM "@CMAKE_SYSTEM@")
-SET(CMAKE_SYSTEM_NAME "@CMAKE_SYSTEM_NAME@")
-SET(CMAKE_SYSTEM_VERSION "@CMAKE_SYSTEM_VERSION@")
-SET(CMAKE_SYSTEM_PROCESSOR "@CMAKE_SYSTEM_PROCESSOR@")
+set(CMAKE_SYSTEM "@CMAKE_SYSTEM@")
+set(CMAKE_SYSTEM_NAME "@CMAKE_SYSTEM_NAME@")
+set(CMAKE_SYSTEM_VERSION "@CMAKE_SYSTEM_VERSION@")
+set(CMAKE_SYSTEM_PROCESSOR "@CMAKE_SYSTEM_PROCESSOR@")
-SET(CMAKE_HOST_SYSTEM "@CMAKE_HOST_SYSTEM@")
-SET(CMAKE_HOST_SYSTEM_NAME "@CMAKE_HOST_SYSTEM_NAME@")
-SET(CMAKE_HOST_SYSTEM_VERSION "@CMAKE_HOST_SYSTEM_VERSION@")
-SET(CMAKE_HOST_SYSTEM_PROCESSOR "@CMAKE_HOST_SYSTEM_PROCESSOR@")
+set(CMAKE_HOST_SYSTEM "@CMAKE_HOST_SYSTEM@")
+set(CMAKE_HOST_SYSTEM_NAME "@CMAKE_HOST_SYSTEM_NAME@")
+set(CMAKE_HOST_SYSTEM_VERSION "@CMAKE_HOST_SYSTEM_VERSION@")
+set(CMAKE_HOST_SYSTEM_PROCESSOR "@CMAKE_HOST_SYSTEM_PROCESSOR@")
-SET(CMAKE_CROSSCOMPILING "@CMAKE_CROSSCOMPILING@")
+set(CMAKE_CROSSCOMPILING "@CMAKE_CROSSCOMPILING@")
-SET(CMAKE_SYSTEM_LOADED 1)
+set(CMAKE_SYSTEM_LOADED 1)
diff --git a/Modules/CMakeSystemSpecificInformation.cmake b/Modules/CMakeSystemSpecificInformation.cmake
index 88b77489bf..6f85ccc913 100644
--- a/Modules/CMakeSystemSpecificInformation.cmake
+++ b/Modules/CMakeSystemSpecificInformation.cmake
@@ -21,49 +21,49 @@
# But they are reset here and set again in the platform files for the target
# platform, so they can be used for testing the target platform instead
# of testing the host platform.
-SET(APPLE )
-SET(UNIX )
-SET(CYGWIN )
-SET(WIN32 )
+set(APPLE )
+set(UNIX )
+set(CYGWIN )
+set(WIN32 )
# include Generic system information
-INCLUDE(CMakeGenericSystem)
+include(CMakeGenericSystem)
# 2. now include SystemName.cmake file to set the system specific information
-SET(CMAKE_SYSTEM_INFO_FILE Platform/${CMAKE_SYSTEM_NAME})
+set(CMAKE_SYSTEM_INFO_FILE Platform/${CMAKE_SYSTEM_NAME})
-INCLUDE(${CMAKE_SYSTEM_INFO_FILE} OPTIONAL RESULT_VARIABLE _INCLUDED_SYSTEM_INFO_FILE)
+include(${CMAKE_SYSTEM_INFO_FILE} OPTIONAL RESULT_VARIABLE _INCLUDED_SYSTEM_INFO_FILE)
-IF(NOT _INCLUDED_SYSTEM_INFO_FILE)
- MESSAGE("System is unknown to cmake, create:\n${CMAKE_SYSTEM_INFO_FILE}"
+if(NOT _INCLUDED_SYSTEM_INFO_FILE)
+ message("System is unknown to cmake, create:\n${CMAKE_SYSTEM_INFO_FILE}"
" to use this system, please send your config file to "
"cmake@www.cmake.org so it can be added to cmake")
- IF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
- CONFIGURE_FILE(${CMAKE_BINARY_DIR}/CMakeCache.txt
+ if(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
+ configure_file(${CMAKE_BINARY_DIR}/CMakeCache.txt
${CMAKE_BINARY_DIR}/CopyOfCMakeCache.txt COPYONLY)
- MESSAGE("Your CMakeCache.txt file was copied to CopyOfCMakeCache.txt. "
+ message("Your CMakeCache.txt file was copied to CopyOfCMakeCache.txt. "
"Please send that file to cmake@www.cmake.org.")
- ENDIF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
-ENDIF(NOT _INCLUDED_SYSTEM_INFO_FILE)
+ endif(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
+endif(NOT _INCLUDED_SYSTEM_INFO_FILE)
# optionally include a file which can do extra-generator specific things, e.g.
# CMakeFindEclipseCDT4.cmake asks gcc for the system include dirs for the Eclipse CDT4 generator
-IF(CMAKE_EXTRA_GENERATOR)
- STRING(REPLACE " " "" _CMAKE_EXTRA_GENERATOR_NO_SPACES ${CMAKE_EXTRA_GENERATOR} )
- INCLUDE("CMakeFind${_CMAKE_EXTRA_GENERATOR_NO_SPACES}" OPTIONAL)
-ENDIF(CMAKE_EXTRA_GENERATOR)
+if(CMAKE_EXTRA_GENERATOR)
+ string(REPLACE " " "" _CMAKE_EXTRA_GENERATOR_NO_SPACES ${CMAKE_EXTRA_GENERATOR} )
+ include("CMakeFind${_CMAKE_EXTRA_GENERATOR_NO_SPACES}" OPTIONAL)
+endif(CMAKE_EXTRA_GENERATOR)
# for most systems a module is the same as a shared library
# so unless the variable CMAKE_MODULE_EXISTS is set just
# copy the values from the LIBRARY variables
# this has to be done after the system information has been loaded
-IF(NOT CMAKE_MODULE_EXISTS)
- SET(CMAKE_SHARED_MODULE_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}")
- SET(CMAKE_SHARED_MODULE_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}")
-ENDIF(NOT CMAKE_MODULE_EXISTS)
+if(NOT CMAKE_MODULE_EXISTS)
+ set(CMAKE_SHARED_MODULE_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}")
+ set(CMAKE_SHARED_MODULE_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}")
+endif(NOT CMAKE_MODULE_EXISTS)
-SET(CMAKE_SYSTEM_SPECIFIC_INFORMATION_LOADED 1)
+set(CMAKE_SYSTEM_SPECIFIC_INFORMATION_LOADED 1)
diff --git a/Modules/CMakeTestASM-ATTCompiler.cmake b/Modules/CMakeTestASM-ATTCompiler.cmake
index 581ad0c23f..0cc68573ef 100644
--- a/Modules/CMakeTestASM-ATTCompiler.cmake
+++ b/Modules/CMakeTestASM-ATTCompiler.cmake
@@ -18,6 +18,6 @@
# because otherwise there would have to be a separate assembler source file
# for each assembler on every architecture.
-SET(ASM_DIALECT "-ATT")
-INCLUDE(CMakeTestASMCompiler)
-SET(ASM_DIALECT)
+set(ASM_DIALECT "-ATT")
+include(CMakeTestASMCompiler)
+set(ASM_DIALECT)
diff --git a/Modules/CMakeTestASMCompiler.cmake b/Modules/CMakeTestASMCompiler.cmake
index 294511d898..9381619c4b 100644
--- a/Modules/CMakeTestASMCompiler.cmake
+++ b/Modules/CMakeTestASMCompiler.cmake
@@ -19,17 +19,17 @@
# for each assembler on every architecture.
-SET(_ASM_COMPILER_WORKS 0)
+set(_ASM_COMPILER_WORKS 0)
-IF(CMAKE_ASM${ASM_DIALECT}_COMPILER)
- SET(_ASM_COMPILER_WORKS 1)
-ENDIF()
+if(CMAKE_ASM${ASM_DIALECT}_COMPILER)
+ set(_ASM_COMPILER_WORKS 1)
+endif()
# when using generic "ASM" support, we must have detected the compiler ID, fail otherwise:
-IF("ASM${ASM_DIALECT}" STREQUAL "ASM")
- IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
- SET(_ASM_COMPILER_WORKS 0)
- ENDIF()
-ENDIF()
+if("ASM${ASM_DIALECT}" STREQUAL "ASM")
+ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
+ set(_ASM_COMPILER_WORKS 0)
+ endif()
+endif()
-SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_WORKS ${_ASM_COMPILER_WORKS} CACHE INTERNAL "")
+set(CMAKE_ASM${ASM_DIALECT}_COMPILER_WORKS ${_ASM_COMPILER_WORKS} CACHE INTERNAL "")
diff --git a/Modules/CMakeTestASM_MASMCompiler.cmake b/Modules/CMakeTestASM_MASMCompiler.cmake
index 8369b942c8..462b1fc072 100644
--- a/Modules/CMakeTestASM_MASMCompiler.cmake
+++ b/Modules/CMakeTestASM_MASMCompiler.cmake
@@ -18,6 +18,6 @@
# because otherwise there would have to be a separate assembler source file
# for each assembler on every architecture.
-SET(ASM_DIALECT "_MASM")
-INCLUDE(CMakeTestASMCompiler)
-SET(ASM_DIALECT)
+set(ASM_DIALECT "_MASM")
+include(CMakeTestASMCompiler)
+set(ASM_DIALECT)
diff --git a/Modules/CMakeTestASM_NASMCompiler.cmake b/Modules/CMakeTestASM_NASMCompiler.cmake
index a5e2bea0a7..414c2f550e 100644
--- a/Modules/CMakeTestASM_NASMCompiler.cmake
+++ b/Modules/CMakeTestASM_NASMCompiler.cmake
@@ -18,6 +18,6 @@
# because otherwise there would have to be a separate assembler source file
# for each assembler on every architecture.
-SET(ASM_DIALECT "_NASM")
-INCLUDE(CMakeTestASMCompiler)
-SET(ASM_DIALECT)
+set(ASM_DIALECT "_NASM")
+include(CMakeTestASMCompiler)
+set(ASM_DIALECT)
diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake
index 5a86eb9178..9881c9d240 100644
--- a/Modules/CMakeTestCCompiler.cmake
+++ b/Modules/CMakeTestCCompiler.cmake
@@ -12,16 +12,16 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE(CMakeTestCompilerCommon)
+include(CMakeTestCompilerCommon)
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that that selected C compiler can actually compile
# and link the most basic of programs. If not, a fatal error
# is set and cmake stops processing commands and will not generate
# any makefiles or projects.
-IF(NOT CMAKE_C_COMPILER_WORKS)
+if(NOT CMAKE_C_COMPILER_WORKS)
PrintTestCompilerStatus("C" "")
- FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c
+ file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c
"#ifdef __cplusplus\n"
"# error \"The CMAKE_C_COMPILER is set to a C++ compiler\"\n"
"#endif\n"
@@ -33,55 +33,55 @@ IF(NOT CMAKE_C_COMPILER_WORKS)
"int main(int argc, char* argv[])\n"
"#endif\n"
"{ (void)argv; return argc-1;}\n")
- TRY_COMPILE(CMAKE_C_COMPILER_WORKS ${CMAKE_BINARY_DIR}
+ try_compile(CMAKE_C_COMPILER_WORKS ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c
OUTPUT_VARIABLE __CMAKE_C_COMPILER_OUTPUT)
- SET(C_TEST_WAS_RUN 1)
-ENDIF(NOT CMAKE_C_COMPILER_WORKS)
+ set(C_TEST_WAS_RUN 1)
+endif(NOT CMAKE_C_COMPILER_WORKS)
-IF(NOT CMAKE_C_COMPILER_WORKS)
+if(NOT CMAKE_C_COMPILER_WORKS)
PrintTestCompilerStatus("C" " -- broken")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the C compiler works failed with "
"the following output:\n${__CMAKE_C_COMPILER_OUTPUT}\n\n")
# if the compiler is broken make sure to remove the platform file
# since Windows-cl configures both c/cxx files both need to be removed
# when c or c++ fails
- FILE(REMOVE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake )
- FILE(REMOVE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake )
- MESSAGE(FATAL_ERROR "The C compiler \"${CMAKE_C_COMPILER}\" "
+ file(REMOVE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake )
+ file(REMOVE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake )
+ message(FATAL_ERROR "The C compiler \"${CMAKE_C_COMPILER}\" "
"is not able to compile a simple test program.\nIt fails "
"with the following output:\n ${__CMAKE_C_COMPILER_OUTPUT}\n\n"
"CMake will not be able to correctly generate this project.")
-ELSE(NOT CMAKE_C_COMPILER_WORKS)
- IF(C_TEST_WAS_RUN)
+else(NOT CMAKE_C_COMPILER_WORKS)
+ if(C_TEST_WAS_RUN)
PrintTestCompilerStatus("C" " -- works")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the C compiler works passed with "
"the following output:\n${__CMAKE_C_COMPILER_OUTPUT}\n\n")
- ENDIF(C_TEST_WAS_RUN)
- SET(CMAKE_C_COMPILER_WORKS 1 CACHE INTERNAL "")
+ endif(C_TEST_WAS_RUN)
+ set(CMAKE_C_COMPILER_WORKS 1 CACHE INTERNAL "")
- IF(CMAKE_C_COMPILER_FORCED)
+ if(CMAKE_C_COMPILER_FORCED)
# The compiler configuration was forced by the user.
# Assume the user has configured all compiler information.
- ELSE(CMAKE_C_COMPILER_FORCED)
+ else(CMAKE_C_COMPILER_FORCED)
# Try to identify the ABI and configure it into CMakeCCompiler.cmake
- INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake)
+ include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake)
CMAKE_DETERMINE_COMPILER_ABI(C ${CMAKE_ROOT}/Modules/CMakeCCompilerABI.c)
- CONFIGURE_FILE(
+ configure_file(
${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCCompiler.cmake
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
- INCLUDE(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCCompiler.cmake)
- ENDIF(CMAKE_C_COMPILER_FORCED)
- IF(CMAKE_C_SIZEOF_DATA_PTR)
- FOREACH(f ${CMAKE_C_ABI_FILES})
- INCLUDE(${f})
- ENDFOREACH()
- UNSET(CMAKE_C_ABI_FILES)
- ENDIF()
-ENDIF(NOT CMAKE_C_COMPILER_WORKS)
+ include(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCCompiler.cmake)
+ endif(CMAKE_C_COMPILER_FORCED)
+ if(CMAKE_C_SIZEOF_DATA_PTR)
+ foreach(f ${CMAKE_C_ABI_FILES})
+ include(${f})
+ endforeach()
+ unset(CMAKE_C_ABI_FILES)
+ endif()
+endif(NOT CMAKE_C_COMPILER_WORKS)
-UNSET(__CMAKE_C_COMPILER_OUTPUT)
+unset(__CMAKE_C_COMPILER_OUTPUT)
diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake
index dadec1a65f..52eaa3ccaa 100644
--- a/Modules/CMakeTestCXXCompiler.cmake
+++ b/Modules/CMakeTestCXXCompiler.cmake
@@ -12,69 +12,69 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE(CMakeTestCompilerCommon)
+include(CMakeTestCompilerCommon)
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that that selected C++ compiler can actually compile
# and link the most basic of programs. If not, a fatal error
# is set and cmake stops processing commands and will not generate
# any makefiles or projects.
-IF(NOT CMAKE_CXX_COMPILER_WORKS)
+if(NOT CMAKE_CXX_COMPILER_WORKS)
PrintTestCompilerStatus("CXX" "")
- FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx
+ file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx
"#ifndef __cplusplus\n"
"# error \"The CMAKE_CXX_COMPILER is set to a C compiler\"\n"
"#endif\n"
"int main(){return 0;}\n")
- TRY_COMPILE(CMAKE_CXX_COMPILER_WORKS ${CMAKE_BINARY_DIR}
+ try_compile(CMAKE_CXX_COMPILER_WORKS ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx
OUTPUT_VARIABLE __CMAKE_CXX_COMPILER_OUTPUT)
- SET(CXX_TEST_WAS_RUN 1)
-ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)
+ set(CXX_TEST_WAS_RUN 1)
+endif(NOT CMAKE_CXX_COMPILER_WORKS)
-IF(NOT CMAKE_CXX_COMPILER_WORKS)
+if(NOT CMAKE_CXX_COMPILER_WORKS)
PrintTestCompilerStatus("CXX" " -- broken")
# if the compiler is broken make sure to remove the platform file
# since Windows-cl configures both c/cxx files both need to be removed
# when c or c++ fails
- FILE(REMOVE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake )
- FILE(REMOVE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake )
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ file(REMOVE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake )
+ file(REMOVE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake )
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the CXX compiler works failed with "
"the following output:\n${__CMAKE_CXX_COMPILER_OUTPUT}\n\n")
- MESSAGE(FATAL_ERROR "The C++ compiler \"${CMAKE_CXX_COMPILER}\" "
+ message(FATAL_ERROR "The C++ compiler \"${CMAKE_CXX_COMPILER}\" "
"is not able to compile a simple test program.\nIt fails "
"with the following output:\n ${__CMAKE_CXX_COMPILER_OUTPUT}\n\n"
"CMake will not be able to correctly generate this project.")
-ELSE(NOT CMAKE_CXX_COMPILER_WORKS)
- IF(CXX_TEST_WAS_RUN)
+else(NOT CMAKE_CXX_COMPILER_WORKS)
+ if(CXX_TEST_WAS_RUN)
PrintTestCompilerStatus("CXX" " -- works")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the CXX compiler works passed with "
"the following output:\n${__CMAKE_CXX_COMPILER_OUTPUT}\n\n")
- ENDIF(CXX_TEST_WAS_RUN)
- SET(CMAKE_CXX_COMPILER_WORKS 1 CACHE INTERNAL "")
+ endif(CXX_TEST_WAS_RUN)
+ set(CMAKE_CXX_COMPILER_WORKS 1 CACHE INTERNAL "")
- IF(CMAKE_CXX_COMPILER_FORCED)
+ if(CMAKE_CXX_COMPILER_FORCED)
# The compiler configuration was forced by the user.
# Assume the user has configured all compiler information.
- ELSE(CMAKE_CXX_COMPILER_FORCED)
+ else(CMAKE_CXX_COMPILER_FORCED)
# Try to identify the ABI and configure it into CMakeCXXCompiler.cmake
- INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake)
+ include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake)
CMAKE_DETERMINE_COMPILER_ABI(CXX ${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp)
- CONFIGURE_FILE(
+ configure_file(
${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
- INCLUDE(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake)
- ENDIF(CMAKE_CXX_COMPILER_FORCED)
- IF(CMAKE_CXX_SIZEOF_DATA_PTR)
- FOREACH(f ${CMAKE_CXX_ABI_FILES})
- INCLUDE(${f})
- ENDFOREACH()
- UNSET(CMAKE_CXX_ABI_FILES)
- ENDIF()
-ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)
+ include(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake)
+ endif(CMAKE_CXX_COMPILER_FORCED)
+ if(CMAKE_CXX_SIZEOF_DATA_PTR)
+ foreach(f ${CMAKE_CXX_ABI_FILES})
+ include(${f})
+ endforeach()
+ unset(CMAKE_CXX_ABI_FILES)
+ endif()
+endif(NOT CMAKE_CXX_COMPILER_WORKS)
-UNSET(__CMAKE_CXX_COMPILER_OUTPUT)
+unset(__CMAKE_CXX_COMPILER_OUTPUT)
diff --git a/Modules/CMakeTestCompilerCommon.cmake b/Modules/CMakeTestCompilerCommon.cmake
index fd8a105b2b..d51b503a1b 100644
--- a/Modules/CMakeTestCompilerCommon.cmake
+++ b/Modules/CMakeTestCompilerCommon.cmake
@@ -13,9 +13,9 @@
# License text for the above reference.)
function(PrintTestCompilerStatus LANG MSG)
- IF(CMAKE_GENERATOR MATCHES Make)
- MESSAGE(STATUS "Check for working ${LANG} compiler: ${CMAKE_${LANG}_COMPILER}${MSG}")
- ELSE()
- MESSAGE(STATUS "Check for working ${LANG} compiler using: ${CMAKE_GENERATOR}${MSG}")
- ENDIF()
+ if(CMAKE_GENERATOR MATCHES Make)
+ message(STATUS "Check for working ${LANG} compiler: ${CMAKE_${LANG}_COMPILER}${MSG}")
+ else()
+ message(STATUS "Check for working ${LANG} compiler using: ${CMAKE_GENERATOR}${MSG}")
+ endif()
endfunction()
diff --git a/Modules/CMakeTestFortranCompiler.cmake b/Modules/CMakeTestFortranCompiler.cmake
index b2fa16aef9..4f711d8e3e 100644
--- a/Modules/CMakeTestFortranCompiler.cmake
+++ b/Modules/CMakeTestFortranCompiler.cmake
@@ -12,90 +12,90 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE(CMakeTestCompilerCommon)
+include(CMakeTestCompilerCommon)
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that that selected Fortran compiler can actually compile
# and link the most basic of programs. If not, a fatal error
# is set and cmake stops processing commands and will not generate
# any makefiles or projects.
-IF(NOT CMAKE_Fortran_COMPILER_WORKS)
+if(NOT CMAKE_Fortran_COMPILER_WORKS)
PrintTestCompilerStatus("Fortran" "")
- FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f "
+ file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f "
PROGRAM TESTFortran
PRINT *, 'Hello'
END
")
- TRY_COMPILE(CMAKE_Fortran_COMPILER_WORKS ${CMAKE_BINARY_DIR}
+ try_compile(CMAKE_Fortran_COMPILER_WORKS ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f
OUTPUT_VARIABLE OUTPUT)
- SET(FORTRAN_TEST_WAS_RUN 1)
-ENDIF(NOT CMAKE_Fortran_COMPILER_WORKS)
+ set(FORTRAN_TEST_WAS_RUN 1)
+endif(NOT CMAKE_Fortran_COMPILER_WORKS)
-IF(NOT CMAKE_Fortran_COMPILER_WORKS)
+if(NOT CMAKE_Fortran_COMPILER_WORKS)
PrintTestCompilerStatus("Fortran" " -- broken")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the Fortran compiler works failed with "
"the following output:\n${OUTPUT}\n\n")
- MESSAGE(FATAL_ERROR "The Fortran compiler \"${CMAKE_Fortran_COMPILER}\" "
+ message(FATAL_ERROR "The Fortran compiler \"${CMAKE_Fortran_COMPILER}\" "
"is not able to compile a simple test program.\nIt fails "
"with the following output:\n ${OUTPUT}\n\n"
"CMake will not be able to correctly generate this project.")
-ELSE(NOT CMAKE_Fortran_COMPILER_WORKS)
- IF(FORTRAN_TEST_WAS_RUN)
+else(NOT CMAKE_Fortran_COMPILER_WORKS)
+ if(FORTRAN_TEST_WAS_RUN)
PrintTestCompilerStatus("Fortran" " -- works")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran compiler works passed with "
"the following output:\n${OUTPUT}\n\n")
- ENDIF(FORTRAN_TEST_WAS_RUN)
- SET(CMAKE_Fortran_COMPILER_WORKS 1 CACHE INTERNAL "")
+ endif(FORTRAN_TEST_WAS_RUN)
+ set(CMAKE_Fortran_COMPILER_WORKS 1 CACHE INTERNAL "")
- IF(CMAKE_Fortran_COMPILER_FORCED)
+ if(CMAKE_Fortran_COMPILER_FORCED)
# The compiler configuration was forced by the user.
# Assume the user has configured all compiler information.
- ELSE(CMAKE_Fortran_COMPILER_FORCED)
+ else(CMAKE_Fortran_COMPILER_FORCED)
# Try to identify the ABI and configure it into CMakeFortranCompiler.cmake
- INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake)
+ include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake)
CMAKE_DETERMINE_COMPILER_ABI(Fortran ${CMAKE_ROOT}/Modules/CMakeFortranCompilerABI.F)
# Test for Fortran 90 support by using an f90-specific construct.
- IF(NOT DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90)
- MESSAGE(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90")
- FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompilerF90.f90 "
+ if(NOT DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90)
+ message(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90")
+ file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompilerF90.f90 "
PROGRAM TESTFortran90
stop = 1 ; do while ( stop .eq. 0 ) ; end do
END PROGRAM TESTFortran90
")
- TRY_COMPILE(CMAKE_Fortran_COMPILER_SUPPORTS_F90 ${CMAKE_BINARY_DIR}
+ try_compile(CMAKE_Fortran_COMPILER_SUPPORTS_F90 ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompilerF90.f90
OUTPUT_VARIABLE OUTPUT)
- IF(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
- MESSAGE(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90 -- yes")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ if(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
+ message(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90 -- yes")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran compiler supports Fortran 90 passed with "
"the following output:\n${OUTPUT}\n\n")
- SET(CMAKE_Fortran_COMPILER_SUPPORTS_F90 1)
- ELSE(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
- MESSAGE(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90 -- no")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ set(CMAKE_Fortran_COMPILER_SUPPORTS_F90 1)
+ else(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
+ message(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90 -- no")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the Fortran compiler supports Fortran 90 failed with "
"the following output:\n${OUTPUT}\n\n")
- SET(CMAKE_Fortran_COMPILER_SUPPORTS_F90 0)
- ENDIF(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
- UNSET(CMAKE_Fortran_COMPILER_SUPPORTS_F90 CACHE)
- ENDIF(NOT DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90)
+ set(CMAKE_Fortran_COMPILER_SUPPORTS_F90 0)
+ endif(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
+ unset(CMAKE_Fortran_COMPILER_SUPPORTS_F90 CACHE)
+ endif(NOT DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90)
- CONFIGURE_FILE(
+ configure_file(
${CMAKE_ROOT}/Modules/CMakeFortranCompiler.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeFortranCompiler.cmake
@ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
)
- INCLUDE(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeFortranCompiler.cmake)
- ENDIF(CMAKE_Fortran_COMPILER_FORCED)
- IF(CMAKE_Fortran_SIZEOF_DATA_PTR)
- FOREACH(f ${CMAKE_Fortran_ABI_FILES})
- INCLUDE(${f})
- ENDFOREACH()
- UNSET(CMAKE_Fortran_ABI_FILES)
- ENDIF()
-ENDIF(NOT CMAKE_Fortran_COMPILER_WORKS)
+ include(${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeFortranCompiler.cmake)
+ endif(CMAKE_Fortran_COMPILER_FORCED)
+ if(CMAKE_Fortran_SIZEOF_DATA_PTR)
+ foreach(f ${CMAKE_Fortran_ABI_FILES})
+ include(${f})
+ endforeach()
+ unset(CMAKE_Fortran_ABI_FILES)
+ endif()
+endif(NOT CMAKE_Fortran_COMPILER_WORKS)
diff --git a/Modules/CMakeTestJavaCompiler.cmake b/Modules/CMakeTestJavaCompiler.cmake
index cfd3e24b69..d763412bff 100644
--- a/Modules/CMakeTestJavaCompiler.cmake
+++ b/Modules/CMakeTestJavaCompiler.cmake
@@ -17,4 +17,4 @@
# and link the most basic of programs. If not, a fatal error
# is set and cmake stops processing commands and will not generate
# any makefiles or projects.
-SET(CMAKE_Java_COMPILER_WORKS 1 CACHE INTERNAL "")
+set(CMAKE_Java_COMPILER_WORKS 1 CACHE INTERNAL "")
diff --git a/Modules/CMakeTestRCCompiler.cmake b/Modules/CMakeTestRCCompiler.cmake
index a5c8d11496..7969da1de3 100644
--- a/Modules/CMakeTestRCCompiler.cmake
+++ b/Modules/CMakeTestRCCompiler.cmake
@@ -20,4 +20,4 @@
# For now there is no way to do a try compile on just a .rc file
# so just do nothing in here.
-SET(CMAKE_RC_COMPILER_WORKS 1 CACHE INTERNAL "")
+set(CMAKE_RC_COMPILER_WORKS 1 CACHE INTERNAL "")
diff --git a/Modules/CMakeUnixFindMake.cmake b/Modules/CMakeUnixFindMake.cmake
index 39962c0d3e..c75cf7cbc9 100644
--- a/Modules/CMakeUnixFindMake.cmake
+++ b/Modules/CMakeUnixFindMake.cmake
@@ -12,5 +12,5 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PROGRAM(CMAKE_MAKE_PROGRAM NAMES gmake make smake)
-MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
+find_program(CMAKE_MAKE_PROGRAM NAMES gmake make smake)
+mark_as_advanced(CMAKE_MAKE_PROGRAM)
diff --git a/Modules/CMakeVS10FindMake.cmake b/Modules/CMakeVS10FindMake.cmake
index 695e92f523..189b626984 100644
--- a/Modules/CMakeVS10FindMake.cmake
+++ b/Modules/CMakeVS10FindMake.cmake
@@ -15,7 +15,7 @@
# Look for devenv as a build program. We need to use this to support
# Intel Fortran integration into VS. MSBuild can not be used for that case
# since Intel Fortran uses the older devenv file format.
-FIND_PROGRAM(CMAKE_MAKE_PROGRAM
+find_program(CMAKE_MAKE_PROGRAM
NAMES devenv
HINTS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VS;EnvironmentDirectory]
@@ -39,16 +39,16 @@ FIND_PROGRAM(CMAKE_MAKE_PROGRAM
# causes the compiler checks and try-compile stuff to fail. MSbuild
# is a better choice for this. However, VCExpress does not support
# cross compiling needed for Win CE.
-IF(NOT CMAKE_CROSSCOMPILING)
- FIND_PROGRAM(CMAKE_MAKE_PROGRAM
+if(NOT CMAKE_CROSSCOMPILING)
+ find_program(CMAKE_MAKE_PROGRAM
NAMES MSBuild
HINTS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VS;ProductDir]
"$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;CLR Version]/"
"c:/WINDOWS/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;CLR Version]/"
"$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\10.0;CLR Version]/")
-ENDIF()
+endif()
-MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
-SET(MSVC10 1)
-SET(MSVC_VERSION 1600)
+mark_as_advanced(CMAKE_MAKE_PROGRAM)
+set(MSVC10 1)
+set(MSVC_VERSION 1600)
diff --git a/Modules/CMakeVS11FindMake.cmake b/Modules/CMakeVS11FindMake.cmake
index 302efaa59a..c55a4c53a9 100644
--- a/Modules/CMakeVS11FindMake.cmake
+++ b/Modules/CMakeVS11FindMake.cmake
@@ -15,7 +15,7 @@
# Look for devenv as a build program. We need to use this to support
# Intel Fortran integration into VS. MSBuild can not be used for that case
# since Intel Fortran uses the older devenv file format.
-FIND_PROGRAM(CMAKE_MAKE_PROGRAM
+find_program(CMAKE_MAKE_PROGRAM
NAMES devenv
HINTS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VS;EnvironmentDirectory]
@@ -39,16 +39,16 @@ FIND_PROGRAM(CMAKE_MAKE_PROGRAM
# causes the compiler checks and try-compile stuff to fail. MSbuild
# is a better choice for this. However, VCExpress does not support
# cross compiling needed for Win CE.
-IF(NOT CMAKE_CROSSCOMPILING)
- FIND_PROGRAM(CMAKE_MAKE_PROGRAM
+if(NOT CMAKE_CROSSCOMPILING)
+ find_program(CMAKE_MAKE_PROGRAM
NAMES MSBuild
HINTS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VS;ProductDir]
"$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0;CLR Version]/"
"c:/WINDOWS/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0;CLR Version]/"
"$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\11.0;CLR Version]/")
-ENDIF()
+endif()
-MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
-SET(MSVC11 1)
-SET(MSVC_VERSION 1700)
+mark_as_advanced(CMAKE_MAKE_PROGRAM)
+set(MSVC11 1)
+set(MSVC_VERSION 1700)
diff --git a/Modules/CMakeVS6BackwardCompatibility.cmake b/Modules/CMakeVS6BackwardCompatibility.cmake
index c948ff4a01..ca48b8587a 100644
--- a/Modules/CMakeVS6BackwardCompatibility.cmake
+++ b/Modules/CMakeVS6BackwardCompatibility.cmake
@@ -13,14 +13,14 @@
# License text for the above reference.)
# hard code these for fast backwards compatibility tests
-SET (CMAKE_SIZEOF_INT 4 CACHE INTERNAL "Size of int data type")
-SET (CMAKE_SIZEOF_LONG 4 CACHE INTERNAL "Size of long data type")
-SET (CMAKE_SIZEOF_VOID_P 4 CACHE INTERNAL "Size of void* data type")
-SET (CMAKE_SIZEOF_CHAR 1 CACHE INTERNAL "Size of char data type")
-SET (CMAKE_SIZEOF_SHORT 2 CACHE INTERNAL "Size of short data type")
-SET (CMAKE_SIZEOF_FLOAT 4 CACHE INTERNAL "Size of float data type")
-SET (CMAKE_SIZEOF_DOUBLE 8 CACHE INTERNAL "Size of double data type")
-SET (CMAKE_NO_ANSI_FOR_SCOPE 1 CACHE INTERNAL
+set (CMAKE_SIZEOF_INT 4 CACHE INTERNAL "Size of int data type")
+set (CMAKE_SIZEOF_LONG 4 CACHE INTERNAL "Size of long data type")
+set (CMAKE_SIZEOF_VOID_P 4 CACHE INTERNAL "Size of void* data type")
+set (CMAKE_SIZEOF_CHAR 1 CACHE INTERNAL "Size of char data type")
+set (CMAKE_SIZEOF_SHORT 2 CACHE INTERNAL "Size of short data type")
+set (CMAKE_SIZEOF_FLOAT 4 CACHE INTERNAL "Size of float data type")
+set (CMAKE_SIZEOF_DOUBLE 8 CACHE INTERNAL "Size of double data type")
+set (CMAKE_NO_ANSI_FOR_SCOPE 1 CACHE INTERNAL
"Does the compiler support ansi for scope.")
-SET (CMAKE_USE_WIN32_THREADS TRUE CACHE BOOL "Use the win32 thread library.")
-SET (CMAKE_WORDS_BIGENDIAN 0 CACHE INTERNAL "endianness of bytes")
+set (CMAKE_USE_WIN32_THREADS TRUE CACHE BOOL "Use the win32 thread library.")
+set (CMAKE_WORDS_BIGENDIAN 0 CACHE INTERNAL "endianness of bytes")
diff --git a/Modules/CMakeVS6FindMake.cmake b/Modules/CMakeVS6FindMake.cmake
index dccf8c4626..40bf5b1720 100644
--- a/Modules/CMakeVS6FindMake.cmake
+++ b/Modules/CMakeVS6FindMake.cmake
@@ -12,7 +12,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PROGRAM(CMAKE_MAKE_PROGRAM
+find_program(CMAKE_MAKE_PROGRAM
NAMES msdev
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\6.0\\Setup;VsCommonDir]/MSDev98/Bin
@@ -20,6 +20,6 @@ FIND_PROGRAM(CMAKE_MAKE_PROGRAM
"c:/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin"
"/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin"
)
-MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
-SET(MSVC60 1)
-SET(MSVC_VERSION 1200)
+mark_as_advanced(CMAKE_MAKE_PROGRAM)
+set(MSVC60 1)
+set(MSVC_VERSION 1200)
diff --git a/Modules/CMakeVS71FindMake.cmake b/Modules/CMakeVS71FindMake.cmake
index 2381adb550..945c3faf89 100644
--- a/Modules/CMakeVS71FindMake.cmake
+++ b/Modules/CMakeVS71FindMake.cmake
@@ -12,7 +12,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PROGRAM(CMAKE_MAKE_PROGRAM
+find_program(CMAKE_MAKE_PROGRAM
NAMES devenv
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\7.1\\Setup\\VS;EnvironmentDirectory]
@@ -21,6 +21,6 @@ FIND_PROGRAM(CMAKE_MAKE_PROGRAM
"c:/Program Files/Microsoft Visual Studio.NET/Common7/IDE"
"/Program Files/Microsoft Visual Studio .NET/Common7/IDE/"
)
-MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
-SET(MSVC71 1)
-SET(MSVC_VERSION 1310)
+mark_as_advanced(CMAKE_MAKE_PROGRAM)
+set(MSVC71 1)
+set(MSVC_VERSION 1310)
diff --git a/Modules/CMakeVS7BackwardCompatibility.cmake b/Modules/CMakeVS7BackwardCompatibility.cmake
index 9743c27052..e9622eecfe 100644
--- a/Modules/CMakeVS7BackwardCompatibility.cmake
+++ b/Modules/CMakeVS7BackwardCompatibility.cmake
@@ -13,14 +13,14 @@
# License text for the above reference.)
# hard code these for fast backwards compatibility tests
-SET (CMAKE_SIZEOF_INT 4 CACHE INTERNAL "Size of int data type")
-SET (CMAKE_SIZEOF_LONG 4 CACHE INTERNAL "Size of long data type")
-SET (CMAKE_SIZEOF_VOID_P 4 CACHE INTERNAL "Size of void* data type")
-SET (CMAKE_SIZEOF_CHAR 1 CACHE INTERNAL "Size of char data type")
-SET (CMAKE_SIZEOF_SHORT 2 CACHE INTERNAL "Size of short data type")
-SET (CMAKE_SIZEOF_FLOAT 4 CACHE INTERNAL "Size of float data type")
-SET (CMAKE_SIZEOF_DOUBLE 8 CACHE INTERNAL "Size of double data type")
-SET (CMAKE_NO_ANSI_FOR_SCOPE 0 CACHE INTERNAL
+set (CMAKE_SIZEOF_INT 4 CACHE INTERNAL "Size of int data type")
+set (CMAKE_SIZEOF_LONG 4 CACHE INTERNAL "Size of long data type")
+set (CMAKE_SIZEOF_VOID_P 4 CACHE INTERNAL "Size of void* data type")
+set (CMAKE_SIZEOF_CHAR 1 CACHE INTERNAL "Size of char data type")
+set (CMAKE_SIZEOF_SHORT 2 CACHE INTERNAL "Size of short data type")
+set (CMAKE_SIZEOF_FLOAT 4 CACHE INTERNAL "Size of float data type")
+set (CMAKE_SIZEOF_DOUBLE 8 CACHE INTERNAL "Size of double data type")
+set (CMAKE_NO_ANSI_FOR_SCOPE 0 CACHE INTERNAL
"Does the compiler support ansi for scope.")
-SET (CMAKE_USE_WIN32_THREADS TRUE CACHE BOOL "Use the win32 thread library.")
-SET (CMAKE_WORDS_BIGENDIAN 0 CACHE INTERNAL "endianness of bytes")
+set (CMAKE_USE_WIN32_THREADS TRUE CACHE BOOL "Use the win32 thread library.")
+set (CMAKE_WORDS_BIGENDIAN 0 CACHE INTERNAL "endianness of bytes")
diff --git a/Modules/CMakeVS7FindMake.cmake b/Modules/CMakeVS7FindMake.cmake
index 665158c88e..218c5f2dfd 100644
--- a/Modules/CMakeVS7FindMake.cmake
+++ b/Modules/CMakeVS7FindMake.cmake
@@ -12,7 +12,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PROGRAM(CMAKE_MAKE_PROGRAM
+find_program(CMAKE_MAKE_PROGRAM
NAMES devenv
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\7.0\\Setup\\VS;EnvironmentDirectory]
@@ -20,6 +20,6 @@ FIND_PROGRAM(CMAKE_MAKE_PROGRAM
"c:/Program Files/Microsoft Visual Studio.NET/Common7/IDE"
"/Program Files/Microsoft Visual Studio .NET/Common7/IDE/"
)
-MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
-SET(MSVC70 1)
-SET(MSVC_VERSION 1300)
+mark_as_advanced(CMAKE_MAKE_PROGRAM)
+set(MSVC70 1)
+set(MSVC_VERSION 1300)
diff --git a/Modules/CMakeVS8FindMake.cmake b/Modules/CMakeVS8FindMake.cmake
index bb08180149..790ca2b6a5 100644
--- a/Modules/CMakeVS8FindMake.cmake
+++ b/Modules/CMakeVS8FindMake.cmake
@@ -13,12 +13,12 @@
# License text for the above reference.)
# VCExpress does not support cross compiling, which is necessary for Win CE
-SET( _CMAKE_MAKE_PROGRAM_NAMES devenv)
-IF(NOT CMAKE_CROSSCOMPILING)
- SET( _CMAKE_MAKE_PROGRAM_NAMES ${_CMAKE_MAKE_PROGRAM_NAMES} VCExpress)
-ENDIF(NOT CMAKE_CROSSCOMPILING)
+set( _CMAKE_MAKE_PROGRAM_NAMES devenv)
+if(NOT CMAKE_CROSSCOMPILING)
+ set( _CMAKE_MAKE_PROGRAM_NAMES ${_CMAKE_MAKE_PROGRAM_NAMES} VCExpress)
+endif(NOT CMAKE_CROSSCOMPILING)
-FIND_PROGRAM(CMAKE_MAKE_PROGRAM
+find_program(CMAKE_MAKE_PROGRAM
NAMES ${_CMAKE_MAKE_PROGRAM_NAMES}
HINTS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VS;EnvironmentDirectory]
@@ -29,6 +29,6 @@ FIND_PROGRAM(CMAKE_MAKE_PROGRAM
"$ENV{ProgramFiles} (x86)/Microsoft Visual Studio8/Common7/IDE"
"/Program Files/Microsoft Visual Studio 8/Common7/IDE/"
)
-MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
-SET(MSVC80 1)
-SET(MSVC_VERSION 1400)
+mark_as_advanced(CMAKE_MAKE_PROGRAM)
+set(MSVC80 1)
+set(MSVC_VERSION 1400)
diff --git a/Modules/CMakeVS9FindMake.cmake b/Modules/CMakeVS9FindMake.cmake
index 9e3c39ef36..c7aba3692b 100644
--- a/Modules/CMakeVS9FindMake.cmake
+++ b/Modules/CMakeVS9FindMake.cmake
@@ -13,12 +13,12 @@
# License text for the above reference.)
# VCExpress does not support cross compiling, which is necessary for Win CE
-SET( _CMAKE_MAKE_PROGRAM_NAMES devenv)
-IF(NOT CMAKE_CROSSCOMPILING)
- SET( _CMAKE_MAKE_PROGRAM_NAMES ${_CMAKE_MAKE_PROGRAM_NAMES} VCExpress)
-ENDIF(NOT CMAKE_CROSSCOMPILING)
+set( _CMAKE_MAKE_PROGRAM_NAMES devenv)
+if(NOT CMAKE_CROSSCOMPILING)
+ set( _CMAKE_MAKE_PROGRAM_NAMES ${_CMAKE_MAKE_PROGRAM_NAMES} VCExpress)
+endif(NOT CMAKE_CROSSCOMPILING)
-FIND_PROGRAM(CMAKE_MAKE_PROGRAM
+find_program(CMAKE_MAKE_PROGRAM
NAMES ${_CMAKE_MAKE_PROGRAM_NAMES}
HINTS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup\\VS;EnvironmentDirectory]
@@ -34,6 +34,6 @@ FIND_PROGRAM(CMAKE_MAKE_PROGRAM
"/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/"
"/Program Files/Microsoft Visual Studio 9/Common7/IDE/"
)
-MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
-SET(MSVC90 1)
-SET(MSVC_VERSION 1500)
+mark_as_advanced(CMAKE_MAKE_PROGRAM)
+set(MSVC90 1)
+set(MSVC_VERSION 1500)
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index b79960e02a..513e11275f 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -285,48 +285,48 @@
# License text for the above reference.)
# Define this var in order to avoid (or warn) concerning multiple inclusion
-IF(CPack_CMake_INCLUDED)
- MESSAGE(WARNING "CPack.cmake has already been included!!")
-ELSE(CPack_CMake_INCLUDED)
- SET(CPack_CMake_INCLUDED 1)
-ENDIF(CPack_CMake_INCLUDED)
+if(CPack_CMake_INCLUDED)
+ message(WARNING "CPack.cmake has already been included!!")
+else(CPack_CMake_INCLUDED)
+ set(CPack_CMake_INCLUDED 1)
+endif(CPack_CMake_INCLUDED)
# Pick a configuration file
-SET(cpack_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in")
-IF(EXISTS "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
- SET(cpack_input_file "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
-ENDIF(EXISTS "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
-SET(cpack_source_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in")
-IF(EXISTS "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
- SET(cpack_source_input_file "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
-ENDIF(EXISTS "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
+set(cpack_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in")
+if(EXISTS "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
+ set(cpack_input_file "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
+endif(EXISTS "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
+set(cpack_source_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in")
+if(EXISTS "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
+ set(cpack_source_input_file "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
+endif(EXISTS "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
# Backward compatibility
# Include CPackComponent macros if it has not already been included before.
include(CPackComponent)
# Macro for setting values if a user did not overwrite them
-MACRO(cpack_set_if_not_set name value)
- IF(NOT DEFINED "${name}")
- SET(${name} "${value}")
- ENDIF(NOT DEFINED "${name}")
-ENDMACRO(cpack_set_if_not_set)
+macro(cpack_set_if_not_set name value)
+ if(NOT DEFINED "${name}")
+ set(${name} "${value}")
+ endif(NOT DEFINED "${name}")
+endmacro(cpack_set_if_not_set)
# cpack_encode_variables - Macro to encode variables for the configuration file
# find any variable that starts with CPACK and create a variable
# _CPACK_OTHER_VARIABLES_ that contains SET commands for
# each cpack variable. _CPACK_OTHER_VARIABLES_ is then
# used as an @ replacment in configure_file for the CPackConfig.
-MACRO(cpack_encode_variables)
- SET(_CPACK_OTHER_VARIABLES_)
- GET_CMAKE_PROPERTY(res VARIABLES)
- FOREACH(var ${res})
- IF("xxx${var}" MATCHES "xxxCPACK")
- SET(_CPACK_OTHER_VARIABLES_
+macro(cpack_encode_variables)
+ set(_CPACK_OTHER_VARIABLES_)
+ get_cmake_property(res VARIABLES)
+ foreach(var ${res})
+ if("xxx${var}" MATCHES "xxxCPACK")
+ set(_CPACK_OTHER_VARIABLES_
"${_CPACK_OTHER_VARIABLES_}\nSET(${var} \"${${var}}\")")
- ENDIF("xxx${var}" MATCHES "xxxCPACK")
- ENDFOREACH(var ${res})
-ENDMACRO(cpack_encode_variables)
+ endif("xxx${var}" MATCHES "xxxCPACK")
+ endforeach(var ${res})
+endmacro(cpack_encode_variables)
# Set the package name
cpack_set_if_not_set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
@@ -350,22 +350,22 @@ cpack_set_if_not_set(CPACK_RESOURCE_FILE_WELCOME
cpack_set_if_not_set(CPACK_MODULE_PATH "${CMAKE_MODULE_PATH}")
-IF(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL)
- SET(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
-ENDIF(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL)
-
-IF(CPACK_NSIS_MODIFY_PATH)
- SET(CPACK_NSIS_MODIFY_PATH ON)
-ENDIF(CPACK_NSIS_MODIFY_PATH)
-
-SET(__cpack_system_name ${CMAKE_SYSTEM_NAME})
-IF(${__cpack_system_name} MATCHES Windows)
- IF(CMAKE_CL_64)
- SET(__cpack_system_name win64)
- ELSE(CMAKE_CL_64)
- SET(__cpack_system_name win32)
- ENDIF(CMAKE_CL_64)
-ENDIF(${__cpack_system_name} MATCHES Windows)
+if(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL)
+ set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
+endif(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL)
+
+if(CPACK_NSIS_MODIFY_PATH)
+ set(CPACK_NSIS_MODIFY_PATH ON)
+endif(CPACK_NSIS_MODIFY_PATH)
+
+set(__cpack_system_name ${CMAKE_SYSTEM_NAME})
+if(${__cpack_system_name} MATCHES Windows)
+ if(CMAKE_CL_64)
+ set(__cpack_system_name win64)
+ else(CMAKE_CL_64)
+ set(__cpack_system_name win32)
+ endif(CMAKE_CL_64)
+endif(${__cpack_system_name} MATCHES Windows)
cpack_set_if_not_set(CPACK_SYSTEM_NAME "${__cpack_system_name}")
# Root dir: default value should be the string literal "$PROGRAMFILES"
@@ -494,7 +494,7 @@ cpack_set_if_not_set(CPACK_CMAKE_GENERATOR "${CMAKE_GENERATOR}")
cpack_set_if_not_set(CPACK_TOPLEVEL_TAG "${CPACK_SYSTEM_NAME}")
# if the user has set CPACK_NSIS_DISPLAY_NAME remember it
if(DEFINED CPACK_NSIS_DISPLAY_NAME)
- SET(CPACK_NSIS_DISPLAY_NAME_SET TRUE)
+ set(CPACK_NSIS_DISPLAY_NAME_SET TRUE)
endif()
# if the user has set CPACK_NSIS_DISPLAY
# explicitly, then use that as the default
@@ -522,31 +522,31 @@ cpack_set_if_not_set(CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
cpack_set_if_not_set(CPACK_NSIS_INSTALLER_ICON_CODE "")
cpack_set_if_not_set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "")
-IF(DEFINED CPACK_COMPONENTS_ALL)
- IF(CPACK_MONOLITHIC_INSTALL)
- MESSAGE("CPack warning: both CPACK_COMPONENTS_ALL and CPACK_MONOLITHIC_INSTALL have been set.\nDefaulting to a monolithic installation.")
- SET(CPACK_COMPONENTS_ALL)
- ELSE(CPACK_MONOLITHIC_INSTALL)
+if(DEFINED CPACK_COMPONENTS_ALL)
+ if(CPACK_MONOLITHIC_INSTALL)
+ message("CPack warning: both CPACK_COMPONENTS_ALL and CPACK_MONOLITHIC_INSTALL have been set.\nDefaulting to a monolithic installation.")
+ set(CPACK_COMPONENTS_ALL)
+ else(CPACK_MONOLITHIC_INSTALL)
# The user has provided the set of components to be installed as
# part of a component-based installation; trust her.
- SET(CPACK_COMPONENTS_ALL_SET_BY_USER TRUE)
- ENDIF(CPACK_MONOLITHIC_INSTALL)
-ELSE(DEFINED CPACK_COMPONENTS_ALL)
+ set(CPACK_COMPONENTS_ALL_SET_BY_USER TRUE)
+ endif(CPACK_MONOLITHIC_INSTALL)
+else(DEFINED CPACK_COMPONENTS_ALL)
# If the user has not specifically requested a monolithic installer
# but has specified components in various "install" commands, tell
# CPack about those components.
- IF(NOT CPACK_MONOLITHIC_INSTALL)
- GET_CMAKE_PROPERTY(CPACK_COMPONENTS_ALL COMPONENTS)
- LIST(LENGTH CPACK_COMPONENTS_ALL CPACK_COMPONENTS_LEN)
- IF(CPACK_COMPONENTS_LEN EQUAL 1)
+ if(NOT CPACK_MONOLITHIC_INSTALL)
+ get_cmake_property(CPACK_COMPONENTS_ALL COMPONENTS)
+ list(LENGTH CPACK_COMPONENTS_ALL CPACK_COMPONENTS_LEN)
+ if(CPACK_COMPONENTS_LEN EQUAL 1)
# Only one component: this is not a component-based installation
# (at least, it isn't a component-based installation, but may
# become one later if the user uses the cpack_add_* commands).
- SET(CPACK_COMPONENTS_ALL)
- ENDIF(CPACK_COMPONENTS_LEN EQUAL 1)
- SET(CPACK_COMPONENTS_LEN)
- ENDIF(NOT CPACK_MONOLITHIC_INSTALL)
-ENDIF(DEFINED CPACK_COMPONENTS_ALL)
+ set(CPACK_COMPONENTS_ALL)
+ endif(CPACK_COMPONENTS_LEN EQUAL 1)
+ set(CPACK_COMPONENTS_LEN)
+ endif(NOT CPACK_MONOLITHIC_INSTALL)
+endif(DEFINED CPACK_COMPONENTS_ALL)
# CMake always generates a component named "Unspecified", which is
# used to install everything that doesn't have an explicitly-provided
@@ -566,13 +566,13 @@ cpack_set_if_not_set(CPACK_SOURCE_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-Source")
cpack_set_if_not_set(CPACK_SOURCE_IGNORE_FILES
"/CVS/;/\\\\\\\\.svn/;/\\\\\\\\.bzr/;/\\\\\\\\.hg/;/\\\\\\\\.git/;\\\\\\\\.swp$;\\\\\\\\.#;/#")
-SET(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_SOURCE_INSTALL_CMAKE_PROJECTS}")
-SET(CPACK_INSTALLED_DIRECTORIES "${CPACK_SOURCE_INSTALLED_DIRECTORIES}")
-SET(CPACK_GENERATOR "${CPACK_SOURCE_GENERATOR}")
-SET(CPACK_TOPLEVEL_TAG "${CPACK_SOURCE_TOPLEVEL_TAG}")
-SET(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}")
-SET(CPACK_IGNORE_FILES "${CPACK_SOURCE_IGNORE_FILES}")
-SET(CPACK_STRIP_FILES "${CPACK_SOURCE_STRIP_FILES}")
+set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_SOURCE_INSTALL_CMAKE_PROJECTS}")
+set(CPACK_INSTALLED_DIRECTORIES "${CPACK_SOURCE_INSTALLED_DIRECTORIES}")
+set(CPACK_GENERATOR "${CPACK_SOURCE_GENERATOR}")
+set(CPACK_TOPLEVEL_TAG "${CPACK_SOURCE_TOPLEVEL_TAG}")
+set(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}")
+set(CPACK_IGNORE_FILES "${CPACK_SOURCE_IGNORE_FILES}")
+set(CPACK_STRIP_FILES "${CPACK_SOURCE_STRIP_FILES}")
cpack_encode_variables()
configure_file("${cpack_source_input_file}"
diff --git a/Modules/CPackComponent.cmake b/Modules/CPackComponent.cmake
index dce34bf3a4..d7d3cf84b5 100644
--- a/Modules/CPackComponent.cmake
+++ b/Modules/CPackComponent.cmake
@@ -275,84 +275,84 @@
# License text for the above reference.)
# Define var in order to avoid multiple inclusion
-IF(NOT CPackComponent_CMake_INCLUDED)
-SET(CPackComponent_CMake_INCLUDED 1)
+if(NOT CPackComponent_CMake_INCLUDED)
+set(CPackComponent_CMake_INCLUDED 1)
# Argument-parsing macro from http://www.cmake.org/Wiki/CMakeMacroParseArguments
-MACRO(cpack_parse_arguments prefix arg_names option_names)
- SET(${prefix}_DEFAULT_ARGS)
- FOREACH(arg_name ${arg_names})
- SET(${prefix}_${arg_name})
- ENDFOREACH(arg_name)
- FOREACH(option ${option_names})
- SET(${prefix}_${option} FALSE)
- ENDFOREACH(option)
+macro(cpack_parse_arguments prefix arg_names option_names)
+ set(${prefix}_DEFAULT_ARGS)
+ foreach(arg_name ${arg_names})
+ set(${prefix}_${arg_name})
+ endforeach(arg_name)
+ foreach(option ${option_names})
+ set(${prefix}_${option} FALSE)
+ endforeach(option)
- SET(current_arg_name DEFAULT_ARGS)
- SET(current_arg_list)
- FOREACH(arg ${ARGN})
- SET(larg_names ${arg_names})
- LIST(FIND larg_names "${arg}" is_arg_name)
- IF (is_arg_name GREATER -1)
- SET(${prefix}_${current_arg_name} ${current_arg_list})
- SET(current_arg_name ${arg})
- SET(current_arg_list)
- ELSE (is_arg_name GREATER -1)
- SET(loption_names ${option_names})
- LIST(FIND loption_names "${arg}" is_option)
- IF (is_option GREATER -1)
- SET(${prefix}_${arg} TRUE)
- ELSE (is_option GREATER -1)
- SET(current_arg_list ${current_arg_list} ${arg})
- ENDIF (is_option GREATER -1)
- ENDIF (is_arg_name GREATER -1)
- ENDFOREACH(arg)
- SET(${prefix}_${current_arg_name} ${current_arg_list})
-ENDMACRO(cpack_parse_arguments)
+ set(current_arg_name DEFAULT_ARGS)
+ set(current_arg_list)
+ foreach(arg ${ARGN})
+ set(larg_names ${arg_names})
+ list(FIND larg_names "${arg}" is_arg_name)
+ if (is_arg_name GREATER -1)
+ set(${prefix}_${current_arg_name} ${current_arg_list})
+ set(current_arg_name ${arg})
+ set(current_arg_list)
+ else (is_arg_name GREATER -1)
+ set(loption_names ${option_names})
+ list(FIND loption_names "${arg}" is_option)
+ if (is_option GREATER -1)
+ set(${prefix}_${arg} TRUE)
+ else (is_option GREATER -1)
+ set(current_arg_list ${current_arg_list} ${arg})
+ endif (is_option GREATER -1)
+ endif (is_arg_name GREATER -1)
+ endforeach(arg)
+ set(${prefix}_${current_arg_name} ${current_arg_list})
+endmacro(cpack_parse_arguments)
# Macro that appends a SET command for the given variable name (var)
# to the macro named strvar, but only if the variable named "var"
# has been defined. The string will eventually be appended to a CPack
# configuration file.
-MACRO(cpack_append_variable_set_command var strvar)
- IF (DEFINED ${var})
- SET(${strvar} "${${strvar}}SET(${var}")
- FOREACH(APPENDVAL ${${var}})
- SET(${strvar} "${${strvar}} ${APPENDVAL}")
- ENDFOREACH(APPENDVAL)
- SET(${strvar} "${${strvar}})\n")
- ENDIF (DEFINED ${var})
-ENDMACRO(cpack_append_variable_set_command)
+macro(cpack_append_variable_set_command var strvar)
+ if (DEFINED ${var})
+ set(${strvar} "${${strvar}}set(${var}")
+ foreach(APPENDVAL ${${var}})
+ set(${strvar} "${${strvar}} ${APPENDVAL}")
+ endforeach(APPENDVAL)
+ set(${strvar} "${${strvar}})\n")
+ endif (DEFINED ${var})
+endmacro(cpack_append_variable_set_command)
# Macro that appends a SET command for the given variable name (var)
# to the macro named strvar, but only if the variable named "var"
# has been defined and is a string. The string will eventually be
# appended to a CPack configuration file.
-MACRO(cpack_append_string_variable_set_command var strvar)
- IF (DEFINED ${var})
- LIST(LENGTH ${var} CPACK_APP_VALUE_LEN)
- IF(${CPACK_APP_VALUE_LEN} EQUAL 1)
- SET(${strvar} "${${strvar}}SET(${var} \"${${var}}\")\n")
- ENDIF(${CPACK_APP_VALUE_LEN} EQUAL 1)
- ENDIF (DEFINED ${var})
-ENDMACRO(cpack_append_string_variable_set_command)
+macro(cpack_append_string_variable_set_command var strvar)
+ if (DEFINED ${var})
+ list(LENGTH ${var} CPACK_APP_VALUE_LEN)
+ if(${CPACK_APP_VALUE_LEN} EQUAL 1)
+ set(${strvar} "${${strvar}}set(${var} \"${${var}}\")\n")
+ endif(${CPACK_APP_VALUE_LEN} EQUAL 1)
+ endif (DEFINED ${var})
+endmacro(cpack_append_string_variable_set_command)
# Macro that appends a SET command for the given variable name (var)
# to the macro named strvar, but only if the variable named "var"
# has been set to true. The string will eventually be
# appended to a CPack configuration file.
-MACRO(cpack_append_option_set_command var strvar)
- IF (${var})
- LIST(LENGTH ${var} CPACK_APP_VALUE_LEN)
- IF(${CPACK_APP_VALUE_LEN} EQUAL 1)
- SET(${strvar} "${${strvar}}SET(${var} TRUE)\n")
- ENDIF(${CPACK_APP_VALUE_LEN} EQUAL 1)
- ENDIF (${var})
-ENDMACRO(cpack_append_option_set_command)
+macro(cpack_append_option_set_command var strvar)
+ if (${var})
+ list(LENGTH ${var} CPACK_APP_VALUE_LEN)
+ if(${CPACK_APP_VALUE_LEN} EQUAL 1)
+ set(${strvar} "${${strvar}}set(${var} TRUE)\n")
+ endif(${CPACK_APP_VALUE_LEN} EQUAL 1)
+ endif (${var})
+endmacro(cpack_append_option_set_command)
# Macro that adds a component to the CPack installer
-MACRO(cpack_add_component compname)
- STRING(TOUPPER ${compname} CPACK_ADDCOMP_UNAME)
+macro(cpack_add_component compname)
+ string(TOUPPER ${compname} CPACK_ADDCOMP_UNAME)
cpack_parse_arguments(CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}
"DISPLAY_NAME;DESCRIPTION;GROUP;DEPENDS;INSTALL_TYPES;ARCHIVE_FILE"
"HIDDEN;REQUIRED;DISABLED;DOWNLOADED"
@@ -360,25 +360,25 @@ MACRO(cpack_add_component compname)
)
if (CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_DOWNLOADED)
- SET(CPACK_ADDCOMP_STR "\n# Configuration for downloaded component \"${compname}\"\n")
+ set(CPACK_ADDCOMP_STR "\n# Configuration for downloaded component \"${compname}\"\n")
else ()
- SET(CPACK_ADDCOMP_STR "\n# Configuration for component \"${compname}\"\n")
+ set(CPACK_ADDCOMP_STR "\n# Configuration for component \"${compname}\"\n")
endif ()
- IF(NOT CPACK_MONOLITHIC_INSTALL)
+ if(NOT CPACK_MONOLITHIC_INSTALL)
# If the user didn't set CPACK_COMPONENTS_ALL explicitly, update the
# value of CPACK_COMPONENTS_ALL in the configuration file. This will
# take care of any components that have been added after the CPack
# moduled was included.
- IF(NOT CPACK_COMPONENTS_ALL_SET_BY_USER)
- GET_CMAKE_PROPERTY(CPACK_ADDCOMP_COMPONENTS COMPONENTS)
- SET(CPACK_ADDCOMP_STR "${CPACK_ADDCOMP_STR}\nSET(CPACK_COMPONENTS_ALL")
- FOREACH(COMP ${CPACK_ADDCOMP_COMPONENTS})
- SET(CPACK_ADDCOMP_STR "${CPACK_ADDCOMP_STR} ${COMP}")
- ENDFOREACH(COMP)
- SET(CPACK_ADDCOMP_STR "${CPACK_ADDCOMP_STR})\n")
- ENDIF(NOT CPACK_COMPONENTS_ALL_SET_BY_USER)
- ENDIF(NOT CPACK_MONOLITHIC_INSTALL)
+ if(NOT CPACK_COMPONENTS_ALL_SET_BY_USER)
+ get_cmake_property(CPACK_ADDCOMP_COMPONENTS COMPONENTS)
+ set(CPACK_ADDCOMP_STR "${CPACK_ADDCOMP_STR}\nSET(CPACK_COMPONENTS_ALL")
+ foreach(COMP ${CPACK_ADDCOMP_COMPONENTS})
+ set(CPACK_ADDCOMP_STR "${CPACK_ADDCOMP_STR} ${COMP}")
+ endforeach(COMP)
+ set(CPACK_ADDCOMP_STR "${CPACK_ADDCOMP_STR})\n")
+ endif(NOT CPACK_COMPONENTS_ALL_SET_BY_USER)
+ endif(NOT CPACK_MONOLITHIC_INSTALL)
cpack_append_string_variable_set_command(
CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_DISPLAY_NAME
@@ -414,21 +414,21 @@ MACRO(cpack_add_component compname)
# Write to config iff the macros is used after CPack.cmake has been
# included, other it's not necessary because the variables
# will be encoded by cpack_encode_variables.
- IF(CPack_CMake_INCLUDED)
- FILE(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${CPACK_ADDCOMP_STR}")
- ENDIF(CPack_CMake_INCLUDED)
-ENDMACRO(cpack_add_component)
+ if(CPack_CMake_INCLUDED)
+ file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${CPACK_ADDCOMP_STR}")
+ endif(CPack_CMake_INCLUDED)
+endmacro(cpack_add_component)
# Macro that adds a component group to the CPack installer
-MACRO(cpack_add_component_group grpname)
- STRING(TOUPPER ${grpname} CPACK_ADDGRP_UNAME)
+macro(cpack_add_component_group grpname)
+ string(TOUPPER ${grpname} CPACK_ADDGRP_UNAME)
cpack_parse_arguments(CPACK_COMPONENT_GROUP_${CPACK_ADDGRP_UNAME}
"DISPLAY_NAME;DESCRIPTION"
"EXPANDED;BOLD_TITLE"
${ARGN}
)
- SET(CPACK_ADDGRP_STR "\n# Configuration for component group \"${grpname}\"\n")
+ set(CPACK_ADDGRP_STR "\n# Configuration for component group \"${grpname}\"\n")
cpack_append_string_variable_set_command(
CPACK_COMPONENT_GROUP_${CPACK_ADDGRP_UNAME}_DISPLAY_NAME
CPACK_ADDGRP_STR)
@@ -445,24 +445,24 @@ MACRO(cpack_add_component_group grpname)
# Write to config iff the macros is used after CPack.cmake has been
# included, other it's not necessary because the variables
# will be encoded by cpack_encode_variables.
- IF(CPack_CMake_INCLUDED)
- FILE(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${CPACK_ADDGRP_STR}")
- ENDIF(CPack_CMake_INCLUDED)
-ENDMACRO(cpack_add_component_group)
+ if(CPack_CMake_INCLUDED)
+ file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${CPACK_ADDGRP_STR}")
+ endif(CPack_CMake_INCLUDED)
+endmacro(cpack_add_component_group)
# Macro that adds an installation type to the CPack installer
-MACRO(cpack_add_install_type insttype)
- STRING(TOUPPER ${insttype} CPACK_INSTTYPE_UNAME)
+macro(cpack_add_install_type insttype)
+ string(TOUPPER ${insttype} CPACK_INSTTYPE_UNAME)
cpack_parse_arguments(CPACK_INSTALL_TYPE_${CPACK_INSTTYPE_UNAME}
"DISPLAY_NAME"
""
${ARGN}
)
- SET(CPACK_INSTTYPE_STR
+ set(CPACK_INSTTYPE_STR
"\n# Configuration for installation type \"${insttype}\"\n")
- SET(CPACK_INSTTYPE_STR
- "${CPACK_INSTTYPE_STR}LIST(APPEND CPACK_ALL_INSTALL_TYPES ${insttype})\n")
+ set(CPACK_INSTTYPE_STR
+ "${CPACK_INSTTYPE_STR}list(APPEND CPACK_ALL_INSTALL_TYPES ${insttype})\n")
cpack_append_string_variable_set_command(
CPACK_INSTALL_TYPE_${CPACK_INSTTYPE_UNAME}_DISPLAY_NAME
CPACK_INSTTYPE_STR)
@@ -470,22 +470,22 @@ MACRO(cpack_add_install_type insttype)
# Write to config iff the macros is used after CPack.cmake has been
# included, other it's not necessary because the variables
# will be encoded by cpack_encode_variables.
- IF(CPack_CMake_INCLUDED)
- FILE(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${CPACK_INSTTYPE_STR}")
- ENDIF(CPack_CMake_INCLUDED)
-ENDMACRO(cpack_add_install_type)
+ if(CPack_CMake_INCLUDED)
+ file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${CPACK_INSTTYPE_STR}")
+ endif(CPack_CMake_INCLUDED)
+endmacro(cpack_add_install_type)
-MACRO(cpack_configure_downloads site)
+macro(cpack_configure_downloads site)
cpack_parse_arguments(CPACK_DOWNLOAD
"UPLOAD_DIRECTORY"
"ALL;ADD_REMOVE;NO_ADD_REMOVE"
${ARGN}
)
- SET(CPACK_CONFIG_DL_STR
+ set(CPACK_CONFIG_DL_STR
"\n# Downloaded components configuration\n")
- SET(CPACK_UPLOAD_DIRECTORY ${CPACK_DOWNLOAD_UPLOAD_DIRECTORY})
- SET(CPACK_DOWNLOAD_SITE ${site})
+ set(CPACK_UPLOAD_DIRECTORY ${CPACK_DOWNLOAD_UPLOAD_DIRECTORY})
+ set(CPACK_DOWNLOAD_SITE ${site})
cpack_append_string_variable_set_command(
CPACK_DOWNLOAD_SITE
CPACK_CONFIG_DL_STR)
@@ -495,10 +495,10 @@ MACRO(cpack_configure_downloads site)
cpack_append_option_set_command(
CPACK_DOWNLOAD_ALL
CPACK_CONFIG_DL_STR)
- IF (${CPACK_DOWNLOAD_ALL} AND NOT ${CPACK_DOWNLOAD_NO_ADD_REMOVE})
- SET(CPACK_DOWNLOAD_ADD_REMOVE ON)
- ENDIF (${CPACK_DOWNLOAD_ALL} AND NOT ${CPACK_DOWNLOAD_NO_ADD_REMOVE})
- SET(CPACK_ADD_REMOVE ${CPACK_DOWNLOAD_ADD_REMOVE})
+ if (${CPACK_DOWNLOAD_ALL} AND NOT ${CPACK_DOWNLOAD_NO_ADD_REMOVE})
+ set(CPACK_DOWNLOAD_ADD_REMOVE ON)
+ endif (${CPACK_DOWNLOAD_ALL} AND NOT ${CPACK_DOWNLOAD_NO_ADD_REMOVE})
+ set(CPACK_ADD_REMOVE ${CPACK_DOWNLOAD_ADD_REMOVE})
cpack_append_option_set_command(
CPACK_ADD_REMOVE
CPACK_CONFIG_DL_STR)
@@ -506,8 +506,8 @@ MACRO(cpack_configure_downloads site)
# Write to config iff the macros is used after CPack.cmake has been
# included, other it's not necessary because the variables
# will be encoded by cpack_encode_variables.
- IF(CPack_CMake_INCLUDED)
- FILE(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${CPACK_CONFIG_DL_STR}")
- ENDIF(CPack_CMake_INCLUDED)
-ENDMACRO(cpack_configure_downloads)
-ENDIF(NOT CPackComponent_CMake_INCLUDED)
+ if(CPack_CMake_INCLUDED)
+ file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${CPACK_CONFIG_DL_STR}")
+ endif(CPack_CMake_INCLUDED)
+endmacro(cpack_configure_downloads)
+endif(NOT CPackComponent_CMake_INCLUDED)
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index bd3b94d742..640cf9a0ed 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -161,7 +161,7 @@
# Default : -
# This variable allow advanced user to add custom script to the control.tar.gz
# Typical usage is for conffiles, postinst, postrm, prerm.
-# Usage: SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
+# Usage: set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
# "${CMAKE_CURRENT_SOURCE_DIR/prerm;${CMAKE_CURRENT_SOURCE_DIR}/postrm")
##end
@@ -185,115 +185,115 @@
#
# http://wiki.debian.org/HowToPackageForDebian
-IF(CMAKE_BINARY_DIR)
- MESSAGE(FATAL_ERROR "CPackDeb.cmake may only be used by CPack internally.")
-ENDIF(CMAKE_BINARY_DIR)
+if(CMAKE_BINARY_DIR)
+ message(FATAL_ERROR "CPackDeb.cmake may only be used by CPack internally.")
+endif(CMAKE_BINARY_DIR)
-IF(NOT UNIX)
- MESSAGE(FATAL_ERROR "CPackDeb.cmake may only be used under UNIX.")
-ENDIF(NOT UNIX)
+if(NOT UNIX)
+ message(FATAL_ERROR "CPackDeb.cmake may only be used under UNIX.")
+endif(NOT UNIX)
# CPACK_DEBIAN_PACKAGE_SHLIBDEPS
# If specify OFF, only user depends are used
-IF(NOT DEFINED CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
- SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF)
-ENDIF(NOT DEFINED CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
+if(NOT DEFINED CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
+ set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF)
+endif(NOT DEFINED CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
-FIND_PROGRAM(FAKEROOT_EXECUTABLE fakeroot)
-IF(FAKEROOT_EXECUTABLE)
- SET(CPACK_DEBIAN_FAKEROOT_EXECUTABLE ${FAKEROOT_EXECUTABLE})
-ENDIF(FAKEROOT_EXECUTABLE)
+find_program(FAKEROOT_EXECUTABLE fakeroot)
+if(FAKEROOT_EXECUTABLE)
+ set(CPACK_DEBIAN_FAKEROOT_EXECUTABLE ${FAKEROOT_EXECUTABLE})
+endif(FAKEROOT_EXECUTABLE)
-IF(CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
+if(CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
# dpkg-shlibdeps is a Debian utility for generating dependency list
- FIND_PROGRAM(SHLIBDEPS_EXECUTABLE dpkg-shlibdeps)
+ find_program(SHLIBDEPS_EXECUTABLE dpkg-shlibdeps)
# Check version of the dpkg-shlibdeps tool using CPackRPM method
- IF(SHLIBDEPS_EXECUTABLE)
- EXECUTE_PROCESS(COMMAND ${SHLIBDEPS_EXECUTABLE} --version
+ if(SHLIBDEPS_EXECUTABLE)
+ execute_process(COMMAND ${SHLIBDEPS_EXECUTABLE} --version
OUTPUT_VARIABLE _TMP_VERSION
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
- STRING(REGEX MATCH "dpkg-shlibdeps version ([0-9]+\\.[0-9]+\\.[0-9]+)"
+ string(REGEX MATCH "dpkg-shlibdeps version ([0-9]+\\.[0-9]+\\.[0-9]+)"
SHLIBDEPS_EXECUTABLE_VERSION
${_TMP_VERSION})
- SET(SHLIBDEPS_EXECUTABLE_VERSION "${CMAKE_MATCH_1}")
- IF(CPACK_DEBIAN_PACKAGE_DEBUG)
- MESSAGE( "CPackDeb Debug: dpkg-shlibdeps version is <${SHLIBDEPS_EXECUTABLE_VERSION}>")
- ENDIF(CPACK_DEBIAN_PACKAGE_DEBUG)
+ set(SHLIBDEPS_EXECUTABLE_VERSION "${CMAKE_MATCH_1}")
+ if(CPACK_DEBIAN_PACKAGE_DEBUG)
+ message( "CPackDeb Debug: dpkg-shlibdeps version is <${SHLIBDEPS_EXECUTABLE_VERSION}>")
+ endif(CPACK_DEBIAN_PACKAGE_DEBUG)
# Generating binary list - Get type of all install files
- EXECUTE_PROCESS(COMMAND find -type f
+ execute_process(COMMAND find -type f
COMMAND xargs file
WORKING_DIRECTORY "${CPACK_TEMPORARY_DIRECTORY}"
OUTPUT_VARIABLE CPACK_DEB_INSTALL_FILES)
# Convert to CMake list
- STRING(REGEX REPLACE "\n" ";" CPACK_DEB_INSTALL_FILES ${CPACK_DEB_INSTALL_FILES})
+ string(REGEX REPLACE "\n" ";" CPACK_DEB_INSTALL_FILES ${CPACK_DEB_INSTALL_FILES})
# Only dynamically linked ELF files are included
# Extract only file name infront of ":"
- FOREACH ( _FILE ${CPACK_DEB_INSTALL_FILES})
- IF ( ${_FILE} MATCHES "ELF.*dynamically linked")
- STRING(REGEX MATCH "(^.*):" _FILE_NAME ${_FILE})
- LIST(APPEND CPACK_DEB_BINARY_FILES ${CMAKE_MATCH_1})
- ENDIF()
- ENDFOREACH()
+ foreach ( _FILE ${CPACK_DEB_INSTALL_FILES})
+ if ( ${_FILE} MATCHES "ELF.*dynamically linked")
+ string(REGEX MATCH "(^.*):" _FILE_NAME ${_FILE})
+ list(APPEND CPACK_DEB_BINARY_FILES ${CMAKE_MATCH_1})
+ endif()
+ endforeach()
- MESSAGE( "CPackDeb: - Generating dependency list")
+ message( "CPackDeb: - Generating dependency list")
# Create blank control file for running dpkg-shlibdeps
# There might be some other way to invoke dpkg-shlibdeps without creating this file
# but standard debian package should not have anything that can collide with this file or directory
- FILE(MAKE_DIRECTORY ${CPACK_TEMPORARY_DIRECTORY}/debian)
- FILE(WRITE ${CPACK_TEMPORARY_DIRECTORY}/debian/control "")
+ file(MAKE_DIRECTORY ${CPACK_TEMPORARY_DIRECTORY}/debian)
+ file(WRITE ${CPACK_TEMPORARY_DIRECTORY}/debian/control "")
# Execute dpkg-shlibdeps
# --ignore-missing-info : allow dpkg-shlibdeps to run even if some libs do not belong to a package
# -O : print to STDOUT
- EXECUTE_PROCESS(COMMAND ${SHLIBDEPS_EXECUTABLE} --ignore-missing-info -O ${CPACK_DEB_BINARY_FILES}
+ execute_process(COMMAND ${SHLIBDEPS_EXECUTABLE} --ignore-missing-info -O ${CPACK_DEB_BINARY_FILES}
WORKING_DIRECTORY "${CPACK_TEMPORARY_DIRECTORY}"
OUTPUT_VARIABLE SHLIBDEPS_OUTPUT
RESULT_VARIABLE SHLIBDEPS_RESULT
ERROR_VARIABLE SHLIBDEPS_ERROR
OUTPUT_STRIP_TRAILING_WHITESPACE )
- IF(CPACK_DEBIAN_PACKAGE_DEBUG)
+ if(CPACK_DEBIAN_PACKAGE_DEBUG)
# dpkg-shlibdeps will throw some warnings if some input files are not binary
- MESSAGE( "CPackDeb Debug: dpkg-shlibdeps warnings \n${SHLIBDEPS_ERROR}")
- ENDIF(CPACK_DEBIAN_PACKAGE_DEBUG)
- IF (NOT SHLIBDEPS_RESULT EQUAL 0)
- MESSAGE (FATAL_ERROR "CPackDeb: dpkg-shlibdeps: ${SHLIBDEPS_ERROR}")
- ENDIF (NOT SHLIBDEPS_RESULT EQUAL 0)
+ message( "CPackDeb Debug: dpkg-shlibdeps warnings \n${SHLIBDEPS_ERROR}")
+ endif(CPACK_DEBIAN_PACKAGE_DEBUG)
+ if (NOT SHLIBDEPS_RESULT EQUAL 0)
+ message (FATAL_ERROR "CPackDeb: dpkg-shlibdeps: ${SHLIBDEPS_ERROR}")
+ endif (NOT SHLIBDEPS_RESULT EQUAL 0)
#Get rid of prefix generated by dpkg-shlibdeps
string (REGEX REPLACE "^.*Depends=" "" CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS ${SHLIBDEPS_OUTPUT})
- IF(CPACK_DEBIAN_PACKAGE_DEBUG)
- MESSAGE( "CPackDeb Debug: Found dependency: ${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}")
- ENDIF(CPACK_DEBIAN_PACKAGE_DEBUG)
+ if(CPACK_DEBIAN_PACKAGE_DEBUG)
+ message( "CPackDeb Debug: Found dependency: ${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}")
+ endif(CPACK_DEBIAN_PACKAGE_DEBUG)
# Remove blank control file
# Might not be safe if package actual contain file or directory named debian
- FILE(REMOVE_RECURSE "${CPACK_TEMPORARY_DIRECTORY}/debian")
+ file(REMOVE_RECURSE "${CPACK_TEMPORARY_DIRECTORY}/debian")
# Append user depend if set
- IF (CPACK_DEBIAN_PACKAGE_DEPENDS)
- SET (CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}, ${CPACK_DEBIAN_PACKAGE_DEPENDS}")
- ELSE (CPACK_DEBIAN_PACKAGE_DEPENDS)
- SET (CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}")
- ENDIF (CPACK_DEBIAN_PACKAGE_DEPENDS)
-
- ELSE (SHLIBDEPS_EXECUTABLE)
- IF(CPACK_DEBIAN_PACKAGE_DEBUG)
- MESSAGE( "CPackDeb Debug: Using only user-provided depends because dpkg-shlibdeps is not found.")
- ENDIF(CPACK_DEBIAN_PACKAGE_DEBUG)
- ENDIF(SHLIBDEPS_EXECUTABLE)
-
-ELSE (CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
- IF(CPACK_DEBIAN_PACKAGE_DEBUG)
- MESSAGE( "CPackDeb Debug: Using only user-provided depends")
- ENDIF(CPACK_DEBIAN_PACKAGE_DEBUG)
-ENDIF(CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
+ if (CPACK_DEBIAN_PACKAGE_DEPENDS)
+ set (CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}, ${CPACK_DEBIAN_PACKAGE_DEPENDS}")
+ else (CPACK_DEBIAN_PACKAGE_DEPENDS)
+ set (CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_AUTO_DEPENDS}")
+ endif (CPACK_DEBIAN_PACKAGE_DEPENDS)
+
+ else (SHLIBDEPS_EXECUTABLE)
+ if(CPACK_DEBIAN_PACKAGE_DEBUG)
+ message( "CPackDeb Debug: Using only user-provided depends because dpkg-shlibdeps is not found.")
+ endif(CPACK_DEBIAN_PACKAGE_DEBUG)
+ endif(SHLIBDEPS_EXECUTABLE)
+
+else (CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
+ if(CPACK_DEBIAN_PACKAGE_DEBUG)
+ message( "CPackDeb Debug: Using only user-provided depends")
+ endif(CPACK_DEBIAN_PACKAGE_DEBUG)
+endif(CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
# Let's define the control file found in debian package:
@@ -303,67 +303,67 @@ ENDIF(CPACK_DEBIAN_PACKAGE_SHLIBDEPS)
# DEBIAN/control
# debian policy enforce lower case for package name
# Package: (mandatory)
-IF(NOT CPACK_DEBIAN_PACKAGE_NAME)
- STRING(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_DEBIAN_PACKAGE_NAME)
-ENDIF(NOT CPACK_DEBIAN_PACKAGE_NAME)
+if(NOT CPACK_DEBIAN_PACKAGE_NAME)
+ string(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_DEBIAN_PACKAGE_NAME)
+endif(NOT CPACK_DEBIAN_PACKAGE_NAME)
# Version: (mandatory)
-IF(NOT CPACK_DEBIAN_PACKAGE_VERSION)
- IF(NOT CPACK_PACKAGE_VERSION)
- MESSAGE(FATAL_ERROR "CPackDeb: Debian package requires a package version")
- ENDIF(NOT CPACK_PACKAGE_VERSION)
- SET(CPACK_DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION})
-ENDIF(NOT CPACK_DEBIAN_PACKAGE_VERSION)
+if(NOT CPACK_DEBIAN_PACKAGE_VERSION)
+ if(NOT CPACK_PACKAGE_VERSION)
+ message(FATAL_ERROR "CPackDeb: Debian package requires a package version")
+ endif(NOT CPACK_PACKAGE_VERSION)
+ set(CPACK_DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION})
+endif(NOT CPACK_DEBIAN_PACKAGE_VERSION)
# Architecture: (mandatory)
-IF(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+if(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
# There is no such thing as i686 architecture on debian, you should use i386 instead
# $ dpkg --print-architecture
- FIND_PROGRAM(DPKG_CMD dpkg)
- IF(NOT DPKG_CMD)
- MESSAGE(STATUS "CPackDeb: Can not find dpkg in your path, default to i386.")
- SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386)
- ENDIF(NOT DPKG_CMD)
- EXECUTE_PROCESS(COMMAND "${DPKG_CMD}" --print-architecture
+ find_program(DPKG_CMD dpkg)
+ if(NOT DPKG_CMD)
+ message(STATUS "CPackDeb: Can not find dpkg in your path, default to i386.")
+ set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386)
+ endif(NOT DPKG_CMD)
+ execute_process(COMMAND "${DPKG_CMD}" --print-architecture
OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
-ENDIF(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
+endif(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
-# have a look at GET_PROPERTY(result GLOBAL PROPERTY ENABLED_FEATURES),
-# this returns the successful FIND_PACKAGE() calls, maybe this can help
+# have a look at get_property(result GLOBAL PROPERTY ENABLED_FEATURES),
+# this returns the successful find_package() calls, maybe this can help
# Depends:
# You should set: DEBIAN_PACKAGE_DEPENDS
# TODO: automate 'objdump -p | grep NEEDED'
-IF(NOT CPACK_DEBIAN_PACKAGE_DEPENDS)
- MESSAGE(STATUS "CPACK_DEBIAN_PACKAGE_DEPENDS not set, the package will have no dependencies.")
-ENDIF(NOT CPACK_DEBIAN_PACKAGE_DEPENDS)
+if(NOT CPACK_DEBIAN_PACKAGE_DEPENDS)
+ message(STATUS "CPACK_DEBIAN_PACKAGE_DEPENDS not set, the package will have no dependencies.")
+endif(NOT CPACK_DEBIAN_PACKAGE_DEPENDS)
# Maintainer: (mandatory)
-IF(NOT CPACK_DEBIAN_PACKAGE_MAINTAINER)
- IF(NOT CPACK_PACKAGE_CONTACT)
- MESSAGE(FATAL_ERROR "CPackDeb: Debian package requires a maintainer for a package, set CPACK_PACKAGE_CONTACT or CPACK_DEBIAN_PACKAGE_MAINTAINER")
- ENDIF(NOT CPACK_PACKAGE_CONTACT)
- SET(CPACK_DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_CONTACT})
-ENDIF(NOT CPACK_DEBIAN_PACKAGE_MAINTAINER)
+if(NOT CPACK_DEBIAN_PACKAGE_MAINTAINER)
+ if(NOT CPACK_PACKAGE_CONTACT)
+ message(FATAL_ERROR "CPackDeb: Debian package requires a maintainer for a package, set CPACK_PACKAGE_CONTACT or CPACK_DEBIAN_PACKAGE_MAINTAINER")
+ endif(NOT CPACK_PACKAGE_CONTACT)
+ set(CPACK_DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_CONTACT})
+endif(NOT CPACK_DEBIAN_PACKAGE_MAINTAINER)
# Description: (mandatory)
-IF(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
- IF(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
- MESSAGE(FATAL_ERROR "CPackDeb: Debian package requires a summary for a package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or CPACK_DEBIAN_PACKAGE_DESCRIPTION")
- ENDIF(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
- SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
-ENDIF(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
+if(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
+ if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
+ message(FATAL_ERROR "CPackDeb: Debian package requires a summary for a package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or CPACK_DEBIAN_PACKAGE_DESCRIPTION")
+ endif(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
+ set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
+endif(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION)
# Section: (recommended)
-IF(NOT CPACK_DEBIAN_PACKAGE_SECTION)
- SET(CPACK_DEBIAN_PACKAGE_SECTION "devel")
-ENDIF(NOT CPACK_DEBIAN_PACKAGE_SECTION)
+if(NOT CPACK_DEBIAN_PACKAGE_SECTION)
+ set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
+endif(NOT CPACK_DEBIAN_PACKAGE_SECTION)
# Priority: (recommended)
-IF(NOT CPACK_DEBIAN_PACKAGE_PRIORITY)
- SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
-ENDIF(NOT CPACK_DEBIAN_PACKAGE_PRIORITY )
+if(NOT CPACK_DEBIAN_PACKAGE_PRIORITY)
+ set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
+endif(NOT CPACK_DEBIAN_PACKAGE_PRIORITY )
# Recommends:
# You should set: CPACK_DEBIAN_PACKAGE_RECOMMENDS
@@ -379,32 +379,32 @@ ENDIF(NOT CPACK_DEBIAN_PACKAGE_PRIORITY )
# - postrm
# - prerm"
# Usage:
-# SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
+# set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
# "${CMAKE_CURRENT_SOURCE_DIR/prerm;${CMAKE_CURRENT_SOURCE_DIR}/postrm")
# Are we packaging components ?
-IF(CPACK_DEB_PACKAGE_COMPONENT)
- SET(CPACK_DEB_PACKAGE_COMPONENT_PART_NAME "-${CPACK_DEB_PACKAGE_COMPONENT}")
- SET(CPACK_DEB_PACKAGE_COMPONENT_PART_PATH "/${CPACK_DEB_PACKAGE_COMPONENT}")
- SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${CPACK_DEB_PACKAGE_COMPONENT}")
- STRING(TOLOWER "${CPACK_PACKAGE_NAME}${CPACK_DEB_PACKAGE_COMPONENT_PART_NAME}" CPACK_DEBIAN_PACKAGE_NAME)
-ELSE(CPACK_DEB_PACKAGE_COMPONENT)
- SET(CPACK_DEB_PACKAGE_COMPONENT_PART_NAME "")
- SET(CPACK_DEB_PACKAGE_COMPONENT_PART_PATH "")
- SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}")
-ENDIF(CPACK_DEB_PACKAGE_COMPONENT)
+if(CPACK_DEB_PACKAGE_COMPONENT)
+ set(CPACK_DEB_PACKAGE_COMPONENT_PART_NAME "-${CPACK_DEB_PACKAGE_COMPONENT}")
+ set(CPACK_DEB_PACKAGE_COMPONENT_PART_PATH "/${CPACK_DEB_PACKAGE_COMPONENT}")
+ set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${CPACK_DEB_PACKAGE_COMPONENT}")
+ string(TOLOWER "${CPACK_PACKAGE_NAME}${CPACK_DEB_PACKAGE_COMPONENT_PART_NAME}" CPACK_DEBIAN_PACKAGE_NAME)
+else(CPACK_DEB_PACKAGE_COMPONENT)
+ set(CPACK_DEB_PACKAGE_COMPONENT_PART_NAME "")
+ set(CPACK_DEB_PACKAGE_COMPONENT_PART_PATH "")
+ set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}")
+endif(CPACK_DEB_PACKAGE_COMPONENT)
# Print out some debug information if we were asked for that
-IF(CPACK_DEBIAN_PACKAGE_DEBUG)
- MESSAGE("CPackDeb:Debug: CPACK_TOPLEVEL_DIRECTORY = ${CPACK_TOPLEVEL_DIRECTORY}")
- MESSAGE("CPackDeb:Debug: CPACK_TOPLEVEL_TAG = ${CPACK_TOPLEVEL_TAG}")
- MESSAGE("CPackDeb:Debug: CPACK_TEMPORARY_DIRECTORY = ${CPACK_TEMPORARY_DIRECTORY}")
- MESSAGE("CPackDeb:Debug: CPACK_OUTPUT_FILE_NAME = ${CPACK_OUTPUT_FILE_NAME}")
- MESSAGE("CPackDeb:Debug: CPACK_OUTPUT_FILE_PATH = ${CPACK_OUTPUT_FILE_PATH}")
- MESSAGE("CPackDeb:Debug: CPACK_PACKAGE_FILE_NAME = ${CPACK_PACKAGE_FILE_NAME}")
- MESSAGE("CPackDeb:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = ${CPACK_PACKAGE_INSTALL_DIRECTORY}")
- MESSAGE("CPackDeb:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = ${CPACK_TEMPORARY_PACKAGE_FILE_NAME}")
-ENDIF(CPACK_DEBIAN_PACKAGE_DEBUG)
+if(CPACK_DEBIAN_PACKAGE_DEBUG)
+ message("CPackDeb:Debug: CPACK_TOPLEVEL_DIRECTORY = ${CPACK_TOPLEVEL_DIRECTORY}")
+ message("CPackDeb:Debug: CPACK_TOPLEVEL_TAG = ${CPACK_TOPLEVEL_TAG}")
+ message("CPackDeb:Debug: CPACK_TEMPORARY_DIRECTORY = ${CPACK_TEMPORARY_DIRECTORY}")
+ message("CPackDeb:Debug: CPACK_OUTPUT_FILE_NAME = ${CPACK_OUTPUT_FILE_NAME}")
+ message("CPackDeb:Debug: CPACK_OUTPUT_FILE_PATH = ${CPACK_OUTPUT_FILE_PATH}")
+ message("CPackDeb:Debug: CPACK_PACKAGE_FILE_NAME = ${CPACK_PACKAGE_FILE_NAME}")
+ message("CPackDeb:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = ${CPACK_PACKAGE_INSTALL_DIRECTORY}")
+ message("CPackDeb:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = ${CPACK_TEMPORARY_PACKAGE_FILE_NAME}")
+endif(CPACK_DEBIAN_PACKAGE_DEBUG)
# For debian source packages:
# debian/control
@@ -414,8 +414,8 @@ ENDIF(CPACK_DEBIAN_PACKAGE_DEBUG)
# http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-debiansourcecontrolfiles
# Builds-Depends:
-#IF(NOT CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS)
-# SET(CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS
+#if(NOT CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS)
+# set(CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS
# "debhelper (>> 5.0.0), libncurses5-dev, tcl8.4"
# )
-#ENDIF(NOT CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS)
+#endif(NOT CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS)
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 0ac6e17e69..66237d88d7 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -162,7 +162,7 @@
# Default : -
# May be set by the user in order to specify a USER binary spec file
# to be used by CPackRPM instead of generating the file.
-# The specified file will be processed by CONFIGURE_FILE( @ONLY).
+# The specified file will be processed by configure_file( @ONLY).
##end
##variable
# CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE - Spec file template.
@@ -239,22 +239,22 @@
# Author: Eric Noulard with the help of Alexander Neundorf.
-IF(CMAKE_BINARY_DIR)
- MESSAGE(FATAL_ERROR "CPackRPM.cmake may only be used by CPack internally.")
-ENDIF(CMAKE_BINARY_DIR)
+if(CMAKE_BINARY_DIR)
+ message(FATAL_ERROR "CPackRPM.cmake may only be used by CPack internally.")
+endif(CMAKE_BINARY_DIR)
-IF(NOT UNIX)
- MESSAGE(FATAL_ERROR "CPackRPM.cmake may only be used under UNIX.")
-ENDIF(NOT UNIX)
+if(NOT UNIX)
+ message(FATAL_ERROR "CPackRPM.cmake may only be used under UNIX.")
+endif(NOT UNIX)
# rpmbuild is the basic command for building RPM package
# it may be a simple (symbolic) link to rpm command.
-FIND_PROGRAM(RPMBUILD_EXECUTABLE rpmbuild)
+find_program(RPMBUILD_EXECUTABLE rpmbuild)
# Check version of the rpmbuild tool this would be easier to
# track bugs with users and CPackRPM debug mode.
# We may use RPM version in order to check for available version dependent features
-IF(RPMBUILD_EXECUTABLE)
+if(RPMBUILD_EXECUTABLE)
execute_process(COMMAND ${RPMBUILD_EXECUTABLE} --version
OUTPUT_VARIABLE _TMP_VERSION
ERROR_QUIET
@@ -262,19 +262,19 @@ IF(RPMBUILD_EXECUTABLE)
string(REGEX REPLACE "^.*\ " ""
RPMBUILD_EXECUTABLE_VERSION
${_TMP_VERSION})
- IF(CPACK_RPM_PACKAGE_DEBUG)
- MESSAGE("CPackRPM:Debug: rpmbuild version is <${RPMBUILD_EXECUTABLE_VERSION}>")
- ENDIF(CPACK_RPM_PACKAGE_DEBUG)
-ENDIF(RPMBUILD_EXECUTABLE)
+ if(CPACK_RPM_PACKAGE_DEBUG)
+ message("CPackRPM:Debug: rpmbuild version is <${RPMBUILD_EXECUTABLE_VERSION}>")
+ endif(CPACK_RPM_PACKAGE_DEBUG)
+endif(RPMBUILD_EXECUTABLE)
-IF(NOT RPMBUILD_EXECUTABLE)
- MESSAGE(FATAL_ERROR "RPM package requires rpmbuild executable")
-ENDIF(NOT RPMBUILD_EXECUTABLE)
+if(NOT RPMBUILD_EXECUTABLE)
+ message(FATAL_ERROR "RPM package requires rpmbuild executable")
+endif(NOT RPMBUILD_EXECUTABLE)
# Display lsb_release output if DEBUG mode enable
# This will help to diagnose problem with CPackRPM
# because we will know on which kind of Linux we are
-IF(CPACK_RPM_PACKAGE_DEBUG)
+if(CPACK_RPM_PACKAGE_DEBUG)
find_program(LSB_RELEASE_EXECUTABLE lsb_release)
if(LSB_RELEASE_EXECUTABLE)
execute_process(COMMAND ${LSB_RELEASE_EXECUTABLE} -a
@@ -287,37 +287,37 @@ IF(CPACK_RPM_PACKAGE_DEBUG)
else (LSB_RELEASE_EXECUTABLE)
set(LSB_RELEASE_OUTPUT "lsb_release not installed/found!")
endif(LSB_RELEASE_EXECUTABLE)
- MESSAGE("CPackRPM:Debug: LSB_RELEASE = ${LSB_RELEASE_OUTPUT}")
-ENDIF(CPACK_RPM_PACKAGE_DEBUG)
+ message("CPackRPM:Debug: LSB_RELEASE = ${LSB_RELEASE_OUTPUT}")
+endif(CPACK_RPM_PACKAGE_DEBUG)
# We may use RPM version in the future in order
# to shut down warning about space in buildtree
# some recent RPM version should support space in different places.
# not checked [yet].
-IF(CPACK_TOPLEVEL_DIRECTORY MATCHES ".* .*")
- MESSAGE(FATAL_ERROR "${RPMBUILD_EXECUTABLE} can't handle paths with spaces, use a build directory without spaces for building RPMs.")
-ENDIF(CPACK_TOPLEVEL_DIRECTORY MATCHES ".* .*")
+if(CPACK_TOPLEVEL_DIRECTORY MATCHES ".* .*")
+ message(FATAL_ERROR "${RPMBUILD_EXECUTABLE} can't handle paths with spaces, use a build directory without spaces for building RPMs.")
+endif(CPACK_TOPLEVEL_DIRECTORY MATCHES ".* .*")
# If rpmbuild is found
# we try to discover alien since we may be on non RPM distro like Debian.
# In this case we may try to to use more advanced features
# like generating RPM directly from DEB using alien.
# FIXME feature not finished (yet)
-FIND_PROGRAM(ALIEN_EXECUTABLE alien)
-IF(ALIEN_EXECUTABLE)
- MESSAGE(STATUS "alien found, we may be on a Debian based distro.")
-ENDIF(ALIEN_EXECUTABLE)
+find_program(ALIEN_EXECUTABLE alien)
+if(ALIEN_EXECUTABLE)
+ message(STATUS "alien found, we may be on a Debian based distro.")
+endif(ALIEN_EXECUTABLE)
# Are we packaging components ?
-IF(CPACK_RPM_PACKAGE_COMPONENT)
- SET(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "-${CPACK_RPM_PACKAGE_COMPONENT}")
- SET(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "/${CPACK_RPM_PACKAGE_COMPONENT}")
- SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${CPACK_RPM_PACKAGE_COMPONENT}")
-ELSE(CPACK_RPM_PACKAGE_COMPONENT)
- SET(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "")
- SET(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "")
- SET(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}")
-ENDIF(CPACK_RPM_PACKAGE_COMPONENT)
+if(CPACK_RPM_PACKAGE_COMPONENT)
+ set(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "-${CPACK_RPM_PACKAGE_COMPONENT}")
+ set(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "/${CPACK_RPM_PACKAGE_COMPONENT}")
+ set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${CPACK_RPM_PACKAGE_COMPONENT}")
+else(CPACK_RPM_PACKAGE_COMPONENT)
+ set(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "")
+ set(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "")
+ set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}")
+endif(CPACK_RPM_PACKAGE_COMPONENT)
#
# Use user-defined RPM specific variables value
@@ -329,42 +329,42 @@ ENDIF(CPACK_RPM_PACKAGE_COMPONENT)
#
# CPACK_RPM_PACKAGE_SUMMARY (mandatory)
-IF(NOT CPACK_RPM_PACKAGE_SUMMARY)
+if(NOT CPACK_RPM_PACKAGE_SUMMARY)
# if neither var is defined lets use the name as summary
- IF(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
- STRING(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_RPM_PACKAGE_SUMMARY)
- ELSE(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
- SET(CPACK_RPM_PACKAGE_SUMMARY ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
- ENDIF(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
-ENDIF(NOT CPACK_RPM_PACKAGE_SUMMARY)
+ if(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
+ string(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_RPM_PACKAGE_SUMMARY)
+ else(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
+ set(CPACK_RPM_PACKAGE_SUMMARY ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
+ endif(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY)
+endif(NOT CPACK_RPM_PACKAGE_SUMMARY)
# CPACK_RPM_PACKAGE_NAME (mandatory)
-IF(NOT CPACK_RPM_PACKAGE_NAME)
- STRING(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_RPM_PACKAGE_NAME)
-ENDIF(NOT CPACK_RPM_PACKAGE_NAME)
+if(NOT CPACK_RPM_PACKAGE_NAME)
+ string(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_RPM_PACKAGE_NAME)
+endif(NOT CPACK_RPM_PACKAGE_NAME)
# CPACK_RPM_PACKAGE_VERSION (mandatory)
-IF(NOT CPACK_RPM_PACKAGE_VERSION)
- IF(NOT CPACK_PACKAGE_VERSION)
- MESSAGE(FATAL_ERROR "RPM package requires a package version")
- ENDIF(NOT CPACK_PACKAGE_VERSION)
- SET(CPACK_RPM_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION})
-ENDIF(NOT CPACK_RPM_PACKAGE_VERSION)
+if(NOT CPACK_RPM_PACKAGE_VERSION)
+ if(NOT CPACK_PACKAGE_VERSION)
+ message(FATAL_ERROR "RPM package requires a package version")
+ endif(NOT CPACK_PACKAGE_VERSION)
+ set(CPACK_RPM_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION})
+endif(NOT CPACK_RPM_PACKAGE_VERSION)
# Replace '-' in version with '_'
# '-' character is an Illegal RPM version character
# it is illegal because it is used to separate
# RPM "Version" from RPM "Release"
-STRING(REPLACE "-" "_" CPACK_RPM_PACKAGE_VERSION ${CPACK_RPM_PACKAGE_VERSION})
+string(REPLACE "-" "_" CPACK_RPM_PACKAGE_VERSION ${CPACK_RPM_PACKAGE_VERSION})
# CPACK_RPM_PACKAGE_ARCHITECTURE (optional)
-IF(CPACK_RPM_PACKAGE_ARCHITECTURE)
- SET(TMP_RPM_BUILDARCH "Buildarch: ${CPACK_RPM_PACKAGE_ARCHITECTURE}")
- IF(CPACK_RPM_PACKAGE_DEBUG)
- MESSAGE("CPackRPM:Debug: using user-specified build arch = ${CPACK_RPM_PACKAGE_ARCHITECTURE}")
- ENDIF(CPACK_RPM_PACKAGE_DEBUG)
-ELSE(CPACK_RPM_PACKAGE_ARCHITECTURE)
- SET(TMP_RPM_BUILDARCH "")
-ENDIF(CPACK_RPM_PACKAGE_ARCHITECTURE)
+if(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(TMP_RPM_BUILDARCH "Buildarch: ${CPACK_RPM_PACKAGE_ARCHITECTURE}")
+ if(CPACK_RPM_PACKAGE_DEBUG)
+ message("CPackRPM:Debug: using user-specified build arch = ${CPACK_RPM_PACKAGE_ARCHITECTURE}")
+ endif(CPACK_RPM_PACKAGE_DEBUG)
+else(CPACK_RPM_PACKAGE_ARCHITECTURE)
+ set(TMP_RPM_BUILDARCH "")
+endif(CPACK_RPM_PACKAGE_ARCHITECTURE)
# CPACK_RPM_PACKAGE_RELEASE
# The RPM release is the numbering of the RPM package ITSELF
@@ -374,28 +374,28 @@ ENDIF(CPACK_RPM_PACKAGE_ARCHITECTURE)
# without changing the version of the packaged software.
# This is the case when the packaging is buggy (not) the software :=)
# If not set, 1 is a good candidate
-IF(NOT CPACK_RPM_PACKAGE_RELEASE)
- SET(CPACK_RPM_PACKAGE_RELEASE 1)
-ENDIF(NOT CPACK_RPM_PACKAGE_RELEASE)
+if(NOT CPACK_RPM_PACKAGE_RELEASE)
+ set(CPACK_RPM_PACKAGE_RELEASE 1)
+endif(NOT CPACK_RPM_PACKAGE_RELEASE)
# CPACK_RPM_PACKAGE_LICENSE
-IF(NOT CPACK_RPM_PACKAGE_LICENSE)
- SET(CPACK_RPM_PACKAGE_LICENSE "unknown")
-ENDIF(NOT CPACK_RPM_PACKAGE_LICENSE)
+if(NOT CPACK_RPM_PACKAGE_LICENSE)
+ set(CPACK_RPM_PACKAGE_LICENSE "unknown")
+endif(NOT CPACK_RPM_PACKAGE_LICENSE)
# CPACK_RPM_PACKAGE_GROUP
-IF(NOT CPACK_RPM_PACKAGE_GROUP)
- SET(CPACK_RPM_PACKAGE_GROUP "unknown")
-ENDIF(NOT CPACK_RPM_PACKAGE_GROUP)
+if(NOT CPACK_RPM_PACKAGE_GROUP)
+ set(CPACK_RPM_PACKAGE_GROUP "unknown")
+endif(NOT CPACK_RPM_PACKAGE_GROUP)
# CPACK_RPM_PACKAGE_VENDOR
-IF(NOT CPACK_RPM_PACKAGE_VENDOR)
- IF(CPACK_PACKAGE_VENDOR)
- SET(CPACK_RPM_PACKAGE_VENDOR "${CPACK_PACKAGE_VENDOR}")
- ELSE(CPACK_PACKAGE_VENDOR)
- SET(CPACK_RPM_PACKAGE_VENDOR "unknown")
- ENDIF(CPACK_PACKAGE_VENDOR)
-ENDIF(NOT CPACK_RPM_PACKAGE_VENDOR)
+if(NOT CPACK_RPM_PACKAGE_VENDOR)
+ if(CPACK_PACKAGE_VENDOR)
+ set(CPACK_RPM_PACKAGE_VENDOR "${CPACK_PACKAGE_VENDOR}")
+ else(CPACK_PACKAGE_VENDOR)
+ set(CPACK_RPM_PACKAGE_VENDOR "unknown")
+ endif(CPACK_PACKAGE_VENDOR)
+endif(NOT CPACK_RPM_PACKAGE_VENDOR)
# CPACK_RPM_PACKAGE_SOURCE
# The name of the source tarball in case we generate a source RPM
@@ -407,35 +407,35 @@ ENDIF(NOT CPACK_RPM_PACKAGE_VENDOR)
# if it is defined
# - set to a default value
#
-IF (NOT CPACK_RPM_PACKAGE_DESCRIPTION)
- IF (CPACK_PACKAGE_DESCRIPTION_FILE)
- FILE(READ ${CPACK_PACKAGE_DESCRIPTION_FILE} CPACK_RPM_PACKAGE_DESCRIPTION)
- ELSE (CPACK_PACKAGE_DESCRIPTION_FILE)
- SET(CPACK_RPM_PACKAGE_DESCRIPTION "no package description available")
- ENDIF (CPACK_PACKAGE_DESCRIPTION_FILE)
-ENDIF (NOT CPACK_RPM_PACKAGE_DESCRIPTION)
+if (NOT CPACK_RPM_PACKAGE_DESCRIPTION)
+ if (CPACK_PACKAGE_DESCRIPTION_FILE)
+ file(READ ${CPACK_PACKAGE_DESCRIPTION_FILE} CPACK_RPM_PACKAGE_DESCRIPTION)
+ else (CPACK_PACKAGE_DESCRIPTION_FILE)
+ set(CPACK_RPM_PACKAGE_DESCRIPTION "no package description available")
+ endif (CPACK_PACKAGE_DESCRIPTION_FILE)
+endif (NOT CPACK_RPM_PACKAGE_DESCRIPTION)
# CPACK_RPM_COMPRESSION_TYPE
#
-IF (CPACK_RPM_COMPRESSION_TYPE)
- IF(CPACK_RPM_PACKAGE_DEBUG)
- MESSAGE("CPackRPM:Debug: User Specified RPM compression type: ${CPACK_RPM_COMPRESSION_TYPE}")
- ENDIF(CPACK_RPM_PACKAGE_DEBUG)
- IF(CPACK_RPM_COMPRESSION_TYPE STREQUAL "lzma")
- SET(CPACK_RPM_COMPRESSION_TYPE_TMP "%define _binary_payload w9.lzdio")
- ENDIF(CPACK_RPM_COMPRESSION_TYPE STREQUAL "lzma")
- IF(CPACK_RPM_COMPRESSION_TYPE STREQUAL "xz")
- SET(CPACK_RPM_COMPRESSION_TYPE_TMP "%define _binary_payload w7.xzdio")
- ENDIF(CPACK_RPM_COMPRESSION_TYPE STREQUAL "xz")
- IF(CPACK_RPM_COMPRESSION_TYPE STREQUAL "bzip2")
- SET(CPACK_RPM_COMPRESSION_TYPE_TMP "%define _binary_payload w9.bzdio")
- ENDIF(CPACK_RPM_COMPRESSION_TYPE STREQUAL "bzip2")
- IF(CPACK_RPM_COMPRESSION_TYPE STREQUAL "gzip")
- SET(CPACK_RPM_COMPRESSION_TYPE_TMP "%define _binary_payload w9.gzdio")
- ENDIF(CPACK_RPM_COMPRESSION_TYPE STREQUAL "gzip")
-ELSE(CPACK_RPM_COMPRESSION_TYPE)
- SET(CPACK_RPM_COMPRESSION_TYPE_TMP "")
-ENDIF(CPACK_RPM_COMPRESSION_TYPE)
+if (CPACK_RPM_COMPRESSION_TYPE)
+ if(CPACK_RPM_PACKAGE_DEBUG)
+ message("CPackRPM:Debug: User Specified RPM compression type: ${CPACK_RPM_COMPRESSION_TYPE}")
+ endif(CPACK_RPM_PACKAGE_DEBUG)
+ if(CPACK_RPM_COMPRESSION_TYPE STREQUAL "lzma")
+ set(CPACK_RPM_COMPRESSION_TYPE_TMP "%define _binary_payload w9.lzdio")
+ endif(CPACK_RPM_COMPRESSION_TYPE STREQUAL "lzma")
+ if(CPACK_RPM_COMPRESSION_TYPE STREQUAL "xz")
+ set(CPACK_RPM_COMPRESSION_TYPE_TMP "%define _binary_payload w7.xzdio")
+ endif(CPACK_RPM_COMPRESSION_TYPE STREQUAL "xz")
+ if(CPACK_RPM_COMPRESSION_TYPE STREQUAL "bzip2")
+ set(CPACK_RPM_COMPRESSION_TYPE_TMP "%define _binary_payload w9.bzdio")
+ endif(CPACK_RPM_COMPRESSION_TYPE STREQUAL "bzip2")
+ if(CPACK_RPM_COMPRESSION_TYPE STREQUAL "gzip")
+ set(CPACK_RPM_COMPRESSION_TYPE_TMP "%define _binary_payload w9.gzdio")
+ endif(CPACK_RPM_COMPRESSION_TYPE STREQUAL "gzip")
+else(CPACK_RPM_COMPRESSION_TYPE)
+ set(CPACK_RPM_COMPRESSION_TYPE_TMP "")
+endif(CPACK_RPM_COMPRESSION_TYPE)
if(CPACK_PACKAGE_RELOCATABLE)
set(CPACK_RPM_PACKAGE_RELOCATABLE TRUE)
@@ -453,57 +453,57 @@ endif(CPACK_RPM_PACKAGE_RELOCATABLE)
# Check if additional fields for RPM spec header are given
# There may be some COMPONENT specific variables as well
-FOREACH(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLICTS AUTOPROV AUTOREQ AUTOREQPROV)
- IF(CPACK_RPM_PACKAGE_DEBUG)
+foreach(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLICTS AUTOPROV AUTOREQ AUTOREQPROV)
+ if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: processing ${_RPM_SPEC_HEADER}")
- ENDIF(CPACK_RPM_PACKAGE_DEBUG)
+ endif(CPACK_RPM_PACKAGE_DEBUG)
if(CPACK_RPM_PACKAGE_COMPONENT)
if(CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${_RPM_SPEC_HEADER})
- IF(CPACK_RPM_PACKAGE_DEBUG)
+ if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: using CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${_RPM_SPEC_HEADER}")
- ENDIF(CPACK_RPM_PACKAGE_DEBUG)
+ endif(CPACK_RPM_PACKAGE_DEBUG)
set(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP ${CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${_RPM_SPEC_HEADER}})
else()
- IF(CPACK_RPM_PACKAGE_DEBUG)
+ if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: CPACK_RPM_${CPACK_RPM_PACKAGE_COMPONENT}_PACKAGE_${_RPM_SPEC_HEADER} not defined")
message("CPackRPM:Debug: using CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}")
- ENDIF(CPACK_RPM_PACKAGE_DEBUG)
+ endif(CPACK_RPM_PACKAGE_DEBUG)
set(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}})
endif()
else()
- IF(CPACK_RPM_PACKAGE_DEBUG)
+ if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: using CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}")
- ENDIF(CPACK_RPM_PACKAGE_DEBUG)
+ endif(CPACK_RPM_PACKAGE_DEBUG)
set(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}})
endif()
- IF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
- STRING(LENGTH ${_RPM_SPEC_HEADER} _PACKAGE_HEADER_STRLENGTH)
- MATH(EXPR _PACKAGE_HEADER_STRLENGTH "${_PACKAGE_HEADER_STRLENGTH} - 1")
- STRING(SUBSTRING ${_RPM_SPEC_HEADER} 1 ${_PACKAGE_HEADER_STRLENGTH} _PACKAGE_HEADER_TAIL)
- STRING(TOLOWER "${_PACKAGE_HEADER_TAIL}" _PACKAGE_HEADER_TAIL)
- STRING(SUBSTRING ${_RPM_SPEC_HEADER} 0 1 _PACKAGE_HEADER_NAME)
- SET(_PACKAGE_HEADER_NAME "${_PACKAGE_HEADER_NAME}${_PACKAGE_HEADER_TAIL}")
- IF(CPACK_RPM_PACKAGE_DEBUG)
- MESSAGE("CPackRPM:Debug: User defined ${_PACKAGE_HEADER_NAME}:\n ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}")
- ENDIF(CPACK_RPM_PACKAGE_DEBUG)
- SET(TMP_RPM_${_RPM_SPEC_HEADER} "${_PACKAGE_HEADER_NAME}: ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}")
- ELSE(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
+ if(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
+ string(LENGTH ${_RPM_SPEC_HEADER} _PACKAGE_HEADER_STRLENGTH)
+ math(EXPR _PACKAGE_HEADER_STRLENGTH "${_PACKAGE_HEADER_STRLENGTH} - 1")
+ string(SUBSTRING ${_RPM_SPEC_HEADER} 1 ${_PACKAGE_HEADER_STRLENGTH} _PACKAGE_HEADER_TAIL)
+ string(TOLOWER "${_PACKAGE_HEADER_TAIL}" _PACKAGE_HEADER_TAIL)
+ string(SUBSTRING ${_RPM_SPEC_HEADER} 0 1 _PACKAGE_HEADER_NAME)
+ set(_PACKAGE_HEADER_NAME "${_PACKAGE_HEADER_NAME}${_PACKAGE_HEADER_TAIL}")
+ if(CPACK_RPM_PACKAGE_DEBUG)
+ message("CPackRPM:Debug: User defined ${_PACKAGE_HEADER_NAME}:\n ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}")
+ endif(CPACK_RPM_PACKAGE_DEBUG)
+ set(TMP_RPM_${_RPM_SPEC_HEADER} "${_PACKAGE_HEADER_NAME}: ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}")
+ else(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
# Do not forget to unset previously set header (from previous component)
- UNSET(TMP_RPM_${_RPM_SPEC_HEADER})
- ENDIF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
-ENDFOREACH(_RPM_SPEC_HEADER)
+ unset(TMP_RPM_${_RPM_SPEC_HEADER})
+ endif(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
+endforeach(_RPM_SPEC_HEADER)
# CPACK_RPM_SPEC_INSTALL_POST
# May be used to define a RPM post intallation script
# for example setting it to "/bin/true" may prevent
# rpmbuild from stripping binaries.
-IF(CPACK_RPM_SPEC_INSTALL_POST)
- IF(CPACK_RPM_PACKAGE_DEBUG)
- MESSAGE("CPackRPM:Debug: User defined CPACK_RPM_SPEC_INSTALL_POST = ${CPACK_RPM_SPEC_INSTALL_POST}")
- ENDIF(CPACK_RPM_PACKAGE_DEBUG)
- SET(TMP_RPM_SPEC_INSTALL_POST "%define __spec_install_post ${CPACK_RPM_SPEC_INSTALL_POST}")
-ENDIF(CPACK_RPM_SPEC_INSTALL_POST)
+if(CPACK_RPM_SPEC_INSTALL_POST)
+ if(CPACK_RPM_PACKAGE_DEBUG)
+ message("CPackRPM:Debug: User defined CPACK_RPM_SPEC_INSTALL_POST = ${CPACK_RPM_SPEC_INSTALL_POST}")
+ endif(CPACK_RPM_PACKAGE_DEBUG)
+ set(TMP_RPM_SPEC_INSTALL_POST "%define __spec_install_post ${CPACK_RPM_SPEC_INSTALL_POST}")
+endif(CPACK_RPM_SPEC_INSTALL_POST)
# CPACK_RPM_POST_INSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_POST_INSTALL_SCRIPT_FILE)
# CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_POST_UNINSTALL_SCRIPT_FILE)
@@ -614,30 +614,30 @@ endif(CPACK_RPM_CHANGELOG_FILE)
# CPACK_RPM_SPEC_MORE_DEFINE
# This is a generated spec rpm file spaceholder
-IF(CPACK_RPM_SPEC_MORE_DEFINE)
- IF(CPACK_RPM_PACKAGE_DEBUG)
- MESSAGE("CPackRPM:Debug: User defined more define spec line specified:\n ${CPACK_RPM_SPEC_MORE_DEFINE}")
- ENDIF(CPACK_RPM_PACKAGE_DEBUG)
-ENDIF(CPACK_RPM_SPEC_MORE_DEFINE)
+if(CPACK_RPM_SPEC_MORE_DEFINE)
+ if(CPACK_RPM_PACKAGE_DEBUG)
+ message("CPackRPM:Debug: User defined more define spec line specified:\n ${CPACK_RPM_SPEC_MORE_DEFINE}")
+ endif(CPACK_RPM_PACKAGE_DEBUG)
+endif(CPACK_RPM_SPEC_MORE_DEFINE)
# Now we may create the RPM build tree structure
-SET(CPACK_RPM_ROOTDIR "${CPACK_TOPLEVEL_DIRECTORY}")
-MESSAGE(STATUS "CPackRPM:Debug: Using CPACK_RPM_ROOTDIR=${CPACK_RPM_ROOTDIR}")
+set(CPACK_RPM_ROOTDIR "${CPACK_TOPLEVEL_DIRECTORY}")
+message(STATUS "CPackRPM:Debug: Using CPACK_RPM_ROOTDIR=${CPACK_RPM_ROOTDIR}")
# Prepare RPM build tree
-FILE(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR})
-FILE(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/tmp)
-FILE(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/BUILD)
-FILE(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/RPMS)
-FILE(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/SOURCES)
-FILE(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/SPECS)
-FILE(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/SRPMS)
-
-#SET(CPACK_RPM_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${CPACK_RPM_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}-${CPACK_RPM_PACKAGE_ARCHITECTURE}.rpm")
-SET(CPACK_RPM_FILE_NAME "${CPACK_OUTPUT_FILE_NAME}")
+file(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR})
+file(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/tmp)
+file(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/BUILD)
+file(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/RPMS)
+file(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/SOURCES)
+file(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/SPECS)
+file(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/SRPMS)
+
+#set(CPACK_RPM_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${CPACK_RPM_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}-${CPACK_RPM_PACKAGE_ARCHITECTURE}.rpm")
+set(CPACK_RPM_FILE_NAME "${CPACK_OUTPUT_FILE_NAME}")
# it seems rpmbuild can't handle spaces in the path
# neither escaping (as below) nor putting quotes around the path seem to help
-#STRING(REGEX REPLACE " " "\\\\ " CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
-SET(CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
+#string(REGEX REPLACE " " "\\\\ " CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
+set(CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
# if we are creating a relocatable package, omit parent directories of
# CPACK_RPM_PACKAGE_PREFIX. This is achieved by building a "filter list"
@@ -666,7 +666,7 @@ endif()
# file name by enclosing it between double quotes (thus the sed)
# Then we must authorize any man pages extension (adding * at the end)
# because rpmbuild may automatically compress those files
-EXECUTE_PROCESS(COMMAND find . -type f -o -type l -o (-type d -a -not ( -name "." ${_RPM_DIRS_TO_OMIT} ) )
+execute_process(COMMAND find . -type f -o -type l -o (-type d -a -not ( -name "." ${_RPM_DIRS_TO_OMIT} ) )
COMMAND sed s:.*/man.*/.*:&*:
COMMAND sed s/\\.\\\(.*\\\)/\"\\1\"/
WORKING_DIRECTORY "${WDIR}"
@@ -715,9 +715,9 @@ endif()
# or CPACK_RPM_INSTALL_FILES,
# hence it must be done before these auto-generated lists are processed.
if(CPACK_RPM_USER_FILELIST_INTERNAL)
- IF(CPACK_RPM_PACKAGE_DEBUG)
+ if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: Handling User Filelist: <${CPACK_RPM_USER_FILELIST_INTERNAL}>")
- ENDIF(CPACK_RPM_PACKAGE_DEBUG)
+ endif(CPACK_RPM_PACKAGE_DEBUG)
# Create CMake list from CPACK_RPM_INSTALL_FILES
string(STRIP "${CPACK_RPM_INSTALL_FILES}" CPACK_RPM_INSTALL_FILES_LIST)
@@ -753,9 +753,9 @@ else()
endif()
if (CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL)
- IF(CPACK_RPM_PACKAGE_DEBUG)
+ if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: Handling Absolute Destination Files: ${CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL}")
- ENDIF(CPACK_RPM_PACKAGE_DEBUG)
+ endif(CPACK_RPM_PACKAGE_DEBUG)
# Remove trailing space
string(STRIP "${CPACK_RPM_INSTALL_FILES}" CPACK_RPM_INSTALL_FILES_LIST)
# Transform endline separated - string into CMake List
@@ -774,10 +774,10 @@ if (CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL)
foreach(F IN LISTS CPACK_ABSOLUTE_DESTINATION_FILES_INTERNAL)
set(CPACK_RPM_ABSOLUTE_INSTALL_FILES "${CPACK_RPM_ABSOLUTE_INSTALL_FILES}%config \"${F}\"\n")
endforeach(F)
- IF(CPACK_RPM_PACKAGE_DEBUG)
+ if(CPACK_RPM_PACKAGE_DEBUG)
message("CPackRPM:Debug: CPACK_RPM_ABSOLUTE_INSTALL_FILES=${CPACK_RPM_ABSOLUTE_INSTALL_FILES}")
message("CPackRPM:Debug: CPACK_RPM_INSTALL_FILES=${CPACK_RPM_INSTALL_FILES}")
- ENDIF(CPACK_RPM_PACKAGE_DEBUG)
+ endif(CPACK_RPM_PACKAGE_DEBUG)
else()
# reset vars in order to avoid leakage of value(s) from one component to another
set(CPACK_RPM_ABSOLUTE_INSTALL_FILES "")
@@ -803,28 +803,28 @@ endforeach(F)
set(CPACK_RPM_INSTALL_FILES_LIST "")
# The name of the final spec file to be used by rpmbuild
-SET(CPACK_RPM_BINARY_SPECFILE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.spec")
+set(CPACK_RPM_BINARY_SPECFILE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.spec")
# Print out some debug information if we were asked for that
-IF(CPACK_RPM_PACKAGE_DEBUG)
- MESSAGE("CPackRPM:Debug: CPACK_TOPLEVEL_DIRECTORY = ${CPACK_TOPLEVEL_DIRECTORY}")
- MESSAGE("CPackRPM:Debug: CPACK_TOPLEVEL_TAG = ${CPACK_TOPLEVEL_TAG}")
- MESSAGE("CPackRPM:Debug: CPACK_TEMPORARY_DIRECTORY = ${CPACK_TEMPORARY_DIRECTORY}")
- MESSAGE("CPackRPM:Debug: CPACK_OUTPUT_FILE_NAME = ${CPACK_OUTPUT_FILE_NAME}")
- MESSAGE("CPackRPM:Debug: CPACK_OUTPUT_FILE_PATH = ${CPACK_OUTPUT_FILE_PATH}")
- MESSAGE("CPackRPM:Debug: CPACK_PACKAGE_FILE_NAME = ${CPACK_PACKAGE_FILE_NAME}")
- MESSAGE("CPackRPM:Debug: CPACK_RPM_BINARY_SPECFILE = ${CPACK_RPM_BINARY_SPECFILE}")
- MESSAGE("CPackRPM:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = ${CPACK_PACKAGE_INSTALL_DIRECTORY}")
- MESSAGE("CPackRPM:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = ${CPACK_TEMPORARY_PACKAGE_FILE_NAME}")
-ENDIF(CPACK_RPM_PACKAGE_DEBUG)
+if(CPACK_RPM_PACKAGE_DEBUG)
+ message("CPackRPM:Debug: CPACK_TOPLEVEL_DIRECTORY = ${CPACK_TOPLEVEL_DIRECTORY}")
+ message("CPackRPM:Debug: CPACK_TOPLEVEL_TAG = ${CPACK_TOPLEVEL_TAG}")
+ message("CPackRPM:Debug: CPACK_TEMPORARY_DIRECTORY = ${CPACK_TEMPORARY_DIRECTORY}")
+ message("CPackRPM:Debug: CPACK_OUTPUT_FILE_NAME = ${CPACK_OUTPUT_FILE_NAME}")
+ message("CPackRPM:Debug: CPACK_OUTPUT_FILE_PATH = ${CPACK_OUTPUT_FILE_PATH}")
+ message("CPackRPM:Debug: CPACK_PACKAGE_FILE_NAME = ${CPACK_PACKAGE_FILE_NAME}")
+ message("CPackRPM:Debug: CPACK_RPM_BINARY_SPECFILE = ${CPACK_RPM_BINARY_SPECFILE}")
+ message("CPackRPM:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = ${CPACK_PACKAGE_INSTALL_DIRECTORY}")
+ message("CPackRPM:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = ${CPACK_TEMPORARY_PACKAGE_FILE_NAME}")
+endif(CPACK_RPM_PACKAGE_DEBUG)
# USER generated spec file handling.
# We should generate a spec file template:
# - either because the user asked for it : CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
# - or the user did not provide one : NOT CPACK_RPM_USER_BINARY_SPECFILE
#
-IF(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE)
- FILE(WRITE ${CPACK_RPM_BINARY_SPECFILE}.in
+if(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE)
+ file(WRITE ${CPACK_RPM_BINARY_SPECFILE}.in
"# -*- rpm-spec -*-
BuildRoot: \@CPACK_RPM_DIRECTORY\@/\@CPACK_PACKAGE_FILE_NAME\@\@CPACK_RPM_PACKAGE_COMPONENT_PART_PATH\@
Summary: \@CPACK_RPM_PACKAGE_SUMMARY\@
@@ -898,28 +898,28 @@ ${CPACK_RPM_USER_INSTALL_FILES}
# Stop here if we were asked to only generate a template USER spec file
# The generated file may then be used as a template by user who wants
# to customize their own spec file.
- IF(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE)
- MESSAGE(FATAL_ERROR "CPackRPM: STOP here Generated USER binary spec file templare is: ${CPACK_RPM_BINARY_SPECFILE}.in")
- ENDIF(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE)
-ENDIF(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE)
+ if(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE)
+ message(FATAL_ERROR "CPackRPM: STOP here Generated USER binary spec file templare is: ${CPACK_RPM_BINARY_SPECFILE}.in")
+ endif(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE)
+endif(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE)
# After that we may either use a user provided spec file
# or generate one using appropriate variables value.
-IF(CPACK_RPM_USER_BINARY_SPECFILE)
+if(CPACK_RPM_USER_BINARY_SPECFILE)
# User may have specified SPECFILE just use it
- MESSAGE("CPackRPM: Will use USER specified spec file: ${CPACK_RPM_USER_BINARY_SPECFILE}")
+ message("CPackRPM: Will use USER specified spec file: ${CPACK_RPM_USER_BINARY_SPECFILE}")
# The user provided file is processed for @var replacement
- CONFIGURE_FILE(${CPACK_RPM_USER_BINARY_SPECFILE} ${CPACK_RPM_BINARY_SPECFILE} @ONLY)
-ELSE(CPACK_RPM_USER_BINARY_SPECFILE)
+ configure_file(${CPACK_RPM_USER_BINARY_SPECFILE} ${CPACK_RPM_BINARY_SPECFILE} @ONLY)
+else(CPACK_RPM_USER_BINARY_SPECFILE)
# No User specified spec file, will use the generated spec file
- MESSAGE("CPackRPM: Will use GENERATED spec file: ${CPACK_RPM_BINARY_SPECFILE}")
+ message("CPackRPM: Will use GENERATED spec file: ${CPACK_RPM_BINARY_SPECFILE}")
# Note the just created file is processed for @var replacement
- CONFIGURE_FILE(${CPACK_RPM_BINARY_SPECFILE}.in ${CPACK_RPM_BINARY_SPECFILE} @ONLY)
-ENDIF(CPACK_RPM_USER_BINARY_SPECFILE)
+ configure_file(${CPACK_RPM_BINARY_SPECFILE}.in ${CPACK_RPM_BINARY_SPECFILE} @ONLY)
+endif(CPACK_RPM_USER_BINARY_SPECFILE)
-IF(RPMBUILD_EXECUTABLE)
+if(RPMBUILD_EXECUTABLE)
# Now call rpmbuild using the SPECFILE
- EXECUTE_PROCESS(
+ execute_process(
COMMAND "${RPMBUILD_EXECUTABLE}" -bb
--define "_topdir ${CPACK_RPM_DIRECTORY}"
--buildroot "${CPACK_RPM_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}"
@@ -928,17 +928,17 @@ IF(RPMBUILD_EXECUTABLE)
RESULT_VARIABLE CPACK_RPMBUILD_EXEC_RESULT
ERROR_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.err"
OUTPUT_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.out")
- IF(CPACK_RPM_PACKAGE_DEBUG OR CPACK_RPMBUILD_EXEC_RESULT)
- FILE(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.err RPMBUILDERR)
- FILE(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.out RPMBUILDOUT)
- MESSAGE("CPackRPM:Debug: You may consult rpmbuild logs in: ")
- MESSAGE("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.err")
- MESSAGE("CPackRPM:Debug: *** ${RPMBUILDERR} ***")
- MESSAGE("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.out")
- MESSAGE("CPackRPM:Debug: *** ${RPMBUILDERR} ***")
- ENDIF(CPACK_RPM_PACKAGE_DEBUG OR CPACK_RPMBUILD_EXEC_RESULT)
-ELSE(RPMBUILD_EXECUTABLE)
- IF(ALIEN_EXECUTABLE)
- MESSAGE(FATAL_ERROR "RPM packaging through alien not done (yet)")
- ENDIF(ALIEN_EXECUTABLE)
-ENDIF(RPMBUILD_EXECUTABLE)
+ if(CPACK_RPM_PACKAGE_DEBUG OR CPACK_RPMBUILD_EXEC_RESULT)
+ file(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.err RPMBUILDERR)
+ file(READ ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.out RPMBUILDOUT)
+ message("CPackRPM:Debug: You may consult rpmbuild logs in: ")
+ message("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.err")
+ message("CPackRPM:Debug: *** ${RPMBUILDERR} ***")
+ message("CPackRPM:Debug: - ${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild${CPACK_RPM_PACKAGE_COMPONENT_PART_NAME}.out")
+ message("CPackRPM:Debug: *** ${RPMBUILDERR} ***")
+ endif(CPACK_RPM_PACKAGE_DEBUG OR CPACK_RPMBUILD_EXEC_RESULT)
+else(RPMBUILD_EXECUTABLE)
+ if(ALIEN_EXECUTABLE)
+ message(FATAL_ERROR "RPM packaging through alien not done (yet)")
+ endif(ALIEN_EXECUTABLE)
+endif(RPMBUILD_EXECUTABLE)
diff --git a/Modules/CPackZIP.cmake b/Modules/CPackZIP.cmake
index f80b43903c..bf7062a760 100644
--- a/Modules/CPackZIP.cmake
+++ b/Modules/CPackZIP.cmake
@@ -12,30 +12,30 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-IF(CMAKE_BINARY_DIR)
- MESSAGE(FATAL_ERROR "CPackZIP.cmake may only be used by CPack internally.")
-ENDIF(CMAKE_BINARY_DIR)
+if(CMAKE_BINARY_DIR)
+ message(FATAL_ERROR "CPackZIP.cmake may only be used by CPack internally.")
+endif(CMAKE_BINARY_DIR)
-FIND_PROGRAM(ZIP_EXECUTABLE wzzip PATHS "$ENV{ProgramFiles}/WinZip")
-IF(ZIP_EXECUTABLE)
- SET(CPACK_ZIP_COMMAND "\"${ZIP_EXECUTABLE}\" -P \"<ARCHIVE>\" @<FILELIST>")
- SET(CPACK_ZIP_NEED_QUOTES TRUE)
-ENDIF(ZIP_EXECUTABLE)
+find_program(ZIP_EXECUTABLE wzzip PATHS "$ENV{ProgramFiles}/WinZip")
+if(ZIP_EXECUTABLE)
+ set(CPACK_ZIP_COMMAND "\"${ZIP_EXECUTABLE}\" -P \"<ARCHIVE>\" @<FILELIST>")
+ set(CPACK_ZIP_NEED_QUOTES TRUE)
+endif(ZIP_EXECUTABLE)
-IF(NOT ZIP_EXECUTABLE)
- FIND_PROGRAM(ZIP_EXECUTABLE 7z PATHS "$ENV{ProgramFiles}/7-Zip")
- IF(ZIP_EXECUTABLE)
- SET(CPACK_ZIP_COMMAND "\"${ZIP_EXECUTABLE}\" a -tzip \"<ARCHIVE>\" @<FILELIST>")
- SET(CPACK_ZIP_NEED_QUOTES TRUE)
- ENDIF(ZIP_EXECUTABLE)
-ENDIF(NOT ZIP_EXECUTABLE)
+if(NOT ZIP_EXECUTABLE)
+ find_program(ZIP_EXECUTABLE 7z PATHS "$ENV{ProgramFiles}/7-Zip")
+ if(ZIP_EXECUTABLE)
+ set(CPACK_ZIP_COMMAND "\"${ZIP_EXECUTABLE}\" a -tzip \"<ARCHIVE>\" @<FILELIST>")
+ set(CPACK_ZIP_NEED_QUOTES TRUE)
+ endif(ZIP_EXECUTABLE)
+endif(NOT ZIP_EXECUTABLE)
-IF(NOT ZIP_EXECUTABLE)
- FIND_PACKAGE(Cygwin)
- FIND_PROGRAM(ZIP_EXECUTABLE zip PATHS "${CYGWIN_INSTALL_PATH}/bin")
- IF(ZIP_EXECUTABLE)
- SET(CPACK_ZIP_COMMAND "\"${ZIP_EXECUTABLE}\" -r \"<ARCHIVE>\" . -i@<FILELIST>")
- SET(CPACK_ZIP_NEED_QUOTES FALSE)
- ENDIF(ZIP_EXECUTABLE)
-ENDIF(NOT ZIP_EXECUTABLE)
+if(NOT ZIP_EXECUTABLE)
+ find_package(Cygwin)
+ find_program(ZIP_EXECUTABLE zip PATHS "${CYGWIN_INSTALL_PATH}/bin")
+ if(ZIP_EXECUTABLE)
+ set(CPACK_ZIP_COMMAND "\"${ZIP_EXECUTABLE}\" -r \"<ARCHIVE>\" . -i@<FILELIST>")
+ set(CPACK_ZIP_NEED_QUOTES FALSE)
+ endif(ZIP_EXECUTABLE)
+endif(NOT ZIP_EXECUTABLE)
diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake
index a32baa223e..4e861a92a2 100644
--- a/Modules/CTest.cmake
+++ b/Modules/CTest.cmake
@@ -58,46 +58,46 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-OPTION(BUILD_TESTING "Build the testing tree." ON)
+option(BUILD_TESTING "Build the testing tree." ON)
# function to turn generator name into a version string
# like vs7 vs71 vs8 vs9
-FUNCTION(GET_VS_VERSION_STRING generator var)
- STRING(REGEX REPLACE "Visual Studio ([0-9][0-9]?)($|.*)" "\\1"
+function(GET_VS_VERSION_STRING generator var)
+ string(REGEX REPLACE "Visual Studio ([0-9][0-9]?)($|.*)" "\\1"
NUMBER "${generator}")
- IF("${generator}" MATCHES "Visual Studio 7 .NET 2003")
- SET(ver_string "vs71")
- ELSE("${generator}" MATCHES "Visual Studio 7 .NET 2003")
- SET(ver_string "vs${NUMBER}")
- ENDIF("${generator}" MATCHES "Visual Studio 7 .NET 2003")
- SET(${var} ${ver_string} PARENT_SCOPE)
-ENDFUNCTION(GET_VS_VERSION_STRING)
+ if("${generator}" MATCHES "Visual Studio 7 .NET 2003")
+ set(ver_string "vs71")
+ else("${generator}" MATCHES "Visual Studio 7 .NET 2003")
+ set(ver_string "vs${NUMBER}")
+ endif("${generator}" MATCHES "Visual Studio 7 .NET 2003")
+ set(${var} ${ver_string} PARENT_SCOPE)
+endfunction(GET_VS_VERSION_STRING)
-IF(BUILD_TESTING)
+if(BUILD_TESTING)
# Setup some auxilary macros
- MACRO(SET_IF_NOT_SET var val)
- IF(NOT DEFINED "${var}")
- SET("${var}" "${val}")
- ENDIF(NOT DEFINED "${var}")
- ENDMACRO(SET_IF_NOT_SET)
+ macro(SET_IF_NOT_SET var val)
+ if(NOT DEFINED "${var}")
+ set("${var}" "${val}")
+ endif(NOT DEFINED "${var}")
+ endmacro(SET_IF_NOT_SET)
- MACRO(SET_IF_SET var val)
- IF(NOT "${val}" MATCHES "^$")
- SET("${var}" "${val}")
- ENDIF(NOT "${val}" MATCHES "^$")
- ENDMACRO(SET_IF_SET)
+ macro(SET_IF_SET var val)
+ if(NOT "${val}" MATCHES "^$")
+ set("${var}" "${val}")
+ endif(NOT "${val}" MATCHES "^$")
+ endmacro(SET_IF_SET)
- MACRO(SET_IF_SET_AND_NOT_SET var val)
- IF(NOT "${val}" MATCHES "^$")
+ macro(SET_IF_SET_AND_NOT_SET var val)
+ if(NOT "${val}" MATCHES "^$")
SET_IF_NOT_SET("${var}" "${val}")
- ENDIF(NOT "${val}" MATCHES "^$")
- ENDMACRO(SET_IF_SET_AND_NOT_SET)
+ endif(NOT "${val}" MATCHES "^$")
+ endmacro(SET_IF_SET_AND_NOT_SET)
# Make sure testing is enabled
- ENABLE_TESTING()
+ enable_testing()
- IF(EXISTS "${PROJECT_SOURCE_DIR}/CTestConfig.cmake")
- INCLUDE("${PROJECT_SOURCE_DIR}/CTestConfig.cmake")
+ if(EXISTS "${PROJECT_SOURCE_DIR}/CTestConfig.cmake")
+ include("${PROJECT_SOURCE_DIR}/CTestConfig.cmake")
SET_IF_SET_AND_NOT_SET(NIGHTLY_START_TIME "${CTEST_NIGHTLY_START_TIME}")
SET_IF_SET_AND_NOT_SET(DROP_METHOD "${CTEST_DROP_METHOD}")
SET_IF_SET_AND_NOT_SET(DROP_SITE "${CTEST_DROP_SITE}")
@@ -107,155 +107,155 @@ IF(BUILD_TESTING)
SET_IF_SET_AND_NOT_SET(DROP_LOCATION "${CTEST_DROP_LOCATION}")
SET_IF_SET_AND_NOT_SET(TRIGGER_SITE "${CTEST_TRIGGER_SITE}")
SET_IF_SET_AND_NOT_SET(UPDATE_TYPE "${CTEST_UPDATE_TYPE}")
- ENDIF(EXISTS "${PROJECT_SOURCE_DIR}/CTestConfig.cmake")
+ endif(EXISTS "${PROJECT_SOURCE_DIR}/CTestConfig.cmake")
# the project can have a DartConfig.cmake file
- IF(EXISTS "${PROJECT_SOURCE_DIR}/DartConfig.cmake")
- INCLUDE("${PROJECT_SOURCE_DIR}/DartConfig.cmake")
- ELSE(EXISTS "${PROJECT_SOURCE_DIR}/DartConfig.cmake")
+ if(EXISTS "${PROJECT_SOURCE_DIR}/DartConfig.cmake")
+ include("${PROJECT_SOURCE_DIR}/DartConfig.cmake")
+ else(EXISTS "${PROJECT_SOURCE_DIR}/DartConfig.cmake")
# Dashboard is opened for submissions for a 24 hour period starting at
# the specified NIGHTLY_START_TIME. Time is specified in 24 hour format.
SET_IF_NOT_SET (NIGHTLY_START_TIME "00:00:00 EDT")
SET_IF_NOT_SET(DROP_METHOD "http")
SET_IF_NOT_SET (COMPRESS_SUBMISSION ON)
- ENDIF(EXISTS "${PROJECT_SOURCE_DIR}/DartConfig.cmake")
+ endif(EXISTS "${PROJECT_SOURCE_DIR}/DartConfig.cmake")
SET_IF_NOT_SET (NIGHTLY_START_TIME "00:00:00 EDT")
- FIND_PROGRAM(CVSCOMMAND cvs )
- SET(CVS_UPDATE_OPTIONS "-d -A -P" CACHE STRING
+ find_program(CVSCOMMAND cvs )
+ set(CVS_UPDATE_OPTIONS "-d -A -P" CACHE STRING
"Options passed to the cvs update command.")
- FIND_PROGRAM(SVNCOMMAND svn)
- FIND_PROGRAM(BZRCOMMAND bzr)
- FIND_PROGRAM(HGCOMMAND hg)
- FIND_PROGRAM(GITCOMMAND git)
+ find_program(SVNCOMMAND svn)
+ find_program(BZRCOMMAND bzr)
+ find_program(HGCOMMAND hg)
+ find_program(GITCOMMAND git)
- IF(NOT UPDATE_TYPE)
- IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CVS")
- SET(UPDATE_TYPE cvs)
- ELSEIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.svn")
- SET(UPDATE_TYPE svn)
- ELSEIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.bzr")
- SET(UPDATE_TYPE bzr)
- ELSEIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.hg")
- SET(UPDATE_TYPE hg)
- ELSEIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
- SET(UPDATE_TYPE git)
- ENDIF()
- ENDIF(NOT UPDATE_TYPE)
+ if(NOT UPDATE_TYPE)
+ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CVS")
+ set(UPDATE_TYPE cvs)
+ elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.svn")
+ set(UPDATE_TYPE svn)
+ elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.bzr")
+ set(UPDATE_TYPE bzr)
+ elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.hg")
+ set(UPDATE_TYPE hg)
+ elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
+ set(UPDATE_TYPE git)
+ endif()
+ endif(NOT UPDATE_TYPE)
- STRING(TOLOWER "${UPDATE_TYPE}" _update_type)
- IF("${_update_type}" STREQUAL "cvs")
- SET(UPDATE_COMMAND "${CVSCOMMAND}")
- SET(UPDATE_OPTIONS "${CVS_UPDATE_OPTIONS}")
- ELSEIF("${_update_type}" STREQUAL "svn")
- SET(UPDATE_COMMAND "${SVNCOMMAND}")
- SET(UPDATE_OPTIONS "${SVN_UPDATE_OPTIONS}")
- ELSEIF("${_update_type}" STREQUAL "bzr")
- SET(UPDATE_COMMAND "${BZRCOMMAND}")
- SET(UPDATE_OPTIONS "${BZR_UPDATE_OPTIONS}")
- ELSEIF("${_update_type}" STREQUAL "hg")
- SET(UPDATE_COMMAND "${HGCOMMAND}")
- SET(UPDATE_OPTIONS "${HG_UPDATE_OPTIONS}")
- ELSEIF("${_update_type}" STREQUAL "git")
- SET(UPDATE_COMMAND "${GITCOMMAND}")
- SET(UPDATE_OPTIONS "${GIT_UPDATE_OPTIONS}")
- ENDIF()
+ string(TOLOWER "${UPDATE_TYPE}" _update_type)
+ if("${_update_type}" STREQUAL "cvs")
+ set(UPDATE_COMMAND "${CVSCOMMAND}")
+ set(UPDATE_OPTIONS "${CVS_UPDATE_OPTIONS}")
+ elseif("${_update_type}" STREQUAL "svn")
+ set(UPDATE_COMMAND "${SVNCOMMAND}")
+ set(UPDATE_OPTIONS "${SVN_UPDATE_OPTIONS}")
+ elseif("${_update_type}" STREQUAL "bzr")
+ set(UPDATE_COMMAND "${BZRCOMMAND}")
+ set(UPDATE_OPTIONS "${BZR_UPDATE_OPTIONS}")
+ elseif("${_update_type}" STREQUAL "hg")
+ set(UPDATE_COMMAND "${HGCOMMAND}")
+ set(UPDATE_OPTIONS "${HG_UPDATE_OPTIONS}")
+ elseif("${_update_type}" STREQUAL "git")
+ set(UPDATE_COMMAND "${GITCOMMAND}")
+ set(UPDATE_OPTIONS "${GIT_UPDATE_OPTIONS}")
+ endif()
- SET(DART_TESTING_TIMEOUT 1500 CACHE STRING
+ set(DART_TESTING_TIMEOUT 1500 CACHE STRING
"Maximum time allowed before CTest will kill the test.")
- SET(CTEST_SUBMIT_RETRY_DELAY 5 CACHE STRING
+ set(CTEST_SUBMIT_RETRY_DELAY 5 CACHE STRING
"How long to wait between timed-out CTest submissions.")
- SET(CTEST_SUBMIT_RETRY_COUNT 3 CACHE STRING
+ set(CTEST_SUBMIT_RETRY_COUNT 3 CACHE STRING
"How many times to retry timed-out CTest submissions.")
- FIND_PROGRAM(MEMORYCHECK_COMMAND
+ find_program(MEMORYCHECK_COMMAND
NAMES purify valgrind boundscheck
PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Rational Software\\Purify\\Setup;InstallFolder]"
DOC "Path to the memory checking command, used for memory error detection."
)
- FIND_PROGRAM(SLURM_SBATCH_COMMAND sbatch DOC
+ find_program(SLURM_SBATCH_COMMAND sbatch DOC
"Path to the SLURM sbatch executable"
)
- FIND_PROGRAM(SLURM_SRUN_COMMAND srun DOC
+ find_program(SLURM_SRUN_COMMAND srun DOC
"Path to the SLURM srun executable"
)
- SET(MEMORYCHECK_SUPPRESSIONS_FILE "" CACHE FILEPATH
+ set(MEMORYCHECK_SUPPRESSIONS_FILE "" CACHE FILEPATH
"File that contains suppressions for the memory checker")
- FIND_PROGRAM(SCPCOMMAND scp DOC
+ find_program(SCPCOMMAND scp DOC
"Path to scp command, used by CTest for submitting results to a Dart server"
)
- FIND_PROGRAM(COVERAGE_COMMAND gcov DOC
+ find_program(COVERAGE_COMMAND gcov DOC
"Path to the coverage program that CTest uses for performing coverage inspection"
)
- SET(COVERAGE_EXTRA_FLAGS "-l" CACHE STRING
+ set(COVERAGE_EXTRA_FLAGS "-l" CACHE STRING
"Extra command line flags to pass to the coverage tool")
# set the site name
- SITE_NAME(SITE)
+ site_name(SITE)
# set the build name
- IF(NOT BUILDNAME)
- SET(DART_COMPILER "${CMAKE_CXX_COMPILER}")
- IF(NOT DART_COMPILER)
- SET(DART_COMPILER "${CMAKE_C_COMPILER}")
- ENDIF(NOT DART_COMPILER)
- IF(NOT DART_COMPILER)
- SET(DART_COMPILER "unknown")
- ENDIF(NOT DART_COMPILER)
- IF(WIN32)
- SET(DART_NAME_COMPONENT "NAME_WE")
- ELSE(WIN32)
- SET(DART_NAME_COMPONENT "NAME")
- ENDIF(WIN32)
- IF(NOT BUILD_NAME_SYSTEM_NAME)
- SET(BUILD_NAME_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}")
- ENDIF(NOT BUILD_NAME_SYSTEM_NAME)
- IF(WIN32)
- SET(BUILD_NAME_SYSTEM_NAME "Win32")
- ENDIF(WIN32)
- IF(UNIX OR BORLAND)
- GET_FILENAME_COMPONENT(DART_CXX_NAME
+ if(NOT BUILDNAME)
+ set(DART_COMPILER "${CMAKE_CXX_COMPILER}")
+ if(NOT DART_COMPILER)
+ set(DART_COMPILER "${CMAKE_C_COMPILER}")
+ endif(NOT DART_COMPILER)
+ if(NOT DART_COMPILER)
+ set(DART_COMPILER "unknown")
+ endif(NOT DART_COMPILER)
+ if(WIN32)
+ set(DART_NAME_COMPONENT "NAME_WE")
+ else(WIN32)
+ set(DART_NAME_COMPONENT "NAME")
+ endif(WIN32)
+ if(NOT BUILD_NAME_SYSTEM_NAME)
+ set(BUILD_NAME_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}")
+ endif(NOT BUILD_NAME_SYSTEM_NAME)
+ if(WIN32)
+ set(BUILD_NAME_SYSTEM_NAME "Win32")
+ endif(WIN32)
+ if(UNIX OR BORLAND)
+ get_filename_component(DART_CXX_NAME
"${CMAKE_CXX_COMPILER}" ${DART_NAME_COMPONENT})
- ELSE(UNIX OR BORLAND)
- GET_FILENAME_COMPONENT(DART_CXX_NAME
+ else(UNIX OR BORLAND)
+ get_filename_component(DART_CXX_NAME
"${CMAKE_BUILD_TOOL}" ${DART_NAME_COMPONENT})
- ENDIF(UNIX OR BORLAND)
- IF(DART_CXX_NAME MATCHES "msdev")
- SET(DART_CXX_NAME "vs60")
- ENDIF(DART_CXX_NAME MATCHES "msdev")
- IF(DART_CXX_NAME MATCHES "devenv")
+ endif(UNIX OR BORLAND)
+ if(DART_CXX_NAME MATCHES "msdev")
+ set(DART_CXX_NAME "vs60")
+ endif(DART_CXX_NAME MATCHES "msdev")
+ if(DART_CXX_NAME MATCHES "devenv")
GET_VS_VERSION_STRING("${CMAKE_GENERATOR}" DART_CXX_NAME)
- ENDIF(DART_CXX_NAME MATCHES "devenv")
- SET(BUILDNAME "${BUILD_NAME_SYSTEM_NAME}-${DART_CXX_NAME}")
- ENDIF(NOT BUILDNAME)
+ endif(DART_CXX_NAME MATCHES "devenv")
+ set(BUILDNAME "${BUILD_NAME_SYSTEM_NAME}-${DART_CXX_NAME}")
+ endif(NOT BUILDNAME)
# the build command
- BUILD_COMMAND(MAKECOMMAND_DEFAULT_VALUE
+ build_command(MAKECOMMAND_DEFAULT_VALUE
CONFIGURATION "\${CTEST_CONFIGURATION_TYPE}")
- SET(MAKECOMMAND ${MAKECOMMAND_DEFAULT_VALUE}
+ set(MAKECOMMAND ${MAKECOMMAND_DEFAULT_VALUE}
CACHE STRING "Command to build the project")
# the default build configuration the ctest build handler will use
# if there is no -C arg given to ctest:
- SET(DEFAULT_CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}")
- IF(DEFAULT_CTEST_CONFIGURATION_TYPE STREQUAL "")
- SET(DEFAULT_CTEST_CONFIGURATION_TYPE "Release")
- ENDIF(DEFAULT_CTEST_CONFIGURATION_TYPE STREQUAL "")
+ set(DEFAULT_CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}")
+ if(DEFAULT_CTEST_CONFIGURATION_TYPE STREQUAL "")
+ set(DEFAULT_CTEST_CONFIGURATION_TYPE "Release")
+ endif(DEFAULT_CTEST_CONFIGURATION_TYPE STREQUAL "")
- IF(NOT "${CMAKE_GENERATOR}" MATCHES "Make")
- SET(CTEST_USE_LAUNCHERS 0)
- ENDIF(NOT "${CMAKE_GENERATOR}" MATCHES "Make")
- IF(CTEST_USE_LAUNCHERS)
- SET(CTEST_LAUNCH_COMPILE "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <OBJECT> --source <SOURCE> --language <LANGUAGE> --")
- SET(CTEST_LAUNCH_LINK "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <TARGET> --target-type <TARGET_TYPE> --language <LANGUAGE> --")
- SET(CTEST_LAUNCH_CUSTOM "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <OUTPUT> --")
- SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CTEST_LAUNCH_COMPILE}")
- SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CTEST_LAUNCH_LINK}")
- SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_CUSTOM "${CTEST_LAUNCH_CUSTOM}")
- ENDIF(CTEST_USE_LAUNCHERS)
+ if(NOT "${CMAKE_GENERATOR}" MATCHES "Make")
+ set(CTEST_USE_LAUNCHERS 0)
+ endif(NOT "${CMAKE_GENERATOR}" MATCHES "Make")
+ if(CTEST_USE_LAUNCHERS)
+ set(CTEST_LAUNCH_COMPILE "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <OBJECT> --source <SOURCE> --language <LANGUAGE> --")
+ set(CTEST_LAUNCH_LINK "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <TARGET> --target-type <TARGET_TYPE> --language <LANGUAGE> --")
+ set(CTEST_LAUNCH_CUSTOM "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <OUTPUT> --")
+ set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CTEST_LAUNCH_COMPILE}")
+ set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CTEST_LAUNCH_LINK}")
+ set_property(GLOBAL PROPERTY RULE_LAUNCH_CUSTOM "${CTEST_LAUNCH_CUSTOM}")
+ endif(CTEST_USE_LAUNCHERS)
- MARK_AS_ADVANCED(
+ mark_as_advanced(
BZRCOMMAND
BZR_UPDATE_OPTIONS
COVERAGE_COMMAND
@@ -278,9 +278,9 @@ IF(BUILD_TESTING)
SVNCOMMAND
SVN_UPDATE_OPTIONS
)
- IF(NOT RUN_FROM_DART)
- SET(RUN_FROM_CTEST_OR_DART 1)
- INCLUDE(CTestTargets)
- SET(RUN_FROM_CTEST_OR_DART)
- ENDIF(NOT RUN_FROM_DART)
-ENDIF(BUILD_TESTING)
+ if(NOT RUN_FROM_DART)
+ set(RUN_FROM_CTEST_OR_DART 1)
+ include(CTestTargets)
+ set(RUN_FROM_CTEST_OR_DART)
+ endif(NOT RUN_FROM_DART)
+endif(BUILD_TESTING)
diff --git a/Modules/CTestTargets.cmake b/Modules/CTestTargets.cmake
index bc4d9646a5..15be42dac3 100644
--- a/Modules/CTestTargets.cmake
+++ b/Modules/CTestTargets.cmake
@@ -12,29 +12,29 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-IF(NOT RUN_FROM_CTEST_OR_DART)
- MESSAGE(FATAL_ERROR "Do not incldue CTestTargets.cmake directly")
-ENDIF(NOT RUN_FROM_CTEST_OR_DART)
+if(NOT RUN_FROM_CTEST_OR_DART)
+ message(FATAL_ERROR "Do not incldue CTestTargets.cmake directly")
+endif(NOT RUN_FROM_CTEST_OR_DART)
# make directories in the binary tree
-FILE(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/Testing/Temporary)
-GET_FILENAME_COMPONENT(CMAKE_HOST_PATH ${CMAKE_COMMAND} PATH)
-SET(CMAKE_TARGET_PATH ${EXECUTABLE_OUTPUT_PATH})
-FIND_PROGRAM(CMAKE_CTEST_COMMAND ctest ${CMAKE_HOST_PATH} ${CMAKE_TARGET_PATH})
-MARK_AS_ADVANCED(CMAKE_CTEST_COMMAND)
+file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/Testing/Temporary)
+get_filename_component(CMAKE_HOST_PATH ${CMAKE_COMMAND} PATH)
+set(CMAKE_TARGET_PATH ${EXECUTABLE_OUTPUT_PATH})
+find_program(CMAKE_CTEST_COMMAND ctest ${CMAKE_HOST_PATH} ${CMAKE_TARGET_PATH})
+mark_as_advanced(CMAKE_CTEST_COMMAND)
# Use CTest
# configure files
-IF(CTEST_NEW_FORMAT)
- CONFIGURE_FILE(
+if(CTEST_NEW_FORMAT)
+ configure_file(
${CMAKE_ROOT}/Modules/DartConfiguration.tcl.in
${PROJECT_BINARY_DIR}/CTestConfiguration.ini )
-ELSE(CTEST_NEW_FORMAT)
- CONFIGURE_FILE(
+else(CTEST_NEW_FORMAT)
+ configure_file(
${CMAKE_ROOT}/Modules/DartConfiguration.tcl.in
${PROJECT_BINARY_DIR}/DartConfiguration.tcl )
-ENDIF(CTEST_NEW_FORMAT)
+endif(CTEST_NEW_FORMAT)
#
# Section 3:
@@ -43,53 +43,53 @@ ENDIF(CTEST_NEW_FORMAT)
# These should NOT need to be modified from project to project.
#
-SET(__conf_types "")
-IF(CMAKE_CONFIGURATION_TYPES)
+set(__conf_types "")
+if(CMAKE_CONFIGURATION_TYPES)
# We need to pass the configuration type on the test command line.
- SET(__conf_types -C "${CMAKE_CFG_INTDIR}")
-ENDIF(CMAKE_CONFIGURATION_TYPES)
+ set(__conf_types -C "${CMAKE_CFG_INTDIR}")
+endif(CMAKE_CONFIGURATION_TYPES)
# Add convenience targets. Do this at most once in case of nested
# projects.
-DEFINE_PROPERTY(GLOBAL PROPERTY CTEST_TARGETS_ADDED
+define_property(GLOBAL PROPERTY CTEST_TARGETS_ADDED
BRIEF_DOCS "Internal property used by CTestTargets module."
FULL_DOCS "Set by the CTestTargets module to track addition of testing targets."
)
-GET_PROPERTY(_CTEST_TARGETS_ADDED GLOBAL PROPERTY CTEST_TARGETS_ADDED)
-IF(NOT _CTEST_TARGETS_ADDED)
- SET_PROPERTY(GLOBAL PROPERTY CTEST_TARGETS_ADDED 1)
+get_property(_CTEST_TARGETS_ADDED GLOBAL PROPERTY CTEST_TARGETS_ADDED)
+if(NOT _CTEST_TARGETS_ADDED)
+ set_property(GLOBAL PROPERTY CTEST_TARGETS_ADDED 1)
# For all generators add basic testing targets.
- FOREACH(mode Experimental Nightly Continuous NightlyMemoryCheck)
- ADD_CUSTOM_TARGET(${mode}
+ foreach(mode Experimental Nightly Continuous NightlyMemoryCheck)
+ add_custom_target(${mode}
${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode}
)
- SET_PROPERTY(TARGET ${mode} PROPERTY RULE_LAUNCH_CUSTOM "")
- SET_PROPERTY(TARGET ${mode} PROPERTY FOLDER "CTestDashboardTargets")
- ENDFOREACH(mode)
+ set_property(TARGET ${mode} PROPERTY RULE_LAUNCH_CUSTOM "")
+ set_property(TARGET ${mode} PROPERTY FOLDER "CTestDashboardTargets")
+ endforeach(mode)
# For Makefile generators add more granular targets.
- IF("${CMAKE_GENERATOR}" MATCHES "(Ninja|Make)")
+ if("${CMAKE_GENERATOR}" MATCHES "(Ninja|Make)")
# Make targets for Experimental builds
- FOREACH(mode Nightly Experimental Continuous)
- FOREACH(testtype
+ foreach(mode Nightly Experimental Continuous)
+ foreach(testtype
Start Update Configure Build Test Coverage MemCheck Submit
# missing purify
)
- ADD_CUSTOM_TARGET(${mode}${testtype}
+ add_custom_target(${mode}${testtype}
${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode}${testtype}
)
- SET_PROPERTY(TARGET ${mode}${testtype} PROPERTY RULE_LAUNCH_CUSTOM "")
- SET_PROPERTY(TARGET ${mode}${testtype} PROPERTY FOLDER "CTestDashboardTargets")
- ENDFOREACH(testtype)
- ENDFOREACH(mode)
- ENDIF("${CMAKE_GENERATOR}" MATCHES "(Ninja|Make)")
+ set_property(TARGET ${mode}${testtype} PROPERTY RULE_LAUNCH_CUSTOM "")
+ set_property(TARGET ${mode}${testtype} PROPERTY FOLDER "CTestDashboardTargets")
+ endforeach(testtype)
+ endforeach(mode)
+ endif("${CMAKE_GENERATOR}" MATCHES "(Ninja|Make)")
# If requested, add an alias that is the equivalent of the built-in "test"
# or "RUN_TESTS" target:
- IF(CTEST_TEST_TARGET_ALIAS)
- ADD_CUSTOM_TARGET(${CTEST_TEST_TARGET_ALIAS}
+ if(CTEST_TEST_TARGET_ALIAS)
+ add_custom_target(${CTEST_TEST_TARGET_ALIAS}
${CMAKE_CTEST_COMMAND} ${__conf_types}
)
- ENDIF()
-ENDIF(NOT _CTEST_TARGETS_ADDED)
+ endif()
+endif(NOT _CTEST_TARGETS_ADDED)
diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake
index 90d04ac661..2f54e392dc 100644
--- a/Modules/CheckCCompilerFlag.cmake
+++ b/Modules/CheckCCompilerFlag.cmake
@@ -21,11 +21,11 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE(CheckCSourceCompiles)
+include(CheckCSourceCompiles)
-MACRO (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
- SET(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")
- SET(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
+macro (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
+ set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")
+ set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
CHECK_C_SOURCE_COMPILES("int main(void) { return 0; }" ${_RESULT}
# Some compilers do not fail with a bad flag
FAIL_REGEX "command line option .* is valid for .* but not for C" # GNU
@@ -41,5 +41,5 @@ MACRO (CHECK_C_COMPILER_FLAG _FLAG _RESULT)
FAIL_REGEX "command option .* is not recognized" # XL
FAIL_REGEX "WARNING: unknown flag:" # Open64
)
- SET (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
-ENDMACRO (CHECK_C_COMPILER_FLAG)
+ set (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
+endmacro (CHECK_C_COMPILER_FLAG)
diff --git a/Modules/CheckCSourceCompiles.cmake b/Modules/CheckCSourceCompiles.cmake
index 2669336348..3c6e6a9fb9 100644
--- a/Modules/CheckCSourceCompiles.cmake
+++ b/Modules/CheckCSourceCompiles.cmake
@@ -24,43 +24,43 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
-MACRO(CHECK_C_SOURCE_COMPILES SOURCE VAR)
- IF("${VAR}" MATCHES "^${VAR}$")
- SET(_FAIL_REGEX)
- SET(_key)
- FOREACH(arg ${ARGN})
- IF("${arg}" MATCHES "^(FAIL_REGEX)$")
- SET(_key "${arg}")
- ELSEIF(_key)
- LIST(APPEND _${_key} "${arg}")
- ELSE()
- MESSAGE(FATAL_ERROR "Unknown argument:\n ${arg}\n")
- ENDIF()
- ENDFOREACH()
- SET(MACRO_CHECK_FUNCTION_DEFINITIONS
+macro(CHECK_C_SOURCE_COMPILES SOURCE VAR)
+ if("${VAR}" MATCHES "^${VAR}$")
+ set(_FAIL_REGEX)
+ set(_key)
+ foreach(arg ${ARGN})
+ if("${arg}" MATCHES "^(FAIL_REGEX)$")
+ set(_key "${arg}")
+ elseif(_key)
+ list(APPEND _${_key} "${arg}")
+ else()
+ message(FATAL_ERROR "Unknown argument:\n ${arg}\n")
+ endif()
+ endforeach()
+ set(MACRO_CHECK_FUNCTION_DEFINITIONS
"-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
- IF(CMAKE_REQUIRED_LIBRARIES)
+ if(CMAKE_REQUIRED_LIBRARIES)
# this one translates potentially used imported library targets to their files on disk
CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
- SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
+ set(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
- ELSE(CMAKE_REQUIRED_LIBRARIES)
- SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
- ENDIF(CMAKE_REQUIRED_LIBRARIES)
- IF(CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
+ else(CMAKE_REQUIRED_LIBRARIES)
+ set(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
+ endif(CMAKE_REQUIRED_LIBRARIES)
+ if(CMAKE_REQUIRED_INCLUDES)
+ set(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
- ELSE(CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
- ENDIF(CMAKE_REQUIRED_INCLUDES)
- FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c"
+ else(CMAKE_REQUIRED_INCLUDES)
+ set(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
+ endif(CMAKE_REQUIRED_INCLUDES)
+ file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c"
"${SOURCE}\n")
- MESSAGE(STATUS "Performing Test ${VAR}")
- TRY_COMPILE(${VAR}
+ message(STATUS "Performing Test ${VAR}")
+ try_compile(${VAR}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
@@ -69,27 +69,27 @@ MACRO(CHECK_C_SOURCE_COMPILES SOURCE VAR)
"${CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
OUTPUT_VARIABLE OUTPUT)
- FOREACH(_regex ${_FAIL_REGEX})
- IF("${OUTPUT}" MATCHES "${_regex}")
- SET(${VAR} 0)
- ENDIF()
- ENDFOREACH()
+ foreach(_regex ${_FAIL_REGEX})
+ if("${OUTPUT}" MATCHES "${_regex}")
+ set(${VAR} 0)
+ endif()
+ endforeach()
- IF(${VAR})
- SET(${VAR} 1 CACHE INTERNAL "Test ${VAR}")
- MESSAGE(STATUS "Performing Test ${VAR} - Success")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ if(${VAR})
+ set(${VAR} 1 CACHE INTERNAL "Test ${VAR}")
+ message(STATUS "Performing Test ${VAR} - Success")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Performing C SOURCE FILE Test ${VAR} succeded with the following output:\n"
"${OUTPUT}\n"
"Source file was:\n${SOURCE}\n")
- ELSE(${VAR})
- MESSAGE(STATUS "Performing Test ${VAR} - Failed")
- SET(${VAR} "" CACHE INTERNAL "Test ${VAR}")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ else(${VAR})
+ message(STATUS "Performing Test ${VAR} - Failed")
+ set(${VAR} "" CACHE INTERNAL "Test ${VAR}")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Performing C SOURCE FILE Test ${VAR} failed with the following output:\n"
"${OUTPUT}\n"
"Source file was:\n${SOURCE}\n")
- ENDIF(${VAR})
- ENDIF("${VAR}" MATCHES "^${VAR}$")
-ENDMACRO(CHECK_C_SOURCE_COMPILES)
+ endif(${VAR})
+ endif("${VAR}" MATCHES "^${VAR}$")
+endmacro(CHECK_C_SOURCE_COMPILES)
diff --git a/Modules/CheckCSourceRuns.cmake b/Modules/CheckCSourceRuns.cmake
index feee93a71f..a8fb554aa1 100644
--- a/Modules/CheckCSourceRuns.cmake
+++ b/Modules/CheckCSourceRuns.cmake
@@ -24,32 +24,32 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
-MACRO(CHECK_C_SOURCE_RUNS SOURCE VAR)
- IF("${VAR}" MATCHES "^${VAR}$")
- SET(MACRO_CHECK_FUNCTION_DEFINITIONS
+macro(CHECK_C_SOURCE_RUNS SOURCE VAR)
+ if("${VAR}" MATCHES "^${VAR}$")
+ set(MACRO_CHECK_FUNCTION_DEFINITIONS
"-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
- IF(CMAKE_REQUIRED_LIBRARIES)
+ if(CMAKE_REQUIRED_LIBRARIES)
# this one translates potentially used imported library targets to their files on disk
CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
- SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
+ set(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
- ELSE(CMAKE_REQUIRED_LIBRARIES)
- SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
- ENDIF(CMAKE_REQUIRED_LIBRARIES)
- IF(CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
+ else(CMAKE_REQUIRED_LIBRARIES)
+ set(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
+ endif(CMAKE_REQUIRED_LIBRARIES)
+ if(CMAKE_REQUIRED_INCLUDES)
+ set(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
- ELSE(CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
- ENDIF(CMAKE_REQUIRED_INCLUDES)
- FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c"
+ else(CMAKE_REQUIRED_INCLUDES)
+ set(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
+ endif(CMAKE_REQUIRED_INCLUDES)
+ file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c"
"${SOURCE}\n")
- MESSAGE(STATUS "Performing Test ${VAR}")
- TRY_RUN(${VAR}_EXITCODE ${VAR}_COMPILED
+ message(STATUS "Performing Test ${VAR}")
+ try_run(${VAR}_EXITCODE ${VAR}_COMPILED
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
@@ -59,33 +59,33 @@ MACRO(CHECK_C_SOURCE_RUNS SOURCE VAR)
"${CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
COMPILE_OUTPUT_VARIABLE OUTPUT)
# if it did not compile make the return value fail code of 1
- IF(NOT ${VAR}_COMPILED)
- SET(${VAR}_EXITCODE 1)
- ENDIF(NOT ${VAR}_COMPILED)
+ if(NOT ${VAR}_COMPILED)
+ set(${VAR}_EXITCODE 1)
+ endif(NOT ${VAR}_COMPILED)
# if the return value was 0 then it worked
- IF("${${VAR}_EXITCODE}" EQUAL 0)
- SET(${VAR} 1 CACHE INTERNAL "Test ${VAR}")
- MESSAGE(STATUS "Performing Test ${VAR} - Success")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ if("${${VAR}_EXITCODE}" EQUAL 0)
+ set(${VAR} 1 CACHE INTERNAL "Test ${VAR}")
+ message(STATUS "Performing Test ${VAR} - Success")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Performing C SOURCE FILE Test ${VAR} succeded with the following output:\n"
"${OUTPUT}\n"
"Return value: ${${VAR}}\n"
"Source file was:\n${SOURCE}\n")
- ELSE("${${VAR}_EXITCODE}" EQUAL 0)
- IF(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN")
- SET(${VAR} "${${VAR}_EXITCODE}")
- ELSE(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN")
- SET(${VAR} "" CACHE INTERNAL "Test ${VAR}")
- ENDIF(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN")
+ else("${${VAR}_EXITCODE}" EQUAL 0)
+ if(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN")
+ set(${VAR} "${${VAR}_EXITCODE}")
+ else(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN")
+ set(${VAR} "" CACHE INTERNAL "Test ${VAR}")
+ endif(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN")
- MESSAGE(STATUS "Performing Test ${VAR} - Failed")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ message(STATUS "Performing Test ${VAR} - Failed")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Performing C SOURCE FILE Test ${VAR} failed with the following output:\n"
"${OUTPUT}\n"
"Return value: ${${VAR}_EXITCODE}\n"
"Source file was:\n${SOURCE}\n")
- ENDIF("${${VAR}_EXITCODE}" EQUAL 0)
- ENDIF("${VAR}" MATCHES "^${VAR}$")
-ENDMACRO(CHECK_C_SOURCE_RUNS)
+ endif("${${VAR}_EXITCODE}" EQUAL 0)
+ endif("${VAR}" MATCHES "^${VAR}$")
+endmacro(CHECK_C_SOURCE_RUNS)
diff --git a/Modules/CheckCXXCompilerFlag.cmake b/Modules/CheckCXXCompilerFlag.cmake
index 19963ea4c4..7e763f7fd0 100644
--- a/Modules/CheckCXXCompilerFlag.cmake
+++ b/Modules/CheckCXXCompilerFlag.cmake
@@ -21,11 +21,11 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE(CheckCXXSourceCompiles)
+include(CheckCXXSourceCompiles)
-MACRO (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
- SET(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")
- SET(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
+macro (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
+ set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")
+ set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
CHECK_CXX_SOURCE_COMPILES("int main() { return 0;}" ${_RESULT}
# Some compilers do not fail with a bad flag
FAIL_REGEX "command line option .* is valid for .* but not for C\\\\+\\\\+" # GNU
@@ -43,6 +43,6 @@ MACRO (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
FAIL_REGEX "File with unknown suffix passed to linker" # PGI
FAIL_REGEX "WARNING: unknown flag:" # Open64
)
- SET (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
-ENDMACRO (CHECK_CXX_COMPILER_FLAG)
+ set (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
+endmacro (CHECK_CXX_COMPILER_FLAG)
diff --git a/Modules/CheckCXXSourceCompiles.cmake b/Modules/CheckCXXSourceCompiles.cmake
index 7f7336e5b4..d13142362e 100644
--- a/Modules/CheckCXXSourceCompiles.cmake
+++ b/Modules/CheckCXXSourceCompiles.cmake
@@ -24,44 +24,44 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
-MACRO(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
- IF("${VAR}" MATCHES "^${VAR}$")
- SET(_FAIL_REGEX)
- SET(_key)
- FOREACH(arg ${ARGN})
- IF("${arg}" MATCHES "^(FAIL_REGEX)$")
- SET(_key "${arg}")
- ELSEIF(_key)
- LIST(APPEND _${_key} "${arg}")
- ELSE()
- MESSAGE(FATAL_ERROR "Unknown argument:\n ${arg}\n")
- ENDIF()
- ENDFOREACH()
+macro(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
+ if("${VAR}" MATCHES "^${VAR}$")
+ set(_FAIL_REGEX)
+ set(_key)
+ foreach(arg ${ARGN})
+ if("${arg}" MATCHES "^(FAIL_REGEX)$")
+ set(_key "${arg}")
+ elseif(_key)
+ list(APPEND _${_key} "${arg}")
+ else()
+ message(FATAL_ERROR "Unknown argument:\n ${arg}\n")
+ endif()
+ endforeach()
- SET(MACRO_CHECK_FUNCTION_DEFINITIONS
+ set(MACRO_CHECK_FUNCTION_DEFINITIONS
"-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
- IF(CMAKE_REQUIRED_LIBRARIES)
+ if(CMAKE_REQUIRED_LIBRARIES)
# this one translates potentially used imported library targets to their files on disk
CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
- SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES
+ set(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
- ELSE(CMAKE_REQUIRED_LIBRARIES)
- SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES)
- ENDIF(CMAKE_REQUIRED_LIBRARIES)
- IF(CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES
+ else(CMAKE_REQUIRED_LIBRARIES)
+ set(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES)
+ endif(CMAKE_REQUIRED_LIBRARIES)
+ if(CMAKE_REQUIRED_INCLUDES)
+ set(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
- ELSE(CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES)
- ENDIF(CMAKE_REQUIRED_INCLUDES)
- FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx"
+ else(CMAKE_REQUIRED_INCLUDES)
+ set(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES)
+ endif(CMAKE_REQUIRED_INCLUDES)
+ file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx"
"${SOURCE}\n")
- MESSAGE(STATUS "Performing Test ${VAR}")
- TRY_COMPILE(${VAR}
+ message(STATUS "Performing Test ${VAR}")
+ try_compile(${VAR}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
@@ -70,27 +70,27 @@ MACRO(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
"${CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES}"
OUTPUT_VARIABLE OUTPUT)
- FOREACH(_regex ${_FAIL_REGEX})
- IF("${OUTPUT}" MATCHES "${_regex}")
- SET(${VAR} 0)
- ENDIF()
- ENDFOREACH()
+ foreach(_regex ${_FAIL_REGEX})
+ if("${OUTPUT}" MATCHES "${_regex}")
+ set(${VAR} 0)
+ endif()
+ endforeach()
- IF(${VAR})
- SET(${VAR} 1 CACHE INTERNAL "Test ${VAR}")
- MESSAGE(STATUS "Performing Test ${VAR} - Success")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ if(${VAR})
+ set(${VAR} 1 CACHE INTERNAL "Test ${VAR}")
+ message(STATUS "Performing Test ${VAR} - Success")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Performing C++ SOURCE FILE Test ${VAR} succeded with the following output:\n"
"${OUTPUT}\n"
"Source file was:\n${SOURCE}\n")
- ELSE(${VAR})
- MESSAGE(STATUS "Performing Test ${VAR} - Failed")
- SET(${VAR} "" CACHE INTERNAL "Test ${VAR}")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ else(${VAR})
+ message(STATUS "Performing Test ${VAR} - Failed")
+ set(${VAR} "" CACHE INTERNAL "Test ${VAR}")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Performing C++ SOURCE FILE Test ${VAR} failed with the following output:\n"
"${OUTPUT}\n"
"Source file was:\n${SOURCE}\n")
- ENDIF(${VAR})
- ENDIF("${VAR}" MATCHES "^${VAR}$")
-ENDMACRO(CHECK_CXX_SOURCE_COMPILES)
+ endif(${VAR})
+ endif("${VAR}" MATCHES "^${VAR}$")
+endmacro(CHECK_CXX_SOURCE_COMPILES)
diff --git a/Modules/CheckCXXSourceRuns.cmake b/Modules/CheckCXXSourceRuns.cmake
index cd68d57064..515951741e 100644
--- a/Modules/CheckCXXSourceRuns.cmake
+++ b/Modules/CheckCXXSourceRuns.cmake
@@ -24,32 +24,32 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
-MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
- IF("${VAR}" MATCHES "^${VAR}$")
- SET(MACRO_CHECK_FUNCTION_DEFINITIONS
+macro(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
+ if("${VAR}" MATCHES "^${VAR}$")
+ set(MACRO_CHECK_FUNCTION_DEFINITIONS
"-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
- IF(CMAKE_REQUIRED_LIBRARIES)
+ if(CMAKE_REQUIRED_LIBRARIES)
# this one translates potentially used imported library targets to their files on disk
CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
- SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES
+ set(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
- ELSE(CMAKE_REQUIRED_LIBRARIES)
- SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES)
- ENDIF(CMAKE_REQUIRED_LIBRARIES)
- IF(CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES
+ else(CMAKE_REQUIRED_LIBRARIES)
+ set(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES)
+ endif(CMAKE_REQUIRED_LIBRARIES)
+ if(CMAKE_REQUIRED_INCLUDES)
+ set(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
- ELSE(CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES)
- ENDIF(CMAKE_REQUIRED_INCLUDES)
- FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx"
+ else(CMAKE_REQUIRED_INCLUDES)
+ set(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES)
+ endif(CMAKE_REQUIRED_INCLUDES)
+ file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx"
"${SOURCE}\n")
- MESSAGE(STATUS "Performing Test ${VAR}")
- TRY_RUN(${VAR}_EXITCODE ${VAR}_COMPILED
+ message(STATUS "Performing Test ${VAR}")
+ try_run(${VAR}_EXITCODE ${VAR}_COMPILED
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
@@ -60,32 +60,32 @@ MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR)
COMPILE_OUTPUT_VARIABLE OUTPUT)
# if it did not compile make the return value fail code of 1
- IF(NOT ${VAR}_COMPILED)
- SET(${VAR}_EXITCODE 1)
- ENDIF(NOT ${VAR}_COMPILED)
+ if(NOT ${VAR}_COMPILED)
+ set(${VAR}_EXITCODE 1)
+ endif(NOT ${VAR}_COMPILED)
# if the return value was 0 then it worked
- IF("${${VAR}_EXITCODE}" EQUAL 0)
- SET(${VAR} 1 CACHE INTERNAL "Test ${VAR}")
- MESSAGE(STATUS "Performing Test ${VAR} - Success")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ if("${${VAR}_EXITCODE}" EQUAL 0)
+ set(${VAR} 1 CACHE INTERNAL "Test ${VAR}")
+ message(STATUS "Performing Test ${VAR} - Success")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Performing C++ SOURCE FILE Test ${VAR} succeded with the following output:\n"
"${OUTPUT}\n"
"Return value: ${${VAR}}\n"
"Source file was:\n${SOURCE}\n")
- ELSE("${${VAR}_EXITCODE}" EQUAL 0)
- IF(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN")
- SET(${VAR} "${${VAR}_EXITCODE}")
- ELSE(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN")
- SET(${VAR} "" CACHE INTERNAL "Test ${VAR}")
- ENDIF(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN")
+ else("${${VAR}_EXITCODE}" EQUAL 0)
+ if(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN")
+ set(${VAR} "${${VAR}_EXITCODE}")
+ else(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN")
+ set(${VAR} "" CACHE INTERNAL "Test ${VAR}")
+ endif(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN")
- MESSAGE(STATUS "Performing Test ${VAR} - Failed")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ message(STATUS "Performing Test ${VAR} - Failed")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Performing C++ SOURCE FILE Test ${VAR} failed with the following output:\n"
"${OUTPUT}\n"
"Return value: ${${VAR}_EXITCODE}\n"
"Source file was:\n${SOURCE}\n")
- ENDIF("${${VAR}_EXITCODE}" EQUAL 0)
- ENDIF("${VAR}" MATCHES "^${VAR}$")
-ENDMACRO(CHECK_CXX_SOURCE_RUNS)
+ endif("${${VAR}_EXITCODE}" EQUAL 0)
+ endif("${VAR}" MATCHES "^${VAR}$")
+endmacro(CHECK_CXX_SOURCE_RUNS)
diff --git a/Modules/CheckCXXSymbolExists.cmake b/Modules/CheckCXXSymbolExists.cmake
index 1b012aefd3..ebb3a92d89 100644
--- a/Modules/CheckCXXSymbolExists.cmake
+++ b/Modules/CheckCXXSymbolExists.cmake
@@ -35,8 +35,8 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE(CheckSymbolExists)
+include(CheckSymbolExists)
-MACRO(CHECK_CXX_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
+macro(CHECK_CXX_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
_CHECK_SYMBOL_EXISTS("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.cxx" "${SYMBOL}" "${FILES}" "${VARIABLE}" )
-ENDMACRO(CHECK_CXX_SYMBOL_EXISTS)
+endmacro(CHECK_CXX_SYMBOL_EXISTS)
diff --git a/Modules/CheckFortranFunctionExists.cmake b/Modules/CheckFortranFunctionExists.cmake
index abec9f738f..0ccf64a5e5 100644
--- a/Modules/CheckFortranFunctionExists.cmake
+++ b/Modules/CheckFortranFunctionExists.cmake
@@ -22,7 +22,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE)
@@ -36,7 +36,7 @@ macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE)
else(CMAKE_REQUIRED_LIBRARIES)
set(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
endif(CMAKE_REQUIRED_LIBRARIES)
- FILE(WRITE
+ file(WRITE
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f
"
program TESTFortran
diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake
index 8c469f012d..b9c0f26f81 100644
--- a/Modules/CheckFunctionExists.cmake
+++ b/Modules/CheckFunctionExists.cmake
@@ -27,29 +27,29 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
-MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
- IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
- SET(MACRO_CHECK_FUNCTION_DEFINITIONS
+macro(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
+ if("${VARIABLE}" MATCHES "^${VARIABLE}$")
+ set(MACRO_CHECK_FUNCTION_DEFINITIONS
"-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}")
- MESSAGE(STATUS "Looking for ${FUNCTION}")
- IF(CMAKE_REQUIRED_LIBRARIES)
+ message(STATUS "Looking for ${FUNCTION}")
+ if(CMAKE_REQUIRED_LIBRARIES)
# this one translates potentially used imported library targets to their files on disk
CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
- SET(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
+ set(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
- ELSE(CMAKE_REQUIRED_LIBRARIES)
- SET(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
- ENDIF(CMAKE_REQUIRED_LIBRARIES)
- IF(CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_FUNCTION_EXISTS_ADD_INCLUDES
+ else(CMAKE_REQUIRED_LIBRARIES)
+ set(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
+ endif(CMAKE_REQUIRED_LIBRARIES)
+ if(CMAKE_REQUIRED_INCLUDES)
+ set(CHECK_FUNCTION_EXISTS_ADD_INCLUDES
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
- ELSE(CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_FUNCTION_EXISTS_ADD_INCLUDES)
- ENDIF(CMAKE_REQUIRED_INCLUDES)
- TRY_COMPILE(${VARIABLE}
+ else(CMAKE_REQUIRED_INCLUDES)
+ set(CHECK_FUNCTION_EXISTS_ADD_INCLUDES)
+ endif(CMAKE_REQUIRED_INCLUDES)
+ try_compile(${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_ROOT}/Modules/CheckFunctionExists.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
@@ -57,18 +57,18 @@ MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
"${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}"
"${CHECK_FUNCTION_EXISTS_ADD_INCLUDES}"
OUTPUT_VARIABLE OUTPUT)
- IF(${VARIABLE})
- SET(${VARIABLE} 1 CACHE INTERNAL "Have function ${FUNCTION}")
- MESSAGE(STATUS "Looking for ${FUNCTION} - found")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ if(${VARIABLE})
+ set(${VARIABLE} 1 CACHE INTERNAL "Have function ${FUNCTION}")
+ message(STATUS "Looking for ${FUNCTION} - found")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the function ${FUNCTION} exists passed with the following output:\n"
"${OUTPUT}\n\n")
- ELSE(${VARIABLE})
- MESSAGE(STATUS "Looking for ${FUNCTION} - not found")
- SET(${VARIABLE} "" CACHE INTERNAL "Have function ${FUNCTION}")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ else(${VARIABLE})
+ message(STATUS "Looking for ${FUNCTION} - not found")
+ set(${VARIABLE} "" CACHE INTERNAL "Have function ${FUNCTION}")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the function ${FUNCTION} exists failed with the following output:\n"
"${OUTPUT}\n\n")
- ENDIF(${VARIABLE})
- ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
-ENDMACRO(CHECK_FUNCTION_EXISTS)
+ endif(${VARIABLE})
+ endif("${VARIABLE}" MATCHES "^${VARIABLE}$")
+endmacro(CHECK_FUNCTION_EXISTS)
diff --git a/Modules/CheckIncludeFile.cmake b/Modules/CheckIncludeFile.cmake
index 07a5ef82df..07d4966b94 100644
--- a/Modules/CheckIncludeFile.cmake
+++ b/Modules/CheckIncludeFile.cmake
@@ -28,24 +28,24 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE)
- IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
- IF(CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_INCLUDE_FILE_C_INCLUDE_DIRS "-DINCLUDE_DIRECTORIES=${CMAKE_REQUIRED_INCLUDES}")
- ELSE(CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_INCLUDE_FILE_C_INCLUDE_DIRS)
- ENDIF(CMAKE_REQUIRED_INCLUDES)
- SET(MACRO_CHECK_INCLUDE_FILE_FLAGS ${CMAKE_REQUIRED_FLAGS})
- SET(CHECK_INCLUDE_FILE_VAR ${INCLUDE})
- CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.c.in
+macro(CHECK_INCLUDE_FILE INCLUDE VARIABLE)
+ if("${VARIABLE}" MATCHES "^${VARIABLE}$")
+ if(CMAKE_REQUIRED_INCLUDES)
+ set(CHECK_INCLUDE_FILE_C_INCLUDE_DIRS "-DINCLUDE_DIRECTORIES=${CMAKE_REQUIRED_INCLUDES}")
+ else(CMAKE_REQUIRED_INCLUDES)
+ set(CHECK_INCLUDE_FILE_C_INCLUDE_DIRS)
+ endif(CMAKE_REQUIRED_INCLUDES)
+ set(MACRO_CHECK_INCLUDE_FILE_FLAGS ${CMAKE_REQUIRED_FLAGS})
+ set(CHECK_INCLUDE_FILE_VAR ${INCLUDE})
+ configure_file(${CMAKE_ROOT}/Modules/CheckIncludeFile.c.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.c IMMEDIATE)
- MESSAGE(STATUS "Looking for ${INCLUDE}")
- IF(${ARGC} EQUAL 3)
- SET(CMAKE_C_FLAGS_SAVE ${CMAKE_C_FLAGS})
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ARGV2}")
- ENDIF(${ARGC} EQUAL 3)
+ message(STATUS "Looking for ${INCLUDE}")
+ if(${ARGC} EQUAL 3)
+ set(CMAKE_C_FLAGS_SAVE ${CMAKE_C_FLAGS})
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ARGV2}")
+ endif(${ARGC} EQUAL 3)
- TRY_COMPILE(${VARIABLE}
+ try_compile(${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
@@ -54,24 +54,24 @@ MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE)
"${CHECK_INCLUDE_FILE_C_INCLUDE_DIRS}"
OUTPUT_VARIABLE OUTPUT)
- IF(${ARGC} EQUAL 3)
- SET(CMAKE_C_FLAGS ${CMAKE_C_FLAGS_SAVE})
- ENDIF(${ARGC} EQUAL 3)
+ if(${ARGC} EQUAL 3)
+ set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS_SAVE})
+ endif(${ARGC} EQUAL 3)
- IF(${VARIABLE})
- MESSAGE(STATUS "Looking for ${INCLUDE} - found")
- SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ if(${VARIABLE})
+ message(STATUS "Looking for ${INCLUDE} - found")
+ set(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the include file ${INCLUDE} "
"exists passed with the following output:\n"
"${OUTPUT}\n\n")
- ELSE(${VARIABLE})
- MESSAGE(STATUS "Looking for ${INCLUDE} - not found")
- SET(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ else(${VARIABLE})
+ message(STATUS "Looking for ${INCLUDE} - not found")
+ set(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the include file ${INCLUDE} "
"exists failed with the following output:\n"
"${OUTPUT}\n\n")
- ENDIF(${VARIABLE})
- ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
-ENDMACRO(CHECK_INCLUDE_FILE)
+ endif(${VARIABLE})
+ endif("${VARIABLE}" MATCHES "^${VARIABLE}$")
+endmacro(CHECK_INCLUDE_FILE)
diff --git a/Modules/CheckIncludeFileCXX.cmake b/Modules/CheckIncludeFileCXX.cmake
index f27d25340f..adc39f3cd8 100644
--- a/Modules/CheckIncludeFileCXX.cmake
+++ b/Modules/CheckIncludeFileCXX.cmake
@@ -28,24 +28,24 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
- IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
- IF(CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_INCLUDE_FILE_CXX_INCLUDE_DIRS "-DINCLUDE_DIRECTORIES=${CMAKE_REQUIRED_INCLUDES}")
- ELSE(CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_INCLUDE_FILE_CXX_INCLUDE_DIRS)
- ENDIF(CMAKE_REQUIRED_INCLUDES)
- SET(MACRO_CHECK_INCLUDE_FILE_FLAGS ${CMAKE_REQUIRED_FLAGS})
- SET(CHECK_INCLUDE_FILE_VAR ${INCLUDE})
- CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in
+macro(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
+ if("${VARIABLE}" MATCHES "^${VARIABLE}$")
+ if(CMAKE_REQUIRED_INCLUDES)
+ set(CHECK_INCLUDE_FILE_CXX_INCLUDE_DIRS "-DINCLUDE_DIRECTORIES=${CMAKE_REQUIRED_INCLUDES}")
+ else(CMAKE_REQUIRED_INCLUDES)
+ set(CHECK_INCLUDE_FILE_CXX_INCLUDE_DIRS)
+ endif(CMAKE_REQUIRED_INCLUDES)
+ set(MACRO_CHECK_INCLUDE_FILE_FLAGS ${CMAKE_REQUIRED_FLAGS})
+ set(CHECK_INCLUDE_FILE_VAR ${INCLUDE})
+ configure_file(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx IMMEDIATE)
- MESSAGE(STATUS "Looking for C++ include ${INCLUDE}")
- IF(${ARGC} EQUAL 3)
- SET(CMAKE_CXX_FLAGS_SAVE ${CMAKE_CXX_FLAGS})
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARGV2}")
- ENDIF(${ARGC} EQUAL 3)
+ message(STATUS "Looking for C++ include ${INCLUDE}")
+ if(${ARGC} EQUAL 3)
+ set(CMAKE_CXX_FLAGS_SAVE ${CMAKE_CXX_FLAGS})
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARGV2}")
+ endif(${ARGC} EQUAL 3)
- TRY_COMPILE(${VARIABLE}
+ try_compile(${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
@@ -54,24 +54,24 @@ MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
"${CHECK_INCLUDE_FILE_CXX_INCLUDE_DIRS}"
OUTPUT_VARIABLE OUTPUT)
- IF(${ARGC} EQUAL 3)
- SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS_SAVE})
- ENDIF(${ARGC} EQUAL 3)
+ if(${ARGC} EQUAL 3)
+ set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS_SAVE})
+ endif(${ARGC} EQUAL 3)
- IF(${VARIABLE})
- MESSAGE(STATUS "Looking for C++ include ${INCLUDE} - found")
- SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ if(${VARIABLE})
+ message(STATUS "Looking for C++ include ${INCLUDE} - found")
+ set(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the include file ${INCLUDE} "
"exists passed with the following output:\n"
"${OUTPUT}\n\n")
- ELSE(${VARIABLE})
- MESSAGE(STATUS "Looking for C++ include ${INCLUDE} - not found")
- SET(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ else(${VARIABLE})
+ message(STATUS "Looking for C++ include ${INCLUDE} - not found")
+ set(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the include file ${INCLUDE} "
"exists failed with the following output:\n"
"${OUTPUT}\n\n")
- ENDIF(${VARIABLE})
- ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
-ENDMACRO(CHECK_INCLUDE_FILE_CXX)
+ endif(${VARIABLE})
+ endif("${VARIABLE}" MATCHES "^${VARIABLE}$")
+endmacro(CHECK_INCLUDE_FILE_CXX)
diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake
index 6901fbc5dc..02e3aac2ef 100644
--- a/Modules/CheckIncludeFiles.cmake
+++ b/Modules/CheckIncludeFiles.cmake
@@ -25,37 +25,37 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-MACRO(CHECK_INCLUDE_FILES INCLUDE VARIABLE)
- IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
- SET(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n")
- IF(CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_INCLUDE_FILES_INCLUDE_DIRS "-DINCLUDE_DIRECTORIES=${CMAKE_REQUIRED_INCLUDES}")
- ELSE(CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_INCLUDE_FILES_INCLUDE_DIRS)
- ENDIF(CMAKE_REQUIRED_INCLUDES)
- SET(CHECK_INCLUDE_FILES_CONTENT "/* */\n")
- SET(MACRO_CHECK_INCLUDE_FILES_FLAGS ${CMAKE_REQUIRED_FLAGS})
- FOREACH(FILE ${INCLUDE})
- SET(CMAKE_CONFIGURABLE_FILE_CONTENT
+macro(CHECK_INCLUDE_FILES INCLUDE VARIABLE)
+ if("${VARIABLE}" MATCHES "^${VARIABLE}$")
+ set(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n")
+ if(CMAKE_REQUIRED_INCLUDES)
+ set(CHECK_INCLUDE_FILES_INCLUDE_DIRS "-DINCLUDE_DIRECTORIES=${CMAKE_REQUIRED_INCLUDES}")
+ else(CMAKE_REQUIRED_INCLUDES)
+ set(CHECK_INCLUDE_FILES_INCLUDE_DIRS)
+ endif(CMAKE_REQUIRED_INCLUDES)
+ set(CHECK_INCLUDE_FILES_CONTENT "/* */\n")
+ set(MACRO_CHECK_INCLUDE_FILES_FLAGS ${CMAKE_REQUIRED_FLAGS})
+ foreach(FILE ${INCLUDE})
+ set(CMAKE_CONFIGURABLE_FILE_CONTENT
"${CMAKE_CONFIGURABLE_FILE_CONTENT}#include <${FILE}>\n")
- ENDFOREACH(FILE)
- SET(CMAKE_CONFIGURABLE_FILE_CONTENT
+ endforeach(FILE)
+ set(CMAKE_CONFIGURABLE_FILE_CONTENT
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\n\nint main(){return 0;}\n")
- CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
+ configure_file("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFiles.c" @ONLY IMMEDIATE)
- SET(_INCLUDE ${INCLUDE}) # remove empty elements
- IF("${_INCLUDE}" MATCHES "^([^;]+);.+;([^;]+)$")
- LIST(LENGTH _INCLUDE _INCLUDE_LEN)
- SET(_description "${_INCLUDE_LEN} include files ${CMAKE_MATCH_1}, ..., ${CMAKE_MATCH_2}")
- ELSEIF("${_INCLUDE}" MATCHES "^([^;]+);([^;]+)$")
- SET(_description "include files ${CMAKE_MATCH_1}, ${CMAKE_MATCH_2}")
- ELSE()
- SET(_description "include file ${_INCLUDE}")
- ENDIF()
+ set(_INCLUDE ${INCLUDE}) # remove empty elements
+ if("${_INCLUDE}" MATCHES "^([^;]+);.+;([^;]+)$")
+ list(LENGTH _INCLUDE _INCLUDE_LEN)
+ set(_description "${_INCLUDE_LEN} include files ${CMAKE_MATCH_1}, ..., ${CMAKE_MATCH_2}")
+ elseif("${_INCLUDE}" MATCHES "^([^;]+);([^;]+)$")
+ set(_description "include files ${CMAKE_MATCH_1}, ${CMAKE_MATCH_2}")
+ else()
+ set(_description "include file ${_INCLUDE}")
+ endif()
- MESSAGE(STATUS "Looking for ${_description}")
- TRY_COMPILE(${VARIABLE}
+ message(STATUS "Looking for ${_description}")
+ try_compile(${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFiles.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
@@ -63,20 +63,20 @@ MACRO(CHECK_INCLUDE_FILES INCLUDE VARIABLE)
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILES_FLAGS}
"${CHECK_INCLUDE_FILES_INCLUDE_DIRS}"
OUTPUT_VARIABLE OUTPUT)
- IF(${VARIABLE})
- MESSAGE(STATUS "Looking for ${_description} - found")
- SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ if(${VARIABLE})
+ message(STATUS "Looking for ${_description} - found")
+ set(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if files ${INCLUDE} "
"exist passed with the following output:\n"
"${OUTPUT}\n\n")
- ELSE(${VARIABLE})
- MESSAGE(STATUS "Looking for ${_description} - not found.")
- SET(${VARIABLE} "" CACHE INTERNAL "Have includes ${INCLUDE}")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ else(${VARIABLE})
+ message(STATUS "Looking for ${_description} - not found.")
+ set(${VARIABLE} "" CACHE INTERNAL "Have includes ${INCLUDE}")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if files ${INCLUDE} "
"exist failed with the following output:\n"
"${OUTPUT}\nSource:\n${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
- ENDIF(${VARIABLE})
- ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
-ENDMACRO(CHECK_INCLUDE_FILES)
+ endif(${VARIABLE})
+ endif("${VARIABLE}" MATCHES "^${VARIABLE}$")
+endmacro(CHECK_INCLUDE_FILES)
diff --git a/Modules/CheckLibraryExists.cmake b/Modules/CheckLibraryExists.cmake
index 59fca0a321..447e97d757 100644
--- a/Modules/CheckLibraryExists.cmake
+++ b/Modules/CheckLibraryExists.cmake
@@ -26,22 +26,22 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
-MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
- IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
- SET(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION
+macro(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
+ if("${VARIABLE}" MATCHES "^${VARIABLE}$")
+ set(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION
"-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}")
- MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY}")
- SET(CHECK_LIBRARY_EXISTS_LIBRARIES ${LIBRARY})
- IF(CMAKE_REQUIRED_LIBRARIES)
+ message(STATUS "Looking for ${FUNCTION} in ${LIBRARY}")
+ set(CHECK_LIBRARY_EXISTS_LIBRARIES ${LIBRARY})
+ if(CMAKE_REQUIRED_LIBRARIES)
# this one translates potentially used imported library targets to their files on disk
CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
- SET(CHECK_LIBRARY_EXISTS_LIBRARIES
+ set(CHECK_LIBRARY_EXISTS_LIBRARIES
${CHECK_LIBRARY_EXISTS_LIBRARIES} ${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES})
- ENDIF(CMAKE_REQUIRED_LIBRARIES)
- TRY_COMPILE(${VARIABLE}
+ endif(CMAKE_REQUIRED_LIBRARIES)
+ try_compile(${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_ROOT}/Modules/CheckFunctionExists.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
@@ -51,20 +51,20 @@ MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
"-DLINK_LIBRARIES:STRING=${CHECK_LIBRARY_EXISTS_LIBRARIES}"
OUTPUT_VARIABLE OUTPUT)
- IF(${VARIABLE})
- MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - found")
- SET(${VARIABLE} 1 CACHE INTERNAL "Have library ${LIBRARY}")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ if(${VARIABLE})
+ message(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - found")
+ set(${VARIABLE} 1 CACHE INTERNAL "Have library ${LIBRARY}")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the function ${FUNCTION} exists in the ${LIBRARY} "
"passed with the following output:\n"
"${OUTPUT}\n\n")
- ELSE(${VARIABLE})
- MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - not found")
- SET(${VARIABLE} "" CACHE INTERNAL "Have library ${LIBRARY}")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ else(${VARIABLE})
+ message(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - not found")
+ set(${VARIABLE} "" CACHE INTERNAL "Have library ${LIBRARY}")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the function ${FUNCTION} exists in the ${LIBRARY} "
"failed with the following output:\n"
"${OUTPUT}\n\n")
- ENDIF(${VARIABLE})
- ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
-ENDMACRO(CHECK_LIBRARY_EXISTS)
+ endif(${VARIABLE})
+ endif("${VARIABLE}" MATCHES "^${VARIABLE}$")
+endmacro(CHECK_LIBRARY_EXISTS)
diff --git a/Modules/CheckSizeOf.cmake b/Modules/CheckSizeOf.cmake
index f6d6636e55..9f587b5c28 100644
--- a/Modules/CheckSizeOf.cmake
+++ b/Modules/CheckSizeOf.cmake
@@ -12,7 +12,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-MESSAGE(SEND_ERROR
+message(SEND_ERROR
"Modules/CheckSizeOf.cmake has been removed. "
"Use Modules/CheckTypeSize.cmake instead. This "
"compatability check may be removed before the next release!")
diff --git a/Modules/CheckStructHasMember.cmake b/Modules/CheckStructHasMember.cmake
index 18e80e3c04..fb9703ea27 100644
--- a/Modules/CheckStructHasMember.cmake
+++ b/Modules/CheckStructHasMember.cmake
@@ -28,15 +28,15 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE(CheckCSourceCompiles)
+include(CheckCSourceCompiles)
-MACRO (CHECK_STRUCT_HAS_MEMBER _STRUCT _MEMBER _HEADER _RESULT)
- SET(_INCLUDE_FILES)
- FOREACH (it ${_HEADER})
- SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n")
- ENDFOREACH (it)
+macro (CHECK_STRUCT_HAS_MEMBER _STRUCT _MEMBER _HEADER _RESULT)
+ set(_INCLUDE_FILES)
+ foreach (it ${_HEADER})
+ set(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n")
+ endforeach (it)
- SET(_CHECK_STRUCT_MEMBER_SOURCE_CODE "
+ set(_CHECK_STRUCT_MEMBER_SOURCE_CODE "
${_INCLUDE_FILES}
int main()
{
@@ -47,5 +47,5 @@ int main()
")
CHECK_C_SOURCE_COMPILES("${_CHECK_STRUCT_MEMBER_SOURCE_CODE}" ${_RESULT})
-ENDMACRO (CHECK_STRUCT_HAS_MEMBER)
+endmacro (CHECK_STRUCT_HAS_MEMBER)
diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake
index e6e677d4f6..c843c31e2e 100644
--- a/Modules/CheckSymbolExists.cmake
+++ b/Modules/CheckSymbolExists.cmake
@@ -35,43 +35,43 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
-MACRO(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
+macro(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
_CHECK_SYMBOL_EXISTS("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c" "${SYMBOL}" "${FILES}" "${VARIABLE}" )
-ENDMACRO(CHECK_SYMBOL_EXISTS)
+endmacro(CHECK_SYMBOL_EXISTS)
-MACRO(_CHECK_SYMBOL_EXISTS SOURCEFILE SYMBOL FILES VARIABLE)
- IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
- SET(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n")
- SET(MACRO_CHECK_SYMBOL_EXISTS_FLAGS ${CMAKE_REQUIRED_FLAGS})
- IF(CMAKE_REQUIRED_LIBRARIES)
+macro(_CHECK_SYMBOL_EXISTS SOURCEFILE SYMBOL FILES VARIABLE)
+ if("${VARIABLE}" MATCHES "^${VARIABLE}$")
+ set(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n")
+ set(MACRO_CHECK_SYMBOL_EXISTS_FLAGS ${CMAKE_REQUIRED_FLAGS})
+ if(CMAKE_REQUIRED_LIBRARIES)
# this one translates potentially used imported library targets to their files on disk
CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
- SET(CHECK_SYMBOL_EXISTS_LIBS
+ set(CHECK_SYMBOL_EXISTS_LIBS
"-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
- ELSE(CMAKE_REQUIRED_LIBRARIES)
- SET(CHECK_SYMBOL_EXISTS_LIBS)
- ENDIF(CMAKE_REQUIRED_LIBRARIES)
- IF(CMAKE_REQUIRED_INCLUDES)
- SET(CMAKE_SYMBOL_EXISTS_INCLUDES
+ else(CMAKE_REQUIRED_LIBRARIES)
+ set(CHECK_SYMBOL_EXISTS_LIBS)
+ endif(CMAKE_REQUIRED_LIBRARIES)
+ if(CMAKE_REQUIRED_INCLUDES)
+ set(CMAKE_SYMBOL_EXISTS_INCLUDES
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
- ELSE(CMAKE_REQUIRED_INCLUDES)
- SET(CMAKE_SYMBOL_EXISTS_INCLUDES)
- ENDIF(CMAKE_REQUIRED_INCLUDES)
- FOREACH(FILE ${FILES})
- SET(CMAKE_CONFIGURABLE_FILE_CONTENT
+ else(CMAKE_REQUIRED_INCLUDES)
+ set(CMAKE_SYMBOL_EXISTS_INCLUDES)
+ endif(CMAKE_REQUIRED_INCLUDES)
+ foreach(FILE ${FILES})
+ set(CMAKE_CONFIGURABLE_FILE_CONTENT
"${CMAKE_CONFIGURABLE_FILE_CONTENT}#include <${FILE}>\n")
- ENDFOREACH(FILE)
- SET(CMAKE_CONFIGURABLE_FILE_CONTENT
+ endforeach(FILE)
+ set(CMAKE_CONFIGURABLE_FILE_CONTENT
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\nint main(int argc, char** argv)\n{\n (void)argv;\n#ifndef ${SYMBOL}\n return ((int*)(&${SYMBOL}))[argc];\n#else\n (void)argc;\n return 0;\n#endif\n}\n")
- CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
+ configure_file("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
"${SOURCEFILE}" @ONLY IMMEDIATE)
- MESSAGE(STATUS "Looking for ${SYMBOL}")
- TRY_COMPILE(${VARIABLE}
+ message(STATUS "Looking for ${SYMBOL}")
+ try_compile(${VARIABLE}
${CMAKE_BINARY_DIR}
"${SOURCEFILE}"
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
@@ -80,22 +80,22 @@ MACRO(_CHECK_SYMBOL_EXISTS SOURCEFILE SYMBOL FILES VARIABLE)
"${CHECK_SYMBOL_EXISTS_LIBS}"
"${CMAKE_SYMBOL_EXISTS_INCLUDES}"
OUTPUT_VARIABLE OUTPUT)
- IF(${VARIABLE})
- MESSAGE(STATUS "Looking for ${SYMBOL} - found")
- SET(${VARIABLE} 1 CACHE INTERNAL "Have symbol ${SYMBOL}")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ if(${VARIABLE})
+ message(STATUS "Looking for ${SYMBOL} - found")
+ set(${VARIABLE} 1 CACHE INTERNAL "Have symbol ${SYMBOL}")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the ${SYMBOL} "
"exist passed with the following output:\n"
"${OUTPUT}\nFile ${SOURCEFILE}:\n"
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
- ELSE(${VARIABLE})
- MESSAGE(STATUS "Looking for ${SYMBOL} - not found.")
- SET(${VARIABLE} "" CACHE INTERNAL "Have symbol ${SYMBOL}")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ else(${VARIABLE})
+ message(STATUS "Looking for ${SYMBOL} - not found.")
+ set(${VARIABLE} "" CACHE INTERNAL "Have symbol ${SYMBOL}")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the ${SYMBOL} "
"exist failed with the following output:\n"
"${OUTPUT}\nFile ${SOURCEFILE}:\n"
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
- ENDIF(${VARIABLE})
- ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
-ENDMACRO(_CHECK_SYMBOL_EXISTS)
+ endif(${VARIABLE})
+ endif("${VARIABLE}" MATCHES "^${VARIABLE}$")
+endmacro(_CHECK_SYMBOL_EXISTS)
diff --git a/Modules/CheckVariableExists.cmake b/Modules/CheckVariableExists.cmake
index 7d6c7945d2..48e848b31b 100644
--- a/Modules/CheckVariableExists.cmake
+++ b/Modules/CheckVariableExists.cmake
@@ -26,41 +26,41 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
+include("${CMAKE_CURRENT_LIST_DIR}/CMakeExpandImportedTargets.cmake")
-MACRO(CHECK_VARIABLE_EXISTS VAR VARIABLE)
- IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
- SET(MACRO_CHECK_VARIABLE_DEFINITIONS
+macro(CHECK_VARIABLE_EXISTS VAR VARIABLE)
+ if("${VARIABLE}" MATCHES "^${VARIABLE}$")
+ set(MACRO_CHECK_VARIABLE_DEFINITIONS
"-DCHECK_VARIABLE_EXISTS=${VAR} ${CMAKE_REQUIRED_FLAGS}")
- MESSAGE(STATUS "Looking for ${VAR}")
- IF(CMAKE_REQUIRED_LIBRARIES)
+ message(STATUS "Looking for ${VAR}")
+ if(CMAKE_REQUIRED_LIBRARIES)
# this one translates potentially used imported library targets to their files on disk
CMAKE_EXPAND_IMPORTED_TARGETS(_ADJUSTED_CMAKE_REQUIRED_LIBRARIES LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CONFIGURATION "${CMAKE_TRY_COMPILE_CONFIGURATION}")
- SET(CHECK_VARIABLE_EXISTS_ADD_LIBRARIES
+ set(CHECK_VARIABLE_EXISTS_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${_ADJUSTED_CMAKE_REQUIRED_LIBRARIES}")
- ELSE(CMAKE_REQUIRED_LIBRARIES)
- SET(CHECK_VARIABLE_EXISTS_ADD_LIBRARIES)
- ENDIF(CMAKE_REQUIRED_LIBRARIES)
- TRY_COMPILE(${VARIABLE}
+ else(CMAKE_REQUIRED_LIBRARIES)
+ set(CHECK_VARIABLE_EXISTS_ADD_LIBRARIES)
+ endif(CMAKE_REQUIRED_LIBRARIES)
+ try_compile(${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_ROOT}/Modules/CheckVariableExists.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_VARIABLE_DEFINITIONS}
"${CHECK_VARIABLE_EXISTS_ADD_LIBRARIES}"
OUTPUT_VARIABLE OUTPUT)
- IF(${VARIABLE})
- SET(${VARIABLE} 1 CACHE INTERNAL "Have variable ${VAR}")
- MESSAGE(STATUS "Looking for ${VAR} - found")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ if(${VARIABLE})
+ set(${VARIABLE} 1 CACHE INTERNAL "Have variable ${VAR}")
+ message(STATUS "Looking for ${VAR} - found")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the variable ${VAR} exists passed with the following output:\n"
"${OUTPUT}\n\n")
- ELSE(${VARIABLE})
- SET(${VARIABLE} "" CACHE INTERNAL "Have variable ${VAR}")
- MESSAGE(STATUS "Looking for ${VAR} - not found")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ else(${VARIABLE})
+ set(${VARIABLE} "" CACHE INTERNAL "Have variable ${VAR}")
+ message(STATUS "Looking for ${VAR} - not found")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the variable ${VAR} exists failed with the following output:\n"
"${OUTPUT}\n\n")
- ENDIF(${VARIABLE})
- ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
-ENDMACRO(CHECK_VARIABLE_EXISTS)
+ endif(${VARIABLE})
+ endif("${VARIABLE}" MATCHES "^${VARIABLE}$")
+endmacro(CHECK_VARIABLE_EXISTS)
diff --git a/Modules/Compiler/Absoft-Fortran.cmake b/Modules/Compiler/Absoft-Fortran.cmake
index 1bb7b1f823..2e1666fbf1 100644
--- a/Modules/Compiler/Absoft-Fortran.cmake
+++ b/Modules/Compiler/Absoft-Fortran.cmake
@@ -1,10 +1,10 @@
-SET(CMAKE_Fortran_FLAGS_INIT "")
-SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
-SET(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "")
-SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
-SET(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
-SET(CMAKE_Fortran_MODDIR_FLAG "-YMOD_OUT_DIR=")
-SET(CMAKE_Fortran_MODPATH_FLAG "-p")
-SET(CMAKE_Fortran_VERBOSE_FLAG "-v")
+set(CMAKE_Fortran_FLAGS_INIT "")
+set(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
+set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "")
+set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
+set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+set(CMAKE_Fortran_MODDIR_FLAG "-YMOD_OUT_DIR=")
+set(CMAKE_Fortran_MODPATH_FLAG "-p")
+set(CMAKE_Fortran_VERBOSE_FLAG "-v")
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-ffree")
diff --git a/Modules/Compiler/GNU-Fortran.cmake b/Modules/Compiler/GNU-Fortran.cmake
index c710e86985..313ccbd027 100644
--- a/Modules/Compiler/GNU-Fortran.cmake
+++ b/Modules/Compiler/GNU-Fortran.cmake
@@ -5,13 +5,13 @@ set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed-form")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-ffree-form")
# No -DNDEBUG for Fortran.
-SET(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os")
-SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
+set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os")
+set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
# We require updates to CMake C++ code to support preprocessing rules
# for Fortran.
-SET(CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE)
-SET(CMAKE_Fortran_CREATE_ASSEMBLY_SOURCE)
+set(CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE)
+set(CMAKE_Fortran_CREATE_ASSEMBLY_SOURCE)
# Fortran-specific feature flags.
-SET(CMAKE_Fortran_MODDIR_FLAG -J)
+set(CMAKE_Fortran_MODDIR_FLAG -J)
diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake
index 6aecf90e83..4f316f6e87 100644
--- a/Modules/Compiler/GNU.cmake
+++ b/Modules/Compiler/GNU.cmake
@@ -32,7 +32,7 @@ macro(__compiler_gnu lang)
# header file as a warning if depfiles are enabled, causing check_header_file
# tests to always succeed. Work around this by disabling dependency tracking
# in try_compile mode.
- GET_PROPERTY(_IN_TC GLOBAL PROPERTY IN_TRY_COMPILE)
+ get_property(_IN_TC GLOBAL PROPERTY IN_TRY_COMPILE)
if(NOT _IN_TC OR CMAKE_FORCE_DEPFILES)
# distcc does not transform -o to -MT when invoking the preprocessor
# internally, as it ought to. Work around this bug by setting -MT here
diff --git a/Modules/Compiler/HP-ASM.cmake b/Modules/Compiler/HP-ASM.cmake
index 8aa7bdb7d4..b60f207b4b 100644
--- a/Modules/Compiler/HP-ASM.cmake
+++ b/Modules/Compiler/HP-ASM.cmake
@@ -1,3 +1,3 @@
-SET(CMAKE_ASM_VERBOSE_FLAG "-v")
+set(CMAKE_ASM_VERBOSE_FLAG "-v")
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s )
diff --git a/Modules/Compiler/HP-C.cmake b/Modules/Compiler/HP-C.cmake
index dc7fbb21d5..6dddcbae12 100644
--- a/Modules/Compiler/HP-C.cmake
+++ b/Modules/Compiler/HP-C.cmake
@@ -1,4 +1,4 @@
-SET(CMAKE_C_VERBOSE_FLAG "-v")
+set(CMAKE_C_VERBOSE_FLAG "-v")
-SET(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
-SET(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
+set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
+set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
diff --git a/Modules/Compiler/HP-CXX.cmake b/Modules/Compiler/HP-CXX.cmake
index 82c1a861e6..44470cae0f 100644
--- a/Modules/Compiler/HP-CXX.cmake
+++ b/Modules/Compiler/HP-CXX.cmake
@@ -1,4 +1,4 @@
-SET(CMAKE_CXX_VERBOSE_FLAG "-v")
+set(CMAKE_CXX_VERBOSE_FLAG "-v")
-SET(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
-SET(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
+set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
+set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
diff --git a/Modules/Compiler/HP-Fortran.cmake b/Modules/Compiler/HP-Fortran.cmake
index 04fb96ea4b..cc56b46114 100644
--- a/Modules/Compiler/HP-Fortran.cmake
+++ b/Modules/Compiler/HP-Fortran.cmake
@@ -1,3 +1,3 @@
-SET(CMAKE_Fortran_VERBOSE_FLAG "-v")
+set(CMAKE_Fortran_VERBOSE_FLAG "-v")
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "+source=fixed")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "+source=free")
diff --git a/Modules/Compiler/Intel-ASM.cmake b/Modules/Compiler/Intel-ASM.cmake
index 59b50a15c8..0dd7b0d64d 100644
--- a/Modules/Compiler/Intel-ASM.cmake
+++ b/Modules/Compiler/Intel-ASM.cmake
@@ -1,13 +1,13 @@
-SET(CMAKE_ASM_VERBOSE_FLAG "-v")
+set(CMAKE_ASM_VERBOSE_FLAG "-v")
-SET(CMAKE_ASM_FLAGS_INIT "")
-SET(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
-SET(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
-SET(CMAKE_ASM_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
-SET(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+set(CMAKE_ASM_FLAGS_INIT "")
+set(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
+set(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
+set(CMAKE_ASM_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
+set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
-IF(UNIX)
- SET(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;S)
-ELSE(UNIX)
- SET(CMAKE_ASM_SOURCE_FILE_EXTENSIONS asm)
-ENDIF(UNIX)
+if(UNIX)
+ set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;S)
+else(UNIX)
+ set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS asm)
+endif(UNIX)
diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake
index 4be91d0844..bca86a0f42 100644
--- a/Modules/Compiler/Intel-C.cmake
+++ b/Modules/Compiler/Intel-C.cmake
@@ -1,10 +1,10 @@
-SET(CMAKE_C_VERBOSE_FLAG "-v")
+set(CMAKE_C_VERBOSE_FLAG "-v")
-SET(CMAKE_C_FLAGS_INIT "")
-SET(CMAKE_C_FLAGS_DEBUG_INIT "-g")
-SET(CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
-SET(CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
-SET(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+set(CMAKE_C_FLAGS_INIT "")
+set(CMAKE_C_FLAGS_DEBUG_INIT "-g")
+set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
+set(CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
+set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
-SET(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
-SET(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
+set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
+set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake
index ff01a81f67..354bb17595 100644
--- a/Modules/Compiler/Intel-CXX.cmake
+++ b/Modules/Compiler/Intel-CXX.cmake
@@ -1,10 +1,10 @@
-SET(CMAKE_CXX_VERBOSE_FLAG "-v")
+set(CMAKE_CXX_VERBOSE_FLAG "-v")
-SET(CMAKE_CXX_FLAGS_INIT "")
-SET(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
-SET(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
-SET(CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
-SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+set(CMAKE_CXX_FLAGS_INIT "")
+set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
+set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
+set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
+set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
-SET(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
-SET(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
+set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
+set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
diff --git a/Modules/Compiler/Intel-Fortran.cmake b/Modules/Compiler/Intel-Fortran.cmake
index 467abdcf5e..84f6182a72 100644
--- a/Modules/Compiler/Intel-Fortran.cmake
+++ b/Modules/Compiler/Intel-Fortran.cmake
@@ -1,9 +1,9 @@
-SET(CMAKE_Fortran_FLAGS_INIT "")
-SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
-SET(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os")
-SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
-SET(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
-SET(CMAKE_Fortran_MODDIR_FLAG "-module ")
-SET(CMAKE_Fortran_VERBOSE_FLAG "-v")
+set(CMAKE_Fortran_FLAGS_INIT "")
+set(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
+set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os")
+set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
+set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+set(CMAKE_Fortran_MODDIR_FLAG "-module ")
+set(CMAKE_Fortran_VERBOSE_FLAG "-v")
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-fixed")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-free")
diff --git a/Modules/Compiler/MIPSpro-C.cmake b/Modules/Compiler/MIPSpro-C.cmake
index abf384ab86..675560c2a4 100644
--- a/Modules/Compiler/MIPSpro-C.cmake
+++ b/Modules/Compiler/MIPSpro-C.cmake
@@ -1 +1 @@
-SET(CMAKE_C_VERBOSE_FLAG "-v")
+set(CMAKE_C_VERBOSE_FLAG "-v")
diff --git a/Modules/Compiler/MIPSpro-CXX.cmake b/Modules/Compiler/MIPSpro-CXX.cmake
index f3c6b5f829..9fb191c754 100644
--- a/Modules/Compiler/MIPSpro-CXX.cmake
+++ b/Modules/Compiler/MIPSpro-CXX.cmake
@@ -1 +1 @@
-SET(CMAKE_CXX_VERBOSE_FLAG "-v")
+set(CMAKE_CXX_VERBOSE_FLAG "-v")
diff --git a/Modules/Compiler/MIPSpro-Fortran.cmake b/Modules/Compiler/MIPSpro-Fortran.cmake
index 9220d3bf08..ffceea80de 100644
--- a/Modules/Compiler/MIPSpro-Fortran.cmake
+++ b/Modules/Compiler/MIPSpro-Fortran.cmake
@@ -1,3 +1,3 @@
-SET(CMAKE_Fortran_VERBOSE_FLAG "-v")
+set(CMAKE_Fortran_VERBOSE_FLAG "-v")
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-fixedform")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-freeform")
diff --git a/Modules/Compiler/PGI-Fortran.cmake b/Modules/Compiler/PGI-Fortran.cmake
index aebc7b1c2e..264c23e74c 100644
--- a/Modules/Compiler/PGI-Fortran.cmake
+++ b/Modules/Compiler/PGI-Fortran.cmake
@@ -4,12 +4,12 @@ __compiler_pgi(Fortran)
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-Mnofreeform")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-Mfreeform")
-SET(CMAKE_Fortran_FLAGS_INIT "${CMAKE_Fortran_FLAGS_INIT} -Mpreprocess -Kieee")
-SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "${CMAKE_Fortran_FLAGS_DEBUG_INIT} -Mbounds")
+set(CMAKE_Fortran_FLAGS_INIT "${CMAKE_Fortran_FLAGS_INIT} -Mpreprocess -Kieee")
+set(CMAKE_Fortran_FLAGS_DEBUG_INIT "${CMAKE_Fortran_FLAGS_DEBUG_INIT} -Mbounds")
# We require updates to CMake C++ code to support preprocessing rules
# for Fortran.
-SET(CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE)
-SET(CMAKE_Fortran_CREATE_ASSEMBLY_SOURCE)
+set(CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE)
+set(CMAKE_Fortran_CREATE_ASSEMBLY_SOURCE)
-SET(CMAKE_Fortran_MODDIR_FLAG "-module ")
+set(CMAKE_Fortran_MODDIR_FLAG "-module ")
diff --git a/Modules/Compiler/PathScale-Fortran.cmake b/Modules/Compiler/PathScale-Fortran.cmake
index e05bf2afc3..d903621046 100644
--- a/Modules/Compiler/PathScale-Fortran.cmake
+++ b/Modules/Compiler/PathScale-Fortran.cmake
@@ -1,6 +1,6 @@
include(Compiler/PathScale)
__compiler_pathscale(Fortran)
-SET(CMAKE_Fortran_MODDIR_FLAG "-module ")
+set(CMAKE_Fortran_MODDIR_FLAG "-module ")
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-fixedform")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-freeform")
diff --git a/Modules/Compiler/SunPro-ASM.cmake b/Modules/Compiler/SunPro-ASM.cmake
index dfc5702eef..371e23373e 100644
--- a/Modules/Compiler/SunPro-ASM.cmake
+++ b/Modules/Compiler/SunPro-ASM.cmake
@@ -1,24 +1,24 @@
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s )
-SET(CMAKE_ASM_VERBOSE_FLAG "-#")
+set(CMAKE_ASM_VERBOSE_FLAG "-#")
-SET(CMAKE_SHARED_LIBRARY_ASM_FLAGS "-KPIC")
-SET(CMAKE_SHARED_LIBRARY_CREATE_ASM_FLAGS "-G")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_ASM_FLAG "-R")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_ASM_FLAG_SEP ":")
-SET(CMAKE_SHARED_LIBRARY_SONAME_ASM_FLAG "-h")
+set(CMAKE_SHARED_LIBRARY_ASM_FLAGS "-KPIC")
+set(CMAKE_SHARED_LIBRARY_CREATE_ASM_FLAGS "-G")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_ASM_FLAG "-R")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_ASM_FLAG_SEP ":")
+set(CMAKE_SHARED_LIBRARY_SONAME_ASM_FLAG "-h")
-SET(CMAKE_ASM_FLAGS_INIT "")
-SET(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
-SET(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
-SET(CMAKE_ASM_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
-SET(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
+set(CMAKE_ASM_FLAGS_INIT "")
+set(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
+set(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
+set(CMAKE_ASM_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
+set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
# Initialize ASM link type selection flags. These flags are used when
# building a shared library, shared module, or executable that links
# to other libraries to select whether to use the static or shared
# versions of the libraries.
-FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
- SET(CMAKE_${type}_LINK_STATIC_ASM_FLAGS "-Bstatic")
- SET(CMAKE_${type}_LINK_DYNAMIC_ASM_FLAGS "-Bdynamic")
-ENDFOREACH(type)
+foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
+ set(CMAKE_${type}_LINK_STATIC_ASM_FLAGS "-Bstatic")
+ set(CMAKE_${type}_LINK_DYNAMIC_ASM_FLAGS "-Bdynamic")
+endforeach(type)
diff --git a/Modules/Compiler/SunPro-C.cmake b/Modules/Compiler/SunPro-C.cmake
index a1a3ae1187..668ddaea53 100644
--- a/Modules/Compiler/SunPro-C.cmake
+++ b/Modules/Compiler/SunPro-C.cmake
@@ -1,27 +1,27 @@
-SET(CMAKE_C_VERBOSE_FLAG "-#")
+set(CMAKE_C_VERBOSE_FLAG "-#")
-SET(CMAKE_C_COMPILE_OPTIONS_PIC -KPIC)
-SET(CMAKE_C_COMPILE_OPTIONS_PIE -KPIE)
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-KPIC")
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-G")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-R")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
-SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-h")
+set(CMAKE_C_COMPILE_OPTIONS_PIC -KPIC)
+set(CMAKE_C_COMPILE_OPTIONS_PIE -KPIE)
+set(CMAKE_SHARED_LIBRARY_C_FLAGS "-KPIC")
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-G")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-R")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
+set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-h")
-SET(CMAKE_C_FLAGS_INIT "")
-SET(CMAKE_C_FLAGS_DEBUG_INIT "-g")
-SET(CMAKE_C_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
-SET(CMAKE_C_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
-SET(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
+set(CMAKE_C_FLAGS_INIT "")
+set(CMAKE_C_FLAGS_DEBUG_INIT "-g")
+set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
+set(CMAKE_C_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
+set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
# Initialize C link type selection flags. These flags are used when
# building a shared library, shared module, or executable that links
# to other libraries to select whether to use the static or shared
# versions of the libraries.
-FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
- SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Bstatic")
- SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Bdynamic")
-ENDFOREACH(type)
+foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
+ set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Bstatic")
+ set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Bdynamic")
+endforeach(type)
-SET(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
-SET(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
+set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
+set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
diff --git a/Modules/Compiler/SunPro-CXX.cmake b/Modules/Compiler/SunPro-CXX.cmake
index 702e42458d..d912eefcd7 100644
--- a/Modules/Compiler/SunPro-CXX.cmake
+++ b/Modules/Compiler/SunPro-CXX.cmake
@@ -1,33 +1,33 @@
-SET(CMAKE_CXX_VERBOSE_FLAG "-v")
+set(CMAKE_CXX_VERBOSE_FLAG "-v")
-SET(CMAKE_CXX_COMPILE_OPTIONS_PIC -KPIC)
-SET(CMAKE_CXX_COMPILE_OPTIONS_PIE -KPIE)
-SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-KPIC")
-SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-G")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-R")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ":")
-SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-h")
+set(CMAKE_CXX_COMPILE_OPTIONS_PIC -KPIC)
+set(CMAKE_CXX_COMPILE_OPTIONS_PIE -KPIE)
+set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-KPIC")
+set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-G")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-R")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ":")
+set(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-h")
-SET(CMAKE_CXX_FLAGS_INIT "")
-SET(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
-SET(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
-SET(CMAKE_CXX_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
-SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
+set(CMAKE_CXX_FLAGS_INIT "")
+set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
+set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
+set(CMAKE_CXX_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
+set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
# Initialize C link type selection flags. These flags are used when
# building a shared library, shared module, or executable that links
# to other libraries to select whether to use the static or shared
# versions of the libraries.
-FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
- SET(CMAKE_${type}_LINK_STATIC_CXX_FLAGS "-Bstatic")
- SET(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS "-Bdynamic")
-ENDFOREACH(type)
+foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
+ set(CMAKE_${type}_LINK_STATIC_CXX_FLAGS "-Bstatic")
+ set(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS "-Bdynamic")
+endforeach(type)
-SET(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
-SET(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
+set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
+set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
# Create archives with "CC -xar" in case user adds "-instances=extern"
# so that template instantiations are available to archive members.
-SET(CMAKE_CXX_CREATE_STATIC_LIBRARY
+set(CMAKE_CXX_CREATE_STATIC_LIBRARY
"<CMAKE_CXX_COMPILER> -xar -o <TARGET> <OBJECTS> "
"<CMAKE_RANLIB> <TARGET> ")
diff --git a/Modules/Compiler/SunPro-Fortran.cmake b/Modules/Compiler/SunPro-Fortran.cmake
index 86d6def340..223a6c66aa 100644
--- a/Modules/Compiler/SunPro-Fortran.cmake
+++ b/Modules/Compiler/SunPro-Fortran.cmake
@@ -1,18 +1,18 @@
-SET(CMAKE_Fortran_VERBOSE_FLAG "-v")
+set(CMAKE_Fortran_VERBOSE_FLAG "-v")
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-fixed")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-free")
-SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-KPIC")
-SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-G")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG "-R")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ":")
-SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-h")
+set(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-KPIC")
+set(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-G")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG "-R")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ":")
+set(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-h")
set(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG "-R")
-SET(CMAKE_Fortran_FLAGS_INIT "")
-SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
-SET(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
-SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
-SET(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
-SET(CMAKE_Fortran_MODDIR_FLAG "-moddir=")
-SET(CMAKE_Fortran_MODPATH_FLAG "-M")
+set(CMAKE_Fortran_FLAGS_INIT "")
+set(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
+set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
+set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
+set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
+set(CMAKE_Fortran_MODDIR_FLAG "-moddir=")
+set(CMAKE_Fortran_MODPATH_FLAG "-M")
diff --git a/Modules/Compiler/TinyCC-C.cmake b/Modules/Compiler/TinyCC-C.cmake
index 4a48c0af53..178dd0c5ef 100644
--- a/Modules/Compiler/TinyCC-C.cmake
+++ b/Modules/Compiler/TinyCC-C.cmake
@@ -1,8 +1,8 @@
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
# no optimization in tcc:
-SET (CMAKE_C_FLAGS_INIT "")
-SET (CMAKE_C_FLAGS_DEBUG_INIT "-g")
-SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-DNDEBUG")
-SET (CMAKE_C_FLAGS_RELEASE_INIT "-DNDEBUG")
-SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g")
+set (CMAKE_C_FLAGS_INIT "")
+set (CMAKE_C_FLAGS_DEBUG_INIT "-g")
+set (CMAKE_C_FLAGS_MINSIZEREL_INIT "-DNDEBUG")
+set (CMAKE_C_FLAGS_RELEASE_INIT "-DNDEBUG")
+set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g")
diff --git a/Modules/Compiler/XL-ASM.cmake b/Modules/Compiler/XL-ASM.cmake
index e5d4ffa85b..95af2ea534 100644
--- a/Modules/Compiler/XL-ASM.cmake
+++ b/Modules/Compiler/XL-ASM.cmake
@@ -1,13 +1,13 @@
-SET(CMAKE_ASM_VERBOSE_FLAG "-V")
+set(CMAKE_ASM_VERBOSE_FLAG "-V")
# -qthreaded = Ensures that all optimizations will be thread-safe
# -qalias=noansi = Turns off type-based aliasing completely (safer optimizer)
# -qhalt=e = Halt on error messages (rather than just severe errors)
-SET(CMAKE_ASM_FLAGS_INIT "-qthreaded -qalias=noansi -qhalt=e -qsourcetype=assembler")
+set(CMAKE_ASM_FLAGS_INIT "-qthreaded -qalias=noansi -qhalt=e -qsourcetype=assembler")
-SET(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
-SET(CMAKE_ASM_FLAGS_RELEASE_INIT "-O -DNDEBUG")
-SET(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-O -DNDEBUG")
-SET(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g")
+set(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
+set(CMAKE_ASM_FLAGS_RELEASE_INIT "-O -DNDEBUG")
+set(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-O -DNDEBUG")
+set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g")
-SET(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s )
+set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s )
diff --git a/Modules/Compiler/XL-C.cmake b/Modules/Compiler/XL-C.cmake
index ae869e37ea..09a55291e8 100644
--- a/Modules/Compiler/XL-C.cmake
+++ b/Modules/Compiler/XL-C.cmake
@@ -6,4 +6,4 @@ set(CMAKE_C_FLAGS_MINSIZEREL_INIT "${CMAKE_C_FLAGS_MINSIZEREL_INIT} -DNDEBUG")
# -qthreaded = Ensures that all optimizations will be thread-safe
# -qalias=noansi = Turns off type-based aliasing completely (safer optimizer)
# -qhalt=e = Halt on error messages (rather than just severe errors)
-SET(CMAKE_C_FLAGS_INIT "-qthreaded -qalias=noansi -qhalt=e")
+set(CMAKE_C_FLAGS_INIT "-qthreaded -qalias=noansi -qhalt=e")
diff --git a/Modules/Compiler/XL-CXX.cmake b/Modules/Compiler/XL-CXX.cmake
index 29c4b5e37d..6c842cd77c 100644
--- a/Modules/Compiler/XL-CXX.cmake
+++ b/Modules/Compiler/XL-CXX.cmake
@@ -5,7 +5,7 @@ set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT} -DNDEBUG
# -qthreaded = Ensures that all optimizations will be thread-safe
# -qhalt=e = Halt on error messages (rather than just severe errors)
-SET(CMAKE_CXX_FLAGS_INIT "-qthreaded -qhalt=e")
+set(CMAKE_CXX_FLAGS_INIT "-qthreaded -qhalt=e")
-SET(CMAKE_CXX_COMPILE_OBJECT
+set(CMAKE_CXX_COMPILE_OBJECT
"<CMAKE_CXX_COMPILER> -+ <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
diff --git a/Modules/Compiler/XL-Fortran.cmake b/Modules/Compiler/XL-Fortran.cmake
index e7026f11af..f1c9158b25 100644
--- a/Modules/Compiler/XL-Fortran.cmake
+++ b/Modules/Compiler/XL-Fortran.cmake
@@ -4,14 +4,14 @@ __compiler_xl(Fortran)
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-qfixed") # [=<right_margin>]
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-qfree") # [=f90|ibm]
-SET(CMAKE_Fortran_MODDIR_FLAG "-qmoddir=")
+set(CMAKE_Fortran_MODDIR_FLAG "-qmoddir=")
-SET(CMAKE_Fortran_DEFINE_FLAG "-WF,-D")
+set(CMAKE_Fortran_DEFINE_FLAG "-WF,-D")
# -qthreaded = Ensures that all optimizations will be thread-safe
# -qhalt=e = Halt on error messages (rather than just severe errors)
-SET(CMAKE_Fortran_FLAGS_INIT "-qthreaded -qhalt=e")
+set(CMAKE_Fortran_FLAGS_INIT "-qthreaded -qhalt=e")
# We require updates to CMake C++ code to support preprocessing rules for Fortran.
-SET(CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE)
-SET(CMAKE_Fortran_CREATE_ASSEMBLY_SOURCE)
+set(CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE)
+set(CMAKE_Fortran_CREATE_ASSEMBLY_SOURCE)
diff --git a/Modules/Dart.cmake b/Modules/Dart.cmake
index e85f093ce0..97addcc2a9 100644
--- a/Modules/Dart.cmake
+++ b/Modules/Dart.cmake
@@ -3,10 +3,10 @@
# It supports using the old Dart 1 Tcl client for driving dashboard
# submissions as well as testing with CTest. This module should be included
# in the CMakeLists.txt file at the top of a project. Typical usage:
-# INCLUDE(Dart)
-# IF(BUILD_TESTING)
+# include(Dart)
+# if(BUILD_TESTING)
# # ... testing related CMake code ...
-# ENDIF(BUILD_TESTING)
+# endif(BUILD_TESTING)
# The BUILD_TESTING option is created by the Dart module to determine
# whether testing support should be enabled. The default is ON.
@@ -32,10 +32,10 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-OPTION(BUILD_TESTING "Build the testing tree." ON)
+option(BUILD_TESTING "Build the testing tree." ON)
-IF(BUILD_TESTING)
- FIND_PACKAGE(Dart QUIET)
+if(BUILD_TESTING)
+ find_package(Dart QUIET)
#
# Section #1:
@@ -44,25 +44,25 @@ IF(BUILD_TESTING)
# on the client and configure site name and build name.
#
- SET(RUN_FROM_DART 1)
- INCLUDE(CTest)
- SET(RUN_FROM_DART)
+ set(RUN_FROM_DART 1)
+ include(CTest)
+ set(RUN_FROM_DART)
- FIND_PROGRAM(COMPRESSIONCOMMAND NAMES gzip compress zip
+ find_program(COMPRESSIONCOMMAND NAMES gzip compress zip
DOC "Path to program used to compress files for transfer to the dart server")
- FIND_PROGRAM(GUNZIPCOMMAND gunzip DOC "Path to gunzip executable")
- FIND_PROGRAM(JAVACOMMAND java DOC "Path to java command, used by the Dart server to create html.")
- OPTION(DART_VERBOSE_BUILD "Show the actual output of the build, or if off show a . for each 1024 bytes."
+ find_program(GUNZIPCOMMAND gunzip DOC "Path to gunzip executable")
+ find_program(JAVACOMMAND java DOC "Path to java command, used by the Dart server to create html.")
+ option(DART_VERBOSE_BUILD "Show the actual output of the build, or if off show a . for each 1024 bytes."
OFF)
- OPTION(DART_BUILD_ERROR_REPORT_LIMIT "Limit of reported errors, -1 reports all." -1 )
- OPTION(DART_BUILD_WARNING_REPORT_LIMIT "Limit of reported warnings, -1 reports all." -1 )
+ option(DART_BUILD_ERROR_REPORT_LIMIT "Limit of reported errors, -1 reports all." -1 )
+ option(DART_BUILD_WARNING_REPORT_LIMIT "Limit of reported warnings, -1 reports all." -1 )
- SET(VERBOSE_BUILD ${DART_VERBOSE_BUILD})
- SET(BUILD_ERROR_REPORT_LIMIT ${DART_BUILD_ERROR_REPORT_LIMIT})
- SET(BUILD_WARNING_REPORT_LIMIT ${DART_BUILD_WARNING_REPORT_LIMIT})
- SET (DELIVER_CONTINUOUS_EMAIL "Off" CACHE BOOL "Should Dart server send email when build errors are found in Continuous builds?")
+ set(VERBOSE_BUILD ${DART_VERBOSE_BUILD})
+ set(BUILD_ERROR_REPORT_LIMIT ${DART_BUILD_ERROR_REPORT_LIMIT})
+ set(BUILD_WARNING_REPORT_LIMIT ${DART_BUILD_WARNING_REPORT_LIMIT})
+ set (DELIVER_CONTINUOUS_EMAIL "Off" CACHE BOOL "Should Dart server send email when build errors are found in Continuous builds?")
- MARK_AS_ADVANCED(
+ mark_as_advanced(
COMPRESSIONCOMMAND
DART_BUILD_ERROR_REPORT_LIMIT
DART_BUILD_WARNING_REPORT_LIMIT
@@ -73,10 +73,10 @@ IF(BUILD_TESTING)
JAVACOMMAND
)
- SET(HAVE_DART)
- IF(EXISTS "${DART_ROOT}/Source/Client/Dart.conf.in")
- SET(HAVE_DART 1)
- ENDIF(EXISTS "${DART_ROOT}/Source/Client/Dart.conf.in")
+ set(HAVE_DART)
+ if(EXISTS "${DART_ROOT}/Source/Client/Dart.conf.in")
+ set(HAVE_DART 1)
+ endif(EXISTS "${DART_ROOT}/Source/Client/Dart.conf.in")
#
# Section #2:
@@ -84,18 +84,18 @@ IF(BUILD_TESTING)
# Make necessary directories and configure testing scripts
#
# find a tcl shell command
- IF(HAVE_DART)
- FIND_PACKAGE(Tclsh)
- ENDIF(HAVE_DART)
+ if(HAVE_DART)
+ find_package(Tclsh)
+ endif(HAVE_DART)
- IF (HAVE_DART)
+ if (HAVE_DART)
# make directories in the binary tree
- FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Dashboard"
+ file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Dashboard"
"${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Sites/${SITE}/${BUILDNAME}")
# configure files
- CONFIGURE_FILE(
+ configure_file(
"${DART_ROOT}/Source/Client/Dart.conf.in"
"${PROJECT_BINARY_DIR}/DartConfiguration.tcl" )
@@ -107,16 +107,16 @@ IF(BUILD_TESTING)
#
# add testing targets
- SET(DART_EXPERIMENTAL_NAME Experimental)
- IF(DART_EXPERIMENTAL_USE_PROJECT_NAME)
- SET(DART_EXPERIMENTAL_NAME "${DART_EXPERIMENTAL_NAME}${PROJECT_NAME}")
- ENDIF(DART_EXPERIMENTAL_USE_PROJECT_NAME)
- ENDIF (HAVE_DART)
-
- SET(RUN_FROM_CTEST_OR_DART 1)
- INCLUDE(CTestTargets)
- SET(RUN_FROM_CTEST_OR_DART)
-ENDIF(BUILD_TESTING)
+ set(DART_EXPERIMENTAL_NAME Experimental)
+ if(DART_EXPERIMENTAL_USE_PROJECT_NAME)
+ set(DART_EXPERIMENTAL_NAME "${DART_EXPERIMENTAL_NAME}${PROJECT_NAME}")
+ endif(DART_EXPERIMENTAL_USE_PROJECT_NAME)
+ endif (HAVE_DART)
+
+ set(RUN_FROM_CTEST_OR_DART 1)
+ include(CTestTargets)
+ set(RUN_FROM_CTEST_OR_DART)
+endif(BUILD_TESTING)
#
# End of Dart.cmake
diff --git a/Modules/DeployQt4.cmake b/Modules/DeployQt4.cmake
index edf4b4e766..6190abed1d 100644
--- a/Modules/DeployQt4.cmake
+++ b/Modules/DeployQt4.cmake
@@ -293,8 +293,8 @@ function(install_qt4_executable executable)
resolve_qt4_paths(libs "")
install(CODE
- "INCLUDE(\"${DeployQt4_cmake_dir}/DeployQt4.cmake\")
- SET(BU_CHMOD_BUNDLE_ITEMS TRUE)
+ "include(\"${DeployQt4_cmake_dir}/DeployQt4.cmake\")
+ set(BU_CHMOD_BUNDLE_ITEMS TRUE)
FIXUP_QT4_EXECUTABLE(\"\${CMAKE_INSTALL_PREFIX}/${executable}\" \"\" \"${libs}\" \"${dirs}\" \"${plugins_dir}\" \"${request_qt_conf}\")"
${component}
)
diff --git a/Modules/Documentation.cmake b/Modules/Documentation.cmake
index aff78c94f5..ec989f4085 100644
--- a/Modules/Documentation.cmake
+++ b/Modules/Documentation.cmake
@@ -18,28 +18,28 @@
#
# Build the documentation ?
#
-OPTION(BUILD_DOCUMENTATION "Build the documentation (Doxygen)." OFF)
-MARK_AS_ADVANCED(BUILD_DOCUMENTATION)
+option(BUILD_DOCUMENTATION "Build the documentation (Doxygen)." OFF)
+mark_as_advanced(BUILD_DOCUMENTATION)
-IF (BUILD_DOCUMENTATION)
+if (BUILD_DOCUMENTATION)
#
# Check for the tools
#
- FIND_PACKAGE(UnixCommands)
- FIND_PACKAGE(Doxygen)
- FIND_PACKAGE(Gnuplot)
- FIND_PACKAGE(HTMLHelp)
- FIND_PACKAGE(Perl)
- FIND_PACKAGE(Wget)
-
- OPTION(DOCUMENTATION_HTML_HELP
+ find_package(UnixCommands)
+ find_package(Doxygen)
+ find_package(Gnuplot)
+ find_package(HTMLHelp)
+ find_package(Perl)
+ find_package(Wget)
+
+ option(DOCUMENTATION_HTML_HELP
"Build the HTML Help file (CHM)." OFF)
- OPTION(DOCUMENTATION_HTML_TARZ
+ option(DOCUMENTATION_HTML_TARZ
"Build a compressed tar archive of the HTML doc." OFF)
- MARK_AS_ADVANCED(
+ mark_as_advanced(
DOCUMENTATION_HTML_HELP
DOCUMENTATION_HTML_TARZ
)
@@ -49,4 +49,4 @@ IF (BUILD_DOCUMENTATION)
# We will probably need bash to create the custom target
#
-ENDIF (BUILD_DOCUMENTATION)
+endif (BUILD_DOCUMENTATION)
diff --git a/Modules/FLTKCompatibility.cmake b/Modules/FLTKCompatibility.cmake
index 6b6f9607b1..58c52da344 100644
--- a/Modules/FLTKCompatibility.cmake
+++ b/Modules/FLTKCompatibility.cmake
@@ -12,4 +12,4 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE(CheckIncludeFile)
+include(CheckIncludeFile)
diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake
index a5b94d199e..718a0d90da 100644
--- a/Modules/FeatureSummary.cmake
+++ b/Modules/FeatureSummary.cmake
@@ -87,7 +87,7 @@
# Use this macro to set up information about the named package, which can
# then be displayed via FEATURE_SUMMARY().
# This can be done either directly in the Find-module or in the project
-# which uses the module after the FIND_PACKAGE() call.
+# which uses the module after the find_package() call.
# The features for which information can be set are added automatically by the
# find_package() command.
#
@@ -151,7 +151,7 @@
# Use this macro to set up information about the named package, which can
# then be displayed via FEATURE_SUMMARY().
# This can be done either directly in the Find-module or in the project
-# which uses the module after the FIND_PACKAGE() call.
+# which uses the module after the find_package() call.
# The features for which information can be set are added automatically by the
# find_package() command.
#
@@ -177,177 +177,177 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE(CMakeParseArguments)
+include(CMakeParseArguments)
-FUNCTION(ADD_FEATURE_INFO _name _enabled _desc)
- IF (${_enabled})
- SET_PROPERTY(GLOBAL APPEND PROPERTY ENABLED_FEATURES "${_name}")
- ELSE ()
- SET_PROPERTY(GLOBAL APPEND PROPERTY DISABLED_FEATURES "${_name}")
- ENDIF ()
+function(ADD_FEATURE_INFO _name _enabled _desc)
+ if (${_enabled})
+ set_property(GLOBAL APPEND PROPERTY ENABLED_FEATURES "${_name}")
+ else ()
+ set_property(GLOBAL APPEND PROPERTY DISABLED_FEATURES "${_name}")
+ endif ()
- SET_PROPERTY(GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION "${_desc}" )
-ENDFUNCTION(ADD_FEATURE_INFO)
+ set_property(GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION "${_desc}" )
+endfunction(ADD_FEATURE_INFO)
-FUNCTION(SET_PACKAGE_PROPERTIES _name _props)
- IF(NOT "${_props}" STREQUAL "PROPERTIES")
- MESSAGE(FATAL_ERROR "PROPERTIES keyword is missing in SET_PACKAGE_PROPERTIES() call.")
- ENDIF()
+function(SET_PACKAGE_PROPERTIES _name _props)
+ if(NOT "${_props}" STREQUAL "PROPERTIES")
+ message(FATAL_ERROR "PROPERTIES keyword is missing in SET_PACKAGE_PROPERTIES() call.")
+ endif()
- SET(options ) # none
- SET(oneValueArgs DESCRIPTION URL TYPE PURPOSE )
- SET(multiValueArgs ) # none
+ set(options ) # none
+ set(oneValueArgs DESCRIPTION URL TYPE PURPOSE )
+ set(multiValueArgs ) # none
CMAKE_PARSE_ARGUMENTS(_SPP "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
- IF(_SPP_UNPARSED_ARGUMENTS)
- MESSAGE(FATAL_ERROR "Unknown keywords given to SET_PACKAGE_PROPERTIES(): \"${_SPP_UNPARSED_ARGUMENTS}\"")
- ENDIF()
+ if(_SPP_UNPARSED_ARGUMENTS)
+ message(FATAL_ERROR "Unknown keywords given to SET_PACKAGE_PROPERTIES(): \"${_SPP_UNPARSED_ARGUMENTS}\"")
+ endif()
- IF(_SPP_DESCRIPTION)
- GET_PROPERTY(_info GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION)
- IF(_info AND NOT "${_info}" STREQUAL "${_SPP_DESCRIPTION}")
- MESSAGE(STATUS "Warning: Property DESCRIPTION for package ${_name} already set to \"${_info}\", overriding it with \"${_SPP_DESCRIPTION}\"")
- ENDIF()
+ if(_SPP_DESCRIPTION)
+ get_property(_info GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION)
+ if(_info AND NOT "${_info}" STREQUAL "${_SPP_DESCRIPTION}")
+ message(STATUS "Warning: Property DESCRIPTION for package ${_name} already set to \"${_info}\", overriding it with \"${_SPP_DESCRIPTION}\"")
+ endif()
- SET_PROPERTY(GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION "${_SPP_DESCRIPTION}" )
- ENDIF()
+ set_property(GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION "${_SPP_DESCRIPTION}" )
+ endif()
- IF(_SPP_URL)
- GET_PROPERTY(_info GLOBAL PROPERTY _CMAKE_${_name}_URL)
- IF(_info AND NOT "${_info}" STREQUAL "${_SPP_URL}")
- MESSAGE(STATUS "Warning: Property URL already set to \"${_info}\", overriding it with \"${_SPP_URL}\"")
- ENDIF()
+ if(_SPP_URL)
+ get_property(_info GLOBAL PROPERTY _CMAKE_${_name}_URL)
+ if(_info AND NOT "${_info}" STREQUAL "${_SPP_URL}")
+ message(STATUS "Warning: Property URL already set to \"${_info}\", overriding it with \"${_SPP_URL}\"")
+ endif()
- SET_PROPERTY(GLOBAL PROPERTY _CMAKE_${_name}_URL "${_SPP_URL}" )
- ENDIF()
+ set_property(GLOBAL PROPERTY _CMAKE_${_name}_URL "${_SPP_URL}" )
+ endif()
# handle the PURPOSE: use APPEND, since there can be multiple purposes for one package inside a project
- IF(_SPP_PURPOSE)
- SET_PROPERTY(GLOBAL APPEND PROPERTY _CMAKE_${_name}_PURPOSE "${_SPP_PURPOSE}" )
- ENDIF()
+ if(_SPP_PURPOSE)
+ set_property(GLOBAL APPEND PROPERTY _CMAKE_${_name}_PURPOSE "${_SPP_PURPOSE}" )
+ endif()
# handle the TYPE
- IF(NOT _SPP_TYPE)
- SET(_SPP_TYPE OPTIONAL)
- ENDIF()
+ if(NOT _SPP_TYPE)
+ set(_SPP_TYPE OPTIONAL)
+ endif()
# List the supported types, according to their priority
- SET(validTypes "RUNTIME" "OPTIONAL" "RECOMMENDED" "REQUIRED" )
- LIST(FIND validTypes ${_SPP_TYPE} _typeIndexInList)
- IF("${_typeIndexInList}" STREQUAL "-1" )
- MESSAGE(FATAL_ERROR "Bad package property type ${_SPP_TYPE} used in SET_PACKAGE_PROPERTIES(). "
+ set(validTypes "RUNTIME" "OPTIONAL" "RECOMMENDED" "REQUIRED" )
+ list(FIND validTypes ${_SPP_TYPE} _typeIndexInList)
+ if("${_typeIndexInList}" STREQUAL "-1" )
+ message(FATAL_ERROR "Bad package property type ${_SPP_TYPE} used in SET_PACKAGE_PROPERTIES(). "
"Valid types are OPTIONAL, RECOMMENDED, REQUIRED and RUNTIME." )
- ENDIF()
+ endif()
- GET_PROPERTY(_previousType GLOBAL PROPERTY _CMAKE_${_name}_TYPE)
- LIST(FIND validTypes "${_previousType}" _prevTypeIndexInList)
+ get_property(_previousType GLOBAL PROPERTY _CMAKE_${_name}_TYPE)
+ list(FIND validTypes "${_previousType}" _prevTypeIndexInList)
# make sure a previously set TYPE is not overridden with a lower new TYPE:
- IF("${_typeIndexInList}" GREATER "${_prevTypeIndexInList}")
- SET_PROPERTY(GLOBAL PROPERTY _CMAKE_${_name}_TYPE "${_SPP_TYPE}" )
- ENDIF()
+ if("${_typeIndexInList}" GREATER "${_prevTypeIndexInList}")
+ set_property(GLOBAL PROPERTY _CMAKE_${_name}_TYPE "${_SPP_TYPE}" )
+ endif()
-ENDFUNCTION(SET_PACKAGE_PROPERTIES)
+endfunction(SET_PACKAGE_PROPERTIES)
-FUNCTION(_FS_GET_FEATURE_SUMMARY _property _var _includeQuiet)
+function(_FS_GET_FEATURE_SUMMARY _property _var _includeQuiet)
- SET(_type "ANY")
- IF("${_property}" MATCHES "REQUIRED_")
- SET(_type "REQUIRED")
- ELSEIF("${_property}" MATCHES "RECOMMENDED_")
- SET(_type "RECOMMENDED")
- ELSEIF("${_property}" MATCHES "RUNTIME_")
- SET(_type "RUNTIME")
- ELSEIF("${_property}" MATCHES "OPTIONAL_")
- SET(_type "OPTIONAL")
- ENDIF()
+ set(_type "ANY")
+ if("${_property}" MATCHES "REQUIRED_")
+ set(_type "REQUIRED")
+ elseif("${_property}" MATCHES "RECOMMENDED_")
+ set(_type "RECOMMENDED")
+ elseif("${_property}" MATCHES "RUNTIME_")
+ set(_type "RUNTIME")
+ elseif("${_property}" MATCHES "OPTIONAL_")
+ set(_type "OPTIONAL")
+ endif()
- IF("${_property}" MATCHES "PACKAGES_FOUND")
- SET(_property "PACKAGES_FOUND")
- ELSEIF("${_property}" MATCHES "PACKAGES_NOT_FOUND")
- SET(_property "PACKAGES_NOT_FOUND")
- ENDIF()
+ if("${_property}" MATCHES "PACKAGES_FOUND")
+ set(_property "PACKAGES_FOUND")
+ elseif("${_property}" MATCHES "PACKAGES_NOT_FOUND")
+ set(_property "PACKAGES_NOT_FOUND")
+ endif()
- SET(_currentFeatureText "")
- GET_PROPERTY(_EnabledFeatures GLOBAL PROPERTY ${_property})
+ set(_currentFeatureText "")
+ get_property(_EnabledFeatures GLOBAL PROPERTY ${_property})
- FOREACH(_currentFeature ${_EnabledFeatures})
+ foreach(_currentFeature ${_EnabledFeatures})
# does this package belong to the type we currently want to list ?
- GET_PROPERTY(_currentType GLOBAL PROPERTY _CMAKE_${_currentFeature}_TYPE)
- IF(NOT _currentType)
- SET(_currentType OPTIONAL)
- ENDIF()
+ get_property(_currentType GLOBAL PROPERTY _CMAKE_${_currentFeature}_TYPE)
+ if(NOT _currentType)
+ set(_currentType OPTIONAL)
+ endif()
- IF("${_type}" STREQUAL ANY OR "${_type}" STREQUAL "${_currentType}")
+ if("${_type}" STREQUAL ANY OR "${_type}" STREQUAL "${_currentType}")
# check whether the current feature/package should be in the output depending on whether it was QUIET or not
- SET(includeThisOne TRUE)
+ set(includeThisOne TRUE)
# skip QUIET packages, except if they are REQUIRED or INCLUDE_QUIET_PACKAGES has been set
- IF((NOT "${_currentType}" STREQUAL "REQUIRED") AND NOT _includeQuiet)
- GET_PROPERTY(_isQuiet GLOBAL PROPERTY _CMAKE_${_currentFeature}_QUIET)
- IF(_isQuiet)
- SET(includeThisOne FALSE)
- ENDIF()
- ENDIF()
+ if((NOT "${_currentType}" STREQUAL "REQUIRED") AND NOT _includeQuiet)
+ get_property(_isQuiet GLOBAL PROPERTY _CMAKE_${_currentFeature}_QUIET)
+ if(_isQuiet)
+ set(includeThisOne FALSE)
+ endif()
+ endif()
- IF(includeThisOne)
+ if(includeThisOne)
- SET(_currentFeatureText "${_currentFeatureText}\n * ${_currentFeature}")
- GET_PROPERTY(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_REQUIRED_VERSION)
- IF(_info)
- SET(_currentFeatureText "${_currentFeatureText} (required version ${_info})")
- ENDIF(_info)
- GET_PROPERTY(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_DESCRIPTION)
- IF(_info)
- SET(_currentFeatureText "${_currentFeatureText} , ${_info}")
- ENDIF(_info)
- GET_PROPERTY(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_URL)
- IF(_info)
- SET(_currentFeatureText "${_currentFeatureText} , <${_info}>")
- ENDIF(_info)
+ set(_currentFeatureText "${_currentFeatureText}\n * ${_currentFeature}")
+ get_property(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_REQUIRED_VERSION)
+ if(_info)
+ set(_currentFeatureText "${_currentFeatureText} (required version ${_info})")
+ endif(_info)
+ get_property(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_DESCRIPTION)
+ if(_info)
+ set(_currentFeatureText "${_currentFeatureText} , ${_info}")
+ endif(_info)
+ get_property(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_URL)
+ if(_info)
+ set(_currentFeatureText "${_currentFeatureText} , <${_info}>")
+ endif(_info)
- GET_PROPERTY(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_PURPOSE)
- FOREACH(_purpose ${_info})
- SET(_currentFeatureText "${_currentFeatureText}\n ${_purpose}")
- ENDFOREACH()
+ get_property(_info GLOBAL PROPERTY _CMAKE_${_currentFeature}_PURPOSE)
+ foreach(_purpose ${_info})
+ set(_currentFeatureText "${_currentFeatureText}\n ${_purpose}")
+ endforeach()
- ENDIF(includeThisOne)
+ endif(includeThisOne)
- ENDIF("${_type}" STREQUAL ANY OR "${_type}" STREQUAL "${_currentType}")
+ endif("${_type}" STREQUAL ANY OR "${_type}" STREQUAL "${_currentType}")
- ENDFOREACH(_currentFeature)
- SET(${_var} "${_currentFeatureText}" PARENT_SCOPE)
-ENDFUNCTION(_FS_GET_FEATURE_SUMMARY)
+ endforeach(_currentFeature)
+ set(${_var} "${_currentFeatureText}" PARENT_SCOPE)
+endfunction(_FS_GET_FEATURE_SUMMARY)
-FUNCTION(FEATURE_SUMMARY)
+function(FEATURE_SUMMARY)
# CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords> <multi_value_keywords> args...)
- SET(options APPEND INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
- SET(oneValueArgs FILENAME VAR DESCRIPTION WHAT)
- SET(multiValueArgs ) # none
+ set(options APPEND INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
+ set(oneValueArgs FILENAME VAR DESCRIPTION WHAT)
+ set(multiValueArgs ) # none
CMAKE_PARSE_ARGUMENTS(_FS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${_FIRST_ARG} ${ARGN})
- IF(_FS_UNPARSED_ARGUMENTS)
- MESSAGE(FATAL_ERROR "Unknown keywords given to FEATURE_SUMMARY(): \"${_FS_UNPARSED_ARGUMENTS}\"")
- ENDIF()
+ if(_FS_UNPARSED_ARGUMENTS)
+ message(FATAL_ERROR "Unknown keywords given to FEATURE_SUMMARY(): \"${_FS_UNPARSED_ARGUMENTS}\"")
+ endif()
- IF(NOT _FS_WHAT)
- MESSAGE(FATAL_ERROR "The call to FEATURE_SUMMARY() doesn't set the required WHAT argument.")
- ENDIF()
+ if(NOT _FS_WHAT)
+ message(FATAL_ERROR "The call to FEATURE_SUMMARY() doesn't set the required WHAT argument.")
+ endif()
- SET(validWhatParts "ENABLED_FEATURES"
+ set(validWhatParts "ENABLED_FEATURES"
"DISABLED_FEATURES"
"PACKAGES_FOUND"
"PACKAGES_NOT_FOUND"
@@ -360,17 +360,17 @@ FUNCTION(FEATURE_SUMMARY)
"RUNTIME_PACKAGES_FOUND"
"RUNTIME_PACKAGES_NOT_FOUND")
- LIST(FIND validWhatParts "${_FS_WHAT}" indexInList)
- IF(NOT "${indexInList}" STREQUAL "-1")
+ list(FIND validWhatParts "${_FS_WHAT}" indexInList)
+ if(NOT "${indexInList}" STREQUAL "-1")
_FS_GET_FEATURE_SUMMARY( ${_FS_WHAT} _featureSummary ${_FS_INCLUDE_QUIET_PACKAGES} )
- SET(_fullText "${_FS_DESCRIPTION}${_featureSummary}\n")
- IF (("${_FS_WHAT}" STREQUAL "REQUIRED_PACKAGES_NOT_FOUND") AND _featureSummary)
- SET(requiredPackagesNotFound TRUE)
- ENDIF()
+ set(_fullText "${_FS_DESCRIPTION}${_featureSummary}\n")
+ if (("${_FS_WHAT}" STREQUAL "REQUIRED_PACKAGES_NOT_FOUND") AND _featureSummary)
+ set(requiredPackagesNotFound TRUE)
+ endif()
- ELSEIF("${_FS_WHAT}" STREQUAL "ALL")
+ elseif("${_FS_WHAT}" STREQUAL "ALL")
- SET(allWhatParts "ENABLED_FEATURES"
+ set(allWhatParts "ENABLED_FEATURES"
"RUNTIME_PACKAGES_FOUND"
"OPTIONAL_PACKAGES_FOUND"
"RECOMMENDED_PACKAGES_FOUND"
@@ -383,84 +383,84 @@ FUNCTION(FEATURE_SUMMARY)
"REQUIRED_PACKAGES_NOT_FOUND"
)
- SET(title_ENABLED_FEATURES "The following features have been enabled:")
- SET(title_DISABLED_FEATURES "The following features have been disabled:")
- SET(title_OPTIONAL_PACKAGES_FOUND "The following OPTIONAL packages have been found:")
- SET(title_OPTIONAL_PACKAGES_NOT_FOUND "The following OPTIONAL packages have not been found:")
- SET(title_RECOMMENDED_PACKAGES_FOUND "The following RECOMMENDED packages have been found:")
- SET(title_RECOMMENDED_PACKAGES_NOT_FOUND "The following RECOMMENDED packages have not been found:")
- SET(title_REQUIRED_PACKAGES_FOUND "The following REQUIRED packages have been found:")
- SET(title_REQUIRED_PACKAGES_NOT_FOUND "The following REQUIRED packages have not been found:")
- SET(title_RUNTIME_PACKAGES_FOUND "The following RUNTIME packages have been found:")
- SET(title_RUNTIME_PACKAGES_NOT_FOUND "The following RUNTIME packages have not been found:")
-
- SET(_fullText "${_FS_DESCRIPTION}")
- FOREACH(part ${allWhatParts})
- SET(_tmp)
+ set(title_ENABLED_FEATURES "The following features have been enabled:")
+ set(title_DISABLED_FEATURES "The following features have been disabled:")
+ set(title_OPTIONAL_PACKAGES_FOUND "The following OPTIONAL packages have been found:")
+ set(title_OPTIONAL_PACKAGES_NOT_FOUND "The following OPTIONAL packages have not been found:")
+ set(title_RECOMMENDED_PACKAGES_FOUND "The following RECOMMENDED packages have been found:")
+ set(title_RECOMMENDED_PACKAGES_NOT_FOUND "The following RECOMMENDED packages have not been found:")
+ set(title_REQUIRED_PACKAGES_FOUND "The following REQUIRED packages have been found:")
+ set(title_REQUIRED_PACKAGES_NOT_FOUND "The following REQUIRED packages have not been found:")
+ set(title_RUNTIME_PACKAGES_FOUND "The following RUNTIME packages have been found:")
+ set(title_RUNTIME_PACKAGES_NOT_FOUND "The following RUNTIME packages have not been found:")
+
+ set(_fullText "${_FS_DESCRIPTION}")
+ foreach(part ${allWhatParts})
+ set(_tmp)
_FS_GET_FEATURE_SUMMARY( ${part} _tmp ${_FS_INCLUDE_QUIET_PACKAGES})
- IF(_tmp)
- SET(_fullText "${_fullText}\n-- ${title_${part}}\n${_tmp}\n")
- IF("${part}" STREQUAL "REQUIRED_PACKAGES_NOT_FOUND")
- SET(requiredPackagesNotFound TRUE)
- ENDIF()
- ENDIF()
- ENDFOREACH()
- ELSE()
- MESSAGE(FATAL_ERROR "The WHAT argument of FEATURE_SUMMARY() is set to ${_FS_WHAT}, which is not a valid value.")
- ENDIF()
-
- IF(_FS_FILENAME)
- IF(_FS_APPEND)
- FILE(APPEND "${_FS_FILENAME}" "${_fullText}")
- ELSE(_FS_APPEND)
- FILE(WRITE "${_FS_FILENAME}" "${_fullText}")
- ENDIF()
-
- ELSE(_FS_FILENAME)
- IF(NOT _FS_VAR)
- MESSAGE(STATUS "${_fullText}")
- ENDIF()
- ENDIF()
-
- IF(_FS_VAR)
- SET(${_FS_VAR} "${_fullText}" PARENT_SCOPE)
- ENDIF()
-
- IF(requiredPackagesNotFound AND _FS_FATAL_ON_MISSING_REQUIRED_PACKAGES)
- MESSAGE(FATAL_ERROR "feature_summary() Error: REQUIRED package(s) are missing, aborting CMake run.")
- ENDIF()
-
-ENDFUNCTION(FEATURE_SUMMARY)
+ if(_tmp)
+ set(_fullText "${_fullText}\n-- ${title_${part}}\n${_tmp}\n")
+ if("${part}" STREQUAL "REQUIRED_PACKAGES_NOT_FOUND")
+ set(requiredPackagesNotFound TRUE)
+ endif()
+ endif()
+ endforeach()
+ else()
+ message(FATAL_ERROR "The WHAT argument of FEATURE_SUMMARY() is set to ${_FS_WHAT}, which is not a valid value.")
+ endif()
+
+ if(_FS_FILENAME)
+ if(_FS_APPEND)
+ file(APPEND "${_FS_FILENAME}" "${_fullText}")
+ else(_FS_APPEND)
+ file(WRITE "${_FS_FILENAME}" "${_fullText}")
+ endif()
+
+ else(_FS_FILENAME)
+ if(NOT _FS_VAR)
+ message(STATUS "${_fullText}")
+ endif()
+ endif()
+
+ if(_FS_VAR)
+ set(${_FS_VAR} "${_fullText}" PARENT_SCOPE)
+ endif()
+
+ if(requiredPackagesNotFound AND _FS_FATAL_ON_MISSING_REQUIRED_PACKAGES)
+ message(FATAL_ERROR "feature_summary() Error: REQUIRED package(s) are missing, aborting CMake run.")
+ endif()
+
+endfunction(FEATURE_SUMMARY)
# The stuff below is only kept for compatibility
-FUNCTION(SET_PACKAGE_INFO _name _desc)
- SET(_url "${ARGV2}")
- SET(_purpose "${ARGV3}")
- SET_PROPERTY(GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION "${_desc}" )
- IF(_url MATCHES ".+")
- SET_PROPERTY(GLOBAL PROPERTY _CMAKE_${_name}_URL "${_url}" )
- ENDIF()
- IF(_purpose MATCHES ".+")
- SET_PROPERTY(GLOBAL APPEND PROPERTY _CMAKE_${_name}_PURPOSE "${_purpose}" )
- ENDIF()
-ENDFUNCTION(SET_PACKAGE_INFO)
+function(SET_PACKAGE_INFO _name _desc)
+ set(_url "${ARGV2}")
+ set(_purpose "${ARGV3}")
+ set_property(GLOBAL PROPERTY _CMAKE_${_name}_DESCRIPTION "${_desc}" )
+ if(_url MATCHES ".+")
+ set_property(GLOBAL PROPERTY _CMAKE_${_name}_URL "${_url}" )
+ endif()
+ if(_purpose MATCHES ".+")
+ set_property(GLOBAL APPEND PROPERTY _CMAKE_${_name}_PURPOSE "${_purpose}" )
+ endif()
+endfunction(SET_PACKAGE_INFO)
-FUNCTION(SET_FEATURE_INFO)
+function(SET_FEATURE_INFO)
SET_PACKAGE_INFO(${ARGN})
-ENDFUNCTION(SET_FEATURE_INFO)
+endfunction(SET_FEATURE_INFO)
-FUNCTION(PRINT_ENABLED_FEATURES)
+function(PRINT_ENABLED_FEATURES)
FEATURE_SUMMARY(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")
-ENDFUNCTION(PRINT_ENABLED_FEATURES)
+endfunction(PRINT_ENABLED_FEATURES)
-FUNCTION(PRINT_DISABLED_FEATURES)
+function(PRINT_DISABLED_FEATURES)
FEATURE_SUMMARY(WHAT DISABLED_FEATURES DESCRIPTION "Disabled features:")
-ENDFUNCTION(PRINT_DISABLED_FEATURES)
+endfunction(PRINT_DISABLED_FEATURES)
diff --git a/Modules/FindASPELL.cmake b/Modules/FindASPELL.cmake
index 713ab7e19d..5b383c4d3e 100644
--- a/Modules/FindASPELL.cmake
+++ b/Modules/FindASPELL.cmake
@@ -21,17 +21,17 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PATH(ASPELL_INCLUDE_DIR aspell.h )
+find_path(ASPELL_INCLUDE_DIR aspell.h )
-FIND_PROGRAM(ASPELL_EXECUTABLE
+find_program(ASPELL_EXECUTABLE
NAMES aspell
)
-FIND_LIBRARY(ASPELL_LIBRARIES NAMES aspell aspell-15 libaspell-15 libaspell)
+find_library(ASPELL_LIBRARIES NAMES aspell aspell-15 libaspell-15 libaspell)
# handle the QUIETLY and REQUIRED arguments and set ASPELL_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ASPELL DEFAULT_MSG ASPELL_LIBRARIES ASPELL_INCLUDE_DIR ASPELL_EXECUTABLE)
-MARK_AS_ADVANCED(ASPELL_INCLUDE_DIR ASPELL_LIBRARIES ASPELL_EXECUTABLE)
+mark_as_advanced(ASPELL_INCLUDE_DIR ASPELL_LIBRARIES ASPELL_EXECUTABLE)
diff --git a/Modules/FindAVIFile.cmake b/Modules/FindAVIFile.cmake
index a45ebf8b96..ce4e1e726d 100644
--- a/Modules/FindAVIFile.cmake
+++ b/Modules/FindAVIFile.cmake
@@ -22,27 +22,27 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-IF (UNIX)
+if (UNIX)
- FIND_PATH(AVIFILE_INCLUDE_DIR avifile.h
+ find_path(AVIFILE_INCLUDE_DIR avifile.h
/usr/local/avifile/include
/usr/local/include/avifile
)
- FIND_LIBRARY(AVIFILE_AVIPLAY_LIBRARY aviplay
+ find_library(AVIFILE_AVIPLAY_LIBRARY aviplay
/usr/local/avifile/lib
)
-ENDIF (UNIX)
+endif (UNIX)
# handle the QUIETLY and REQUIRED arguments and set AVIFILE_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(AVIFile DEFAULT_MSG AVIFILE_INCLUDE_DIR AVIFILE_AVIPLAY_LIBRARY)
-IF (AVIFILE_FOUND)
- SET(AVIFILE_LIBRARIES ${AVIFILE_AVIPLAY_LIBRARY})
- SET(AVIFILE_DEFINITIONS "")
-ENDIF()
+if (AVIFILE_FOUND)
+ set(AVIFILE_LIBRARIES ${AVIFILE_AVIPLAY_LIBRARY})
+ set(AVIFILE_DEFINITIONS "")
+endif()
-MARK_AS_ADVANCED(AVIFILE_INCLUDE_DIR AVIFILE_AVIPLAY_LIBRARY)
+mark_as_advanced(AVIFILE_INCLUDE_DIR AVIFILE_AVIPLAY_LIBRARY)
diff --git a/Modules/FindBISON.cmake b/Modules/FindBISON.cmake
index 7af3367887..d0e0a222f9 100644
--- a/Modules/FindBISON.cmake
+++ b/Modules/FindBISON.cmake
@@ -47,46 +47,46 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PROGRAM(BISON_EXECUTABLE bison DOC "path to the bison executable")
-MARK_AS_ADVANCED(BISON_EXECUTABLE)
+find_program(BISON_EXECUTABLE bison DOC "path to the bison executable")
+mark_as_advanced(BISON_EXECUTABLE)
-IF(BISON_EXECUTABLE)
+if(BISON_EXECUTABLE)
# the bison commands should be executed with the C locale, otherwise
# the message (which are parsed) may be translated
- SET(_Bison_SAVED_LC_ALL "$ENV{LC_ALL}")
- SET(ENV{LC_ALL} C)
+ set(_Bison_SAVED_LC_ALL "$ENV{LC_ALL}")
+ set(ENV{LC_ALL} C)
- EXECUTE_PROCESS(COMMAND ${BISON_EXECUTABLE} --version
+ execute_process(COMMAND ${BISON_EXECUTABLE} --version
OUTPUT_VARIABLE BISON_version_output
ERROR_VARIABLE BISON_version_error
RESULT_VARIABLE BISON_version_result
OUTPUT_STRIP_TRAILING_WHITESPACE)
- SET(ENV{LC_ALL} ${_Bison_SAVED_LC_ALL})
+ set(ENV{LC_ALL} ${_Bison_SAVED_LC_ALL})
- IF(NOT ${BISON_version_result} EQUAL 0)
- MESSAGE(SEND_ERROR "Command \"${BISON_EXECUTABLE} --version\" failed with output:\n${BISON_version_error}")
- ELSE()
+ if(NOT ${BISON_version_result} EQUAL 0)
+ message(SEND_ERROR "Command \"${BISON_EXECUTABLE} --version\" failed with output:\n${BISON_version_error}")
+ else()
# Bison++
- IF("${BISON_version_output}" MATCHES "^bison\\+\\+")
- STRING(REGEX REPLACE "^bison\\+\\+ Version ([^,]+).*" "\\1"
+ if("${BISON_version_output}" MATCHES "^bison\\+\\+")
+ string(REGEX REPLACE "^bison\\+\\+ Version ([^,]+).*" "\\1"
BISON_VERSION "${BISON_version_output}")
# GNU Bison
- ELSEIF("${BISON_version_output}" MATCHES "^bison[^+]")
- STRING(REGEX REPLACE "^bison \\(GNU Bison\\) ([^\n]+)\n.*" "\\1"
+ elseif("${BISON_version_output}" MATCHES "^bison[^+]")
+ string(REGEX REPLACE "^bison \\(GNU Bison\\) ([^\n]+)\n.*" "\\1"
BISON_VERSION "${BISON_version_output}")
- ELSEIF("${BISON_version_output}" MATCHES "^GNU Bison ")
- STRING(REGEX REPLACE "^GNU Bison (version )?([^\n]+).*" "\\2"
+ elseif("${BISON_version_output}" MATCHES "^GNU Bison ")
+ string(REGEX REPLACE "^GNU Bison (version )?([^\n]+).*" "\\2"
BISON_VERSION "${BISON_version_output}")
- ENDIF()
- ENDIF()
+ endif()
+ endif()
# internal macro
- MACRO(BISON_TARGET_option_verbose Name BisonOutput filename)
- LIST(APPEND BISON_TARGET_cmdopt "--verbose")
- GET_FILENAME_COMPONENT(BISON_TARGET_output_path "${BisonOutput}" PATH)
- GET_FILENAME_COMPONENT(BISON_TARGET_output_name "${BisonOutput}" NAME_WE)
- ADD_CUSTOM_COMMAND(OUTPUT ${filename}
+ macro(BISON_TARGET_option_verbose Name BisonOutput filename)
+ list(APPEND BISON_TARGET_cmdopt "--verbose")
+ get_filename_component(BISON_TARGET_output_path "${BisonOutput}" PATH)
+ get_filename_component(BISON_TARGET_output_name "${BisonOutput}" NAME_WE)
+ add_custom_command(OUTPUT ${filename}
COMMAND ${CMAKE_COMMAND}
ARGS -E copy
"${BISON_TARGET_output_path}/${BISON_TARGET_output_name}.output"
@@ -95,58 +95,58 @@ IF(BISON_EXECUTABLE)
"${BISON_TARGET_output_path}/${BISON_TARGET_output_name}.output"
COMMENT "[BISON][${Name}] Copying bison verbose table to ${filename}"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
- SET(BISON_${Name}_VERBOSE_FILE ${filename})
- LIST(APPEND BISON_TARGET_extraoutputs
+ set(BISON_${Name}_VERBOSE_FILE ${filename})
+ list(APPEND BISON_TARGET_extraoutputs
"${BISON_TARGET_output_path}/${BISON_TARGET_output_name}.output")
- ENDMACRO(BISON_TARGET_option_verbose)
+ endmacro(BISON_TARGET_option_verbose)
# internal macro
- MACRO(BISON_TARGET_option_extraopts Options)
- SET(BISON_TARGET_extraopts "${Options}")
- SEPARATE_ARGUMENTS(BISON_TARGET_extraopts)
- LIST(APPEND BISON_TARGET_cmdopt ${BISON_TARGET_extraopts})
- ENDMACRO(BISON_TARGET_option_extraopts)
+ macro(BISON_TARGET_option_extraopts Options)
+ set(BISON_TARGET_extraopts "${Options}")
+ separate_arguments(BISON_TARGET_extraopts)
+ list(APPEND BISON_TARGET_cmdopt ${BISON_TARGET_extraopts})
+ endmacro(BISON_TARGET_option_extraopts)
#============================================================
# BISON_TARGET (public macro)
#============================================================
#
- MACRO(BISON_TARGET Name BisonInput BisonOutput)
- SET(BISON_TARGET_output_header "")
- SET(BISON_TARGET_cmdopt "")
- SET(BISON_TARGET_outputs "${BisonOutput}")
- IF(NOT ${ARGC} EQUAL 3 AND NOT ${ARGC} EQUAL 5 AND NOT ${ARGC} EQUAL 7)
- MESSAGE(SEND_ERROR "Usage")
- ELSE()
+ macro(BISON_TARGET Name BisonInput BisonOutput)
+ set(BISON_TARGET_output_header "")
+ set(BISON_TARGET_cmdopt "")
+ set(BISON_TARGET_outputs "${BisonOutput}")
+ if(NOT ${ARGC} EQUAL 3 AND NOT ${ARGC} EQUAL 5 AND NOT ${ARGC} EQUAL 7)
+ message(SEND_ERROR "Usage")
+ else()
# Parsing parameters
- IF(${ARGC} GREATER 5 OR ${ARGC} EQUAL 5)
- IF("${ARGV3}" STREQUAL "VERBOSE")
+ if(${ARGC} GREATER 5 OR ${ARGC} EQUAL 5)
+ if("${ARGV3}" STREQUAL "VERBOSE")
BISON_TARGET_option_verbose(${Name} ${BisonOutput} "${ARGV4}")
- ENDIF()
- IF("${ARGV3}" STREQUAL "COMPILE_FLAGS")
+ endif()
+ if("${ARGV3}" STREQUAL "COMPILE_FLAGS")
BISON_TARGET_option_extraopts("${ARGV4}")
- ENDIF()
- ENDIF()
+ endif()
+ endif()
- IF(${ARGC} EQUAL 7)
- IF("${ARGV5}" STREQUAL "VERBOSE")
+ if(${ARGC} EQUAL 7)
+ if("${ARGV5}" STREQUAL "VERBOSE")
BISON_TARGET_option_verbose(${Name} ${BisonOutput} "${ARGV6}")
- ENDIF()
+ endif()
- IF("${ARGV5}" STREQUAL "COMPILE_FLAGS")
+ if("${ARGV5}" STREQUAL "COMPILE_FLAGS")
BISON_TARGET_option_extraopts("${ARGV6}")
- ENDIF()
- ENDIF()
+ endif()
+ endif()
# Header's name generated by bison (see option -d)
- LIST(APPEND BISON_TARGET_cmdopt "-d")
- STRING(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\2" _fileext "${ARGV2}")
- STRING(REPLACE "c" "h" _fileext ${_fileext})
- STRING(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\1${_fileext}"
+ list(APPEND BISON_TARGET_cmdopt "-d")
+ string(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\2" _fileext "${ARGV2}")
+ string(REPLACE "c" "h" _fileext ${_fileext})
+ string(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\1${_fileext}"
BISON_${Name}_OUTPUT_HEADER "${ARGV2}")
- LIST(APPEND BISON_TARGET_outputs "${BISON_${Name}_OUTPUT_HEADER}")
+ list(APPEND BISON_TARGET_outputs "${BISON_${Name}_OUTPUT_HEADER}")
- ADD_CUSTOM_COMMAND(OUTPUT ${BISON_TARGET_outputs}
+ add_custom_command(OUTPUT ${BISON_TARGET_outputs}
${BISON_TARGET_extraoutputs}
COMMAND ${BISON_EXECUTABLE}
ARGS ${BISON_TARGET_cmdopt} -o ${ARGV2} ${ARGV1}
@@ -155,20 +155,20 @@ IF(BISON_EXECUTABLE)
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
# define target variables
- SET(BISON_${Name}_DEFINED TRUE)
- SET(BISON_${Name}_INPUT ${ARGV1})
- SET(BISON_${Name}_OUTPUTS ${BISON_TARGET_outputs})
- SET(BISON_${Name}_COMPILE_FLAGS ${BISON_TARGET_cmdopt})
- SET(BISON_${Name}_OUTPUT_SOURCE "${BisonOutput}")
-
- ENDIF(NOT ${ARGC} EQUAL 3 AND NOT ${ARGC} EQUAL 5 AND NOT ${ARGC} EQUAL 7)
- ENDMACRO(BISON_TARGET)
+ set(BISON_${Name}_DEFINED TRUE)
+ set(BISON_${Name}_INPUT ${ARGV1})
+ set(BISON_${Name}_OUTPUTS ${BISON_TARGET_outputs})
+ set(BISON_${Name}_COMPILE_FLAGS ${BISON_TARGET_cmdopt})
+ set(BISON_${Name}_OUTPUT_SOURCE "${BisonOutput}")
+
+ endif(NOT ${ARGC} EQUAL 3 AND NOT ${ARGC} EQUAL 5 AND NOT ${ARGC} EQUAL 7)
+ endmacro(BISON_TARGET)
#
#============================================================
-ENDIF(BISON_EXECUTABLE)
+endif(BISON_EXECUTABLE)
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(BISON REQUIRED_VARS BISON_EXECUTABLE
VERSION_VAR BISON_VERSION)
diff --git a/Modules/FindBZip2.cmake b/Modules/FindBZip2.cmake
index 75ab500044..121d3f0890 100644
--- a/Modules/FindBZip2.cmake
+++ b/Modules/FindBZip2.cmake
@@ -22,35 +22,35 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-SET(_BZIP2_PATHS PATHS
+set(_BZIP2_PATHS PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Bzip2;InstallPath]"
)
-FIND_PATH(BZIP2_INCLUDE_DIR bzlib.h ${_BZIP2_PATHS} PATH_SUFFIXES include)
+find_path(BZIP2_INCLUDE_DIR bzlib.h ${_BZIP2_PATHS} PATH_SUFFIXES include)
-IF (NOT BZIP2_LIBRARIES)
- FIND_LIBRARY(BZIP2_LIBRARY_RELEASE NAMES bz2 bzip2 ${_BZIP2_PATHS} PATH_SUFFIXES lib)
- FIND_LIBRARY(BZIP2_LIBRARY_DEBUG NAMES bzip2d ${_BZIP2_PATHS} PATH_SUFFIXES lib)
+if (NOT BZIP2_LIBRARIES)
+ find_library(BZIP2_LIBRARY_RELEASE NAMES bz2 bzip2 ${_BZIP2_PATHS} PATH_SUFFIXES lib)
+ find_library(BZIP2_LIBRARY_DEBUG NAMES bzip2d ${_BZIP2_PATHS} PATH_SUFFIXES lib)
- INCLUDE(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
+ include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
SELECT_LIBRARY_CONFIGURATIONS(BZIP2)
-ENDIF (NOT BZIP2_LIBRARIES)
+endif (NOT BZIP2_LIBRARIES)
-IF (BZIP2_INCLUDE_DIR AND EXISTS "${BZIP2_INCLUDE_DIR}/bzlib.h")
- FILE(STRINGS "${BZIP2_INCLUDE_DIR}/bzlib.h" BZLIB_H REGEX "bzip2/libbzip2 version [0-9]+\\.[^ ]+ of [0-9]+ ")
- STRING(REGEX REPLACE ".* bzip2/libbzip2 version ([0-9]+\\.[^ ]+) of [0-9]+ .*" "\\1" BZIP2_VERSION_STRING "${BZLIB_H}")
-ENDIF (BZIP2_INCLUDE_DIR AND EXISTS "${BZIP2_INCLUDE_DIR}/bzlib.h")
+if (BZIP2_INCLUDE_DIR AND EXISTS "${BZIP2_INCLUDE_DIR}/bzlib.h")
+ file(STRINGS "${BZIP2_INCLUDE_DIR}/bzlib.h" BZLIB_H REGEX "bzip2/libbzip2 version [0-9]+\\.[^ ]+ of [0-9]+ ")
+ string(REGEX REPLACE ".* bzip2/libbzip2 version ([0-9]+\\.[^ ]+) of [0-9]+ .*" "\\1" BZIP2_VERSION_STRING "${BZLIB_H}")
+endif (BZIP2_INCLUDE_DIR AND EXISTS "${BZIP2_INCLUDE_DIR}/bzlib.h")
# handle the QUIETLY and REQUIRED arguments and set BZip2_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(BZip2
REQUIRED_VARS BZIP2_LIBRARIES BZIP2_INCLUDE_DIR
VERSION_VAR BZIP2_VERSION_STRING)
-IF (BZIP2_FOUND)
- INCLUDE(CheckLibraryExists)
+if (BZIP2_FOUND)
+ include(CheckLibraryExists)
CHECK_LIBRARY_EXISTS("${BZIP2_LIBRARIES}" BZ2_bzCompressInit "" BZIP2_NEED_PREFIX)
-ENDIF (BZIP2_FOUND)
+endif (BZIP2_FOUND)
-MARK_AS_ADVANCED(BZIP2_INCLUDE_DIR)
+mark_as_advanced(BZIP2_INCLUDE_DIR)
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index ad6b1598dd..e536b6e4d1 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -48,7 +48,7 @@
# libraries with a few exceptions (Boost.Python is one).
#
# Please see the section below near Boost_LIB_DIAGNOSTIC_DEFINITIONS for
-# more details. Adding a TARGET_LINK_LIBRARIES() as shown in the example
+# more details. Adding a target_link_libraries() as shown in the example
# above appears to cause VS to link dynamically if Boost_USE_STATIC_LIBS
# gets set to OFF. It is suggested you avoid automatic linking since it
# will make your application less portable.
diff --git a/Modules/FindCABLE.cmake b/Modules/FindCABLE.cmake
index 678fb07ca6..72a8805caa 100644
--- a/Modules/FindCABLE.cmake
+++ b/Modules/FindCABLE.cmake
@@ -23,12 +23,12 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-IF(NOT CABLE)
- FIND_PATH(CABLE_BUILD_DIR cableVersion.h)
-ENDIF(NOT CABLE)
+if(NOT CABLE)
+ find_path(CABLE_BUILD_DIR cableVersion.h)
+endif(NOT CABLE)
-IF(CABLE_BUILD_DIR)
- LOAD_CACHE(${CABLE_BUILD_DIR}
+if(CABLE_BUILD_DIR)
+ load_cache(${CABLE_BUILD_DIR}
EXCLUDE
BUILD_SHARED_LIBS
LIBRARY_OUTPUT_PATH
@@ -39,43 +39,43 @@ IF(CABLE_BUILD_DIR)
CABLE_LIBRARY_PATH
CABLE_EXECUTABLE_PATH)
- IF(CABLE_LIBRARY_PATH)
- FIND_LIBRARY(CABLE_TCL_LIBRARY NAMES CableTclFacility PATHS
+ if(CABLE_LIBRARY_PATH)
+ find_library(CABLE_TCL_LIBRARY NAMES CableTclFacility PATHS
${CABLE_LIBRARY_PATH}
${CABLE_LIBRARY_PATH}/*)
- ELSE(CABLE_LIBRARY_PATH)
- FIND_LIBRARY(CABLE_TCL_LIBRARY NAMES CableTclFacility PATHS
+ else(CABLE_LIBRARY_PATH)
+ find_library(CABLE_TCL_LIBRARY NAMES CableTclFacility PATHS
${CABLE_BINARY_DIR}/CableTclFacility
${CABLE_BINARY_DIR}/CableTclFacility/*)
- ENDIF(CABLE_LIBRARY_PATH)
+ endif(CABLE_LIBRARY_PATH)
- IF(CABLE_EXECUTABLE_PATH)
- FIND_PROGRAM(CABLE NAMES cable PATHS
+ if(CABLE_EXECUTABLE_PATH)
+ find_program(CABLE NAMES cable PATHS
${CABLE_EXECUTABLE_PATH}
${CABLE_EXECUTABLE_PATH}/*)
- ELSE(CABLE_EXECUTABLE_PATH)
- FIND_PROGRAM(CABLE NAMES cable PATHS
+ else(CABLE_EXECUTABLE_PATH)
+ find_program(CABLE NAMES cable PATHS
${CABLE_BINARY_DIR}/Executables
${CABLE_BINARY_DIR}/Executables/*)
- ENDIF(CABLE_EXECUTABLE_PATH)
+ endif(CABLE_EXECUTABLE_PATH)
- FIND_PATH(CABLE_INCLUDE_DIR CableTclFacility/ctCalls.h
+ find_path(CABLE_INCLUDE_DIR CableTclFacility/ctCalls.h
${CABLE_SOURCE_DIR})
-ELSE(CABLE_BUILD_DIR)
+else(CABLE_BUILD_DIR)
# Find the cable executable in the path.
- FIND_PROGRAM(CABLE NAMES cable)
+ find_program(CABLE NAMES cable)
# Get the path where the executable sits, but without the executable
# name on it.
- GET_FILENAME_COMPONENT(CABLE_ROOT_BIN ${CABLE} PATH)
+ get_filename_component(CABLE_ROOT_BIN ${CABLE} PATH)
# Find the cable include directory in a path relative to the cable
# executable.
- FIND_PATH(CABLE_INCLUDE_DIR CableTclFacility/ctCalls.h
+ find_path(CABLE_INCLUDE_DIR CableTclFacility/ctCalls.h
${CABLE_ROOT_BIN}/../include/Cable)
# Find the WrapTclFacility library in a path relative to the cable
# executable.
- FIND_LIBRARY(CABLE_TCL_LIBRARY NAMES CableTclFacility PATHS
+ find_library(CABLE_TCL_LIBRARY NAMES CableTclFacility PATHS
${CABLE_ROOT_BIN}/../lib/Cable)
-ENDIF(CABLE_BUILD_DIR)
+endif(CABLE_BUILD_DIR)
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 56a92c199e..94e4500be8 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -855,7 +855,7 @@ function(CUDA_COMPUTE_BUILD_PATH path build_path)
file(TO_CMAKE_PATH "${path}" bpath)
if (IS_ABSOLUTE "${bpath}")
# Absolute paths are generally unnessary, especially if something like
- # FILE(GLOB_RECURSE) is used to pick up the files.
+ # file(GLOB_RECURSE) is used to pick up the files.
file(RELATIVE_PATH bpath "${CMAKE_CURRENT_SOURCE_DIR}" "${bpath}")
endif()
diff --git a/Modules/FindCURL.cmake b/Modules/FindCURL.cmake
index 5f2181a99c..5c58b8437a 100644
--- a/Modules/FindCURL.cmake
+++ b/Modules/FindCURL.cmake
@@ -21,39 +21,39 @@
# License text for the above reference.)
# Look for the header file.
-FIND_PATH(CURL_INCLUDE_DIR NAMES curl/curl.h)
-MARK_AS_ADVANCED(CURL_INCLUDE_DIR)
+find_path(CURL_INCLUDE_DIR NAMES curl/curl.h)
+mark_as_advanced(CURL_INCLUDE_DIR)
# Look for the library.
-FIND_LIBRARY(CURL_LIBRARY NAMES
+find_library(CURL_LIBRARY NAMES
curl
# Windows MSVC prebuilts:
curllib
libcurl_imp
curllib_static
)
-MARK_AS_ADVANCED(CURL_LIBRARY)
+mark_as_advanced(CURL_LIBRARY)
-IF(CURL_INCLUDE_DIR)
- FOREACH(_curl_version_header curlver.h curl.h)
- IF(EXISTS "${CURL_INCLUDE_DIR}/curl/${_curl_version_header}")
- FILE(STRINGS "${CURL_INCLUDE_DIR}/curl/${_curl_version_header}" curl_version_str REGEX "^#define[\t ]+LIBCURL_VERSION[\t ]+\".*\"")
+if(CURL_INCLUDE_DIR)
+ foreach(_curl_version_header curlver.h curl.h)
+ if(EXISTS "${CURL_INCLUDE_DIR}/curl/${_curl_version_header}")
+ file(STRINGS "${CURL_INCLUDE_DIR}/curl/${_curl_version_header}" curl_version_str REGEX "^#define[\t ]+LIBCURL_VERSION[\t ]+\".*\"")
- STRING(REGEX REPLACE "^#define[\t ]+LIBCURL_VERSION[\t ]+\"([^\"]*)\".*" "\\1" CURL_VERSION_STRING "${curl_version_str}")
- UNSET(curl_version_str)
- BREAK()
- ENDIF()
- ENDFOREACH(_curl_version_header)
-ENDIF()
+ string(REGEX REPLACE "^#define[\t ]+LIBCURL_VERSION[\t ]+\"([^\"]*)\".*" "\\1" CURL_VERSION_STRING "${curl_version_str}")
+ unset(curl_version_str)
+ break()
+ endif()
+ endforeach(_curl_version_header)
+endif()
# handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CURL
REQUIRED_VARS CURL_LIBRARY CURL_INCLUDE_DIR
VERSION_VAR CURL_VERSION_STRING)
-IF(CURL_FOUND)
- SET(CURL_LIBRARIES ${CURL_LIBRARY})
- SET(CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIR})
-ENDIF(CURL_FOUND)
+if(CURL_FOUND)
+ set(CURL_LIBRARIES ${CURL_LIBRARY})
+ set(CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIR})
+endif(CURL_FOUND)
diff --git a/Modules/FindCoin3D.cmake b/Modules/FindCoin3D.cmake
index 2b4c914f4a..914d74b11e 100644
--- a/Modules/FindCoin3D.cmake
+++ b/Modules/FindCoin3D.cmake
@@ -22,63 +22,63 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-IF (WIN32)
- IF (CYGWIN)
+if (WIN32)
+ if (CYGWIN)
- FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h)
- FIND_LIBRARY(COIN3D_LIBRARIES Coin)
+ find_path(COIN3D_INCLUDE_DIRS Inventor/So.h)
+ find_library(COIN3D_LIBRARIES Coin)
- ELSE (CYGWIN)
+ else (CYGWIN)
- FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h
+ find_path(COIN3D_INCLUDE_DIRS Inventor/So.h
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/include"
)
- FIND_LIBRARY(COIN3D_LIBRARY_DEBUG coin2d
+ find_library(COIN3D_LIBRARY_DEBUG coin2d
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/lib"
)
- FIND_LIBRARY(COIN3D_LIBRARY_RELEASE coin2
+ find_library(COIN3D_LIBRARY_RELEASE coin2
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/lib"
)
- IF (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
- SET(COIN3D_LIBRARIES optimized ${COIN3D_LIBRARY_RELEASE}
+ if (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
+ set(COIN3D_LIBRARIES optimized ${COIN3D_LIBRARY_RELEASE}
debug ${COIN3D_LIBRARY_DEBUG})
- ELSE (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
- IF (COIN3D_LIBRARY_DEBUG)
- SET (COIN3D_LIBRARIES ${COIN3D_LIBRARY_DEBUG})
- ENDIF (COIN3D_LIBRARY_DEBUG)
- IF (COIN3D_LIBRARY_RELEASE)
- SET (COIN3D_LIBRARIES ${COIN3D_LIBRARY_RELEASE})
- ENDIF (COIN3D_LIBRARY_RELEASE)
- ENDIF (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
-
- ENDIF (CYGWIN)
-
-ELSE (WIN32)
- IF(APPLE)
- FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h
+ else (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
+ if (COIN3D_LIBRARY_DEBUG)
+ set (COIN3D_LIBRARIES ${COIN3D_LIBRARY_DEBUG})
+ endif (COIN3D_LIBRARY_DEBUG)
+ if (COIN3D_LIBRARY_RELEASE)
+ set (COIN3D_LIBRARIES ${COIN3D_LIBRARY_RELEASE})
+ endif (COIN3D_LIBRARY_RELEASE)
+ endif (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
+
+ endif (CYGWIN)
+
+else (WIN32)
+ if(APPLE)
+ find_path(COIN3D_INCLUDE_DIRS Inventor/So.h
/Library/Frameworks/Inventor.framework/Headers
)
- FIND_LIBRARY(COIN3D_LIBRARIES Coin
+ find_library(COIN3D_LIBRARIES Coin
/Library/Frameworks/Inventor.framework/Libraries
)
- SET(COIN3D_LIBRARIES "-framework Coin3d" CACHE STRING "Coin3D library for OSX")
- ELSE(APPLE)
+ set(COIN3D_LIBRARIES "-framework Coin3d" CACHE STRING "Coin3D library for OSX")
+ else(APPLE)
- FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h)
- FIND_LIBRARY(COIN3D_LIBRARIES Coin)
+ find_path(COIN3D_INCLUDE_DIRS Inventor/So.h)
+ find_library(COIN3D_LIBRARIES Coin)
- ENDIF(APPLE)
+ endif(APPLE)
-ENDIF (WIN32)
+endif (WIN32)
# handle the QUIETLY and REQUIRED arguments and set COIN3D_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Coin3D DEFAULT_MSG COIN3D_LIBRARIES COIN3D_INCLUDE_DIRS)
-MARK_AS_ADVANCED(COIN3D_INCLUDE_DIRS COIN3D_LIBRARIES )
+mark_as_advanced(COIN3D_INCLUDE_DIRS COIN3D_LIBRARIES )
diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake
index 0ea5166d2a..de719921ee 100644
--- a/Modules/FindCurses.cmake
+++ b/Modules/FindCurses.cmake
@@ -9,7 +9,7 @@
# CURSES_HAVE_NCURSES_CURSES_H - true if ncurses/curses.h is available
# CURSES_LIBRARY - set for backwards compatibility with 2.4 CMake
#
-# Set CURSES_NEED_NCURSES to TRUE before the FIND_PACKAGE() command if NCurses
+# Set CURSES_NEED_NCURSES to TRUE before the find_package() command if NCurses
# functionality is required.
#=============================================================================
@@ -25,23 +25,23 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_LIBRARY(CURSES_CURSES_LIBRARY NAMES curses )
+find_library(CURSES_CURSES_LIBRARY NAMES curses )
-FIND_LIBRARY(CURSES_NCURSES_LIBRARY NAMES ncurses )
-SET(CURSES_USE_NCURSES FALSE)
+find_library(CURSES_NCURSES_LIBRARY NAMES ncurses )
+set(CURSES_USE_NCURSES FALSE)
-IF(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_LIBRARY)
- SET(CURSES_USE_NCURSES TRUE)
-ENDIF(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_LIBRARY)
+if(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_LIBRARY)
+ set(CURSES_USE_NCURSES TRUE)
+endif(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_LIBRARY)
# http://cygwin.com/ml/cygwin-announce/2010-01/msg00002.html
# cygwin ncurses stopped providing curses.h symlinks see above
# message. Cygwin is an ncurses package, so force ncurses on
# cygwin if the curses.h is missing
-IF(CYGWIN)
- IF(NOT EXISTS /usr/include/curses.h)
- SET(CURSES_USE_NCURSES TRUE)
- ENDIF()
-ENDIF()
+if(CYGWIN)
+ if(NOT EXISTS /usr/include/curses.h)
+ set(CURSES_USE_NCURSES TRUE)
+ endif()
+endif()
# Not sure the logic is correct here.
@@ -55,48 +55,48 @@ ENDIF()
# So at first try ncurses.h, if not found, try to find curses.h under the same
# prefix as the library was found, if still not found, try curses.h with the
# default search paths.
-IF(CURSES_CURSES_LIBRARY AND CURSES_NEED_NCURSES)
- INCLUDE(CheckLibraryExists)
+if(CURSES_CURSES_LIBRARY AND CURSES_NEED_NCURSES)
+ include(CheckLibraryExists)
CHECK_LIBRARY_EXISTS("${CURSES_CURSES_LIBRARY}"
wsyncup "" CURSES_CURSES_HAS_WSYNCUP)
- IF(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_HAS_WSYNCUP)
+ if(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_HAS_WSYNCUP)
CHECK_LIBRARY_EXISTS("${CURSES_NCURSES_LIBRARY}"
wsyncup "" CURSES_NCURSES_HAS_WSYNCUP)
- IF( CURSES_NCURSES_HAS_WSYNCUP)
- SET(CURSES_USE_NCURSES TRUE)
- ENDIF( CURSES_NCURSES_HAS_WSYNCUP)
- ENDIF(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_HAS_WSYNCUP)
+ if( CURSES_NCURSES_HAS_WSYNCUP)
+ set(CURSES_USE_NCURSES TRUE)
+ endif( CURSES_NCURSES_HAS_WSYNCUP)
+ endif(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_HAS_WSYNCUP)
-ENDIF(CURSES_CURSES_LIBRARY AND CURSES_NEED_NCURSES)
+endif(CURSES_CURSES_LIBRARY AND CURSES_NEED_NCURSES)
-IF(NOT CURSES_USE_NCURSES)
- FIND_FILE(CURSES_HAVE_CURSES_H curses.h )
- FIND_PATH(CURSES_CURSES_H_PATH curses.h )
- GET_FILENAME_COMPONENT(_cursesLibDir "${CURSES_CURSES_LIBRARY}" PATH)
- GET_FILENAME_COMPONENT(_cursesParentDir "${_cursesLibDir}" PATH)
+if(NOT CURSES_USE_NCURSES)
+ find_file(CURSES_HAVE_CURSES_H curses.h )
+ find_path(CURSES_CURSES_H_PATH curses.h )
+ get_filename_component(_cursesLibDir "${CURSES_CURSES_LIBRARY}" PATH)
+ get_filename_component(_cursesParentDir "${_cursesLibDir}" PATH)
# for compatibility with older FindCurses.cmake this has to be in the cache
# FORCE must not be used since this would break builds which preload a cache wqith these variables set
- SET(CURSES_INCLUDE_PATH "${CURSES_CURSES_H_PATH}"
+ set(CURSES_INCLUDE_PATH "${CURSES_CURSES_H_PATH}"
CACHE FILEPATH "The curses include path")
- SET(CURSES_LIBRARY "${CURSES_CURSES_LIBRARY}"
+ set(CURSES_LIBRARY "${CURSES_CURSES_LIBRARY}"
CACHE FILEPATH "The curses library")
-ELSE(NOT CURSES_USE_NCURSES)
+else(NOT CURSES_USE_NCURSES)
# we need to find ncurses
- GET_FILENAME_COMPONENT(_cursesLibDir "${CURSES_NCURSES_LIBRARY}" PATH)
- GET_FILENAME_COMPONENT(_cursesParentDir "${_cursesLibDir}" PATH)
+ get_filename_component(_cursesLibDir "${CURSES_NCURSES_LIBRARY}" PATH)
+ get_filename_component(_cursesParentDir "${_cursesLibDir}" PATH)
- FIND_FILE(CURSES_HAVE_NCURSES_H ncurses.h)
- FIND_FILE(CURSES_HAVE_NCURSES_NCURSES_H ncurses/ncurses.h)
- FIND_FILE(CURSES_HAVE_NCURSES_CURSES_H ncurses/curses.h)
- FIND_FILE(CURSES_HAVE_CURSES_H curses.h
+ find_file(CURSES_HAVE_NCURSES_H ncurses.h)
+ find_file(CURSES_HAVE_NCURSES_NCURSES_H ncurses/ncurses.h)
+ find_file(CURSES_HAVE_NCURSES_CURSES_H ncurses/curses.h)
+ find_file(CURSES_HAVE_CURSES_H curses.h
HINTS "${_cursesParentDir}/include")
- FIND_PATH(CURSES_NCURSES_INCLUDE_PATH ncurses.h ncurses/ncurses.h
+ find_path(CURSES_NCURSES_INCLUDE_PATH ncurses.h ncurses/ncurses.h
ncurses/curses.h)
- FIND_PATH(CURSES_NCURSES_INCLUDE_PATH curses.h
+ find_path(CURSES_NCURSES_INCLUDE_PATH curses.h
HINTS "${_cursesParentDir}/include")
# for compatibility with older FindCurses.cmake this has to be in the cache
@@ -106,60 +106,60 @@ ELSE(NOT CURSES_USE_NCURSES)
# a cache wqith these variables set
# only put ncurses include and library into
# variables if they are found
- IF(NOT CURSES_NCURSES_INCLUDE_PATH AND CURSES_HAVE_NCURSES_NCURSES_H)
- GET_FILENAME_COMPONENT(CURSES_NCURSES_INCLUDE_PATH
+ if(NOT CURSES_NCURSES_INCLUDE_PATH AND CURSES_HAVE_NCURSES_NCURSES_H)
+ get_filename_component(CURSES_NCURSES_INCLUDE_PATH
"${CURSES_HAVE_NCURSES_NCURSES_H}" PATH)
- ENDIF(NOT CURSES_NCURSES_INCLUDE_PATH AND CURSES_HAVE_NCURSES_NCURSES_H)
- IF(CURSES_NCURSES_INCLUDE_PATH AND CURSES_NCURSES_LIBRARY)
- SET( FORCE_IT )
- IF(CURSES_INCLUDE_PATH MATCHES NOTFOUND)
- SET(FORCE_IT FORCE)
- ENDIF(CURSES_INCLUDE_PATH MATCHES NOTFOUND)
- SET(CURSES_INCLUDE_PATH "${CURSES_NCURSES_INCLUDE_PATH}"
+ endif(NOT CURSES_NCURSES_INCLUDE_PATH AND CURSES_HAVE_NCURSES_NCURSES_H)
+ if(CURSES_NCURSES_INCLUDE_PATH AND CURSES_NCURSES_LIBRARY)
+ set( FORCE_IT )
+ if(CURSES_INCLUDE_PATH MATCHES NOTFOUND)
+ set(FORCE_IT FORCE)
+ endif(CURSES_INCLUDE_PATH MATCHES NOTFOUND)
+ set(CURSES_INCLUDE_PATH "${CURSES_NCURSES_INCLUDE_PATH}"
CACHE FILEPATH "The curses include path" ${FORCE_IT})
- SET( FORCE_IT)
- IF(CURSES_LIBRARY MATCHES NOTFOUND)
- SET(FORCE_IT FORCE)
- ENDIF(CURSES_LIBRARY MATCHES NOTFOUND)
- SET(CURSES_LIBRARY "${CURSES_NCURSES_LIBRARY}"
+ set( FORCE_IT)
+ if(CURSES_LIBRARY MATCHES NOTFOUND)
+ set(FORCE_IT FORCE)
+ endif(CURSES_LIBRARY MATCHES NOTFOUND)
+ set(CURSES_LIBRARY "${CURSES_NCURSES_LIBRARY}"
CACHE FILEPATH "The curses library" ${FORCE_IT})
- ENDIF(CURSES_NCURSES_INCLUDE_PATH AND CURSES_NCURSES_LIBRARY)
+ endif(CURSES_NCURSES_INCLUDE_PATH AND CURSES_NCURSES_LIBRARY)
-ENDIF(NOT CURSES_USE_NCURSES)
+endif(NOT CURSES_USE_NCURSES)
-FIND_LIBRARY(CURSES_EXTRA_LIBRARY cur_colr HINTS "${_cursesLibDir}")
-FIND_LIBRARY(CURSES_EXTRA_LIBRARY cur_colr )
+find_library(CURSES_EXTRA_LIBRARY cur_colr HINTS "${_cursesLibDir}")
+find_library(CURSES_EXTRA_LIBRARY cur_colr )
-FIND_LIBRARY(CURSES_FORM_LIBRARY form HINTS "${_cursesLibDir}")
-FIND_LIBRARY(CURSES_FORM_LIBRARY form )
+find_library(CURSES_FORM_LIBRARY form HINTS "${_cursesLibDir}")
+find_library(CURSES_FORM_LIBRARY form )
# for compatibility with older FindCurses.cmake this has to be in the cache
# FORCE must not be used since this would break builds which preload a cache
# qith these variables set
-SET(FORM_LIBRARY "${CURSES_FORM_LIBRARY}"
+set(FORM_LIBRARY "${CURSES_FORM_LIBRARY}"
CACHE FILEPATH "The curses form library")
# Need to provide the *_LIBRARIES
-SET(CURSES_LIBRARIES ${CURSES_LIBRARY})
+set(CURSES_LIBRARIES ${CURSES_LIBRARY})
-IF(CURSES_EXTRA_LIBRARY)
- SET(CURSES_LIBRARIES ${CURSES_LIBRARIES} ${CURSES_EXTRA_LIBRARY})
-ENDIF(CURSES_EXTRA_LIBRARY)
+if(CURSES_EXTRA_LIBRARY)
+ set(CURSES_LIBRARIES ${CURSES_LIBRARIES} ${CURSES_EXTRA_LIBRARY})
+endif(CURSES_EXTRA_LIBRARY)
-IF(CURSES_FORM_LIBRARY)
- SET(CURSES_LIBRARIES ${CURSES_LIBRARIES} ${CURSES_FORM_LIBRARY})
-ENDIF(CURSES_FORM_LIBRARY)
+if(CURSES_FORM_LIBRARY)
+ set(CURSES_LIBRARIES ${CURSES_LIBRARIES} ${CURSES_FORM_LIBRARY})
+endif(CURSES_FORM_LIBRARY)
# Proper name is *_INCLUDE_DIR
-SET(CURSES_INCLUDE_DIR ${CURSES_INCLUDE_PATH})
+set(CURSES_INCLUDE_DIR ${CURSES_INCLUDE_PATH})
# handle the QUIETLY and REQUIRED arguments and set CURSES_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Curses DEFAULT_MSG
CURSES_LIBRARY CURSES_INCLUDE_PATH)
-MARK_AS_ADVANCED(
+mark_as_advanced(
CURSES_INCLUDE_PATH
CURSES_LIBRARY
CURSES_CURSES_INCLUDE_PATH
diff --git a/Modules/FindCygwin.cmake b/Modules/FindCygwin.cmake
index 28f55ba0cc..75e3342ba6 100644
--- a/Modules/FindCygwin.cmake
+++ b/Modules/FindCygwin.cmake
@@ -14,15 +14,15 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-IF (WIN32)
- FIND_PATH(CYGWIN_INSTALL_PATH
+if (WIN32)
+ find_path(CYGWIN_INSTALL_PATH
cygwin.bat
"C:/Cygwin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygwin\\setup;rootdir]"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygnus Solutions\\Cygwin\\mounts v2\\/;native]"
)
- MARK_AS_ADVANCED(
+ mark_as_advanced(
CYGWIN_INSTALL_PATH
)
-ENDIF (WIN32)
+endif (WIN32)
diff --git a/Modules/FindDart.cmake b/Modules/FindDart.cmake
index caca4b868e..13e19be7dd 100644
--- a/Modules/FindDart.cmake
+++ b/Modules/FindDart.cmake
@@ -16,7 +16,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PATH(DART_ROOT README.INSTALL
+find_path(DART_ROOT README.INSTALL
$ENV{DART_ROOT}
${PROJECT_SOURCE_DIR}/Dart
/usr/share/Dart
@@ -30,7 +30,7 @@ FIND_PATH(DART_ROOT README.INSTALL
# handle the QUIETLY and REQUIRED arguments and set DART_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Dart DEFAULT_MSG DART_ROOT)
-MARK_AS_ADVANCED(DART_ROOT)
+mark_as_advanced(DART_ROOT)
diff --git a/Modules/FindDevIL.cmake b/Modules/FindDevIL.cmake
index ebfe298981..dacc60422c 100644
--- a/Modules/FindDevIL.cmake
+++ b/Modules/FindDevIL.cmake
@@ -36,38 +36,38 @@
# TODO: Add version support.
# Tested under Linux and Windows (MSVC)
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-FIND_PATH(IL_INCLUDE_DIR il.h
+find_path(IL_INCLUDE_DIR il.h
PATH_SUFFIXES include IL
DOC "The path the the directory that contains il.h"
)
-#MESSAGE("IL_INCLUDE_DIR is ${IL_INCLUDE_DIR}")
+#message("IL_INCLUDE_DIR is ${IL_INCLUDE_DIR}")
-FIND_LIBRARY(IL_LIBRARIES
+find_library(IL_LIBRARIES
NAMES IL DEVIL
PATH_SUFFIXES lib64 lib lib32
DOC "The file that corresponds to the base il library."
)
-#MESSAGE("IL_LIBRARIES is ${IL_LIBRARIES}")
+#message("IL_LIBRARIES is ${IL_LIBRARIES}")
-FIND_LIBRARY(ILUT_LIBRARIES
+find_library(ILUT_LIBRARIES
NAMES ILUT
PATH_SUFFIXES lib64 lib lib32
DOC "The file that corresponds to the il (system?) utility library."
)
-#MESSAGE("ILUT_LIBRARIES is ${ILUT_LIBRARIES}")
+#message("ILUT_LIBRARIES is ${ILUT_LIBRARIES}")
-FIND_LIBRARY(ILU_LIBRARIES
+find_library(ILU_LIBRARIES
NAMES ILU
PATH_SUFFIXES lib64 lib lib32
DOC "The file that corresponds to the il utility library."
)
-#MESSAGE("ILU_LIBRARIES is ${ILU_LIBRARIES}")
+#message("ILU_LIBRARIES is ${ILU_LIBRARIES}")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(IL DEFAULT_MSG
IL_LIBRARIES ILU_LIBRARIES
diff --git a/Modules/FindDoxygen.cmake b/Modules/FindDoxygen.cmake
index a004d7b651..d63044f420 100644
--- a/Modules/FindDoxygen.cmake
+++ b/Modules/FindDoxygen.cmake
@@ -33,9 +33,9 @@
# License text for the above reference.)
# For backwards compatibility support
-IF(Doxygen_FIND_QUIETLY)
- SET(DOXYGEN_FIND_QUIETLY TRUE)
-ENDIF(Doxygen_FIND_QUIETLY)
+if(Doxygen_FIND_QUIETLY)
+ set(DOXYGEN_FIND_QUIETLY TRUE)
+endif(Doxygen_FIND_QUIETLY)
# ===== Rationale for OS X AppBundle mods below =====
# With the OS X GUI version, Doxygen likes to be installed to /Applications and
@@ -54,9 +54,9 @@ ENDIF(Doxygen_FIND_QUIETLY)
# the app-bundle feature, just for this CMake module:
if(APPLE)
# Save the old setting
- SET(TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE ${CMAKE_FIND_APPBUNDLE})
+ set(TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE ${CMAKE_FIND_APPBUNDLE})
# Disable the App-bundle detection feature
- SET(CMAKE_FIND_APPBUNDLE "NEVER")
+ set(CMAKE_FIND_APPBUNDLE "NEVER")
endif()
# FYI:
# In the older versions of OS X Doxygen, dot was included with the
@@ -68,7 +68,7 @@ endif()
# Find Doxygen...
#
-FIND_PROGRAM(DOXYGEN_EXECUTABLE
+find_program(DOXYGEN_EXECUTABLE
NAMES doxygen
PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\doxygen_is1;Inno Setup: App Path]/bin"
@@ -77,9 +77,9 @@ FIND_PROGRAM(DOXYGEN_EXECUTABLE
DOC "Doxygen documentation generation tool (http://www.doxygen.org)"
)
-IF(DOXYGEN_EXECUTABLE)
- EXECUTE_PROCESS(COMMAND ${DOXYGEN_EXECUTABLE} "--version" OUTPUT_VARIABLE DOXYGEN_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
-ENDIF()
+if(DOXYGEN_EXECUTABLE)
+ execute_process(COMMAND ${DOXYGEN_EXECUTABLE} "--version" OUTPUT_VARIABLE DOXYGEN_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
+endif()
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Doxygen REQUIRED_VARS DOXYGEN_EXECUTABLE VERSION_VAR DOXYGEN_VERSION)
@@ -88,8 +88,8 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Doxygen REQUIRED_VARS DOXYGEN_EXECUTABLE VERSI
# Find Dot...
#
-IF(NOT DOXYGEN_SKIP_DOT)
- FIND_PROGRAM(DOXYGEN_DOT_EXECUTABLE
+if(NOT DOXYGEN_SKIP_DOT)
+ find_program(DOXYGEN_DOT_EXECUTABLE
NAMES dot
PATHS
"$ENV{ProgramFiles}/Graphviz 2.21/bin"
@@ -117,7 +117,7 @@ endif(NOT DOXYGEN_SKIP_DOT)
if(APPLE)
# Restore the old app-bundle setting setting
- SET(CMAKE_FIND_APPBUNDLE ${TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE})
+ set(CMAKE_FIND_APPBUNDLE ${TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE})
endif()
# Maintain the _FOUND variables as "YES" or "NO" for backwards compatibility
@@ -134,10 +134,10 @@ else()
endif()
# For backwards compatibility support
-SET (DOXYGEN ${DOXYGEN_EXECUTABLE} )
-SET (DOT ${DOXYGEN_DOT_EXECUTABLE} )
+set (DOXYGEN ${DOXYGEN_EXECUTABLE} )
+set (DOT ${DOXYGEN_DOT_EXECUTABLE} )
-MARK_AS_ADVANCED(
+mark_as_advanced(
DOXYGEN_EXECUTABLE
DOXYGEN_DOT_EXECUTABLE
DOXYGEN_DOT_PATH
diff --git a/Modules/FindEXPAT.cmake b/Modules/FindEXPAT.cmake
index 7a6dbbbd9a..e8523a059b 100644
--- a/Modules/FindEXPAT.cmake
+++ b/Modules/FindEXPAT.cmake
@@ -19,10 +19,10 @@
# License text for the above reference.)
# Look for the header file.
-FIND_PATH(EXPAT_INCLUDE_DIR NAMES expat.h)
+find_path(EXPAT_INCLUDE_DIR NAMES expat.h)
# Look for the library.
-FIND_LIBRARY(EXPAT_LIBRARY NAMES expat libexpat)
+find_library(EXPAT_LIBRARY NAMES expat libexpat)
if (EXPAT_INCLUDE_DIR AND EXISTS "${EXPAT_INCLUDE_DIR}/expat.h")
file(STRINGS "${EXPAT_INCLUDE_DIR}/expat.h" expat_version_str
@@ -46,15 +46,15 @@ endif (EXPAT_INCLUDE_DIR AND EXISTS "${EXPAT_INCLUDE_DIR}/expat.h")
# handle the QUIETLY and REQUIRED arguments and set EXPAT_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(EXPAT
REQUIRED_VARS EXPAT_LIBRARY EXPAT_INCLUDE_DIR
VERSION_VAR EXPAT_VERSION_STRING)
# Copy the results to the output variables.
-IF(EXPAT_FOUND)
- SET(EXPAT_LIBRARIES ${EXPAT_LIBRARY})
- SET(EXPAT_INCLUDE_DIRS ${EXPAT_INCLUDE_DIR})
-ENDIF(EXPAT_FOUND)
+if(EXPAT_FOUND)
+ set(EXPAT_LIBRARIES ${EXPAT_LIBRARY})
+ set(EXPAT_INCLUDE_DIRS ${EXPAT_INCLUDE_DIR})
+endif(EXPAT_FOUND)
-MARK_AS_ADVANCED(EXPAT_INCLUDE_DIR EXPAT_LIBRARY)
+mark_as_advanced(EXPAT_INCLUDE_DIR EXPAT_LIBRARY)
diff --git a/Modules/FindFLEX.cmake b/Modules/FindFLEX.cmake
index 586f77a6ef..64c1d535a4 100644
--- a/Modules/FindFLEX.cmake
+++ b/Modules/FindFLEX.cmake
@@ -8,7 +8,7 @@
# FLEX_INCLUDE_DIRS - The path to the flex headers
#
# The minimum required version of flex can be specified using the
-# standard syntax, e.g. FIND_PACKAGE(FLEX 2.5.13)
+# standard syntax, e.g. find_package(FLEX 2.5.13)
#
#
# If flex is found on the system, the module provides the macro:
@@ -63,73 +63,73 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PROGRAM(FLEX_EXECUTABLE flex DOC "path to the flex executable")
-MARK_AS_ADVANCED(FLEX_EXECUTABLE)
+find_program(FLEX_EXECUTABLE flex DOC "path to the flex executable")
+mark_as_advanced(FLEX_EXECUTABLE)
-FIND_LIBRARY(FL_LIBRARY NAMES fl
+find_library(FL_LIBRARY NAMES fl
DOC "Path to the fl library")
-FIND_PATH(FLEX_INCLUDE_DIR FlexLexer.h
+find_path(FLEX_INCLUDE_DIR FlexLexer.h
DOC "Path to the flex headers")
-MARK_AS_ADVANCED(FL_LIBRARY FLEX_INCLUDE_DIR)
+mark_as_advanced(FL_LIBRARY FLEX_INCLUDE_DIR)
-SET(FLEX_INCLUDE_DIRS ${FLEX_INCLUDE_DIR})
-SET(FLEX_LIBRARIES ${FL_LIBRARY})
+set(FLEX_INCLUDE_DIRS ${FLEX_INCLUDE_DIR})
+set(FLEX_LIBRARIES ${FL_LIBRARY})
-IF(FLEX_EXECUTABLE)
+if(FLEX_EXECUTABLE)
- EXECUTE_PROCESS(COMMAND ${FLEX_EXECUTABLE} --version
+ execute_process(COMMAND ${FLEX_EXECUTABLE} --version
OUTPUT_VARIABLE FLEX_version_output
ERROR_VARIABLE FLEX_version_error
RESULT_VARIABLE FLEX_version_result
OUTPUT_STRIP_TRAILING_WHITESPACE)
- IF(NOT ${FLEX_version_result} EQUAL 0)
- IF(FLEX_FIND_REQUIRED)
- MESSAGE(SEND_ERROR "Command \"${FLEX_EXECUTABLE} --version\" failed with output:\n${FLEX_version_output}\n${FLEX_version_error}")
- ELSE()
- MESSAGE("Command \"${FLEX_EXECUTABLE} --version\" failed with output:\n${FLEX_version_output}\n${FLEX_version_error}\nFLEX_VERSION will not be available")
- ENDIF()
- ELSE()
+ if(NOT ${FLEX_version_result} EQUAL 0)
+ if(FLEX_FIND_REQUIRED)
+ message(SEND_ERROR "Command \"${FLEX_EXECUTABLE} --version\" failed with output:\n${FLEX_version_output}\n${FLEX_version_error}")
+ else()
+ message("Command \"${FLEX_EXECUTABLE} --version\" failed with output:\n${FLEX_version_output}\n${FLEX_version_error}\nFLEX_VERSION will not be available")
+ endif()
+ else()
# older versions of flex printed "/full/path/to/executable version X.Y"
# newer versions use "basename(executable) X.Y"
- GET_FILENAME_COMPONENT(FLEX_EXE_NAME "${FLEX_EXECUTABLE}" NAME)
- STRING(REGEX REPLACE "^.*${FLEX_EXE_NAME}\"? (version )?([0-9]+[^ ]*)$" "\\2"
+ get_filename_component(FLEX_EXE_NAME "${FLEX_EXECUTABLE}" NAME)
+ string(REGEX REPLACE "^.*${FLEX_EXE_NAME}\"? (version )?([0-9]+[^ ]*)$" "\\2"
FLEX_VERSION "${FLEX_version_output}")
- UNSET(FLEX_EXE_NAME)
- ENDIF()
+ unset(FLEX_EXE_NAME)
+ endif()
#============================================================
# FLEX_TARGET (public macro)
#============================================================
#
- MACRO(FLEX_TARGET Name Input Output)
- SET(FLEX_TARGET_usage "FLEX_TARGET(<Name> <Input> <Output> [COMPILE_FLAGS <string>]")
- IF(${ARGC} GREATER 3)
- IF(${ARGC} EQUAL 5)
- IF("${ARGV3}" STREQUAL "COMPILE_FLAGS")
- SET(FLEX_EXECUTABLE_opts "${ARGV4}")
- SEPARATE_ARGUMENTS(FLEX_EXECUTABLE_opts)
- ELSE()
- MESSAGE(SEND_ERROR ${FLEX_TARGET_usage})
- ENDIF()
- ELSE()
- MESSAGE(SEND_ERROR ${FLEX_TARGET_usage})
- ENDIF()
- ENDIF()
-
- ADD_CUSTOM_COMMAND(OUTPUT ${Output}
+ macro(FLEX_TARGET Name Input Output)
+ set(FLEX_TARGET_usage "FLEX_TARGET(<Name> <Input> <Output> [COMPILE_FLAGS <string>]")
+ if(${ARGC} GREATER 3)
+ if(${ARGC} EQUAL 5)
+ if("${ARGV3}" STREQUAL "COMPILE_FLAGS")
+ set(FLEX_EXECUTABLE_opts "${ARGV4}")
+ separate_arguments(FLEX_EXECUTABLE_opts)
+ else()
+ message(SEND_ERROR ${FLEX_TARGET_usage})
+ endif()
+ else()
+ message(SEND_ERROR ${FLEX_TARGET_usage})
+ endif()
+ endif()
+
+ add_custom_command(OUTPUT ${Output}
COMMAND ${FLEX_EXECUTABLE}
ARGS ${FLEX_EXECUTABLE_opts} -o${Output} ${Input}
DEPENDS ${Input}
COMMENT "[FLEX][${Name}] Building scanner with flex ${FLEX_VERSION}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
- SET(FLEX_${Name}_DEFINED TRUE)
- SET(FLEX_${Name}_OUTPUTS ${Output})
- SET(FLEX_${Name}_INPUT ${Input})
- SET(FLEX_${Name}_COMPILE_FLAGS ${FLEX_EXECUTABLE_opts})
- ENDMACRO(FLEX_TARGET)
+ set(FLEX_${Name}_DEFINED TRUE)
+ set(FLEX_${Name}_OUTPUTS ${Output})
+ set(FLEX_${Name}_INPUT ${Input})
+ set(FLEX_${Name}_COMPILE_FLAGS ${FLEX_EXECUTABLE_opts})
+ endmacro(FLEX_TARGET)
#============================================================
@@ -137,24 +137,24 @@ IF(FLEX_EXECUTABLE)
# ADD_FLEX_BISON_DEPENDENCY (public macro)
#============================================================
#
- MACRO(ADD_FLEX_BISON_DEPENDENCY FlexTarget BisonTarget)
+ macro(ADD_FLEX_BISON_DEPENDENCY FlexTarget BisonTarget)
- IF(NOT FLEX_${FlexTarget}_OUTPUTS)
- MESSAGE(SEND_ERROR "Flex target `${FlexTarget}' does not exists.")
- ENDIF()
+ if(NOT FLEX_${FlexTarget}_OUTPUTS)
+ message(SEND_ERROR "Flex target `${FlexTarget}' does not exists.")
+ endif()
- IF(NOT BISON_${BisonTarget}_OUTPUT_HEADER)
- MESSAGE(SEND_ERROR "Bison target `${BisonTarget}' does not exists.")
- ENDIF()
+ if(NOT BISON_${BisonTarget}_OUTPUT_HEADER)
+ message(SEND_ERROR "Bison target `${BisonTarget}' does not exists.")
+ endif()
- SET_SOURCE_FILES_PROPERTIES(${FLEX_${FlexTarget}_OUTPUTS}
+ set_source_files_properties(${FLEX_${FlexTarget}_OUTPUTS}
PROPERTIES OBJECT_DEPENDS ${BISON_${BisonTarget}_OUTPUT_HEADER})
- ENDMACRO(ADD_FLEX_BISON_DEPENDENCY)
+ endmacro(ADD_FLEX_BISON_DEPENDENCY)
#============================================================
-ENDIF(FLEX_EXECUTABLE)
+endif(FLEX_EXECUTABLE)
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FLEX REQUIRED_VARS FLEX_EXECUTABLE
VERSION_VAR FLEX_VERSION)
diff --git a/Modules/FindFLTK.cmake b/Modules/FindFLTK.cmake
index 8a656f6277..402fe2f5ea 100644
--- a/Modules/FindFLTK.cmake
+++ b/Modules/FindFLTK.cmake
@@ -42,56 +42,56 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-IF(NOT FLTK_SKIP_OPENGL)
- FIND_PACKAGE(OpenGL)
-ENDIF()
+if(NOT FLTK_SKIP_OPENGL)
+ find_package(OpenGL)
+endif()
# Platform dependent libraries required by FLTK
-IF(WIN32)
- IF(NOT CYGWIN)
- IF(BORLAND)
- SET( FLTK_PLATFORM_DEPENDENT_LIBS import32 )
- ELSE(BORLAND)
- SET( FLTK_PLATFORM_DEPENDENT_LIBS wsock32 comctl32 )
- ENDIF(BORLAND)
- ENDIF(NOT CYGWIN)
-ENDIF(WIN32)
-
-IF(UNIX)
- INCLUDE(FindX11)
- FIND_LIBRARY(FLTK_MATH_LIBRARY m)
- SET( FLTK_PLATFORM_DEPENDENT_LIBS ${X11_LIBRARIES} ${FLTK_MATH_LIBRARY})
-ENDIF(UNIX)
-
-IF(APPLE)
- SET( FLTK_PLATFORM_DEPENDENT_LIBS "-framework Carbon -framework Cocoa -framework ApplicationServices -lz")
-ENDIF(APPLE)
+if(WIN32)
+ if(NOT CYGWIN)
+ if(BORLAND)
+ set( FLTK_PLATFORM_DEPENDENT_LIBS import32 )
+ else(BORLAND)
+ set( FLTK_PLATFORM_DEPENDENT_LIBS wsock32 comctl32 )
+ endif(BORLAND)
+ endif(NOT CYGWIN)
+endif(WIN32)
+
+if(UNIX)
+ include(FindX11)
+ find_library(FLTK_MATH_LIBRARY m)
+ set( FLTK_PLATFORM_DEPENDENT_LIBS ${X11_LIBRARIES} ${FLTK_MATH_LIBRARY})
+endif(UNIX)
+
+if(APPLE)
+ set( FLTK_PLATFORM_DEPENDENT_LIBS "-framework Carbon -framework Cocoa -framework ApplicationServices -lz")
+endif(APPLE)
# If FLTK_INCLUDE_DIR is already defined we assigne its value to FLTK_DIR
-IF(FLTK_INCLUDE_DIR)
- SET(FLTK_DIR ${FLTK_INCLUDE_DIR})
-ENDIF(FLTK_INCLUDE_DIR)
+if(FLTK_INCLUDE_DIR)
+ set(FLTK_DIR ${FLTK_INCLUDE_DIR})
+endif(FLTK_INCLUDE_DIR)
# If FLTK has been built using CMake we try to find everything directly
-SET(FLTK_DIR_STRING "directory containing FLTKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/fltk for an installation.")
+set(FLTK_DIR_STRING "directory containing FLTKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/fltk for an installation.")
# Search only if the location is not already known.
-IF(NOT FLTK_DIR)
+if(NOT FLTK_DIR)
# Get the system search path as a list.
- FILE(TO_CMAKE_PATH "$ENV{PATH}" FLTK_DIR_SEARCH2)
+ file(TO_CMAKE_PATH "$ENV{PATH}" FLTK_DIR_SEARCH2)
# Construct a set of paths relative to the system search path.
- SET(FLTK_DIR_SEARCH "")
- FOREACH(dir ${FLTK_DIR_SEARCH2})
- SET(FLTK_DIR_SEARCH ${FLTK_DIR_SEARCH} "${dir}/../lib/fltk")
- ENDFOREACH(dir)
- STRING(REPLACE "//" "/" FLTK_DIR_SEARCH "${FLTK_DIR_SEARCH}")
+ set(FLTK_DIR_SEARCH "")
+ foreach(dir ${FLTK_DIR_SEARCH2})
+ set(FLTK_DIR_SEARCH ${FLTK_DIR_SEARCH} "${dir}/../lib/fltk")
+ endforeach(dir)
+ string(REPLACE "//" "/" FLTK_DIR_SEARCH "${FLTK_DIR_SEARCH}")
#
# Look for an installation or build tree.
#
- FIND_PATH(FLTK_DIR FLTKConfig.cmake
+ find_path(FLTK_DIR FLTKConfig.cmake
# Look for an environment variable FLTK_DIR.
$ENV{FLTK_DIR}
@@ -122,188 +122,188 @@ IF(NOT FLTK_DIR)
# Help the user find it if we cannot.
DOC "The ${FLTK_DIR_STRING}"
)
-ENDIF(NOT FLTK_DIR)
+endif(NOT FLTK_DIR)
# Check if FLTK was built using CMake
- IF(EXISTS ${FLTK_DIR}/FLTKConfig.cmake)
- SET(FLTK_BUILT_WITH_CMAKE 1)
- ENDIF(EXISTS ${FLTK_DIR}/FLTKConfig.cmake)
+ if(EXISTS ${FLTK_DIR}/FLTKConfig.cmake)
+ set(FLTK_BUILT_WITH_CMAKE 1)
+ endif(EXISTS ${FLTK_DIR}/FLTKConfig.cmake)
- IF(FLTK_BUILT_WITH_CMAKE)
- SET(FLTK_FOUND 1)
- INCLUDE(${FLTK_DIR}/FLTKConfig.cmake)
+ if(FLTK_BUILT_WITH_CMAKE)
+ set(FLTK_FOUND 1)
+ include(${FLTK_DIR}/FLTKConfig.cmake)
# Fluid
- IF(FLUID_COMMAND)
- SET(FLTK_FLUID_EXECUTABLE ${FLUID_COMMAND} CACHE FILEPATH "Fluid executable")
- ELSE(FLUID_COMMAND)
- FIND_PROGRAM(FLTK_FLUID_EXECUTABLE fluid PATHS
+ if(FLUID_COMMAND)
+ set(FLTK_FLUID_EXECUTABLE ${FLUID_COMMAND} CACHE FILEPATH "Fluid executable")
+ else(FLUID_COMMAND)
+ find_program(FLTK_FLUID_EXECUTABLE fluid PATHS
${FLTK_EXECUTABLE_DIRS}
${FLTK_EXECUTABLE_DIRS}/RelWithDebInfo
${FLTK_EXECUTABLE_DIRS}/Debug
${FLTK_EXECUTABLE_DIRS}/Release
NO_SYSTEM_PATH)
- ENDIF(FLUID_COMMAND)
- # MARK_AS_ADVANCED(FLTK_FLUID_EXECUTABLE)
+ endif(FLUID_COMMAND)
+ # mark_as_advanced(FLTK_FLUID_EXECUTABLE)
- SET(FLTK_INCLUDE_DIR ${FLTK_DIR})
- LINK_DIRECTORIES(${FLTK_LIBRARY_DIRS})
+ set(FLTK_INCLUDE_DIR ${FLTK_DIR})
+ link_directories(${FLTK_LIBRARY_DIRS})
- SET(FLTK_BASE_LIBRARY fltk)
- SET(FLTK_GL_LIBRARY fltk_gl)
- SET(FLTK_FORMS_LIBRARY fltk_forms)
- SET(FLTK_IMAGES_LIBRARY fltk_images)
+ set(FLTK_BASE_LIBRARY fltk)
+ set(FLTK_GL_LIBRARY fltk_gl)
+ set(FLTK_FORMS_LIBRARY fltk_forms)
+ set(FLTK_IMAGES_LIBRARY fltk_images)
# Add the extra libraries
- LOAD_CACHE(${FLTK_DIR}
+ load_cache(${FLTK_DIR}
READ_WITH_PREFIX
FL FLTK_USE_SYSTEM_JPEG
FL FLTK_USE_SYSTEM_PNG
FL FLTK_USE_SYSTEM_ZLIB
)
- SET(FLTK_IMAGES_LIBS "")
- IF(FLFLTK_USE_SYSTEM_JPEG)
- SET(FLTK_IMAGES_LIBS ${FLTK_IMAGES_LIBS} fltk_jpeg)
- ENDIF(FLFLTK_USE_SYSTEM_JPEG)
- IF(FLFLTK_USE_SYSTEM_PNG)
- SET(FLTK_IMAGES_LIBS ${FLTK_IMAGES_LIBS} fltk_png)
- ENDIF(FLFLTK_USE_SYSTEM_PNG)
- IF(FLFLTK_USE_SYSTEM_ZLIB)
- SET(FLTK_IMAGES_LIBS ${FLTK_IMAGES_LIBS} fltk_zlib)
- ENDIF(FLFLTK_USE_SYSTEM_ZLIB)
- SET(FLTK_IMAGES_LIBS "${FLTK_IMAGES_LIBS}" CACHE INTERNAL
+ set(FLTK_IMAGES_LIBS "")
+ if(FLFLTK_USE_SYSTEM_JPEG)
+ set(FLTK_IMAGES_LIBS ${FLTK_IMAGES_LIBS} fltk_jpeg)
+ endif(FLFLTK_USE_SYSTEM_JPEG)
+ if(FLFLTK_USE_SYSTEM_PNG)
+ set(FLTK_IMAGES_LIBS ${FLTK_IMAGES_LIBS} fltk_png)
+ endif(FLFLTK_USE_SYSTEM_PNG)
+ if(FLFLTK_USE_SYSTEM_ZLIB)
+ set(FLTK_IMAGES_LIBS ${FLTK_IMAGES_LIBS} fltk_zlib)
+ endif(FLFLTK_USE_SYSTEM_ZLIB)
+ set(FLTK_IMAGES_LIBS "${FLTK_IMAGES_LIBS}" CACHE INTERNAL
"Extra libraries for fltk_images library.")
- ELSE(FLTK_BUILT_WITH_CMAKE)
+ else(FLTK_BUILT_WITH_CMAKE)
# if FLTK was not built using CMake
# Find fluid executable.
- FIND_PROGRAM(FLTK_FLUID_EXECUTABLE fluid ${FLTK_INCLUDE_DIR}/fluid)
+ find_program(FLTK_FLUID_EXECUTABLE fluid ${FLTK_INCLUDE_DIR}/fluid)
# Use location of fluid to help find everything else.
- SET(FLTK_INCLUDE_SEARCH_PATH "")
- SET(FLTK_LIBRARY_SEARCH_PATH "")
- IF(FLTK_FLUID_EXECUTABLE)
- GET_FILENAME_COMPONENT(FLTK_BIN_DIR "${FLTK_FLUID_EXECUTABLE}" PATH)
- SET(FLTK_INCLUDE_SEARCH_PATH ${FLTK_INCLUDE_SEARCH_PATH}
+ set(FLTK_INCLUDE_SEARCH_PATH "")
+ set(FLTK_LIBRARY_SEARCH_PATH "")
+ if(FLTK_FLUID_EXECUTABLE)
+ get_filename_component(FLTK_BIN_DIR "${FLTK_FLUID_EXECUTABLE}" PATH)
+ set(FLTK_INCLUDE_SEARCH_PATH ${FLTK_INCLUDE_SEARCH_PATH}
${FLTK_BIN_DIR}/../include ${FLTK_BIN_DIR}/..)
- SET(FLTK_LIBRARY_SEARCH_PATH ${FLTK_LIBRARY_SEARCH_PATH}
+ set(FLTK_LIBRARY_SEARCH_PATH ${FLTK_LIBRARY_SEARCH_PATH}
${FLTK_BIN_DIR}/../lib)
- SET(FLTK_WRAP_UI 1)
- ENDIF(FLTK_FLUID_EXECUTABLE)
+ set(FLTK_WRAP_UI 1)
+ endif(FLTK_FLUID_EXECUTABLE)
#
# Try to find FLTK include dir using fltk-config
#
- IF(UNIX)
+ if(UNIX)
# Use fltk-config to generate a list of possible include directories
- FIND_PROGRAM(FLTK_CONFIG_SCRIPT fltk-config PATHS ${FLTK_BIN_DIR})
- IF(FLTK_CONFIG_SCRIPT)
- IF(NOT FLTK_INCLUDE_DIR)
- EXEC_PROGRAM(${FLTK_CONFIG_SCRIPT} ARGS --cxxflags OUTPUT_VARIABLE FLTK_CXXFLAGS)
- IF(FLTK_CXXFLAGS)
- STRING(REGEX MATCHALL "-I[^ ]*" _fltk_temp_dirs ${FLTK_CXXFLAGS})
- STRING(REPLACE "-I" "" _fltk_temp_dirs "${_fltk_temp_dirs}")
- FOREACH(_dir ${_fltk_temp_dirs})
- STRING(STRIP ${_dir} _output)
- LIST(APPEND _FLTK_POSSIBLE_INCLUDE_DIRS ${_output})
- ENDFOREACH()
- ENDIF(FLTK_CXXFLAGS)
- ENDIF()
- ENDIF()
- ENDIF()
-
- SET(FLTK_INCLUDE_SEARCH_PATH ${FLTK_INCLUDE_SEARCH_PATH}
+ find_program(FLTK_CONFIG_SCRIPT fltk-config PATHS ${FLTK_BIN_DIR})
+ if(FLTK_CONFIG_SCRIPT)
+ if(NOT FLTK_INCLUDE_DIR)
+ exec_program(${FLTK_CONFIG_SCRIPT} ARGS --cxxflags OUTPUT_VARIABLE FLTK_CXXFLAGS)
+ if(FLTK_CXXFLAGS)
+ string(REGEX MATCHALL "-I[^ ]*" _fltk_temp_dirs ${FLTK_CXXFLAGS})
+ string(REPLACE "-I" "" _fltk_temp_dirs "${_fltk_temp_dirs}")
+ foreach(_dir ${_fltk_temp_dirs})
+ string(STRIP ${_dir} _output)
+ list(APPEND _FLTK_POSSIBLE_INCLUDE_DIRS ${_output})
+ endforeach()
+ endif(FLTK_CXXFLAGS)
+ endif()
+ endif()
+ endif()
+
+ set(FLTK_INCLUDE_SEARCH_PATH ${FLTK_INCLUDE_SEARCH_PATH}
/usr/local/fltk
/usr/X11R6/include
${_FLTK_POSSIBLE_INCLUDE_DIRS}
)
- FIND_PATH(FLTK_INCLUDE_DIR
+ find_path(FLTK_INCLUDE_DIR
NAMES FL/Fl.h FL/Fl.H # fltk 1.1.9 has Fl.H (#8376)
PATHS ${FLTK_INCLUDE_SEARCH_PATH})
#
# Try to find FLTK library
- IF(UNIX)
- IF(FLTK_CONFIG_SCRIPT)
- EXEC_PROGRAM(${FLTK_CONFIG_SCRIPT} ARGS --libs OUTPUT_VARIABLE _FLTK_POSSIBLE_LIBS)
- IF(_FLTK_POSSIBLE_LIBS)
- GET_FILENAME_COMPONENT(_FLTK_POSSIBLE_LIBRARY_DIR ${_FLTK_POSSIBLE_LIBS} PATH)
- ENDIF()
- ENDIF()
- ENDIF()
-
- SET(FLTK_LIBRARY_SEARCH_PATH ${FLTK_LIBRARY_SEARCH_PATH}
+ if(UNIX)
+ if(FLTK_CONFIG_SCRIPT)
+ exec_program(${FLTK_CONFIG_SCRIPT} ARGS --libs OUTPUT_VARIABLE _FLTK_POSSIBLE_LIBS)
+ if(_FLTK_POSSIBLE_LIBS)
+ get_filename_component(_FLTK_POSSIBLE_LIBRARY_DIR ${_FLTK_POSSIBLE_LIBS} PATH)
+ endif()
+ endif()
+ endif()
+
+ set(FLTK_LIBRARY_SEARCH_PATH ${FLTK_LIBRARY_SEARCH_PATH}
/usr/local/fltk/lib
/usr/X11R6/lib
${FLTK_INCLUDE_DIR}/lib
${_FLTK_POSSIBLE_LIBRARY_DIR}
)
- FIND_LIBRARY(FLTK_BASE_LIBRARY NAMES fltk fltkd
+ find_library(FLTK_BASE_LIBRARY NAMES fltk fltkd
PATHS ${FLTK_LIBRARY_SEARCH_PATH})
- FIND_LIBRARY(FLTK_GL_LIBRARY NAMES fltkgl fltkgld fltk_gl
+ find_library(FLTK_GL_LIBRARY NAMES fltkgl fltkgld fltk_gl
PATHS ${FLTK_LIBRARY_SEARCH_PATH})
- FIND_LIBRARY(FLTK_FORMS_LIBRARY NAMES fltkforms fltkformsd fltk_forms
+ find_library(FLTK_FORMS_LIBRARY NAMES fltkforms fltkformsd fltk_forms
PATHS ${FLTK_LIBRARY_SEARCH_PATH})
- FIND_LIBRARY(FLTK_IMAGES_LIBRARY NAMES fltkimages fltkimagesd fltk_images
+ find_library(FLTK_IMAGES_LIBRARY NAMES fltkimages fltkimagesd fltk_images
PATHS ${FLTK_LIBRARY_SEARCH_PATH})
# Find the extra libraries needed for the fltk_images library.
- IF(UNIX)
- IF(FLTK_CONFIG_SCRIPT)
- EXEC_PROGRAM(${FLTK_CONFIG_SCRIPT} ARGS --use-images --ldflags
+ if(UNIX)
+ if(FLTK_CONFIG_SCRIPT)
+ exec_program(${FLTK_CONFIG_SCRIPT} ARGS --use-images --ldflags
OUTPUT_VARIABLE FLTK_IMAGES_LDFLAGS)
- SET(FLTK_LIBS_EXTRACT_REGEX ".*-lfltk_images (.*) -lfltk.*")
- IF("${FLTK_IMAGES_LDFLAGS}" MATCHES "${FLTK_LIBS_EXTRACT_REGEX}")
- STRING(REGEX REPLACE "${FLTK_LIBS_EXTRACT_REGEX}" "\\1"
+ set(FLTK_LIBS_EXTRACT_REGEX ".*-lfltk_images (.*) -lfltk.*")
+ if("${FLTK_IMAGES_LDFLAGS}" MATCHES "${FLTK_LIBS_EXTRACT_REGEX}")
+ string(REGEX REPLACE "${FLTK_LIBS_EXTRACT_REGEX}" "\\1"
FLTK_IMAGES_LIBS "${FLTK_IMAGES_LDFLAGS}")
- STRING(REGEX REPLACE " +" ";" FLTK_IMAGES_LIBS "${FLTK_IMAGES_LIBS}")
+ string(REGEX REPLACE " +" ";" FLTK_IMAGES_LIBS "${FLTK_IMAGES_LIBS}")
# The EXEC_PROGRAM will not be inherited into subdirectories from
# the file that originally included this module. Save the answer.
- SET(FLTK_IMAGES_LIBS "${FLTK_IMAGES_LIBS}" CACHE INTERNAL
+ set(FLTK_IMAGES_LIBS "${FLTK_IMAGES_LIBS}" CACHE INTERNAL
"Extra libraries for fltk_images library.")
- ENDIF("${FLTK_IMAGES_LDFLAGS}" MATCHES "${FLTK_LIBS_EXTRACT_REGEX}")
- ENDIF(FLTK_CONFIG_SCRIPT)
- ENDIF(UNIX)
+ endif("${FLTK_IMAGES_LDFLAGS}" MATCHES "${FLTK_LIBS_EXTRACT_REGEX}")
+ endif(FLTK_CONFIG_SCRIPT)
+ endif(UNIX)
- ENDIF(FLTK_BUILT_WITH_CMAKE)
+ endif(FLTK_BUILT_WITH_CMAKE)
# Append all of the required libraries together (by default, everything)
- SET(FLTK_LIBRARIES)
- IF(NOT FLTK_SKIP_IMAGES)
- LIST(APPEND FLTK_LIBRARIES ${FLTK_IMAGES_LIBRARY})
- ENDIF()
- IF(NOT FLTK_SKIP_FORMS)
- LIST(APPEND FLTK_LIBRARIES ${FLTK_FORMS_LIBRARY})
- ENDIF()
- IF(NOT FLTK_SKIP_OPENGL)
- LIST(APPEND FLTK_LIBRARIES ${FLTK_GL_LIBRARY} ${OPENGL_gl_LIBRARY})
- LIST(APPEND FLTK_INCLUDE_DIR ${OPENGL_INCLUDE_DIR})
- LIST(REMOVE_DUPLICATES FLTK_INCLUDE_DIR)
- ENDIF()
- LIST(APPEND FLTK_LIBRARIES ${FLTK_BASE_LIBRARY})
-
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-IF(FLTK_SKIP_FLUID)
+ set(FLTK_LIBRARIES)
+ if(NOT FLTK_SKIP_IMAGES)
+ list(APPEND FLTK_LIBRARIES ${FLTK_IMAGES_LIBRARY})
+ endif()
+ if(NOT FLTK_SKIP_FORMS)
+ list(APPEND FLTK_LIBRARIES ${FLTK_FORMS_LIBRARY})
+ endif()
+ if(NOT FLTK_SKIP_OPENGL)
+ list(APPEND FLTK_LIBRARIES ${FLTK_GL_LIBRARY} ${OPENGL_gl_LIBRARY})
+ list(APPEND FLTK_INCLUDE_DIR ${OPENGL_INCLUDE_DIR})
+ list(REMOVE_DUPLICATES FLTK_INCLUDE_DIR)
+ endif()
+ list(APPEND FLTK_LIBRARIES ${FLTK_BASE_LIBRARY})
+
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+if(FLTK_SKIP_FLUID)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FLTK DEFAULT_MSG FLTK_LIBRARIES FLTK_INCLUDE_DIR)
-ELSE()
+else()
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FLTK DEFAULT_MSG FLTK_LIBRARIES FLTK_INCLUDE_DIR FLTK_FLUID_EXECUTABLE)
-ENDIF()
+endif()
-IF(FLTK_FOUND)
- IF(APPLE)
- SET(FLTK_LIBRARIES ${FLTK_PLATFORM_DEPENDENT_LIBS} ${FLTK_LIBRARIES})
- ELSE(APPLE)
- SET(FLTK_LIBRARIES ${FLTK_LIBRARIES} ${FLTK_PLATFORM_DEPENDENT_LIBS})
- ENDIF(APPLE)
+if(FLTK_FOUND)
+ if(APPLE)
+ set(FLTK_LIBRARIES ${FLTK_PLATFORM_DEPENDENT_LIBS} ${FLTK_LIBRARIES})
+ else(APPLE)
+ set(FLTK_LIBRARIES ${FLTK_LIBRARIES} ${FLTK_PLATFORM_DEPENDENT_LIBS})
+ endif(APPLE)
# The following deprecated settings are for compatibility with CMake 1.4
- SET (HAS_FLTK ${FLTK_FOUND})
- SET (FLTK_INCLUDE_PATH ${FLTK_INCLUDE_DIR})
- SET (FLTK_FLUID_EXE ${FLTK_FLUID_EXECUTABLE})
- SET (FLTK_LIBRARY ${FLTK_LIBRARIES})
-ENDIF(FLTK_FOUND)
+ set (HAS_FLTK ${FLTK_FOUND})
+ set (FLTK_INCLUDE_PATH ${FLTK_INCLUDE_DIR})
+ set (FLTK_FLUID_EXE ${FLTK_FLUID_EXECUTABLE})
+ set (FLTK_LIBRARY ${FLTK_LIBRARIES})
+endif(FLTK_FOUND)
diff --git a/Modules/FindFLTK2.cmake b/Modules/FindFLTK2.cmake
index c6a978807c..059ecdbcfa 100644
--- a/Modules/FindFLTK2.cmake
+++ b/Modules/FindFLTK2.cmake
@@ -23,55 +23,55 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-SET (FLTK2_DIR $ENV{FLTK2_DIR} )
+set (FLTK2_DIR $ENV{FLTK2_DIR} )
# Platform dependent libraries required by FLTK2
-IF(WIN32)
- IF(NOT CYGWIN)
- IF(BORLAND)
- SET( FLTK2_PLATFORM_DEPENDENT_LIBS import32 )
- ELSE(BORLAND)
- SET( FLTK2_PLATFORM_DEPENDENT_LIBS wsock32 comctl32 )
- ENDIF(BORLAND)
- ENDIF(NOT CYGWIN)
-ENDIF(WIN32)
-
-IF(UNIX)
- INCLUDE(${CMAKE_ROOT}/Modules/FindX11.cmake)
- SET( FLTK2_PLATFORM_DEPENDENT_LIBS ${X11_LIBRARIES} -lm)
-ENDIF(UNIX)
-
-IF(APPLE)
- SET( FLTK2_PLATFORM_DEPENDENT_LIBS "-framework Carbon -framework Cocoa -framework ApplicationServices -lz")
-ENDIF(APPLE)
+if(WIN32)
+ if(NOT CYGWIN)
+ if(BORLAND)
+ set( FLTK2_PLATFORM_DEPENDENT_LIBS import32 )
+ else(BORLAND)
+ set( FLTK2_PLATFORM_DEPENDENT_LIBS wsock32 comctl32 )
+ endif(BORLAND)
+ endif(NOT CYGWIN)
+endif(WIN32)
+
+if(UNIX)
+ include(${CMAKE_ROOT}/Modules/FindX11.cmake)
+ set( FLTK2_PLATFORM_DEPENDENT_LIBS ${X11_LIBRARIES} -lm)
+endif(UNIX)
+
+if(APPLE)
+ set( FLTK2_PLATFORM_DEPENDENT_LIBS "-framework Carbon -framework Cocoa -framework ApplicationServices -lz")
+endif(APPLE)
# If FLTK2_INCLUDE_DIR is already defined we assigne its value to FLTK2_DIR
-IF(FLTK2_INCLUDE_DIR)
- SET(FLTK2_DIR ${FLTK2_INCLUDE_DIR})
-ELSE(FLTK2_INCLUDE_DIR)
- SET(FLTK2_INCLUDE_DIR ${FLTK2_DIR})
-ENDIF(FLTK2_INCLUDE_DIR)
+if(FLTK2_INCLUDE_DIR)
+ set(FLTK2_DIR ${FLTK2_INCLUDE_DIR})
+else(FLTK2_INCLUDE_DIR)
+ set(FLTK2_INCLUDE_DIR ${FLTK2_DIR})
+endif(FLTK2_INCLUDE_DIR)
# If FLTK2 has been built using CMake we try to find everything directly
-SET(FLTK2_DIR_STRING "directory containing FLTK2Config.cmake. This is either the root of the build tree, or PREFIX/lib/fltk for an installation.")
+set(FLTK2_DIR_STRING "directory containing FLTK2Config.cmake. This is either the root of the build tree, or PREFIX/lib/fltk for an installation.")
# Search only if the location is not already known.
-IF(NOT FLTK2_DIR)
+if(NOT FLTK2_DIR)
# Get the system search path as a list.
- FILE(TO_CMAKE_PATH "$ENV{PATH}" FLTK2_DIR_SEARCH2)
+ file(TO_CMAKE_PATH "$ENV{PATH}" FLTK2_DIR_SEARCH2)
# Construct a set of paths relative to the system search path.
- SET(FLTK2_DIR_SEARCH "")
- FOREACH(dir ${FLTK2_DIR_SEARCH2})
- SET(FLTK2_DIR_SEARCH ${FLTK2_DIR_SEARCH} "${dir}/../lib/fltk")
- ENDFOREACH(dir)
- STRING(REPLACE "//" "/" FLTK2_DIR_SEARCH "${FLTK2_DIR_SEARCH}")
+ set(FLTK2_DIR_SEARCH "")
+ foreach(dir ${FLTK2_DIR_SEARCH2})
+ set(FLTK2_DIR_SEARCH ${FLTK2_DIR_SEARCH} "${dir}/../lib/fltk")
+ endforeach(dir)
+ string(REPLACE "//" "/" FLTK2_DIR_SEARCH "${FLTK2_DIR_SEARCH}")
#
# Look for an installation or build tree.
#
- FIND_PATH(FLTK2_DIR FLTK2Config.cmake
+ find_path(FLTK2_DIR FLTK2Config.cmake
# Look for an environment variable FLTK2_DIR.
$ENV{FLTK2_DIR}
@@ -101,167 +101,167 @@ IF(NOT FLTK2_DIR)
DOC "The ${FLTK2_DIR_STRING}"
)
- IF(NOT FLTK2_DIR)
- FIND_PATH(FLTK2_DIR fltk/run.h ${FLTK2_INCLUDE_SEARCH_PATH})
- ENDIF(NOT FLTK2_DIR)
+ if(NOT FLTK2_DIR)
+ find_path(FLTK2_DIR fltk/run.h ${FLTK2_INCLUDE_SEARCH_PATH})
+ endif(NOT FLTK2_DIR)
-ENDIF(NOT FLTK2_DIR)
+endif(NOT FLTK2_DIR)
# If FLTK2 was found, load the configuration file to get the rest of the
# settings.
-IF(FLTK2_DIR)
+if(FLTK2_DIR)
# Check if FLTK2 was built using CMake
- IF(EXISTS ${FLTK2_DIR}/FLTK2Config.cmake)
- SET(FLTK2_BUILT_WITH_CMAKE 1)
- ENDIF(EXISTS ${FLTK2_DIR}/FLTK2Config.cmake)
+ if(EXISTS ${FLTK2_DIR}/FLTK2Config.cmake)
+ set(FLTK2_BUILT_WITH_CMAKE 1)
+ endif(EXISTS ${FLTK2_DIR}/FLTK2Config.cmake)
- IF(FLTK2_BUILT_WITH_CMAKE)
- SET(FLTK2_FOUND 1)
- INCLUDE(${FLTK2_DIR}/FLTK2Config.cmake)
+ if(FLTK2_BUILT_WITH_CMAKE)
+ set(FLTK2_FOUND 1)
+ include(${FLTK2_DIR}/FLTK2Config.cmake)
# Fluid
- IF(FLUID_COMMAND)
- SET(FLTK2_FLUID_EXECUTABLE ${FLUID_COMMAND} CACHE FILEPATH "Fluid executable")
- ELSE(FLUID_COMMAND)
- FIND_PROGRAM(FLTK2_FLUID_EXECUTABLE fluid2 PATHS
+ if(FLUID_COMMAND)
+ set(FLTK2_FLUID_EXECUTABLE ${FLUID_COMMAND} CACHE FILEPATH "Fluid executable")
+ else(FLUID_COMMAND)
+ find_program(FLTK2_FLUID_EXECUTABLE fluid2 PATHS
${FLTK2_EXECUTABLE_DIRS}
${FLTK2_EXECUTABLE_DIRS}/RelWithDebInfo
${FLTK2_EXECUTABLE_DIRS}/Debug
${FLTK2_EXECUTABLE_DIRS}/Release
NO_SYSTEM_PATH)
- ENDIF(FLUID_COMMAND)
+ endif(FLUID_COMMAND)
- MARK_AS_ADVANCED(FLTK2_FLUID_EXECUTABLE)
- SET( FLTK_FLUID_EXECUTABLE ${FLTK2_FLUID_EXECUTABLE} )
+ mark_as_advanced(FLTK2_FLUID_EXECUTABLE)
+ set( FLTK_FLUID_EXECUTABLE ${FLTK2_FLUID_EXECUTABLE} )
- SET(FLTK2_INCLUDE_DIR ${FLTK2_DIR})
- LINK_DIRECTORIES(${FLTK2_LIBRARY_DIRS})
+ set(FLTK2_INCLUDE_DIR ${FLTK2_DIR})
+ link_directories(${FLTK2_LIBRARY_DIRS})
- SET(FLTK2_BASE_LIBRARY fltk2)
- SET(FLTK2_GL_LIBRARY fltk2_gl)
- SET(FLTK2_IMAGES_LIBRARY fltk2_images)
+ set(FLTK2_BASE_LIBRARY fltk2)
+ set(FLTK2_GL_LIBRARY fltk2_gl)
+ set(FLTK2_IMAGES_LIBRARY fltk2_images)
# Add the extra libraries
- LOAD_CACHE(${FLTK2_DIR}
+ load_cache(${FLTK2_DIR}
READ_WITH_PREFIX
FL FLTK2_USE_SYSTEM_JPEG
FL FLTK2_USE_SYSTEM_PNG
FL FLTK2_USE_SYSTEM_ZLIB
)
- SET(FLTK2_IMAGES_LIBS "")
- IF(FLFLTK2_USE_SYSTEM_JPEG)
- SET(FLTK2_IMAGES_LIBS ${FLTK2_IMAGES_LIBS} fltk2_jpeg)
- ENDIF(FLFLTK2_USE_SYSTEM_JPEG)
- IF(FLFLTK2_USE_SYSTEM_PNG)
- SET(FLTK2_IMAGES_LIBS ${FLTK2_IMAGES_LIBS} fltk2_png)
- ENDIF(FLFLTK2_USE_SYSTEM_PNG)
- IF(FLFLTK2_USE_SYSTEM_ZLIB)
- SET(FLTK2_IMAGES_LIBS ${FLTK2_IMAGES_LIBS} fltk2_zlib)
- ENDIF(FLFLTK2_USE_SYSTEM_ZLIB)
- SET(FLTK2_IMAGES_LIBS "${FLTK2_IMAGES_LIBS}" CACHE INTERNAL
+ set(FLTK2_IMAGES_LIBS "")
+ if(FLFLTK2_USE_SYSTEM_JPEG)
+ set(FLTK2_IMAGES_LIBS ${FLTK2_IMAGES_LIBS} fltk2_jpeg)
+ endif(FLFLTK2_USE_SYSTEM_JPEG)
+ if(FLFLTK2_USE_SYSTEM_PNG)
+ set(FLTK2_IMAGES_LIBS ${FLTK2_IMAGES_LIBS} fltk2_png)
+ endif(FLFLTK2_USE_SYSTEM_PNG)
+ if(FLFLTK2_USE_SYSTEM_ZLIB)
+ set(FLTK2_IMAGES_LIBS ${FLTK2_IMAGES_LIBS} fltk2_zlib)
+ endif(FLFLTK2_USE_SYSTEM_ZLIB)
+ set(FLTK2_IMAGES_LIBS "${FLTK2_IMAGES_LIBS}" CACHE INTERNAL
"Extra libraries for fltk2_images library.")
- ELSE(FLTK2_BUILT_WITH_CMAKE)
+ else(FLTK2_BUILT_WITH_CMAKE)
# if FLTK2 was not built using CMake
# Find fluid executable.
- FIND_PROGRAM(FLTK2_FLUID_EXECUTABLE fluid2 ${FLTK2_INCLUDE_DIR}/fluid)
+ find_program(FLTK2_FLUID_EXECUTABLE fluid2 ${FLTK2_INCLUDE_DIR}/fluid)
# Use location of fluid to help find everything else.
- SET(FLTK2_INCLUDE_SEARCH_PATH "")
- SET(FLTK2_LIBRARY_SEARCH_PATH "")
- IF(FLTK2_FLUID_EXECUTABLE)
- SET( FLTK_FLUID_EXECUTABLE ${FLTK2_FLUID_EXECUTABLE} )
- GET_FILENAME_COMPONENT(FLTK2_BIN_DIR "${FLTK2_FLUID_EXECUTABLE}" PATH)
- SET(FLTK2_INCLUDE_SEARCH_PATH ${FLTK2_INCLUDE_SEARCH_PATH}
+ set(FLTK2_INCLUDE_SEARCH_PATH "")
+ set(FLTK2_LIBRARY_SEARCH_PATH "")
+ if(FLTK2_FLUID_EXECUTABLE)
+ set( FLTK_FLUID_EXECUTABLE ${FLTK2_FLUID_EXECUTABLE} )
+ get_filename_component(FLTK2_BIN_DIR "${FLTK2_FLUID_EXECUTABLE}" PATH)
+ set(FLTK2_INCLUDE_SEARCH_PATH ${FLTK2_INCLUDE_SEARCH_PATH}
${FLTK2_BIN_DIR}/../include ${FLTK2_BIN_DIR}/..)
- SET(FLTK2_LIBRARY_SEARCH_PATH ${FLTK2_LIBRARY_SEARCH_PATH}
+ set(FLTK2_LIBRARY_SEARCH_PATH ${FLTK2_LIBRARY_SEARCH_PATH}
${FLTK2_BIN_DIR}/../lib)
- SET(FLTK2_WRAP_UI 1)
- ENDIF(FLTK2_FLUID_EXECUTABLE)
+ set(FLTK2_WRAP_UI 1)
+ endif(FLTK2_FLUID_EXECUTABLE)
- SET(FLTK2_INCLUDE_SEARCH_PATH ${FLTK2_INCLUDE_SEARCH_PATH}
+ set(FLTK2_INCLUDE_SEARCH_PATH ${FLTK2_INCLUDE_SEARCH_PATH}
/usr/local/fltk2
/usr/X11R6/include
)
- FIND_PATH(FLTK2_INCLUDE_DIR fltk/run.h ${FLTK2_INCLUDE_SEARCH_PATH})
+ find_path(FLTK2_INCLUDE_DIR fltk/run.h ${FLTK2_INCLUDE_SEARCH_PATH})
- SET(FLTK2_LIBRARY_SEARCH_PATH ${FLTK2_LIBRARY_SEARCH_PATH}
+ set(FLTK2_LIBRARY_SEARCH_PATH ${FLTK2_LIBRARY_SEARCH_PATH}
/usr/local/fltk2/lib
/usr/X11R6/lib
${FLTK2_INCLUDE_DIR}/lib
)
- FIND_LIBRARY(FLTK2_BASE_LIBRARY NAMES fltk2
+ find_library(FLTK2_BASE_LIBRARY NAMES fltk2
PATHS ${FLTK2_LIBRARY_SEARCH_PATH})
- FIND_LIBRARY(FLTK2_GL_LIBRARY NAMES fltk2_gl
+ find_library(FLTK2_GL_LIBRARY NAMES fltk2_gl
PATHS ${FLTK2_LIBRARY_SEARCH_PATH})
- FIND_LIBRARY(FLTK2_IMAGES_LIBRARY NAMES fltk2_images
+ find_library(FLTK2_IMAGES_LIBRARY NAMES fltk2_images
PATHS ${FLTK2_LIBRARY_SEARCH_PATH})
# Find the extra libraries needed for the fltk_images library.
- IF(UNIX)
- FIND_PROGRAM(FLTK2_CONFIG_SCRIPT fltk2-config PATHS ${FLTK2_BIN_DIR})
- IF(FLTK2_CONFIG_SCRIPT)
- EXEC_PROGRAM(${FLTK2_CONFIG_SCRIPT} ARGS --use-images --ldflags
+ if(UNIX)
+ find_program(FLTK2_CONFIG_SCRIPT fltk2-config PATHS ${FLTK2_BIN_DIR})
+ if(FLTK2_CONFIG_SCRIPT)
+ exec_program(${FLTK2_CONFIG_SCRIPT} ARGS --use-images --ldflags
OUTPUT_VARIABLE FLTK2_IMAGES_LDFLAGS)
- SET(FLTK2_LIBS_EXTRACT_REGEX ".*-lfltk2_images (.*) -lfltk2.*")
- IF("${FLTK2_IMAGES_LDFLAGS}" MATCHES "${FLTK2_LIBS_EXTRACT_REGEX}")
- STRING(REGEX REPLACE "${FLTK2_LIBS_EXTRACT_REGEX}" "\\1"
+ set(FLTK2_LIBS_EXTRACT_REGEX ".*-lfltk2_images (.*) -lfltk2.*")
+ if("${FLTK2_IMAGES_LDFLAGS}" MATCHES "${FLTK2_LIBS_EXTRACT_REGEX}")
+ string(REGEX REPLACE "${FLTK2_LIBS_EXTRACT_REGEX}" "\\1"
FLTK2_IMAGES_LIBS "${FLTK2_IMAGES_LDFLAGS}")
- STRING(REGEX REPLACE " +" ";" FLTK2_IMAGES_LIBS "${FLTK2_IMAGES_LIBS}")
+ string(REGEX REPLACE " +" ";" FLTK2_IMAGES_LIBS "${FLTK2_IMAGES_LIBS}")
# The EXEC_PROGRAM will not be inherited into subdirectories from
# the file that originally included this module. Save the answer.
- SET(FLTK2_IMAGES_LIBS "${FLTK2_IMAGES_LIBS}" CACHE INTERNAL
+ set(FLTK2_IMAGES_LIBS "${FLTK2_IMAGES_LIBS}" CACHE INTERNAL
"Extra libraries for fltk_images library.")
- ENDIF("${FLTK2_IMAGES_LDFLAGS}" MATCHES "${FLTK2_LIBS_EXTRACT_REGEX}")
- ENDIF(FLTK2_CONFIG_SCRIPT)
- ENDIF(UNIX)
+ endif("${FLTK2_IMAGES_LDFLAGS}" MATCHES "${FLTK2_LIBS_EXTRACT_REGEX}")
+ endif(FLTK2_CONFIG_SCRIPT)
+ endif(UNIX)
- ENDIF(FLTK2_BUILT_WITH_CMAKE)
-ENDIF(FLTK2_DIR)
+ endif(FLTK2_BUILT_WITH_CMAKE)
+endif(FLTK2_DIR)
-SET(FLTK2_FOUND 1)
-FOREACH(var FLTK2_FLUID_EXECUTABLE FLTK2_INCLUDE_DIR
+set(FLTK2_FOUND 1)
+foreach(var FLTK2_FLUID_EXECUTABLE FLTK2_INCLUDE_DIR
FLTK2_BASE_LIBRARY FLTK2_GL_LIBRARY
FLTK2_IMAGES_LIBRARY)
- IF(NOT ${var})
- MESSAGE( STATUS "${var} not found" )
- SET(FLTK2_FOUND 0)
- ENDIF(NOT ${var})
-ENDFOREACH(var)
+ if(NOT ${var})
+ message( STATUS "${var} not found" )
+ set(FLTK2_FOUND 0)
+ endif(NOT ${var})
+endforeach(var)
-IF(FLTK2_FOUND)
- SET(FLTK2_LIBRARIES ${FLTK2_IMAGES_LIBRARY} ${FLTK2_IMAGES_LIBS} ${FLTK2_BASE_LIBRARY} ${FLTK2_GL_LIBRARY} )
- IF(APPLE)
- SET(FLTK2_LIBRARIES ${FLTK2_PLATFORM_DEPENDENT_LIBS} ${FLTK2_LIBRARIES})
- ELSE(APPLE)
- SET(FLTK2_LIBRARIES ${FLTK2_LIBRARIES} ${FLTK2_PLATFORM_DEPENDENT_LIBS})
- ENDIF(APPLE)
+if(FLTK2_FOUND)
+ set(FLTK2_LIBRARIES ${FLTK2_IMAGES_LIBRARY} ${FLTK2_IMAGES_LIBS} ${FLTK2_BASE_LIBRARY} ${FLTK2_GL_LIBRARY} )
+ if(APPLE)
+ set(FLTK2_LIBRARIES ${FLTK2_PLATFORM_DEPENDENT_LIBS} ${FLTK2_LIBRARIES})
+ else(APPLE)
+ set(FLTK2_LIBRARIES ${FLTK2_LIBRARIES} ${FLTK2_PLATFORM_DEPENDENT_LIBS})
+ endif(APPLE)
# The following deprecated settings are for compatibility with CMake 1.4
- SET (HAS_FLTK2 ${FLTK2_FOUND})
- SET (FLTK2_INCLUDE_PATH ${FLTK2_INCLUDE_DIR})
- SET (FLTK2_FLUID_EXE ${FLTK2_FLUID_EXECUTABLE})
- SET (FLTK2_LIBRARY ${FLTK2_LIBRARIES})
-ELSE(FLTK2_FOUND)
+ set (HAS_FLTK2 ${FLTK2_FOUND})
+ set (FLTK2_INCLUDE_PATH ${FLTK2_INCLUDE_DIR})
+ set (FLTK2_FLUID_EXE ${FLTK2_FLUID_EXECUTABLE})
+ set (FLTK2_LIBRARY ${FLTK2_LIBRARIES})
+else(FLTK2_FOUND)
# make FIND_PACKAGE friendly
- IF(NOT FLTK2_FIND_QUIETLY)
- IF(FLTK2_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR
+ if(NOT FLTK2_FIND_QUIETLY)
+ if(FLTK2_FIND_REQUIRED)
+ message(FATAL_ERROR
"FLTK2 required, please specify its location with FLTK2_DIR.")
- ELSE(FLTK2_FIND_REQUIRED)
- MESSAGE(STATUS "FLTK2 was not found.")
- ENDIF(FLTK2_FIND_REQUIRED)
- ENDIF(NOT FLTK2_FIND_QUIETLY)
-ENDIF(FLTK2_FOUND)
+ else(FLTK2_FIND_REQUIRED)
+ message(STATUS "FLTK2 was not found.")
+ endif(FLTK2_FIND_REQUIRED)
+ endif(NOT FLTK2_FIND_QUIETLY)
+endif(FLTK2_FOUND)
diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake
index e6f670256d..d89683371a 100644
--- a/Modules/FindFreetype.cmake
+++ b/Modules/FindFreetype.cmake
@@ -38,11 +38,11 @@
# Then from there, they need to set a bunch of #define's
# so you can do something like:
# #include FT_FREETYPE_H
-# Unfortunately, using CMake's mechanisms like INCLUDE_DIRECTORIES()
+# Unfortunately, using CMake's mechanisms like include_directories()
# 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
@@ -51,7 +51,7 @@ FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
/usr/freeware/include
)
-FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
+find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
HINTS
$ENV{FREETYPE_DIR}/include/freetype2
PATHS
@@ -61,7 +61,7 @@ FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
PATH_SUFFIXES freetype2
)
-FIND_LIBRARY(FREETYPE_LIBRARY
+find_library(FREETYPE_LIBRARY
NAMES freetype libfreetype freetype219
HINTS
$ENV{FREETYPE_DIR}
@@ -73,38 +73,38 @@ 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}")
-ENDIF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
-SET(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}")
+if(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
+ set(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}")
+endif(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
+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(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
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}")
- STRING(REGEX REPLACE "^#[\t ]*define[\t ]+FREETYPE_${VPART}[\t ]+([0-9]+)$" "\\1"
+ unset(FREETYPE_VERSION_STRING)
+ foreach(VPART MAJOR MINOR PATCH)
+ foreach(VLINE ${freetype_version_str})
+ if(VLINE MATCHES "^#[\t ]*define[\t ]+FREETYPE_${VPART}")
+ string(REGEX REPLACE "^#[\t ]*define[\t ]+FREETYPE_${VPART}[\t ]+([0-9]+)$" "\\1"
FREETYPE_VERSION_PART "${VLINE}")
- IF(FREETYPE_VERSION_STRING)
- SET(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_STRING}.${FREETYPE_VERSION_PART}")
- ELSE(FREETYPE_VERSION_STRING)
- SET(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_PART}")
- ENDIF(FREETYPE_VERSION_STRING)
- UNSET(FREETYPE_VERSION_PART)
- ENDIF()
- ENDFOREACH(VLINE)
- ENDFOREACH(VPART)
-ENDIF(FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
+ if(FREETYPE_VERSION_STRING)
+ set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_STRING}.${FREETYPE_VERSION_PART}")
+ else(FREETYPE_VERSION_STRING)
+ set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_PART}")
+ endif(FREETYPE_VERSION_STRING)
+ unset(FREETYPE_VERSION_PART)
+ endif()
+ endforeach(VLINE)
+ endforeach(VPART)
+endif(FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
# 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)
+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)
+mark_as_advanced(FREETYPE_LIBRARY FREETYPE_INCLUDE_DIR_freetype2 FREETYPE_INCLUDE_DIR_ft2build)
diff --git a/Modules/FindGCCXML.cmake b/Modules/FindGCCXML.cmake
index 261a5d180e..05f08a6392 100644
--- a/Modules/FindGCCXML.cmake
+++ b/Modules/FindGCCXML.cmake
@@ -16,7 +16,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PROGRAM(GCCXML
+find_program(GCCXML
NAMES gccxml
../GCC_XML/gccxml
PATHS [HKEY_CURRENT_USER\\Software\\Kitware\\GCC_XML;loc]
@@ -24,4 +24,4 @@ FIND_PROGRAM(GCCXML
"C:/Program Files/GCC_XML"
)
-MARK_AS_ADVANCED(GCCXML)
+mark_as_advanced(GCCXML)
diff --git a/Modules/FindGDAL.cmake b/Modules/FindGDAL.cmake
index 3b42a33d41..1e09b8200d 100644
--- a/Modules/FindGDAL.cmake
+++ b/Modules/FindGDAL.cmake
@@ -40,7 +40,7 @@
#
#include "gdal.h"
-FIND_PATH(GDAL_INCLUDE_DIR gdal.h
+find_path(GDAL_INCLUDE_DIR gdal.h
HINTS
$ENV{GDAL_DIR}
$ENV{GDAL_ROOT}
@@ -57,12 +57,12 @@ FIND_PATH(GDAL_INCLUDE_DIR gdal.h
/opt
)
-IF(UNIX)
+if(UNIX)
# Use gdal-config to obtain the library version (this should hopefully
# allow us to -lgdal1.x.y where x.y are correct version)
# For some reason, libgdal development packages do not contain
# libgdal.so...
- FIND_PROGRAM(GDAL_CONFIG gdal-config
+ find_program(GDAL_CONFIG gdal-config
HINTS
$ENV{GDAL_DIR}
$ENV{GDAL_ROOT}
@@ -85,7 +85,7 @@ IF(UNIX)
endif()
endif()
-FIND_LIBRARY(GDAL_LIBRARY
+find_library(GDAL_LIBRARY
NAMES ${_gdal_lib} gdal gdal_i gdal1.5.0 gdal1.4.0 gdal1.3.2 GDAL
HINTS
$ENV{GDAL_DIR}
diff --git a/Modules/FindGIF.cmake b/Modules/FindGIF.cmake
index 41e909805b..ff1d39667c 100644
--- a/Modules/FindGIF.cmake
+++ b/Modules/FindGIF.cmake
@@ -5,7 +5,7 @@
# GIF_VERSION, reports either version 4 or 3 (for everything before version 4)
#
# The minimum required version of giflib can be specified using the
-# standard syntax, e.g. FIND_PACKAGE(GIF 4)
+# standard syntax, e.g. find_package(GIF 4)
#
# $GIF_DIR is an environment variable that would
# correspond to the ./configure --prefix=$GIF_DIR
@@ -26,7 +26,7 @@
# Created by Eric Wing.
# Modifications by Alexander Neundorf
-FIND_PATH(GIF_INCLUDE_DIR gif_lib.h
+find_path(GIF_INCLUDE_DIR gif_lib.h
HINTS
$ENV{GIF_DIR}
PATH_SUFFIXES include
@@ -36,9 +36,9 @@ FIND_PATH(GIF_INCLUDE_DIR gif_lib.h
)
# the gif library can have many names :-/
-SET(POTENTIAL_GIF_LIBS gif libgif ungif libungif giflib giflib4)
+set(POTENTIAL_GIF_LIBS gif libgif ungif libungif giflib giflib4)
-FIND_LIBRARY(GIF_LIBRARY
+find_library(GIF_LIBRARY
NAMES ${POTENTIAL_GIF_LIBS}
HINTS
$ENV{GIF_DIR}
@@ -49,7 +49,7 @@ FIND_LIBRARY(GIF_LIBRARY
)
# see readme.txt
-SET(GIF_LIBRARIES ${GIF_LIBRARY})
+set(GIF_LIBRARIES ${GIF_LIBRARY})
# Very basic version detection.
# The GIF_LIB_VERSION string in gif_lib.h seems to be unreliable, since it seems
@@ -57,24 +57,24 @@ SET(GIF_LIBRARIES ${GIF_LIBRARY})
# In version 4 the member UserData was added to GifFileType, so we check for this
# one.
# http://giflib.sourcearchive.com/documentation/4.1.4/files.html
-IF(GIF_INCLUDE_DIR)
- INCLUDE(CMakePushCheckState)
- INCLUDE(CheckStructHasMember)
+if(GIF_INCLUDE_DIR)
+ include(CMakePushCheckState)
+ include(CheckStructHasMember)
CMAKE_PUSH_CHECK_STATE()
- SET(GIF_VERSION 3)
- SET(CMAKE_REQUIRED_INCLUDES "${GIF_INCLUDE_DIR}")
+ set(GIF_VERSION 3)
+ set(CMAKE_REQUIRED_INCLUDES "${GIF_INCLUDE_DIR}")
CHECK_STRUCT_HAS_MEMBER(GifFileType UserData gif_lib.h GIF_GifFileType_UserData )
- IF(GIF_GifFileType_UserData)
- SET(GIF_VERSION 4)
- ENDIF()
+ if(GIF_GifFileType_UserData)
+ set(GIF_VERSION 4)
+ endif()
CMAKE_POP_CHECK_STATE()
-ENDIF()
+endif()
# handle the QUIETLY and REQUIRED arguments and set GIF_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GIF REQUIRED_VARS GIF_LIBRARY GIF_INCLUDE_DIR
VERSION_VAR GIF_VERSION )
-MARK_AS_ADVANCED(GIF_INCLUDE_DIR GIF_LIBRARY)
+mark_as_advanced(GIF_INCLUDE_DIR GIF_LIBRARY)
diff --git a/Modules/FindGLU.cmake b/Modules/FindGLU.cmake
index 5198f11e1c..3db2ce4c64 100644
--- a/Modules/FindGLU.cmake
+++ b/Modules/FindGLU.cmake
@@ -16,13 +16,13 @@
# GLU library is now found by FindOpenGL.cmake
#
-MESSAGE(STATUS
+message(STATUS
"WARNING: you are using the obsolete 'GLU' package, please use 'OpenGL' instead")
-INCLUDE(FindOpenGL)
+include(FindOpenGL)
-IF (OPENGL_GLU_FOUND)
- SET (GLU_LIBRARY ${OPENGL_LIBRARIES})
- SET (GLU_INCLUDE_PATH ${OPENGL_INCLUDE_DIR})
-ENDIF (OPENGL_GLU_FOUND)
+if (OPENGL_GLU_FOUND)
+ set (GLU_LIBRARY ${OPENGL_LIBRARIES})
+ set (GLU_INCLUDE_PATH ${OPENGL_INCLUDE_DIR})
+endif (OPENGL_GLU_FOUND)
diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake
index cfa1375162..edff53cb91 100644
--- a/Modules/FindGLUT.cmake
+++ b/Modules/FindGLUT.cmake
@@ -20,27 +20,27 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-IF (WIN32)
- FIND_PATH( GLUT_INCLUDE_DIR NAMES GL/glut.h
+if (WIN32)
+ find_path( GLUT_INCLUDE_DIR NAMES GL/glut.h
PATHS ${GLUT_ROOT_PATH}/include )
- FIND_LIBRARY( GLUT_glut_LIBRARY NAMES glut glut32 freeglut
+ find_library( GLUT_glut_LIBRARY NAMES glut glut32 freeglut
PATHS
${OPENGL_LIBRARY_DIR}
${GLUT_ROOT_PATH}/Release
)
-ELSE (WIN32)
+else (WIN32)
- IF (APPLE)
+ if (APPLE)
# These values for Apple could probably do with improvement.
- FIND_PATH( GLUT_INCLUDE_DIR glut.h
+ find_path( GLUT_INCLUDE_DIR glut.h
/System/Library/Frameworks/GLUT.framework/Versions/A/Headers
${OPENGL_LIBRARY_DIR}
)
- SET(GLUT_glut_LIBRARY "-framework GLUT" CACHE STRING "GLUT library for OSX")
- SET(GLUT_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX")
- ELSE (APPLE)
+ set(GLUT_glut_LIBRARY "-framework GLUT" CACHE STRING "GLUT library for OSX")
+ set(GLUT_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX")
+ else (APPLE)
- FIND_PATH( GLUT_INCLUDE_DIR GL/glut.h
+ find_path( GLUT_INCLUDE_DIR GL/glut.h
/usr/include/GL
/usr/openwin/share/include
/usr/openwin/include
@@ -48,29 +48,29 @@ ELSE (WIN32)
/opt/graphics/OpenGL/contrib/libglut
)
- FIND_LIBRARY( GLUT_glut_LIBRARY glut
+ find_library( GLUT_glut_LIBRARY glut
/usr/openwin/lib
)
- FIND_LIBRARY( GLUT_Xi_LIBRARY Xi
+ find_library( GLUT_Xi_LIBRARY Xi
/usr/openwin/lib
)
- FIND_LIBRARY( GLUT_Xmu_LIBRARY Xmu
+ find_library( GLUT_Xmu_LIBRARY Xmu
/usr/openwin/lib
)
- ENDIF (APPLE)
+ endif (APPLE)
-ENDIF (WIN32)
+endif (WIN32)
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLUT REQUIRED_VARS GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-IF (GLUT_FOUND)
+if (GLUT_FOUND)
# Is -lXi and -lXmu required on all platforms that have it?
# If not, we need some way to figure out what platform we are on.
- SET( GLUT_LIBRARIES
+ set( GLUT_LIBRARIES
${GLUT_glut_LIBRARY}
${GLUT_Xmu_LIBRARY}
${GLUT_Xi_LIBRARY}
@@ -78,11 +78,11 @@ IF (GLUT_FOUND)
)
#The following deprecated settings are for backwards compatibility with CMake1.4
- SET (GLUT_LIBRARY ${GLUT_LIBRARIES})
- SET (GLUT_INCLUDE_PATH ${GLUT_INCLUDE_DIR})
-ENDIF(GLUT_FOUND)
+ set (GLUT_LIBRARY ${GLUT_LIBRARIES})
+ set (GLUT_INCLUDE_PATH ${GLUT_INCLUDE_DIR})
+endif(GLUT_FOUND)
-MARK_AS_ADVANCED(
+mark_as_advanced(
GLUT_INCLUDE_DIR
GLUT_glut_LIBRARY
GLUT_Xmu_LIBRARY
diff --git a/Modules/FindGTK.cmake b/Modules/FindGTK.cmake
index 3fa75a6403..780932e617 100644
--- a/Modules/FindGTK.cmake
+++ b/Modules/FindGTK.cmake
@@ -18,9 +18,9 @@
# License text for the above reference.)
# don't even bother under WIN32
-IF(UNIX)
+if(UNIX)
- FIND_PATH( GTK_gtk_INCLUDE_PATH NAMES gtk/gtk.h
+ find_path( GTK_gtk_INCLUDE_PATH NAMES gtk/gtk.h
PATH_SUFFIXES gtk-1.2 gtk12
PATHS
/usr/openwin/share/include
@@ -33,7 +33,7 @@ IF(UNIX)
# for both.
# - Atanas Georgiev <atanas@cs.columbia.edu>
- FIND_PATH( GTK_glibconfig_INCLUDE_PATH NAMES glibconfig.h
+ find_path( GTK_glibconfig_INCLUDE_PATH NAMES glibconfig.h
PATHS
/usr/openwin/share/include
/usr/local/include/glib12
@@ -43,7 +43,7 @@ IF(UNIX)
/opt/gnome/lib/glib/include
)
- FIND_PATH( GTK_glib_INCLUDE_PATH NAMES glib.h
+ find_path( GTK_glib_INCLUDE_PATH NAMES glib.h
PATH_SUFFIXES gtk-1.2 glib-1.2 glib12
PATHS
/usr/openwin/share/include
@@ -51,12 +51,12 @@ IF(UNIX)
/opt/gnome/include
)
- FIND_PATH( GTK_gtkgl_INCLUDE_PATH NAMES gtkgl/gtkglarea.h
+ find_path( GTK_gtkgl_INCLUDE_PATH NAMES gtkgl/gtkglarea.h
PATHS /usr/openwin/share/include
/opt/gnome/include
)
- FIND_LIBRARY( GTK_gtkgl_LIBRARY gtkgl
+ find_library( GTK_gtkgl_LIBRARY gtkgl
/usr/openwin/lib
/opt/gnome/lib
)
@@ -65,43 +65,43 @@ IF(UNIX)
# The 12 suffix is thanks to the FreeBSD ports collection
#
- FIND_LIBRARY( GTK_gtk_LIBRARY
+ find_library( GTK_gtk_LIBRARY
NAMES gtk gtk12
PATHS /usr/openwin/lib
/opt/gnome/lib
)
- FIND_LIBRARY( GTK_gdk_LIBRARY
+ find_library( GTK_gdk_LIBRARY
NAMES gdk gdk12
PATHS /usr/openwin/lib
/opt/gnome/lib
)
- FIND_LIBRARY( GTK_gmodule_LIBRARY
+ find_library( GTK_gmodule_LIBRARY
NAMES gmodule gmodule12
PATHS /usr/openwin/lib
/opt/gnome/lib
)
- FIND_LIBRARY( GTK_glib_LIBRARY
+ find_library( GTK_glib_LIBRARY
NAMES glib glib12
PATHS /usr/openwin/lib
/opt/gnome/lib
)
- FIND_LIBRARY( GTK_Xi_LIBRARY
+ find_library( GTK_Xi_LIBRARY
NAMES Xi
PATHS /usr/openwin/lib
/opt/gnome/lib
)
- FIND_LIBRARY( GTK_gthread_LIBRARY
+ find_library( GTK_gthread_LIBRARY
NAMES gthread gthread12
PATHS /usr/openwin/lib
/opt/gnome/lib
)
- IF(GTK_gtk_INCLUDE_PATH
+ if(GTK_gtk_INCLUDE_PATH
AND GTK_glibconfig_INCLUDE_PATH
AND GTK_glib_INCLUDE_PATH
AND GTK_gtk_LIBRARY
@@ -110,42 +110,42 @@ IF(UNIX)
# Assume that if gtk and glib were found, the other
# supporting libraries have also been found.
- SET( GTK_FOUND "YES" )
- SET( GTK_INCLUDE_DIR ${GTK_gtk_INCLUDE_PATH}
+ set( GTK_FOUND "YES" )
+ set( GTK_INCLUDE_DIR ${GTK_gtk_INCLUDE_PATH}
${GTK_glibconfig_INCLUDE_PATH}
${GTK_glib_INCLUDE_PATH} )
- SET( GTK_LIBRARIES ${GTK_gtk_LIBRARY}
+ set( GTK_LIBRARIES ${GTK_gtk_LIBRARY}
${GTK_gdk_LIBRARY}
${GTK_glib_LIBRARY} )
- IF(GTK_gmodule_LIBRARY)
- SET(GTK_LIBRARIES ${GTK_LIBRARIES} ${GTK_gmodule_LIBRARY})
- ENDIF(GTK_gmodule_LIBRARY)
- IF(GTK_gthread_LIBRARY)
- SET(GTK_LIBRARIES ${GTK_LIBRARIES} ${GTK_gthread_LIBRARY})
- ENDIF(GTK_gthread_LIBRARY)
- IF(GTK_Xi_LIBRARY)
- SET(GTK_LIBRARIES ${GTK_LIBRARIES} ${GTK_Xi_LIBRARY})
- ENDIF(GTK_Xi_LIBRARY)
-
- IF(GTK_gtkgl_INCLUDE_PATH AND GTK_gtkgl_LIBRARY)
- SET( GTK_GL_FOUND "YES" )
- SET( GTK_INCLUDE_DIR ${GTK_INCLUDE_DIR}
+ if(GTK_gmodule_LIBRARY)
+ set(GTK_LIBRARIES ${GTK_LIBRARIES} ${GTK_gmodule_LIBRARY})
+ endif(GTK_gmodule_LIBRARY)
+ if(GTK_gthread_LIBRARY)
+ set(GTK_LIBRARIES ${GTK_LIBRARIES} ${GTK_gthread_LIBRARY})
+ endif(GTK_gthread_LIBRARY)
+ if(GTK_Xi_LIBRARY)
+ set(GTK_LIBRARIES ${GTK_LIBRARIES} ${GTK_Xi_LIBRARY})
+ endif(GTK_Xi_LIBRARY)
+
+ if(GTK_gtkgl_INCLUDE_PATH AND GTK_gtkgl_LIBRARY)
+ set( GTK_GL_FOUND "YES" )
+ set( GTK_INCLUDE_DIR ${GTK_INCLUDE_DIR}
${GTK_gtkgl_INCLUDE_PATH} )
- SET( GTK_LIBRARIES ${GTK_gtkgl_LIBRARY} ${GTK_LIBRARIES} )
- MARK_AS_ADVANCED(
+ set( GTK_LIBRARIES ${GTK_gtkgl_LIBRARY} ${GTK_LIBRARIES} )
+ mark_as_advanced(
GTK_gtkgl_LIBRARY
GTK_gtkgl_INCLUDE_PATH
)
- ENDIF(GTK_gtkgl_INCLUDE_PATH AND GTK_gtkgl_LIBRARY)
+ endif(GTK_gtkgl_INCLUDE_PATH AND GTK_gtkgl_LIBRARY)
- ENDIF(GTK_gtk_INCLUDE_PATH
+ endif(GTK_gtk_INCLUDE_PATH
AND GTK_glibconfig_INCLUDE_PATH
AND GTK_glib_INCLUDE_PATH
AND GTK_gtk_LIBRARY
AND GTK_glib_LIBRARY)
- MARK_AS_ADVANCED(
+ mark_as_advanced(
GTK_gdk_LIBRARY
GTK_glib_INCLUDE_PATH
GTK_glib_LIBRARY
@@ -159,7 +159,7 @@ IF(UNIX)
GTK_gtkgl_LIBRARY
)
-ENDIF(UNIX)
+endif(UNIX)
diff --git a/Modules/FindGettext.cmake b/Modules/FindGettext.cmake
index 6dbc026189..a801a29c80 100644
--- a/Modules/FindGettext.cmake
+++ b/Modules/FindGettext.cmake
@@ -39,182 +39,182 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PROGRAM(GETTEXT_MSGMERGE_EXECUTABLE msgmerge)
+find_program(GETTEXT_MSGMERGE_EXECUTABLE msgmerge)
-FIND_PROGRAM(GETTEXT_MSGFMT_EXECUTABLE msgfmt)
+find_program(GETTEXT_MSGFMT_EXECUTABLE msgfmt)
-IF(GETTEXT_MSGMERGE_EXECUTABLE)
- EXECUTE_PROCESS(COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --version
+if(GETTEXT_MSGMERGE_EXECUTABLE)
+ execute_process(COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --version
OUTPUT_VARIABLE gettext_version
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
- IF (gettext_version MATCHES "^msgmerge \\(.*\\) [0-9]")
- STRING(REGEX REPLACE "^msgmerge \\([^\\)]*\\) ([0-9\\.]+[^ \n]*).*" "\\1" GETTEXT_VERSION_STRING "${gettext_version}")
- ENDIF()
- UNSET(gettext_version)
-ENDIF(GETTEXT_MSGMERGE_EXECUTABLE)
+ if (gettext_version MATCHES "^msgmerge \\(.*\\) [0-9]")
+ string(REGEX REPLACE "^msgmerge \\([^\\)]*\\) ([0-9\\.]+[^ \n]*).*" "\\1" GETTEXT_VERSION_STRING "${gettext_version}")
+ endif()
+ unset(gettext_version)
+endif(GETTEXT_MSGMERGE_EXECUTABLE)
-INCLUDE(FindPackageHandleStandardArgs)
+include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gettext
REQUIRED_VARS GETTEXT_MSGMERGE_EXECUTABLE GETTEXT_MSGFMT_EXECUTABLE
VERSION_VAR GETTEXT_VERSION_STRING)
-INCLUDE(CMakeParseArguments)
+include(CMakeParseArguments)
-FUNCTION(_GETTEXT_GET_UNIQUE_TARGET_NAME _name _unique_name)
- SET(propertyName "_GETTEXT_UNIQUE_COUNTER_${_name}")
- GET_PROPERTY(currentCounter GLOBAL PROPERTY "${propertyName}")
- IF(NOT currentCounter)
- SET(currentCounter 1)
- ENDIF()
- SET(${_unique_name} "${_name}_${currentCounter}" PARENT_SCOPE)
- MATH(EXPR currentCounter "${currentCounter} + 1")
- SET_PROPERTY(GLOBAL PROPERTY ${propertyName} ${currentCounter} )
-ENDFUNCTION()
+function(_GETTEXT_GET_UNIQUE_TARGET_NAME _name _unique_name)
+ set(propertyName "_GETTEXT_UNIQUE_COUNTER_${_name}")
+ get_property(currentCounter GLOBAL PROPERTY "${propertyName}")
+ if(NOT currentCounter)
+ set(currentCounter 1)
+ endif()
+ set(${_unique_name} "${_name}_${currentCounter}" PARENT_SCOPE)
+ math(EXPR currentCounter "${currentCounter} + 1")
+ set_property(GLOBAL PROPERTY ${propertyName} ${currentCounter} )
+endfunction()
-MACRO(GETTEXT_CREATE_TRANSLATIONS _potFile _firstPoFileArg)
+macro(GETTEXT_CREATE_TRANSLATIONS _potFile _firstPoFileArg)
# make it a real variable, so we can modify it here
- SET(_firstPoFile "${_firstPoFileArg}")
-
- SET(_gmoFiles)
- GET_FILENAME_COMPONENT(_potName ${_potFile} NAME)
- STRING(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _potBasename ${_potName})
- GET_FILENAME_COMPONENT(_absPotFile ${_potFile} ABSOLUTE)
-
- SET(_addToAll)
- IF(${_firstPoFile} STREQUAL "ALL")
- SET(_addToAll "ALL")
- SET(_firstPoFile)
- ENDIF(${_firstPoFile} STREQUAL "ALL")
-
- FOREACH (_currentPoFile ${_firstPoFile} ${ARGN})
- GET_FILENAME_COMPONENT(_absFile ${_currentPoFile} ABSOLUTE)
- GET_FILENAME_COMPONENT(_abs_PATH ${_absFile} PATH)
- GET_FILENAME_COMPONENT(_lang ${_absFile} NAME_WE)
- SET(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo)
-
- ADD_CUSTOM_COMMAND(
+ set(_firstPoFile "${_firstPoFileArg}")
+
+ set(_gmoFiles)
+ get_filename_component(_potName ${_potFile} NAME)
+ string(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _potBasename ${_potName})
+ get_filename_component(_absPotFile ${_potFile} ABSOLUTE)
+
+ set(_addToAll)
+ if(${_firstPoFile} STREQUAL "ALL")
+ set(_addToAll "ALL")
+ set(_firstPoFile)
+ endif(${_firstPoFile} STREQUAL "ALL")
+
+ foreach (_currentPoFile ${_firstPoFile} ${ARGN})
+ get_filename_component(_absFile ${_currentPoFile} ABSOLUTE)
+ get_filename_component(_abs_PATH ${_absFile} PATH)
+ get_filename_component(_lang ${_absFile} NAME_WE)
+ set(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo)
+
+ add_custom_command(
OUTPUT ${_gmoFile}
COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${_absFile} ${_absPotFile}
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_absFile}
DEPENDS ${_absPotFile} ${_absFile}
)
- INSTALL(FILES ${_gmoFile} DESTINATION share/locale/${_lang}/LC_MESSAGES RENAME ${_potBasename}.mo)
- SET(_gmoFiles ${_gmoFiles} ${_gmoFile})
+ install(FILES ${_gmoFile} DESTINATION share/locale/${_lang}/LC_MESSAGES RENAME ${_potBasename}.mo)
+ set(_gmoFiles ${_gmoFiles} ${_gmoFile})
- ENDFOREACH (_currentPoFile )
+ endforeach (_currentPoFile )
- IF(NOT TARGET translations)
- ADD_CUSTOM_TARGET(translations)
- ENDIF()
+ if(NOT TARGET translations)
+ add_custom_target(translations)
+ endif()
_GETTEXT_GET_UNIQUE_TARGET_NAME(translations uniqueTargetName)
- ADD_CUSTOM_TARGET(${uniqueTargetName} ${_addToAll} DEPENDS ${_gmoFiles})
+ add_custom_target(${uniqueTargetName} ${_addToAll} DEPENDS ${_gmoFiles})
- ADD_DEPENDENCIES(translations ${uniqueTargetName})
+ add_dependencies(translations ${uniqueTargetName})
-ENDMACRO(GETTEXT_CREATE_TRANSLATIONS )
+endmacro(GETTEXT_CREATE_TRANSLATIONS )
-FUNCTION(GETTEXT_PROCESS_POT_FILE _potFile)
- SET(_gmoFiles)
- SET(_options ALL)
- SET(_oneValueArgs INSTALL_DESTINATION)
- SET(_multiValueArgs LANGUAGES)
+function(GETTEXT_PROCESS_POT_FILE _potFile)
+ set(_gmoFiles)
+ set(_options ALL)
+ set(_oneValueArgs INSTALL_DESTINATION)
+ set(_multiValueArgs LANGUAGES)
CMAKE_PARSE_ARGUMENTS(_parsedArguments "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
- GET_FILENAME_COMPONENT(_potName ${_potFile} NAME)
- STRING(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _potBasename ${_potName})
- GET_FILENAME_COMPONENT(_absPotFile ${_potFile} ABSOLUTE)
+ get_filename_component(_potName ${_potFile} NAME)
+ string(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _potBasename ${_potName})
+ get_filename_component(_absPotFile ${_potFile} ABSOLUTE)
- FOREACH (_lang ${_parsedArguments_LANGUAGES})
- SET(_poFile "${CMAKE_CURRENT_BINARY_DIR}/${_lang}.po")
- SET(_gmoFile "${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo")
+ foreach (_lang ${_parsedArguments_LANGUAGES})
+ set(_poFile "${CMAKE_CURRENT_BINARY_DIR}/${_lang}.po")
+ set(_gmoFile "${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo")
- ADD_CUSTOM_COMMAND(
+ add_custom_command(
OUTPUT "${_poFile}"
COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${_poFile} ${_absPotFile}
DEPENDS ${_absPotFile}
)
- ADD_CUSTOM_COMMAND(
+ add_custom_command(
OUTPUT "${_gmoFile}"
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_poFile}
DEPENDS ${_absPotFile} ${_poFile}
)
- IF(_parsedArguments_INSTALL_DESTINATION)
- INSTALL(FILES ${_gmoFile} DESTINATION ${_parsedArguments_INSTALL_DESTINATION}/${_lang}/LC_MESSAGES RENAME ${_potBasename}.mo)
- ENDIF(_parsedArguments_INSTALL_DESTINATION)
- LIST(APPEND _gmoFiles ${_gmoFile})
- ENDFOREACH (_lang )
+ if(_parsedArguments_INSTALL_DESTINATION)
+ install(FILES ${_gmoFile} DESTINATION ${_parsedArguments_INSTALL_DESTINATION}/${_lang}/LC_MESSAGES RENAME ${_potBasename}.mo)
+ endif(_parsedArguments_INSTALL_DESTINATION)
+ list(APPEND _gmoFiles ${_gmoFile})
+ endforeach (_lang )
- IF(NOT TARGET potfiles)
- ADD_CUSTOM_TARGET(potfiles)
- ENDIF()
+ if(NOT TARGET potfiles)
+ add_custom_target(potfiles)
+ endif()
_GETTEXT_GET_UNIQUE_TARGET_NAME( potfiles uniqueTargetName)
- IF(_parsedArguments_ALL)
- ADD_CUSTOM_TARGET(${uniqueTargetName} ALL DEPENDS ${_gmoFiles})
- ELSE(_parsedArguments_ALL)
- ADD_CUSTOM_TARGET(${uniqueTargetName} DEPENDS ${_gmoFiles})
- ENDIF(_parsedArguments_ALL)
+ if(_parsedArguments_ALL)
+ add_custom_target(${uniqueTargetName} ALL DEPENDS ${_gmoFiles})
+ else(_parsedArguments_ALL)
+ add_custom_target(${uniqueTargetName} DEPENDS ${_gmoFiles})
+ endif(_parsedArguments_ALL)
- ADD_DEPENDENCIES(potfiles ${uniqueTargetName})
+ add_dependencies(potfiles ${uniqueTargetName})
-ENDFUNCTION(GETTEXT_PROCESS_POT_FILE)
+endfunction(GETTEXT_PROCESS_POT_FILE)
-FUNCTION(GETTEXT_PROCESS_PO_FILES _lang)
- SET(_options ALL)
- SET(_oneValueArgs INSTALL_DESTINATION)
- SET(_multiValueArgs PO_FILES)
- SET(_gmoFiles)
+function(GETTEXT_PROCESS_PO_FILES _lang)
+ set(_options ALL)
+ set(_oneValueArgs INSTALL_DESTINATION)
+ set(_multiValueArgs PO_FILES)
+ set(_gmoFiles)
CMAKE_PARSE_ARGUMENTS(_parsedArguments "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
- FOREACH(_current_PO_FILE ${_parsedArguments_PO_FILES})
- GET_FILENAME_COMPONENT(_name ${_current_PO_FILE} NAME)
- STRING(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _basename ${_name})
- SET(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.gmo)
- ADD_CUSTOM_COMMAND(OUTPUT ${_gmoFile}
+ foreach(_current_PO_FILE ${_parsedArguments_PO_FILES})
+ get_filename_component(_name ${_current_PO_FILE} NAME)
+ string(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _basename ${_name})
+ set(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.gmo)
+ add_custom_command(OUTPUT ${_gmoFile}
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_current_PO_FILE}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
DEPENDS ${_current_PO_FILE}
)
- IF(_parsedArguments_INSTALL_DESTINATION)
- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.gmo DESTINATION ${_parsedArguments_INSTALL_DESTINATION}/${_lang}/LC_MESSAGES/ RENAME ${_basename}.mo)
- ENDIF(_parsedArguments_INSTALL_DESTINATION)
- LIST(APPEND _gmoFiles ${_gmoFile})
- ENDFOREACH(_current_PO_FILE)
+ if(_parsedArguments_INSTALL_DESTINATION)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.gmo DESTINATION ${_parsedArguments_INSTALL_DESTINATION}/${_lang}/LC_MESSAGES/ RENAME ${_basename}.mo)
+ endif(_parsedArguments_INSTALL_DESTINATION)
+ list(APPEND _gmoFiles ${_gmoFile})
+ endforeach(_current_PO_FILE)
- IF(NOT TARGET pofiles)
- ADD_CUSTOM_TARGET(pofiles)
- ENDIF()
+ if(NOT TARGET pofiles)
+ add_custom_target(pofiles)
+ endif()
_GETTEXT_GET_UNIQUE_TARGET_NAME( pofiles uniqueTargetName)
- IF(_parsedArguments_ALL)
- ADD_CUSTOM_TARGET(${uniqueTargetName} ALL DEPENDS ${_gmoFiles})
- ELSE(_parsedArguments_ALL)
- ADD_CUSTOM_TARGET(${uniqueTargetName} DEPENDS ${_gmoFiles})
- ENDIF(_parsedArguments_ALL)
+ if(_parsedArguments_ALL)
+ add_custom_target(${uniqueTargetName} ALL DEPENDS ${_gmoFiles})
+ else(_parsedArguments_ALL)
+ add_custom_target(${uniqueTargetName} DEPENDS ${_gmoFiles})
+ endif(_parsedArguments_ALL)
- ADD_DEPENDENCIES(pofiles ${uniqueTargetName})
+ add_dependencies(pofiles ${uniqueTargetName})
-ENDFUNCTION(GETTEXT_PROCESS_PO_FILES)
+endfunction(GETTEXT_PROCESS_PO_FILES)
-IF (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE )
- SET(GETTEXT_FOUND TRUE)
-ELSE (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE )
- SET(GETTEXT_FOUND FALSE)
- IF (GetText_REQUIRED)
- MESSAGE(FATAL_ERROR "GetText not found")
- ENDIF (GetText_REQUIRED)
-ENDIF (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE )
+if (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE )
+ set(GETTEXT_FOUND TRUE)
+else (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE )
+ set(GETTEXT_FOUND FALSE)
+ if (GetText_REQUIRED)
+ message(FATAL_ERROR "GetText not found")
+ endif (GetText_REQUIRED)
+endif (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE )
diff --git a/Modules/FindGnuTLS.cmake b/Modules/FindGnuTLS.cmake
index 617f58f268..a05efe6b0c 100644
--- a/Modules/FindGnuTLS.cmake
+++ b/Modules/FindGnuTLS.cmake
@@ -26,44 +26,44 @@
# Note that this doesn't try to find the gnutls-extra package.
-IF (GNUTLS_INCLUDE_DIR AND GNUTLS_LIBRARY)
+if (GNUTLS_INCLUDE_DIR AND GNUTLS_LIBRARY)
# in cache already
- SET(gnutls_FIND_QUIETLY TRUE)
-ENDIF (GNUTLS_INCLUDE_DIR AND GNUTLS_LIBRARY)
+ set(gnutls_FIND_QUIETLY TRUE)
+endif (GNUTLS_INCLUDE_DIR AND GNUTLS_LIBRARY)
-IF (NOT WIN32)
+if (NOT WIN32)
# try using pkg-config to get the directories and then use these values
- # in the FIND_PATH() and FIND_LIBRARY() calls
+ # in the find_path() and find_library() calls
# also fills in GNUTLS_DEFINITIONS, although that isn't normally useful
- FIND_PACKAGE(PkgConfig QUIET)
+ find_package(PkgConfig QUIET)
PKG_CHECK_MODULES(PC_GNUTLS QUIET gnutls)
- SET(GNUTLS_DEFINITIONS ${PC_GNUTLS_CFLAGS_OTHER})
- SET(GNUTLS_VERSION_STRING ${PC_GNUTLS_VERSION})
-ENDIF (NOT WIN32)
+ set(GNUTLS_DEFINITIONS ${PC_GNUTLS_CFLAGS_OTHER})
+ set(GNUTLS_VERSION_STRING ${PC_GNUTLS_VERSION})
+endif (NOT WIN32)
-FIND_PATH(GNUTLS_INCLUDE_DIR gnutls/gnutls.h
+find_path(GNUTLS_INCLUDE_DIR gnutls/gnutls.h
HINTS
${PC_GNUTLS_INCLUDEDIR}
${PC_GNUTLS_INCLUDE_DIRS}
)
-FIND_LIBRARY(GNUTLS_LIBRARY NAMES gnutls libgnutls
+find_library(GNUTLS_LIBRARY NAMES gnutls libgnutls
HINTS
${PC_GNUTLS_LIBDIR}
${PC_GNUTLS_LIBRARY_DIRS}
)
-MARK_AS_ADVANCED(GNUTLS_INCLUDE_DIR GNUTLS_LIBRARY)
+mark_as_advanced(GNUTLS_INCLUDE_DIR GNUTLS_LIBRARY)
# handle the QUIETLY and REQUIRED arguments and set GNUTLS_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GnuTLS
REQUIRED_VARS GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR
VERSION_VAR GNUTLS_VERSION_STRING)
-IF(GNUTLS_FOUND)
- SET(GNUTLS_LIBRARIES ${GNUTLS_LIBRARY})
- SET(GNUTLS_INCLUDE_DIRS ${GNUTLS_INCLUDE_DIR})
-ENDIF()
+if(GNUTLS_FOUND)
+ set(GNUTLS_LIBRARIES ${GNUTLS_LIBRARY})
+ set(GNUTLS_INCLUDE_DIRS ${GNUTLS_INCLUDE_DIR})
+endif()
diff --git a/Modules/FindGnuplot.cmake b/Modules/FindGnuplot.cmake
index d5730476d2..07af0bf203 100644
--- a/Modules/FindGnuplot.cmake
+++ b/Modules/FindGnuplot.cmake
@@ -21,9 +21,9 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE(FindCygwin)
+include(FindCygwin)
-FIND_PROGRAM(GNUPLOT_EXECUTABLE
+find_program(GNUPLOT_EXECUTABLE
NAMES
gnuplot
pgnuplot
@@ -32,26 +32,26 @@ FIND_PROGRAM(GNUPLOT_EXECUTABLE
${CYGWIN_INSTALL_PATH}/bin
)
-IF (GNUPLOT_EXECUTABLE)
- EXECUTE_PROCESS(COMMAND "${GNUPLOT_EXECUTABLE}" --version
+if (GNUPLOT_EXECUTABLE)
+ execute_process(COMMAND "${GNUPLOT_EXECUTABLE}" --version
OUTPUT_VARIABLE GNUPLOT_OUTPUT_VARIABLE
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
- STRING(REGEX REPLACE "^gnuplot ([0-9\\.]+)( patchlevel )?" "\\1." GNUPLOT_VERSION_STRING "${GNUPLOT_OUTPUT_VARIABLE}")
- STRING(REGEX REPLACE "\\.$" "" GNUPLOT_VERSION_STRING "${GNUPLOT_VERSION_STRING}")
- UNSET(GNUPLOT_OUTPUT_VARIABLE)
-ENDIF()
+ string(REGEX REPLACE "^gnuplot ([0-9\\.]+)( patchlevel )?" "\\1." GNUPLOT_VERSION_STRING "${GNUPLOT_OUTPUT_VARIABLE}")
+ string(REGEX REPLACE "\\.$" "" GNUPLOT_VERSION_STRING "${GNUPLOT_VERSION_STRING}")
+ unset(GNUPLOT_OUTPUT_VARIABLE)
+endif()
# for compatibility
-SET(GNUPLOT ${GNUPLOT_EXECUTABLE})
+set(GNUPLOT ${GNUPLOT_EXECUTABLE})
# handle the QUIETLY and REQUIRED arguments and set GNUPLOT_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gnuplot
REQUIRED_VARS GNUPLOT_EXECUTABLE
VERSION_VAR GNUPLOT_VERSION_STRING)
-MARK_AS_ADVANCED( GNUPLOT_EXECUTABLE )
+mark_as_advanced( GNUPLOT_EXECUTABLE )
diff --git a/Modules/FindHSPELL.cmake b/Modules/FindHSPELL.cmake
index 79bfc81bb5..05b55059b6 100644
--- a/Modules/FindHSPELL.cmake
+++ b/Modules/FindHSPELL.cmake
@@ -24,23 +24,23 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PATH(HSPELL_INCLUDE_DIR hspell.h)
+find_path(HSPELL_INCLUDE_DIR hspell.h)
-FIND_LIBRARY(HSPELL_LIBRARIES NAMES hspell)
+find_library(HSPELL_LIBRARIES NAMES hspell)
-IF (HSPELL_INCLUDE_DIR)
- FILE(READ "${HSPELL_INCLUDE_DIR}/hspell.h" HSPELL_H)
- STRING(REGEX REPLACE ".*#define HSPELL_VERSION_MAJOR ([0-9]+).*" "\\1" HSPELL_VERSION_MAJOR "${HSPELL_H}")
- STRING(REGEX REPLACE ".*#define HSPELL_VERSION_MINOR ([0-9]+).*" "\\1" HSPELL_VERSION_MINOR "${HSPELL_H}")
- SET(HSPELL_VERSION_STRING "${HSPELL_VERSION_MAJOR}.${HSPELL_VERSION_MINOR}")
-ENDIF()
+if (HSPELL_INCLUDE_DIR)
+ file(READ "${HSPELL_INCLUDE_DIR}/hspell.h" HSPELL_H)
+ string(REGEX REPLACE ".*#define HSPELL_VERSION_MAJOR ([0-9]+).*" "\\1" HSPELL_VERSION_MAJOR "${HSPELL_H}")
+ string(REGEX REPLACE ".*#define HSPELL_VERSION_MINOR ([0-9]+).*" "\\1" HSPELL_VERSION_MINOR "${HSPELL_H}")
+ set(HSPELL_VERSION_STRING "${HSPELL_VERSION_MAJOR}.${HSPELL_VERSION_MINOR}")
+endif()
# handle the QUIETLY and REQUIRED arguments and set HSPELL_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(HSPELL
REQUIRED_VARS HSPELL_LIBRARIES HSPELL_INCLUDE_DIR
VERSION_VAR HSPELL_VERSION_STRING)
-MARK_AS_ADVANCED(HSPELL_INCLUDE_DIR HSPELL_LIBRARIES)
+mark_as_advanced(HSPELL_INCLUDE_DIR HSPELL_LIBRARIES)
diff --git a/Modules/FindHTMLHelp.cmake b/Modules/FindHTMLHelp.cmake
index 00de82afd1..d51b3987ad 100644
--- a/Modules/FindHTMLHelp.cmake
+++ b/Modules/FindHTMLHelp.cmake
@@ -18,18 +18,18 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-IF(WIN32)
+if(WIN32)
- FIND_PROGRAM(HTML_HELP_COMPILER
+ find_program(HTML_HELP_COMPILER
hhc
"[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]"
"$ENV{ProgramFiles}/HTML Help Workshop"
"C:/Program Files/HTML Help Workshop"
)
- GET_FILENAME_COMPONENT(HTML_HELP_COMPILER_PATH "${HTML_HELP_COMPILER}" PATH)
+ get_filename_component(HTML_HELP_COMPILER_PATH "${HTML_HELP_COMPILER}" PATH)
- FIND_PATH(HTML_HELP_INCLUDE_PATH
+ find_path(HTML_HELP_INCLUDE_PATH
htmlhelp.h
"${HTML_HELP_COMPILER_PATH}/include"
"[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/include"
@@ -37,7 +37,7 @@ IF(WIN32)
"C:/Program Files/HTML Help Workshop/include"
)
- FIND_LIBRARY(HTML_HELP_LIBRARY
+ find_library(HTML_HELP_LIBRARY
htmlhelp
"${HTML_HELP_COMPILER_PATH}/lib"
"[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/lib"
@@ -45,10 +45,10 @@ IF(WIN32)
"C:/Program Files/HTML Help Workshop/lib"
)
- MARK_AS_ADVANCED(
+ mark_as_advanced(
HTML_HELP_COMPILER
HTML_HELP_INCLUDE_PATH
HTML_HELP_LIBRARY
)
-ENDIF(WIN32)
+endif(WIN32)
diff --git a/Modules/FindITK.cmake b/Modules/FindITK.cmake
index 5b598d2300..b0b3f03f0a 100644
--- a/Modules/FindITK.cmake
+++ b/Modules/FindITK.cmake
@@ -36,22 +36,22 @@
# Use the Config mode of the find_package() command to find ITKConfig.
# If this succeeds (possibly because ITK_DIR is already set), the
# command will have already loaded ITKConfig.cmake and set ITK_FOUND.
-IF(NOT ITK_FOUND)
- SET(_ITK_REQUIRED "")
- IF(ITK_FIND_REQUIRED)
- SET(_ITK_REQUIRED REQUIRED)
- ENDIF()
- SET(_ITK_QUIET "")
- IF(ITK_FIND_QUIETLY)
- SET(_ITK_QUIET QUIET)
- ENDIF()
- FIND_PACKAGE(ITK ${_ITK_REQUIRED} ${_ITK_QUIET} NO_MODULE
+if(NOT ITK_FOUND)
+ set(_ITK_REQUIRED "")
+ if(ITK_FIND_REQUIRED)
+ set(_ITK_REQUIRED REQUIRED)
+ endif()
+ set(_ITK_QUIET "")
+ if(ITK_FIND_QUIETLY)
+ set(_ITK_QUIET QUIET)
+ endif()
+ find_package(ITK ${_ITK_REQUIRED} ${_ITK_QUIET} NO_MODULE
NAMES ITK InsightToolkit
CONFIGS ITKConfig.cmake
)
-ENDIF()
+endif()
-IF(ITK_FOUND)
+if(ITK_FOUND)
# Set USE_ITK_FILE for backward-compatability.
- SET(USE_ITK_FILE ${ITK_USE_FILE})
-ENDIF()
+ set(USE_ITK_FILE ${ITK_USE_FILE})
+endif()
diff --git a/Modules/FindImageMagick.cmake b/Modules/FindImageMagick.cmake
index f21b63008e..436bb4bb62 100644
--- a/Modules/FindImageMagick.cmake
+++ b/Modules/FindImageMagick.cmake
@@ -45,11 +45,11 @@
# ImageMagick_<component>_LIBRARIES - Full path to <component> libraries.
#
# Example Usages:
-# FIND_PACKAGE(ImageMagick)
-# FIND_PACKAGE(ImageMagick COMPONENTS convert)
-# FIND_PACKAGE(ImageMagick COMPONENTS convert mogrify display)
-# FIND_PACKAGE(ImageMagick COMPONENTS Magick++)
-# FIND_PACKAGE(ImageMagick COMPONENTS Magick++ convert)
+# find_package(ImageMagick)
+# find_package(ImageMagick COMPONENTS convert)
+# find_package(ImageMagick COMPONENTS convert mogrify display)
+# find_package(ImageMagick COMPONENTS Magick++)
+# find_package(ImageMagick COMPONENTS Magick++ convert)
#
# Note that the standard FIND_PACKAGE features are supported
# (i.e., QUIET, REQUIRED, etc.).
@@ -72,10 +72,10 @@
#---------------------------------------------------------------------
# Helper functions
#---------------------------------------------------------------------
-FUNCTION(FIND_IMAGEMAGICK_API component header)
- SET(ImageMagick_${component}_FOUND FALSE PARENT_SCOPE)
+function(FIND_IMAGEMAGICK_API component header)
+ set(ImageMagick_${component}_FOUND FALSE PARENT_SCOPE)
- FIND_PATH(ImageMagick_${component}_INCLUDE_DIR
+ find_path(ImageMagick_${component}_INCLUDE_DIR
NAMES ${header}
PATHS
${ImageMagick_INCLUDE_DIRS}
@@ -84,150 +84,150 @@ FUNCTION(FIND_IMAGEMAGICK_API component header)
ImageMagick
DOC "Path to the ImageMagick include dir."
)
- FIND_LIBRARY(ImageMagick_${component}_LIBRARY
+ find_library(ImageMagick_${component}_LIBRARY
NAMES ${ARGN}
PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]/lib"
DOC "Path to the ImageMagick Magick++ library."
)
- IF(ImageMagick_${component}_INCLUDE_DIR AND ImageMagick_${component}_LIBRARY)
- SET(ImageMagick_${component}_FOUND TRUE PARENT_SCOPE)
+ if(ImageMagick_${component}_INCLUDE_DIR AND ImageMagick_${component}_LIBRARY)
+ set(ImageMagick_${component}_FOUND TRUE PARENT_SCOPE)
- LIST(APPEND ImageMagick_INCLUDE_DIRS
+ list(APPEND ImageMagick_INCLUDE_DIRS
${ImageMagick_${component}_INCLUDE_DIR}
)
- LIST(REMOVE_DUPLICATES ImageMagick_INCLUDE_DIRS)
- SET(ImageMagick_INCLUDE_DIRS ${ImageMagick_INCLUDE_DIRS} PARENT_SCOPE)
+ list(REMOVE_DUPLICATES ImageMagick_INCLUDE_DIRS)
+ set(ImageMagick_INCLUDE_DIRS ${ImageMagick_INCLUDE_DIRS} PARENT_SCOPE)
- LIST(APPEND ImageMagick_LIBRARIES
+ list(APPEND ImageMagick_LIBRARIES
${ImageMagick_${component}_LIBRARY}
)
- SET(ImageMagick_LIBRARIES ${ImageMagick_LIBRARIES} PARENT_SCOPE)
- ENDIF(ImageMagick_${component}_INCLUDE_DIR AND ImageMagick_${component}_LIBRARY)
-ENDFUNCTION(FIND_IMAGEMAGICK_API)
+ set(ImageMagick_LIBRARIES ${ImageMagick_LIBRARIES} PARENT_SCOPE)
+ endif(ImageMagick_${component}_INCLUDE_DIR AND ImageMagick_${component}_LIBRARY)
+endfunction(FIND_IMAGEMAGICK_API)
-FUNCTION(FIND_IMAGEMAGICK_EXE component)
- SET(_IMAGEMAGICK_EXECUTABLE
+function(FIND_IMAGEMAGICK_EXE component)
+ set(_IMAGEMAGICK_EXECUTABLE
${ImageMagick_EXECUTABLE_DIR}/${component}${CMAKE_EXECUTABLE_SUFFIX})
- IF(EXISTS ${_IMAGEMAGICK_EXECUTABLE})
- SET(ImageMagick_${component}_EXECUTABLE
+ if(EXISTS ${_IMAGEMAGICK_EXECUTABLE})
+ set(ImageMagick_${component}_EXECUTABLE
${_IMAGEMAGICK_EXECUTABLE}
PARENT_SCOPE
)
- SET(ImageMagick_${component}_FOUND TRUE PARENT_SCOPE)
- ELSE(EXISTS ${_IMAGEMAGICK_EXECUTABLE})
- SET(ImageMagick_${component}_FOUND FALSE PARENT_SCOPE)
- ENDIF(EXISTS ${_IMAGEMAGICK_EXECUTABLE})
-ENDFUNCTION(FIND_IMAGEMAGICK_EXE)
+ set(ImageMagick_${component}_FOUND TRUE PARENT_SCOPE)
+ else(EXISTS ${_IMAGEMAGICK_EXECUTABLE})
+ set(ImageMagick_${component}_FOUND FALSE PARENT_SCOPE)
+ endif(EXISTS ${_IMAGEMAGICK_EXECUTABLE})
+endfunction(FIND_IMAGEMAGICK_EXE)
#---------------------------------------------------------------------
# Start Actual Work
#---------------------------------------------------------------------
# Try to find a ImageMagick installation binary path.
-FIND_PATH(ImageMagick_EXECUTABLE_DIR
+find_path(ImageMagick_EXECUTABLE_DIR
NAMES mogrify${CMAKE_EXECUTABLE_SUFFIX}
PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]"
DOC "Path to the ImageMagick binary directory."
NO_DEFAULT_PATH
)
-FIND_PATH(ImageMagick_EXECUTABLE_DIR
+find_path(ImageMagick_EXECUTABLE_DIR
NAMES mogrify${CMAKE_EXECUTABLE_SUFFIX}
)
# Find each component. Search for all tools in same dir
# <ImageMagick_EXECUTABLE_DIR>; otherwise they should be found
# independently and not in a cohesive module such as this one.
-UNSET(ImageMagick_REQUIRED_VARS)
-UNSET(ImageMagick_DEFAULT_EXECUTABLES)
-FOREACH(component ${ImageMagick_FIND_COMPONENTS}
+unset(ImageMagick_REQUIRED_VARS)
+unset(ImageMagick_DEFAULT_EXECUTABLES)
+foreach(component ${ImageMagick_FIND_COMPONENTS}
# DEPRECATED: forced components for backward compatibility
convert mogrify import montage composite
)
- IF(component STREQUAL "Magick++")
+ if(component STREQUAL "Magick++")
FIND_IMAGEMAGICK_API(Magick++ Magick++.h
Magick++ CORE_RL_Magick++_
)
- LIST(APPEND ImageMagick_REQUIRED_VARS ImageMagick_Magick++_LIBRARY)
- ELSEIF(component STREQUAL "MagickWand")
+ list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_Magick++_LIBRARY)
+ elseif(component STREQUAL "MagickWand")
FIND_IMAGEMAGICK_API(MagickWand wand/MagickWand.h
Wand MagickWand CORE_RL_wand_
)
- LIST(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickWand_LIBRARY)
- ELSEIF(component STREQUAL "MagickCore")
+ list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickWand_LIBRARY)
+ elseif(component STREQUAL "MagickCore")
FIND_IMAGEMAGICK_API(MagickCore magick/MagickCore.h
Magick MagickCore CORE_RL_magick_
)
- LIST(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickCore_LIBRARY)
- ELSE(component STREQUAL "Magick++")
- IF(ImageMagick_EXECUTABLE_DIR)
+ list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickCore_LIBRARY)
+ else(component STREQUAL "Magick++")
+ if(ImageMagick_EXECUTABLE_DIR)
FIND_IMAGEMAGICK_EXE(${component})
- ENDIF(ImageMagick_EXECUTABLE_DIR)
+ endif(ImageMagick_EXECUTABLE_DIR)
- IF(ImageMagick_FIND_COMPONENTS)
- LIST(FIND ImageMagick_FIND_COMPONENTS ${component} is_requested)
- IF(is_requested GREATER -1)
- LIST(APPEND ImageMagick_REQUIRED_VARS ImageMagick_${component}_EXECUTABLE)
- ENDIF(is_requested GREATER -1)
- ELSEIF(ImageMagick_${component}_EXECUTABLE)
+ if(ImageMagick_FIND_COMPONENTS)
+ list(FIND ImageMagick_FIND_COMPONENTS ${component} is_requested)
+ if(is_requested GREATER -1)
+ list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_${component}_EXECUTABLE)
+ endif(is_requested GREATER -1)
+ elseif(ImageMagick_${component}_EXECUTABLE)
# if no components were requested explicitly put all (default) executables
# in the list
- LIST(APPEND ImageMagick_DEFAULT_EXECUTABLES ImageMagick_${component}_EXECUTABLE)
- ENDIF(ImageMagick_FIND_COMPONENTS)
- ENDIF(component STREQUAL "Magick++")
-ENDFOREACH(component)
+ list(APPEND ImageMagick_DEFAULT_EXECUTABLES ImageMagick_${component}_EXECUTABLE)
+ endif(ImageMagick_FIND_COMPONENTS)
+ endif(component STREQUAL "Magick++")
+endforeach(component)
-IF(NOT ImageMagick_FIND_COMPONENTS AND NOT ImageMagick_DEFAULT_EXECUTABLES)
+if(NOT ImageMagick_FIND_COMPONENTS AND NOT ImageMagick_DEFAULT_EXECUTABLES)
# No components were requested, and none of the default components were
# found. Just insert mogrify into the list of the default components to
# find so FPHSA below has something to check
- LIST(APPEND ImageMagick_REQUIRED_VARS ImageMagick_mogrify_EXECUTABLE)
-ELSEIF(ImageMagick_DEFAULT_EXECUTABLES)
- LIST(APPEND ImageMagick_REQUIRED_VARS ${ImageMagick_DEFAULT_EXECUTABLES})
-ENDIF()
+ list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_mogrify_EXECUTABLE)
+elseif(ImageMagick_DEFAULT_EXECUTABLES)
+ list(APPEND ImageMagick_REQUIRED_VARS ${ImageMagick_DEFAULT_EXECUTABLES})
+endif()
-SET(ImageMagick_INCLUDE_DIRS ${ImageMagick_INCLUDE_DIRS})
-SET(ImageMagick_LIBRARIES ${ImageMagick_LIBRARIES})
+set(ImageMagick_INCLUDE_DIRS ${ImageMagick_INCLUDE_DIRS})
+set(ImageMagick_LIBRARIES ${ImageMagick_LIBRARIES})
-IF(ImageMagick_mogrify_EXECUTABLE)
- EXECUTE_PROCESS(COMMAND ${ImageMagick_mogrify_EXECUTABLE} -version
+if(ImageMagick_mogrify_EXECUTABLE)
+ execute_process(COMMAND ${ImageMagick_mogrify_EXECUTABLE} -version
OUTPUT_VARIABLE imagemagick_version
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
- IF(imagemagick_version MATCHES "^Version: ImageMagick [0-9]")
- STRING(REGEX REPLACE "^Version: ImageMagick ([-0-9\\.]+).*" "\\1" ImageMagick_VERSION_STRING "${imagemagick_version}")
- ENDIF()
- UNSET(imagemagick_version)
-ENDIF(ImageMagick_mogrify_EXECUTABLE)
+ if(imagemagick_version MATCHES "^Version: ImageMagick [0-9]")
+ string(REGEX REPLACE "^Version: ImageMagick ([-0-9\\.]+).*" "\\1" ImageMagick_VERSION_STRING "${imagemagick_version}")
+ endif()
+ unset(imagemagick_version)
+endif(ImageMagick_mogrify_EXECUTABLE)
#---------------------------------------------------------------------
# Standard Package Output
#---------------------------------------------------------------------
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ImageMagick
REQUIRED_VARS ${ImageMagick_REQUIRED_VARS}
VERSION_VAR ImageMagick_VERSION_STRING
)
# Maintain consistency with all other variables.
-SET(ImageMagick_FOUND ${IMAGEMAGICK_FOUND})
+set(ImageMagick_FOUND ${IMAGEMAGICK_FOUND})
#---------------------------------------------------------------------
# DEPRECATED: Setting variables for backward compatibility.
#---------------------------------------------------------------------
-SET(IMAGEMAGICK_BINARY_PATH ${ImageMagick_EXECUTABLE_DIR}
+set(IMAGEMAGICK_BINARY_PATH ${ImageMagick_EXECUTABLE_DIR}
CACHE PATH "Path to the ImageMagick binary directory.")
-SET(IMAGEMAGICK_CONVERT_EXECUTABLE ${ImageMagick_convert_EXECUTABLE}
+set(IMAGEMAGICK_CONVERT_EXECUTABLE ${ImageMagick_convert_EXECUTABLE}
CACHE FILEPATH "Path to ImageMagick's convert executable.")
-SET(IMAGEMAGICK_MOGRIFY_EXECUTABLE ${ImageMagick_mogrify_EXECUTABLE}
+set(IMAGEMAGICK_MOGRIFY_EXECUTABLE ${ImageMagick_mogrify_EXECUTABLE}
CACHE FILEPATH "Path to ImageMagick's mogrify executable.")
-SET(IMAGEMAGICK_IMPORT_EXECUTABLE ${ImageMagick_import_EXECUTABLE}
+set(IMAGEMAGICK_IMPORT_EXECUTABLE ${ImageMagick_import_EXECUTABLE}
CACHE FILEPATH "Path to ImageMagick's import executable.")
-SET(IMAGEMAGICK_MONTAGE_EXECUTABLE ${ImageMagick_montage_EXECUTABLE}
+set(IMAGEMAGICK_MONTAGE_EXECUTABLE ${ImageMagick_montage_EXECUTABLE}
CACHE FILEPATH "Path to ImageMagick's montage executable.")
-SET(IMAGEMAGICK_COMPOSITE_EXECUTABLE ${ImageMagick_composite_EXECUTABLE}
+set(IMAGEMAGICK_COMPOSITE_EXECUTABLE ${ImageMagick_composite_EXECUTABLE}
CACHE FILEPATH "Path to ImageMagick's composite executable.")
-MARK_AS_ADVANCED(
+mark_as_advanced(
IMAGEMAGICK_BINARY_PATH
IMAGEMAGICK_CONVERT_EXECUTABLE
IMAGEMAGICK_MOGRIFY_EXECUTABLE
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake
index f93b454a47..1dae07e7f5 100644
--- a/Modules/FindJNI.cmake
+++ b/Modules/FindJNI.cmake
@@ -27,74 +27,74 @@
# License text for the above reference.)
# Expand {libarch} occurences to java_libarch subdirectory(-ies) and set ${_var}
-MACRO(java_append_library_directories _var)
+macro(java_append_library_directories _var)
# Determine java arch-specific library subdir
# Mostly based on openjdk/jdk/make/common/shared/Platform.gmk as of openjdk
# 1.6.0_18 + icedtea patches. However, it would be much better to base the
# guess on the first part of the GNU config.guess platform triplet.
- IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
- SET(_java_libarch "amd64")
- ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
- SET(_java_libarch "i386")
- ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^alpha")
- SET(_java_libarch "alpha")
- ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
+ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+ set(_java_libarch "amd64")
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
+ set(_java_libarch "i386")
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^alpha")
+ set(_java_libarch "alpha")
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
# Subdir is "arm" for both big-endian (arm) and little-endian (armel).
- SET(_java_libarch "arm")
- ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
+ set(_java_libarch "arm")
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
# mips* machines are bi-endian mostly so processor does not tell
# endianess of the underlying system.
- SET(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}" "mips" "mipsel" "mipseb")
- ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64")
- SET(_java_libarch "ppc64")
- ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)")
- SET(_java_libarch "ppc")
- ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^sparc")
+ set(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}" "mips" "mipsel" "mipseb")
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64")
+ set(_java_libarch "ppc64")
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)")
+ set(_java_libarch "ppc")
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^sparc")
# Both flavours can run on the same processor
- SET(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}" "sparc" "sparcv9")
- ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(parisc|hppa)")
- SET(_java_libarch "parisc" "parisc64")
- ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^s390")
+ set(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}" "sparc" "sparcv9")
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(parisc|hppa)")
+ set(_java_libarch "parisc" "parisc64")
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^s390")
# s390 binaries can run on s390x machines
- SET(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}" "s390" "s390x")
- ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^sh")
- SET(_java_libarch "sh")
- ELSE(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
- SET(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}")
- ENDIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+ set(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}" "s390" "s390x")
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^sh")
+ set(_java_libarch "sh")
+ else(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+ set(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}")
+ endif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
# Append default list architectures if CMAKE_SYSTEM_PROCESSOR was empty or
# system is non-Linux (where the code above has not been well tested)
- IF(NOT _java_libarch OR NOT (CMAKE_SYSTEM_NAME MATCHES "Linux"))
- LIST(APPEND _java_libarch "i386" "amd64" "ppc")
- ENDIF(NOT _java_libarch OR NOT (CMAKE_SYSTEM_NAME MATCHES "Linux"))
+ if(NOT _java_libarch OR NOT (CMAKE_SYSTEM_NAME MATCHES "Linux"))
+ list(APPEND _java_libarch "i386" "amd64" "ppc")
+ endif(NOT _java_libarch OR NOT (CMAKE_SYSTEM_NAME MATCHES "Linux"))
# Sometimes ${CMAKE_SYSTEM_PROCESSOR} is added to the list to prefer
# current value to a hardcoded list. Remove possible duplicates.
- LIST(REMOVE_DUPLICATES _java_libarch)
+ list(REMOVE_DUPLICATES _java_libarch)
- FOREACH(_path ${ARGN})
- IF(_path MATCHES "{libarch}")
- FOREACH(_libarch ${_java_libarch})
- STRING(REPLACE "{libarch}" "${_libarch}" _newpath "${_path}")
- LIST(APPEND ${_var} "${_newpath}")
- ENDFOREACH(_libarch)
- ELSE(_path MATCHES "{libarch}")
- LIST(APPEND ${_var} "${_path}")
- ENDIF(_path MATCHES "{libarch}")
- ENDFOREACH(_path)
-ENDMACRO(java_append_library_directories)
+ foreach(_path ${ARGN})
+ if(_path MATCHES "{libarch}")
+ foreach(_libarch ${_java_libarch})
+ string(REPLACE "{libarch}" "${_libarch}" _newpath "${_path}")
+ list(APPEND ${_var} "${_newpath}")
+ endforeach(_libarch)
+ else(_path MATCHES "{libarch}")
+ list(APPEND ${_var} "${_path}")
+ endif(_path MATCHES "{libarch}")
+ endforeach(_path)
+endmacro(java_append_library_directories)
-GET_FILENAME_COMPONENT(java_install_version
+get_filename_component(java_install_version
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit;CurrentVersion]" NAME)
-SET(JAVA_AWT_LIBRARY_DIRECTORIES
+set(JAVA_AWT_LIBRARY_DIRECTORIES
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.4;JavaHome]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\${java_install_version};JavaHome]/lib"
)
-FILE(TO_CMAKE_PATH "$ENV{JAVA_HOME}" _JAVA_HOME)
+file(TO_CMAKE_PATH "$ENV{JAVA_HOME}" _JAVA_HOME)
JAVA_APPEND_LIBRARY_DIRECTORIES(JAVA_AWT_LIBRARY_DIRECTORIES
${_JAVA_HOME}/jre/lib/{libarch}
@@ -122,18 +122,18 @@ JAVA_APPEND_LIBRARY_DIRECTORIES(JAVA_AWT_LIBRARY_DIRECTORIES
/usr/lib/jvm/default-java/lib
)
-SET(JAVA_JVM_LIBRARY_DIRECTORIES)
-FOREACH(dir ${JAVA_AWT_LIBRARY_DIRECTORIES})
- SET(JAVA_JVM_LIBRARY_DIRECTORIES
+set(JAVA_JVM_LIBRARY_DIRECTORIES)
+foreach(dir ${JAVA_AWT_LIBRARY_DIRECTORIES})
+ set(JAVA_JVM_LIBRARY_DIRECTORIES
${JAVA_JVM_LIBRARY_DIRECTORIES}
"${dir}"
"${dir}/client"
"${dir}/server"
)
-ENDFOREACH(dir)
+endforeach(dir)
-SET(JAVA_AWT_INCLUDE_DIRECTORIES
+set(JAVA_AWT_INCLUDE_DIRECTORIES
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.4;JavaHome]/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\${java_install_version};JavaHome]/include"
@@ -155,74 +155,74 @@ SET(JAVA_AWT_INCLUDE_DIRECTORIES
/usr/lib/jvm/default-java/include
)
-FOREACH(JAVA_PROG "${JAVA_RUNTIME}" "${JAVA_COMPILE}" "${JAVA_ARCHIVE}")
- GET_FILENAME_COMPONENT(jpath "${JAVA_PROG}" PATH)
- FOREACH(JAVA_INC_PATH ../include ../java/include ../share/java/include)
- IF(EXISTS ${jpath}/${JAVA_INC_PATH})
- SET(JAVA_AWT_INCLUDE_DIRECTORIES ${JAVA_AWT_INCLUDE_DIRECTORIES} "${jpath}/${JAVA_INC_PATH}")
- ENDIF(EXISTS ${jpath}/${JAVA_INC_PATH})
- ENDFOREACH(JAVA_INC_PATH)
- FOREACH(JAVA_LIB_PATH
+foreach(JAVA_PROG "${JAVA_RUNTIME}" "${JAVA_COMPILE}" "${JAVA_ARCHIVE}")
+ get_filename_component(jpath "${JAVA_PROG}" PATH)
+ foreach(JAVA_INC_PATH ../include ../java/include ../share/java/include)
+ if(EXISTS ${jpath}/${JAVA_INC_PATH})
+ set(JAVA_AWT_INCLUDE_DIRECTORIES ${JAVA_AWT_INCLUDE_DIRECTORIES} "${jpath}/${JAVA_INC_PATH}")
+ endif(EXISTS ${jpath}/${JAVA_INC_PATH})
+ endforeach(JAVA_INC_PATH)
+ foreach(JAVA_LIB_PATH
../lib ../jre/lib ../jre/lib/i386
../java/lib ../java/jre/lib ../java/jre/lib/i386
../share/java/lib ../share/java/jre/lib ../share/java/jre/lib/i386)
- IF(EXISTS ${jpath}/${JAVA_LIB_PATH})
- SET(JAVA_AWT_LIBRARY_DIRECTORIES ${JAVA_AWT_LIBRARY_DIRECTORIES} "${jpath}/${JAVA_LIB_PATH}")
- ENDIF(EXISTS ${jpath}/${JAVA_LIB_PATH})
- ENDFOREACH(JAVA_LIB_PATH)
-ENDFOREACH(JAVA_PROG)
+ if(EXISTS ${jpath}/${JAVA_LIB_PATH})
+ set(JAVA_AWT_LIBRARY_DIRECTORIES ${JAVA_AWT_LIBRARY_DIRECTORIES} "${jpath}/${JAVA_LIB_PATH}")
+ endif(EXISTS ${jpath}/${JAVA_LIB_PATH})
+ endforeach(JAVA_LIB_PATH)
+endforeach(JAVA_PROG)
-IF(APPLE)
- IF(EXISTS ~/Library/Frameworks/JavaVM.framework)
- SET(JAVA_HAVE_FRAMEWORK 1)
- ENDIF(EXISTS ~/Library/Frameworks/JavaVM.framework)
- IF(EXISTS /Library/Frameworks/JavaVM.framework)
- SET(JAVA_HAVE_FRAMEWORK 1)
- ENDIF(EXISTS /Library/Frameworks/JavaVM.framework)
- IF(EXISTS /System/Library/Frameworks/JavaVM.framework)
- SET(JAVA_HAVE_FRAMEWORK 1)
- ENDIF(EXISTS /System/Library/Frameworks/JavaVM.framework)
+if(APPLE)
+ if(EXISTS ~/Library/Frameworks/JavaVM.framework)
+ set(JAVA_HAVE_FRAMEWORK 1)
+ endif(EXISTS ~/Library/Frameworks/JavaVM.framework)
+ if(EXISTS /Library/Frameworks/JavaVM.framework)
+ set(JAVA_HAVE_FRAMEWORK 1)
+ endif(EXISTS /Library/Frameworks/JavaVM.framework)
+ if(EXISTS /System/Library/Frameworks/JavaVM.framework)
+ set(JAVA_HAVE_FRAMEWORK 1)
+ endif(EXISTS /System/Library/Frameworks/JavaVM.framework)
- IF(JAVA_HAVE_FRAMEWORK)
- IF(NOT JAVA_AWT_LIBRARY)
- SET (JAVA_AWT_LIBRARY "-framework JavaVM" CACHE FILEPATH "Java Frameworks" FORCE)
- ENDIF(NOT JAVA_AWT_LIBRARY)
+ if(JAVA_HAVE_FRAMEWORK)
+ if(NOT JAVA_AWT_LIBRARY)
+ set (JAVA_AWT_LIBRARY "-framework JavaVM" CACHE FILEPATH "Java Frameworks" FORCE)
+ endif(NOT JAVA_AWT_LIBRARY)
- IF(NOT JAVA_JVM_LIBRARY)
- SET (JAVA_JVM_LIBRARY "-framework JavaVM" CACHE FILEPATH "Java Frameworks" FORCE)
- ENDIF(NOT JAVA_JVM_LIBRARY)
+ if(NOT JAVA_JVM_LIBRARY)
+ set (JAVA_JVM_LIBRARY "-framework JavaVM" CACHE FILEPATH "Java Frameworks" FORCE)
+ endif(NOT JAVA_JVM_LIBRARY)
- IF(NOT JAVA_AWT_INCLUDE_PATH)
- IF(EXISTS /System/Library/Frameworks/JavaVM.framework/Headers/jawt.h)
- SET (JAVA_AWT_INCLUDE_PATH "/System/Library/Frameworks/JavaVM.framework/Headers" CACHE FILEPATH "jawt.h location" FORCE)
- ENDIF(EXISTS /System/Library/Frameworks/JavaVM.framework/Headers/jawt.h)
- ENDIF(NOT JAVA_AWT_INCLUDE_PATH)
+ if(NOT JAVA_AWT_INCLUDE_PATH)
+ if(EXISTS /System/Library/Frameworks/JavaVM.framework/Headers/jawt.h)
+ set (JAVA_AWT_INCLUDE_PATH "/System/Library/Frameworks/JavaVM.framework/Headers" CACHE FILEPATH "jawt.h location" FORCE)
+ endif(EXISTS /System/Library/Frameworks/JavaVM.framework/Headers/jawt.h)
+ endif(NOT JAVA_AWT_INCLUDE_PATH)
# If using "-framework JavaVM", prefer its headers *before* the others in
# JAVA_AWT_INCLUDE_DIRECTORIES... (*prepend* to the list here)
#
- SET(JAVA_AWT_INCLUDE_DIRECTORIES
+ set(JAVA_AWT_INCLUDE_DIRECTORIES
~/Library/Frameworks/JavaVM.framework/Headers
/Library/Frameworks/JavaVM.framework/Headers
/System/Library/Frameworks/JavaVM.framework/Headers
${JAVA_AWT_INCLUDE_DIRECTORIES}
)
- ENDIF(JAVA_HAVE_FRAMEWORK)
-ELSE(APPLE)
- FIND_LIBRARY(JAVA_AWT_LIBRARY jawt
+ endif(JAVA_HAVE_FRAMEWORK)
+else(APPLE)
+ find_library(JAVA_AWT_LIBRARY jawt
PATHS ${JAVA_AWT_LIBRARY_DIRECTORIES}
)
- FIND_LIBRARY(JAVA_JVM_LIBRARY NAMES jvm JavaVM
+ find_library(JAVA_JVM_LIBRARY NAMES jvm JavaVM
PATHS ${JAVA_JVM_LIBRARY_DIRECTORIES}
)
-ENDIF(APPLE)
+endif(APPLE)
# add in the include path
-FIND_PATH(JAVA_INCLUDE_PATH jni.h
+find_path(JAVA_INCLUDE_PATH jni.h
${JAVA_AWT_INCLUDE_DIRECTORIES}
)
-FIND_PATH(JAVA_INCLUDE_PATH2 jni_md.h
+find_path(JAVA_INCLUDE_PATH2 jni_md.h
${JAVA_INCLUDE_PATH}
${JAVA_INCLUDE_PATH}/win32
${JAVA_INCLUDE_PATH}/linux
@@ -232,15 +232,15 @@ FIND_PATH(JAVA_INCLUDE_PATH2 jni_md.h
${JAVA_INCLUDE_PATH}/alpha
)
-FIND_PATH(JAVA_AWT_INCLUDE_PATH jawt.h
+find_path(JAVA_AWT_INCLUDE_PATH jawt.h
${JAVA_INCLUDE_PATH}
)
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(JNI DEFAULT_MSG JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY
JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
-MARK_AS_ADVANCED(
+mark_as_advanced(
JAVA_AWT_LIBRARY
JAVA_JVM_LIBRARY
JAVA_AWT_INCLUDE_PATH
@@ -248,12 +248,12 @@ MARK_AS_ADVANCED(
JAVA_INCLUDE_PATH2
)
-SET(JNI_LIBRARIES
+set(JNI_LIBRARIES
${JAVA_AWT_LIBRARY}
${JAVA_JVM_LIBRARY}
)
-SET(JNI_INCLUDE_DIRS
+set(JNI_INCLUDE_DIRS
${JAVA_INCLUDE_PATH}
${JAVA_INCLUDE_PATH2}
${JAVA_AWT_INCLUDE_PATH}
diff --git a/Modules/FindJPEG.cmake b/Modules/FindJPEG.cmake
index 0b5db40890..9b0d8f48a3 100644
--- a/Modules/FindJPEG.cmake
+++ b/Modules/FindJPEG.cmake
@@ -20,24 +20,24 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PATH(JPEG_INCLUDE_DIR jpeglib.h)
+find_path(JPEG_INCLUDE_DIR jpeglib.h)
-SET(JPEG_NAMES ${JPEG_NAMES} jpeg)
-FIND_LIBRARY(JPEG_LIBRARY NAMES ${JPEG_NAMES} )
+set(JPEG_NAMES ${JPEG_NAMES} jpeg)
+find_library(JPEG_LIBRARY NAMES ${JPEG_NAMES} )
# handle the QUIETLY and REQUIRED arguments and set JPEG_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(JPEG DEFAULT_MSG JPEG_LIBRARY JPEG_INCLUDE_DIR)
-IF(JPEG_FOUND)
- SET(JPEG_LIBRARIES ${JPEG_LIBRARY})
-ENDIF(JPEG_FOUND)
+if(JPEG_FOUND)
+ set(JPEG_LIBRARIES ${JPEG_LIBRARY})
+endif(JPEG_FOUND)
# Deprecated declarations.
-SET (NATIVE_JPEG_INCLUDE_PATH ${JPEG_INCLUDE_DIR} )
-IF(JPEG_LIBRARY)
- GET_FILENAME_COMPONENT (NATIVE_JPEG_LIB_PATH ${JPEG_LIBRARY} PATH)
-ENDIF(JPEG_LIBRARY)
+set (NATIVE_JPEG_INCLUDE_PATH ${JPEG_INCLUDE_DIR} )
+if(JPEG_LIBRARY)
+ get_filename_component (NATIVE_JPEG_LIB_PATH ${JPEG_LIBRARY} PATH)
+endif(JPEG_LIBRARY)
-MARK_AS_ADVANCED(JPEG_LIBRARY JPEG_INCLUDE_DIR )
+mark_as_advanced(JPEG_LIBRARY JPEG_INCLUDE_DIR )
diff --git a/Modules/FindJasper.cmake b/Modules/FindJasper.cmake
index b6178449b6..c5b865a12e 100644
--- a/Modules/FindJasper.cmake
+++ b/Modules/FindJasper.cmake
@@ -21,33 +21,33 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PATH(JASPER_INCLUDE_DIR jasper/jasper.h)
+find_path(JASPER_INCLUDE_DIR jasper/jasper.h)
-IF (NOT JASPER_LIBRARIES)
- FIND_PACKAGE(JPEG)
+if (NOT JASPER_LIBRARIES)
+ find_package(JPEG)
- FIND_LIBRARY(JASPER_LIBRARY_RELEASE NAMES jasper libjasper)
- FIND_LIBRARY(JASPER_LIBRARY_DEBUG NAMES jasperd)
+ find_library(JASPER_LIBRARY_RELEASE NAMES jasper libjasper)
+ find_library(JASPER_LIBRARY_DEBUG NAMES jasperd)
- INCLUDE(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
+ include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
SELECT_LIBRARY_CONFIGURATIONS(JASPER)
-ENDIF (NOT JASPER_LIBRARIES)
+endif (NOT JASPER_LIBRARIES)
-IF (JASPER_INCLUDE_DIR AND EXISTS "${JASPER_INCLUDE_DIR}/jasper/jas_config.h")
- FILE(STRINGS "${JASPER_INCLUDE_DIR}/jasper/jas_config.h" jasper_version_str REGEX "^#define[\t ]+JAS_VERSION[\t ]+\".*\".*")
+if (JASPER_INCLUDE_DIR AND EXISTS "${JASPER_INCLUDE_DIR}/jasper/jas_config.h")
+ file(STRINGS "${JASPER_INCLUDE_DIR}/jasper/jas_config.h" jasper_version_str REGEX "^#define[\t ]+JAS_VERSION[\t ]+\".*\".*")
- STRING(REGEX REPLACE "^#define[\t ]+JAS_VERSION[\t ]+\"([^\"]+)\".*" "\\1" JASPER_VERSION_STRING "${jasper_version_str}")
-ENDIF (JASPER_INCLUDE_DIR AND EXISTS "${JASPER_INCLUDE_DIR}/jasper/jas_config.h")
+ string(REGEX REPLACE "^#define[\t ]+JAS_VERSION[\t ]+\"([^\"]+)\".*" "\\1" JASPER_VERSION_STRING "${jasper_version_str}")
+endif (JASPER_INCLUDE_DIR AND EXISTS "${JASPER_INCLUDE_DIR}/jasper/jas_config.h")
# handle the QUIETLY and REQUIRED arguments and set JASPER_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jasper
REQUIRED_VARS JASPER_LIBRARIES JASPER_INCLUDE_DIR JPEG_LIBRARIES
VERSION_VAR JASPER_VERSION_STRING)
-IF (JASPER_FOUND)
- SET(JASPER_LIBRARIES ${JASPER_LIBRARIES} ${JPEG_LIBRARIES} )
-ENDIF (JASPER_FOUND)
+if (JASPER_FOUND)
+ set(JASPER_LIBRARIES ${JASPER_LIBRARIES} ${JPEG_LIBRARIES} )
+endif (JASPER_FOUND)
-MARK_AS_ADVANCED(JASPER_INCLUDE_DIR)
+mark_as_advanced(JASPER_INCLUDE_DIR)
diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake
index 2e50ecac20..24af0e00b7 100644
--- a/Modules/FindJava.cmake
+++ b/Modules/FindJava.cmake
@@ -16,7 +16,7 @@
# Java_VERSION = This is set to: $major.$minor.$patch(.$tweak)
#
# The minimum required version of Java can be specified using the
-# standard CMake syntax, e.g. FIND_PACKAGE(Java 1.5)
+# standard CMake syntax, e.g. find_package(Java 1.5)
#
# NOTE: ${Java_VERSION} and ${Java_VERSION_STRING} are not guaranteed to be
# identical. For example some java version may return:
@@ -37,9 +37,9 @@
# Java_<component>_FOUND - TRUE if <component> is found.
#
# Example Usages:
-# FIND_PACKAGE(Java)
-# FIND_PACKAGE(Java COMPONENTS Runtime)
-# FIND_PACKAGE(Java COMPONENTS Development)
+# find_package(Java)
+# find_package(Java COMPONENTS Runtime)
+# find_package(Java COMPONENTS Development)
#
#=============================================================================
@@ -57,7 +57,7 @@
# License text for the above reference.)
# The HINTS option should only be used for values computed from the system.
-SET(_JAVA_HINTS
+set(_JAVA_HINTS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\2.0;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.9;JavaHome]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.8;JavaHome]/bin"
@@ -70,7 +70,7 @@ SET(_JAVA_HINTS
)
# Hard-coded guesses should still go in PATHS. This ensures that the user
# environment can always override hard guesses.
-SET(_JAVA_PATHS
+set(_JAVA_PATHS
/usr/lib/java/bin
/usr/share/java/bin
/usr/local/java/bin
@@ -81,79 +81,79 @@ SET(_JAVA_PATHS
/usr/lib/j2sdk1.5-sun/bin
/opt/sun-jdk-1.5.0.04/bin
)
-FIND_PROGRAM(Java_JAVA_EXECUTABLE
+find_program(Java_JAVA_EXECUTABLE
NAMES java
HINTS ${_JAVA_HINTS}
PATHS ${_JAVA_PATHS}
)
-IF(Java_JAVA_EXECUTABLE)
- EXECUTE_PROCESS(COMMAND ${Java_JAVA_EXECUTABLE} -version
+if(Java_JAVA_EXECUTABLE)
+ execute_process(COMMAND ${Java_JAVA_EXECUTABLE} -version
RESULT_VARIABLE res
OUTPUT_VARIABLE var
ERROR_VARIABLE var # sun-java output to stderr
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE)
- IF( res )
- IF(${Java_FIND_REQUIRED})
- MESSAGE( FATAL_ERROR "Error executing java -version" )
- ELSE()
- MESSAGE( STATUS "Warning, could not run java --version")
- ENDIF()
- ELSE()
+ if( res )
+ if(${Java_FIND_REQUIRED})
+ message( FATAL_ERROR "Error executing java -version" )
+ else()
+ message( STATUS "Warning, could not run java --version")
+ endif()
+ else()
# extract major/minor version and patch level from "java -version" output
# Tested on linux using
# 1. Sun / Sun OEM
# 2. OpenJDK 1.6
# 3. GCJ 1.5
# 4. Kaffe 1.4.2
- IF(var MATCHES "java version \"[0-9]+\\.[0-9]+\\.[0-9_.]+.*\".*")
+ if(var MATCHES "java version \"[0-9]+\\.[0-9]+\\.[0-9_.]+.*\".*")
# This is most likely Sun / OpenJDK, or maybe GCJ-java compat layer
- STRING( REGEX REPLACE ".* version \"([0-9]+\\.[0-9]+\\.[0-9_.]+.*)\".*"
+ string( REGEX REPLACE ".* version \"([0-9]+\\.[0-9]+\\.[0-9_.]+.*)\".*"
"\\1" Java_VERSION_STRING "${var}" )
- ELSEIF(var MATCHES "java full version \"kaffe-[0-9]+\\.[0-9]+\\.[0-9_]+\".*")
+ elseif(var MATCHES "java full version \"kaffe-[0-9]+\\.[0-9]+\\.[0-9_]+\".*")
# Kaffe style
- STRING( REGEX REPLACE "java full version \"kaffe-([0-9]+\\.[0-9]+\\.[0-9_]+).*"
+ string( REGEX REPLACE "java full version \"kaffe-([0-9]+\\.[0-9]+\\.[0-9_]+).*"
"\\1" Java_VERSION_STRING "${var}" )
- ELSE()
- IF(NOT Java_FIND_QUIETLY)
+ else()
+ if(NOT Java_FIND_QUIETLY)
message(WARNING "regex not supported: ${var}. Please report")
- ENDIF(NOT Java_FIND_QUIETLY)
- ENDIF()
- STRING( REGEX REPLACE "([0-9]+).*" "\\1" Java_VERSION_MAJOR "${Java_VERSION_STRING}" )
- STRING( REGEX REPLACE "[0-9]+\\.([0-9]+).*" "\\1" Java_VERSION_MINOR "${Java_VERSION_STRING}" )
- STRING( REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" Java_VERSION_PATCH "${Java_VERSION_STRING}" )
+ endif(NOT Java_FIND_QUIETLY)
+ endif()
+ string( REGEX REPLACE "([0-9]+).*" "\\1" Java_VERSION_MAJOR "${Java_VERSION_STRING}" )
+ string( REGEX REPLACE "[0-9]+\\.([0-9]+).*" "\\1" Java_VERSION_MINOR "${Java_VERSION_STRING}" )
+ string( REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" Java_VERSION_PATCH "${Java_VERSION_STRING}" )
# warning tweak version can be empty:
- STRING( REGEX REPLACE "[0-9]+\\.[0-9]+\\.[0-9]+[_\\.]?([0-9]*).*$" "\\1" Java_VERSION_TWEAK "${Java_VERSION_STRING}" )
+ string( REGEX REPLACE "[0-9]+\\.[0-9]+\\.[0-9]+[_\\.]?([0-9]*).*$" "\\1" Java_VERSION_TWEAK "${Java_VERSION_STRING}" )
if( Java_VERSION_TWEAK STREQUAL "" ) # check case where tweak is not defined
set(Java_VERSION ${Java_VERSION_MAJOR}.${Java_VERSION_MINOR}.${Java_VERSION_PATCH})
else( )
set(Java_VERSION ${Java_VERSION_MAJOR}.${Java_VERSION_MINOR}.${Java_VERSION_PATCH}.${Java_VERSION_TWEAK})
endif( )
- ENDIF()
+ endif()
-ENDIF(Java_JAVA_EXECUTABLE)
+endif(Java_JAVA_EXECUTABLE)
-FIND_PROGRAM(Java_JAR_EXECUTABLE
+find_program(Java_JAR_EXECUTABLE
NAMES jar
HINTS ${_JAVA_HINTS}
PATHS ${_JAVA_PATHS}
)
-FIND_PROGRAM(Java_JAVAC_EXECUTABLE
+find_program(Java_JAVAC_EXECUTABLE
NAMES javac
HINTS ${_JAVA_HINTS}
PATHS ${_JAVA_PATHS}
)
-FIND_PROGRAM(Java_JAVAH_EXECUTABLE
+find_program(Java_JAVAH_EXECUTABLE
NAMES javah
HINTS ${_JAVA_HINTS}
PATHS ${_JAVA_PATHS}
)
-FIND_PROGRAM(Java_JAVADOC_EXECUTABLE
+find_program(Java_JAVADOC_EXECUTABLE
NAMES javadoc
HINTS ${_JAVA_HINTS}
PATHS ${_JAVA_PATHS}
@@ -189,7 +189,7 @@ else()
endif()
-MARK_AS_ADVANCED(
+mark_as_advanced(
Java_JAVA_EXECUTABLE
Java_JAR_EXECUTABLE
Java_JAVAC_EXECUTABLE
@@ -198,7 +198,7 @@ MARK_AS_ADVANCED(
)
# LEGACY
-SET(JAVA_RUNTIME ${Java_JAVA_EXECUTABLE})
-SET(JAVA_ARCHIVE ${Java_JAR_EXECUTABLE})
-SET(JAVA_COMPILE ${Java_JAVAC_EXECUTABLE})
+set(JAVA_RUNTIME ${Java_JAVA_EXECUTABLE})
+set(JAVA_ARCHIVE ${Java_JAR_EXECUTABLE})
+set(JAVA_COMPILE ${Java_JAVAC_EXECUTABLE})
diff --git a/Modules/FindKDE3.cmake b/Modules/FindKDE3.cmake
index 65a559fa78..a8d30a890e 100644
--- a/Modules/FindKDE3.cmake
+++ b/Modules/FindKDE3.cmake
@@ -3,8 +3,8 @@
# This module defines the following variables:
# KDE3_DEFINITIONS - compiler definitions required for compiling KDE software
# KDE3_INCLUDE_DIR - the KDE include directory
-# KDE3_INCLUDE_DIRS - the KDE and the Qt include directory, for use with INCLUDE_DIRECTORIES()
-# KDE3_LIB_DIR - the directory where the KDE libraries are installed, for use with LINK_DIRECTORIES()
+# KDE3_INCLUDE_DIRS - the KDE and the Qt include directory, for use with include_directories()
+# KDE3_LIB_DIR - the directory where the KDE libraries are installed, for use with link_directories()
# QT_AND_KDECORE_LIBS - this contains both the Qt and the kdecore library
# KDE3_DCOPIDL_EXECUTABLE - the dcopidl executable
# KDE3_DCOPIDL2CPP_EXECUTABLE - the dcopidl2cpp executable
@@ -23,7 +23,7 @@
# Call this if you want to have automatic moc file handling.
# This means if you include "foo.moc" in the source file foo.cpp
# a moc file for the header foo.h will be created automatically.
-# You can set the property SKIP_AUTOMAKE using SET_SOURCE_FILES_PROPERTIES()
+# You can set the property SKIP_AUTOMAKE using set_source_files_properties()
# to exclude some files in the list from being processed.
#
# KDE3_ADD_MOC_FILES(SRCS_VAR file1 ... fileN )
@@ -46,7 +46,7 @@
# This will create and install a simple libtool file for the given target.
#
# KDE3_ADD_EXECUTABLE(name file1 ... fileN )
-# Currently identical to ADD_EXECUTABLE(), may provide some advanced features in the future.
+# Currently identical to add_executable(), may provide some advanced features in the future.
#
# KDE3_ADD_KPART(name [WITH_PREFIX] file1 ... fileN )
# Create a KDE plugin (KPart, kioslave, etc.) from the given source files.
@@ -77,37 +77,37 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-IF(NOT UNIX AND KDE3_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Compiling KDE3 applications and libraries under Windows is not supported")
-ENDIF(NOT UNIX AND KDE3_FIND_REQUIRED)
+if(NOT UNIX AND KDE3_FIND_REQUIRED)
+ message(FATAL_ERROR "Compiling KDE3 applications and libraries under Windows is not supported")
+endif(NOT UNIX AND KDE3_FIND_REQUIRED)
# If Qt4 has already been found, fail.
-IF(QT4_FOUND)
- IF(KDE3_FIND_REQUIRED)
- MESSAGE( FATAL_ERROR "KDE3/Qt3 and Qt4 cannot be used together in one project.")
- ELSE(KDE3_FIND_REQUIRED)
- IF(NOT KDE3_FIND_QUIETLY)
- MESSAGE( STATUS "KDE3/Qt3 and Qt4 cannot be used together in one project.")
- ENDIF(NOT KDE3_FIND_QUIETLY)
- RETURN()
- ENDIF(KDE3_FIND_REQUIRED)
-ENDIF(QT4_FOUND)
+if(QT4_FOUND)
+ if(KDE3_FIND_REQUIRED)
+ message( FATAL_ERROR "KDE3/Qt3 and Qt4 cannot be used together in one project.")
+ else(KDE3_FIND_REQUIRED)
+ if(NOT KDE3_FIND_QUIETLY)
+ message( STATUS "KDE3/Qt3 and Qt4 cannot be used together in one project.")
+ endif(NOT KDE3_FIND_QUIETLY)
+ return()
+ endif(KDE3_FIND_REQUIRED)
+endif(QT4_FOUND)
-SET(QT_MT_REQUIRED TRUE)
-#SET(QT_MIN_VERSION "3.0.0")
+set(QT_MT_REQUIRED TRUE)
+#set(QT_MIN_VERSION "3.0.0")
#this line includes FindQt.cmake, which searches the Qt library and headers
-IF(KDE3_FIND_REQUIRED)
- SET(_REQ_STRING_KDE3 "REQUIRED")
-ENDIF(KDE3_FIND_REQUIRED)
+if(KDE3_FIND_REQUIRED)
+ set(_REQ_STRING_KDE3 "REQUIRED")
+endif(KDE3_FIND_REQUIRED)
-FIND_PACKAGE(Qt3 ${_REQ_STRING_KDE3})
-FIND_PACKAGE(X11 ${_REQ_STRING_KDE3})
+find_package(Qt3 ${_REQ_STRING_KDE3})
+find_package(X11 ${_REQ_STRING_KDE3})
#now try to find some kde stuff
-FIND_PROGRAM(KDECONFIG_EXECUTABLE NAMES kde-config
+find_program(KDECONFIG_EXECUTABLE NAMES kde-config
HINTS
$ENV{KDEDIR}/bin
PATHS
@@ -115,25 +115,25 @@ FIND_PROGRAM(KDECONFIG_EXECUTABLE NAMES kde-config
/opt/kde/bin
)
-SET(KDE3PREFIX)
-IF(KDECONFIG_EXECUTABLE)
- EXECUTE_PROCESS(COMMAND ${KDECONFIG_EXECUTABLE} --version
+set(KDE3PREFIX)
+if(KDECONFIG_EXECUTABLE)
+ execute_process(COMMAND ${KDECONFIG_EXECUTABLE} --version
OUTPUT_VARIABLE kde_config_version )
- STRING(REGEX MATCH "KDE: .\\." kde_version "${kde_config_version}")
- IF ("${kde_version}" MATCHES "KDE: 3\\.")
- EXECUTE_PROCESS(COMMAND ${KDECONFIG_EXECUTABLE} --prefix
+ string(REGEX MATCH "KDE: .\\." kde_version "${kde_config_version}")
+ if ("${kde_version}" MATCHES "KDE: 3\\.")
+ execute_process(COMMAND ${KDECONFIG_EXECUTABLE} --prefix
OUTPUT_VARIABLE kdedir )
- STRING(REGEX REPLACE "\n" "" KDE3PREFIX "${kdedir}")
+ string(REGEX REPLACE "\n" "" KDE3PREFIX "${kdedir}")
- ENDIF ("${kde_version}" MATCHES "KDE: 3\\.")
-ENDIF(KDECONFIG_EXECUTABLE)
+ endif ("${kde_version}" MATCHES "KDE: 3\\.")
+endif(KDECONFIG_EXECUTABLE)
# at first the KDE include directory
# kpassdlg.h comes from kdeui and doesn't exist in KDE4 anymore
-FIND_PATH(KDE3_INCLUDE_DIR kpassdlg.h
+find_path(KDE3_INCLUDE_DIR kpassdlg.h
HINTS
$ENV{KDEDIR}/include
${KDE3PREFIX}/include
@@ -145,7 +145,7 @@ FIND_PATH(KDE3_INCLUDE_DIR kpassdlg.h
)
#now the KDE library directory
-FIND_LIBRARY(KDE3_KDECORE_LIBRARY NAMES kdecore
+find_library(KDE3_KDECORE_LIBRARY NAMES kdecore
HINTS
$ENV{KDEDIR}/lib
${KDE3PREFIX}/lib
@@ -154,20 +154,20 @@ FIND_LIBRARY(KDE3_KDECORE_LIBRARY NAMES kdecore
/opt/kde/lib
)
-SET(QT_AND_KDECORE_LIBS ${QT_LIBRARIES} ${KDE3_KDECORE_LIBRARY})
+set(QT_AND_KDECORE_LIBS ${QT_LIBRARIES} ${KDE3_KDECORE_LIBRARY})
-GET_FILENAME_COMPONENT(KDE3_LIB_DIR ${KDE3_KDECORE_LIBRARY} PATH )
+get_filename_component(KDE3_LIB_DIR ${KDE3_KDECORE_LIBRARY} PATH )
-IF(NOT KDE3_LIBTOOL_DIR)
- IF(KDE3_KDECORE_LIBRARY MATCHES lib64)
- SET(KDE3_LIBTOOL_DIR /lib64/kde3)
- ELSE(KDE3_KDECORE_LIBRARY MATCHES lib64)
- SET(KDE3_LIBTOOL_DIR /lib/kde3)
- ENDIF(KDE3_KDECORE_LIBRARY MATCHES lib64)
-ENDIF(NOT KDE3_LIBTOOL_DIR)
+if(NOT KDE3_LIBTOOL_DIR)
+ if(KDE3_KDECORE_LIBRARY MATCHES lib64)
+ set(KDE3_LIBTOOL_DIR /lib64/kde3)
+ else(KDE3_KDECORE_LIBRARY MATCHES lib64)
+ set(KDE3_LIBTOOL_DIR /lib/kde3)
+ endif(KDE3_KDECORE_LIBRARY MATCHES lib64)
+endif(NOT KDE3_LIBTOOL_DIR)
#now search for the dcop utilities
-FIND_PROGRAM(KDE3_DCOPIDL_EXECUTABLE NAMES dcopidl
+find_program(KDE3_DCOPIDL_EXECUTABLE NAMES dcopidl
HINTS
$ENV{KDEDIR}/bin
${KDE3PREFIX}/bin
@@ -176,7 +176,7 @@ FIND_PROGRAM(KDE3_DCOPIDL_EXECUTABLE NAMES dcopidl
/opt/kde/bin
)
-FIND_PROGRAM(KDE3_DCOPIDL2CPP_EXECUTABLE NAMES dcopidl2cpp
+find_program(KDE3_DCOPIDL2CPP_EXECUTABLE NAMES dcopidl2cpp
HINTS
$ENV{KDEDIR}/bin
${KDE3PREFIX}/bin
@@ -185,7 +185,7 @@ FIND_PROGRAM(KDE3_DCOPIDL2CPP_EXECUTABLE NAMES dcopidl2cpp
/opt/kde/bin
)
-FIND_PROGRAM(KDE3_KCFGC_EXECUTABLE NAMES kconfig_compiler
+find_program(KDE3_KCFGC_EXECUTABLE NAMES kconfig_compiler
HINTS
$ENV{KDEDIR}/bin
${KDE3PREFIX}/bin
@@ -196,104 +196,104 @@ FIND_PROGRAM(KDE3_KCFGC_EXECUTABLE NAMES kconfig_compiler
#SET KDE3_FOUND
-IF (KDE3_INCLUDE_DIR AND KDE3_LIB_DIR AND KDE3_DCOPIDL_EXECUTABLE AND KDE3_DCOPIDL2CPP_EXECUTABLE AND KDE3_KCFGC_EXECUTABLE)
- SET(KDE3_FOUND TRUE)
-ELSE (KDE3_INCLUDE_DIR AND KDE3_LIB_DIR AND KDE3_DCOPIDL_EXECUTABLE AND KDE3_DCOPIDL2CPP_EXECUTABLE AND KDE3_KCFGC_EXECUTABLE)
- SET(KDE3_FOUND FALSE)
-ENDIF (KDE3_INCLUDE_DIR AND KDE3_LIB_DIR AND KDE3_DCOPIDL_EXECUTABLE AND KDE3_DCOPIDL2CPP_EXECUTABLE AND KDE3_KCFGC_EXECUTABLE)
+if (KDE3_INCLUDE_DIR AND KDE3_LIB_DIR AND KDE3_DCOPIDL_EXECUTABLE AND KDE3_DCOPIDL2CPP_EXECUTABLE AND KDE3_KCFGC_EXECUTABLE)
+ set(KDE3_FOUND TRUE)
+else (KDE3_INCLUDE_DIR AND KDE3_LIB_DIR AND KDE3_DCOPIDL_EXECUTABLE AND KDE3_DCOPIDL2CPP_EXECUTABLE AND KDE3_KCFGC_EXECUTABLE)
+ set(KDE3_FOUND FALSE)
+endif (KDE3_INCLUDE_DIR AND KDE3_LIB_DIR AND KDE3_DCOPIDL_EXECUTABLE AND KDE3_DCOPIDL2CPP_EXECUTABLE AND KDE3_KCFGC_EXECUTABLE)
# add some KDE specific stuff
-SET(KDE3_DEFINITIONS -DQT_CLEAN_NAMESPACE -D_GNU_SOURCE)
+set(KDE3_DEFINITIONS -DQT_CLEAN_NAMESPACE -D_GNU_SOURCE)
# set compiler flags only if KDE3 has actually been found
-IF(KDE3_FOUND)
- SET(_KDE3_USE_FLAGS FALSE)
- IF(CMAKE_COMPILER_IS_GNUCXX)
- SET(_KDE3_USE_FLAGS TRUE) # use flags for gnu compiler
- EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} --version
+if(KDE3_FOUND)
+ set(_KDE3_USE_FLAGS FALSE)
+ if(CMAKE_COMPILER_IS_GNUCXX)
+ set(_KDE3_USE_FLAGS TRUE) # use flags for gnu compiler
+ execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
OUTPUT_VARIABLE out)
# gnu gcc 2.96 does not work with flags
# I guess 2.95 also doesn't then
- IF("${out}" MATCHES "2.9[56]")
- SET(_KDE3_USE_FLAGS FALSE)
- ENDIF("${out}" MATCHES "2.9[56]")
- ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+ if("${out}" MATCHES "2.9[56]")
+ set(_KDE3_USE_FLAGS FALSE)
+ endif("${out}" MATCHES "2.9[56]")
+ endif(CMAKE_COMPILER_IS_GNUCXX)
#only on linux, but NOT e.g. on FreeBSD:
- IF(CMAKE_SYSTEM_NAME MATCHES "Linux" AND _KDE3_USE_FLAGS)
- SET (KDE3_DEFINITIONS ${KDE3_DEFINITIONS} -D_XOPEN_SOURCE=500 -D_BSD_SOURCE)
- SET ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common")
- SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -fno-exceptions -fno-check-new -fno-common")
- ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux" AND _KDE3_USE_FLAGS)
+ if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND _KDE3_USE_FLAGS)
+ set (KDE3_DEFINITIONS ${KDE3_DEFINITIONS} -D_XOPEN_SOURCE=500 -D_BSD_SOURCE)
+ set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common")
+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -fno-exceptions -fno-check-new -fno-common")
+ endif(CMAKE_SYSTEM_NAME MATCHES "Linux" AND _KDE3_USE_FLAGS)
# works on FreeBSD, NOT tested on NetBSD and OpenBSD
- IF (CMAKE_SYSTEM_NAME MATCHES BSD AND _KDE3_USE_FLAGS)
- SET ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common")
- SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common")
- ENDIF (CMAKE_SYSTEM_NAME MATCHES BSD AND _KDE3_USE_FLAGS)
+ if (CMAKE_SYSTEM_NAME MATCHES BSD AND _KDE3_USE_FLAGS)
+ set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common")
+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common")
+ endif (CMAKE_SYSTEM_NAME MATCHES BSD AND _KDE3_USE_FLAGS)
# if no special buildtype is selected, add -O2 as default optimization
- IF (NOT CMAKE_BUILD_TYPE AND _KDE3_USE_FLAGS)
- SET ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
- SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
- ENDIF (NOT CMAKE_BUILD_TYPE AND _KDE3_USE_FLAGS)
+ if (NOT CMAKE_BUILD_TYPE AND _KDE3_USE_FLAGS)
+ set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
+ endif (NOT CMAKE_BUILD_TYPE AND _KDE3_USE_FLAGS)
-#SET(CMAKE_SHARED_LINKER_FLAGS "-avoid-version -module -Wl,--no-undefined -Wl,--allow-shlib-undefined")
-#SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings -avoid-version -Wl,--no-undefined -lc")
-#SET(CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings -avoid-version -Wl,--no-undefined -lc")
-ENDIF(KDE3_FOUND)
+#set(CMAKE_SHARED_LINKER_FLAGS "-avoid-version -module -Wl,--no-undefined -Wl,--allow-shlib-undefined")
+#set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings -avoid-version -Wl,--no-undefined -lc")
+#set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings -avoid-version -Wl,--no-undefined -lc")
+endif(KDE3_FOUND)
# KDE3Macros.cmake contains all the KDE specific macros
-INCLUDE(KDE3Macros)
+include(KDE3Macros)
-MACRO (KDE3_PRINT_RESULTS)
- IF(KDE3_INCLUDE_DIR)
- MESSAGE(STATUS "Found KDE3 include dir: ${KDE3_INCLUDE_DIR}")
- ELSE(KDE3_INCLUDE_DIR)
- MESSAGE(STATUS "Didn't find KDE3 headers")
- ENDIF(KDE3_INCLUDE_DIR)
+macro (KDE3_PRINT_RESULTS)
+ if(KDE3_INCLUDE_DIR)
+ message(STATUS "Found KDE3 include dir: ${KDE3_INCLUDE_DIR}")
+ else(KDE3_INCLUDE_DIR)
+ message(STATUS "Didn't find KDE3 headers")
+ endif(KDE3_INCLUDE_DIR)
- IF(KDE3_LIB_DIR)
- MESSAGE(STATUS "Found KDE3 library dir: ${KDE3_LIB_DIR}")
- ELSE(KDE3_LIB_DIR)
- MESSAGE(STATUS "Didn't find KDE3 core library")
- ENDIF(KDE3_LIB_DIR)
+ if(KDE3_LIB_DIR)
+ message(STATUS "Found KDE3 library dir: ${KDE3_LIB_DIR}")
+ else(KDE3_LIB_DIR)
+ message(STATUS "Didn't find KDE3 core library")
+ endif(KDE3_LIB_DIR)
- IF(KDE3_DCOPIDL_EXECUTABLE)
- MESSAGE(STATUS "Found KDE3 dcopidl preprocessor: ${KDE3_DCOPIDL_EXECUTABLE}")
- ELSE(KDE3_DCOPIDL_EXECUTABLE)
- MESSAGE(STATUS "Didn't find the KDE3 dcopidl preprocessor")
- ENDIF(KDE3_DCOPIDL_EXECUTABLE)
+ if(KDE3_DCOPIDL_EXECUTABLE)
+ message(STATUS "Found KDE3 dcopidl preprocessor: ${KDE3_DCOPIDL_EXECUTABLE}")
+ else(KDE3_DCOPIDL_EXECUTABLE)
+ message(STATUS "Didn't find the KDE3 dcopidl preprocessor")
+ endif(KDE3_DCOPIDL_EXECUTABLE)
- IF(KDE3_DCOPIDL2CPP_EXECUTABLE)
- MESSAGE(STATUS "Found KDE3 dcopidl2cpp preprocessor: ${KDE3_DCOPIDL2CPP_EXECUTABLE}")
- ELSE(KDE3_DCOPIDL2CPP_EXECUTABLE)
- MESSAGE(STATUS "Didn't find the KDE3 dcopidl2cpp preprocessor")
- ENDIF(KDE3_DCOPIDL2CPP_EXECUTABLE)
+ if(KDE3_DCOPIDL2CPP_EXECUTABLE)
+ message(STATUS "Found KDE3 dcopidl2cpp preprocessor: ${KDE3_DCOPIDL2CPP_EXECUTABLE}")
+ else(KDE3_DCOPIDL2CPP_EXECUTABLE)
+ message(STATUS "Didn't find the KDE3 dcopidl2cpp preprocessor")
+ endif(KDE3_DCOPIDL2CPP_EXECUTABLE)
- IF(KDE3_KCFGC_EXECUTABLE)
- MESSAGE(STATUS "Found KDE3 kconfig_compiler preprocessor: ${KDE3_KCFGC_EXECUTABLE}")
- ELSE(KDE3_KCFGC_EXECUTABLE)
- MESSAGE(STATUS "Didn't find the KDE3 kconfig_compiler preprocessor")
- ENDIF(KDE3_KCFGC_EXECUTABLE)
+ if(KDE3_KCFGC_EXECUTABLE)
+ message(STATUS "Found KDE3 kconfig_compiler preprocessor: ${KDE3_KCFGC_EXECUTABLE}")
+ else(KDE3_KCFGC_EXECUTABLE)
+ message(STATUS "Didn't find the KDE3 kconfig_compiler preprocessor")
+ endif(KDE3_KCFGC_EXECUTABLE)
-ENDMACRO (KDE3_PRINT_RESULTS)
+endmacro (KDE3_PRINT_RESULTS)
-IF (KDE3_FIND_REQUIRED AND NOT KDE3_FOUND)
+if (KDE3_FIND_REQUIRED AND NOT KDE3_FOUND)
#bail out if something wasn't found
KDE3_PRINT_RESULTS()
- MESSAGE(FATAL_ERROR "Could NOT find everything required for compiling KDE 3 programs")
+ message(FATAL_ERROR "Could NOT find everything required for compiling KDE 3 programs")
-ENDIF (KDE3_FIND_REQUIRED AND NOT KDE3_FOUND)
+endif (KDE3_FIND_REQUIRED AND NOT KDE3_FOUND)
-IF (NOT KDE3_FIND_QUIETLY)
+if (NOT KDE3_FIND_QUIETLY)
KDE3_PRINT_RESULTS()
-ENDIF (NOT KDE3_FIND_QUIETLY)
+endif (NOT KDE3_FIND_QUIETLY)
#add the found Qt and KDE include directories to the current include path
-SET(KDE3_INCLUDE_DIRS ${QT_INCLUDE_DIR} ${KDE3_INCLUDE_DIR})
+set(KDE3_INCLUDE_DIRS ${QT_INCLUDE_DIR} ${KDE3_INCLUDE_DIR})
diff --git a/Modules/FindKDE4.cmake b/Modules/FindKDE4.cmake
index fb93328281..9cff20ebb9 100644
--- a/Modules/FindKDE4.cmake
+++ b/Modules/FindKDE4.cmake
@@ -24,18 +24,18 @@
# License text for the above reference.)
# If Qt3 has already been found, fail.
-IF(QT_QT_LIBRARY)
- IF(KDE4_FIND_REQUIRED)
- MESSAGE( FATAL_ERROR "KDE4/Qt4 and Qt3 cannot be used together in one project.")
- ELSE(KDE4_FIND_REQUIRED)
- IF(NOT KDE4_FIND_QUIETLY)
- MESSAGE( STATUS "KDE4/Qt4 and Qt3 cannot be used together in one project.")
- ENDIF(NOT KDE4_FIND_QUIETLY)
- RETURN()
- ENDIF(KDE4_FIND_REQUIRED)
-ENDIF(QT_QT_LIBRARY)
+if(QT_QT_LIBRARY)
+ if(KDE4_FIND_REQUIRED)
+ message( FATAL_ERROR "KDE4/Qt4 and Qt3 cannot be used together in one project.")
+ else(KDE4_FIND_REQUIRED)
+ if(NOT KDE4_FIND_QUIETLY)
+ message( STATUS "KDE4/Qt4 and Qt3 cannot be used together in one project.")
+ endif(NOT KDE4_FIND_QUIETLY)
+ return()
+ endif(KDE4_FIND_REQUIRED)
+endif(QT_QT_LIBRARY)
-FILE(TO_CMAKE_PATH "$ENV{KDEDIRS}" _KDEDIRS)
+file(TO_CMAKE_PATH "$ENV{KDEDIRS}" _KDEDIRS)
# when cross compiling, searching kde4-config in order to run it later on
# doesn't make a lot of sense. We'll have to do something about this.
@@ -43,7 +43,7 @@ FILE(TO_CMAKE_PATH "$ENV{KDEDIRS}" _KDEDIRS)
# still it can't be used to run it. Alex
# For KDE4 kde-config has been renamed to kde4-config
-FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config
+find_program(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config
# the suffix must be used since KDEDIRS can be a list of directories which don't have bin/ appended
PATH_SUFFIXES bin
HINTS
@@ -53,48 +53,48 @@ FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config
ONLY_CMAKE_FIND_ROOT_PATH
)
-IF (NOT KDE4_KDECONFIG_EXECUTABLE)
- IF (KDE4_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "ERROR: Could not find KDE4 kde4-config")
- ENDIF (KDE4_FIND_REQUIRED)
-ENDIF (NOT KDE4_KDECONFIG_EXECUTABLE)
+if (NOT KDE4_KDECONFIG_EXECUTABLE)
+ if (KDE4_FIND_REQUIRED)
+ message(FATAL_ERROR "ERROR: Could not find KDE4 kde4-config")
+ endif (KDE4_FIND_REQUIRED)
+endif (NOT KDE4_KDECONFIG_EXECUTABLE)
# when cross compiling, KDE4_DATA_DIR may be already preset
-IF(NOT KDE4_DATA_DIR)
- IF(CMAKE_CROSSCOMPILING)
+if(NOT KDE4_DATA_DIR)
+ if(CMAKE_CROSSCOMPILING)
# when cross compiling, don't run kde4-config but use its location as install dir
- GET_FILENAME_COMPONENT(KDE4_DATA_DIR "${KDE4_KDECONFIG_EXECUTABLE}" PATH)
- GET_FILENAME_COMPONENT(KDE4_DATA_DIR "${KDE4_DATA_DIR}" PATH)
- ELSE(CMAKE_CROSSCOMPILING)
+ get_filename_component(KDE4_DATA_DIR "${KDE4_KDECONFIG_EXECUTABLE}" PATH)
+ get_filename_component(KDE4_DATA_DIR "${KDE4_DATA_DIR}" PATH)
+ else(CMAKE_CROSSCOMPILING)
# then ask kde4-config for the kde data dirs
- IF(KDE4_KDECONFIG_EXECUTABLE)
- EXECUTE_PROCESS(COMMAND "${KDE4_KDECONFIG_EXECUTABLE}" --path data OUTPUT_VARIABLE _data_DIR ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
- FILE(TO_CMAKE_PATH "${_data_DIR}" _data_DIR)
+ if(KDE4_KDECONFIG_EXECUTABLE)
+ execute_process(COMMAND "${KDE4_KDECONFIG_EXECUTABLE}" --path data OUTPUT_VARIABLE _data_DIR ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+ file(TO_CMAKE_PATH "${_data_DIR}" _data_DIR)
# then check the data dirs for FindKDE4Internal.cmake
- FIND_PATH(KDE4_DATA_DIR cmake/modules/FindKDE4Internal.cmake HINTS ${_data_DIR})
- ENDIF(KDE4_KDECONFIG_EXECUTABLE)
- ENDIF(CMAKE_CROSSCOMPILING)
-ENDIF(NOT KDE4_DATA_DIR)
+ find_path(KDE4_DATA_DIR cmake/modules/FindKDE4Internal.cmake HINTS ${_data_DIR})
+ endif(KDE4_KDECONFIG_EXECUTABLE)
+ endif(CMAKE_CROSSCOMPILING)
+endif(NOT KDE4_DATA_DIR)
# if it has been found...
-IF (KDE4_DATA_DIR)
+if (KDE4_DATA_DIR)
- SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${KDE4_DATA_DIR}/cmake/modules)
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${KDE4_DATA_DIR}/cmake/modules)
- IF (KDE4_FIND_QUIETLY)
- SET(_quiet QUIET)
- ENDIF (KDE4_FIND_QUIETLY)
+ if (KDE4_FIND_QUIETLY)
+ set(_quiet QUIET)
+ endif (KDE4_FIND_QUIETLY)
- IF (KDE4_FIND_REQUIRED)
- SET(_req REQUIRED)
- ENDIF (KDE4_FIND_REQUIRED)
+ if (KDE4_FIND_REQUIRED)
+ set(_req REQUIRED)
+ endif (KDE4_FIND_REQUIRED)
# use FindKDE4Internal.cmake to do the rest
- FIND_PACKAGE(KDE4Internal ${_req} ${_quiet})
-ELSE (KDE4_DATA_DIR)
- IF (KDE4_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "ERROR: cmake/modules/FindKDE4Internal.cmake not found in ${_data_DIR}")
- ENDIF (KDE4_FIND_REQUIRED)
-ENDIF (KDE4_DATA_DIR)
+ find_package(KDE4Internal ${_req} ${_quiet})
+else (KDE4_DATA_DIR)
+ if (KDE4_FIND_REQUIRED)
+ message(FATAL_ERROR "ERROR: cmake/modules/FindKDE4Internal.cmake not found in ${_data_DIR}")
+ endif (KDE4_FIND_REQUIRED)
+endif (KDE4_DATA_DIR)
diff --git a/Modules/FindLATEX.cmake b/Modules/FindLATEX.cmake
index 7997ae9c8f..020272724a 100644
--- a/Modules/FindLATEX.cmake
+++ b/Modules/FindLATEX.cmake
@@ -24,97 +24,97 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-IF (WIN32)
+if (WIN32)
# Try to find the MikTex binary path (look for its package manager).
- FIND_PATH(MIKTEX_BINARY_PATH mpm.exe
+ find_path(MIKTEX_BINARY_PATH mpm.exe
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MiK\\MiKTeX\\CurrentVersion\\MiKTeX;Install Root]/miktex/bin"
DOC
"Path to the MikTex binary directory."
)
- MARK_AS_ADVANCED(MIKTEX_BINARY_PATH)
+ mark_as_advanced(MIKTEX_BINARY_PATH)
# Try to find the GhostScript binary path (look for gswin32).
- GET_FILENAME_COMPONENT(GHOSTSCRIPT_BINARY_PATH_FROM_REGISTERY_8_00
+ get_filename_component(GHOSTSCRIPT_BINARY_PATH_FROM_REGISTERY_8_00
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\AFPL Ghostscript\\8.00;GS_DLL]" PATH
)
- GET_FILENAME_COMPONENT(GHOSTSCRIPT_BINARY_PATH_FROM_REGISTERY_7_04
+ get_filename_component(GHOSTSCRIPT_BINARY_PATH_FROM_REGISTERY_7_04
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\AFPL Ghostscript\\7.04;GS_DLL]" PATH
)
- FIND_PATH(GHOSTSCRIPT_BINARY_PATH gswin32.exe
+ find_path(GHOSTSCRIPT_BINARY_PATH gswin32.exe
${GHOSTSCRIPT_BINARY_PATH_FROM_REGISTERY_8_00}
${GHOSTSCRIPT_BINARY_PATH_FROM_REGISTERY_7_04}
DOC "Path to the GhostScript binary directory."
)
- MARK_AS_ADVANCED(GHOSTSCRIPT_BINARY_PATH)
+ mark_as_advanced(GHOSTSCRIPT_BINARY_PATH)
- FIND_PATH(GHOSTSCRIPT_LIBRARY_PATH ps2pdf13.bat
+ find_path(GHOSTSCRIPT_LIBRARY_PATH ps2pdf13.bat
"${GHOSTSCRIPT_BINARY_PATH}/../lib"
DOC "Path to the GhostScript library directory."
)
- MARK_AS_ADVANCED(GHOSTSCRIPT_LIBRARY_PATH)
+ mark_as_advanced(GHOSTSCRIPT_LIBRARY_PATH)
-ENDIF (WIN32)
+endif (WIN32)
-FIND_PROGRAM(LATEX_COMPILER
+find_program(LATEX_COMPILER
NAMES latex
PATHS ${MIKTEX_BINARY_PATH}
/usr/bin
)
-FIND_PROGRAM(PDFLATEX_COMPILER
+find_program(PDFLATEX_COMPILER
NAMES pdflatex
PATHS ${MIKTEX_BINARY_PATH}
/usr/bin
)
-FIND_PROGRAM(BIBTEX_COMPILER
+find_program(BIBTEX_COMPILER
NAMES bibtex
PATHS ${MIKTEX_BINARY_PATH}
/usr/bin
)
-FIND_PROGRAM(MAKEINDEX_COMPILER
+find_program(MAKEINDEX_COMPILER
NAMES makeindex
PATHS ${MIKTEX_BINARY_PATH}
/usr/bin
)
-FIND_PROGRAM(DVIPS_CONVERTER
+find_program(DVIPS_CONVERTER
NAMES dvips
PATHS ${MIKTEX_BINARY_PATH}
/usr/bin
)
-FIND_PROGRAM(DVIPDF_CONVERTER
+find_program(DVIPDF_CONVERTER
NAMES dvipdfm dvipdft dvipdf
PATHS ${MIKTEX_BINARY_PATH}
/usr/bin
)
-IF (WIN32)
- FIND_PROGRAM(PS2PDF_CONVERTER
+if (WIN32)
+ find_program(PS2PDF_CONVERTER
NAMES ps2pdf14.bat
PATHS ${GHOSTSCRIPT_LIBRARY_PATH}
)
-ELSE (WIN32)
- FIND_PROGRAM(PS2PDF_CONVERTER
+else (WIN32)
+ find_program(PS2PDF_CONVERTER
NAMES ps2pdf14 ps2pdf
)
-ENDIF (WIN32)
+endif (WIN32)
-FIND_PROGRAM(LATEX2HTML_CONVERTER
+find_program(LATEX2HTML_CONVERTER
NAMES latex2html
PATHS ${MIKTEX_BINARY_PATH}
/usr/bin
)
-MARK_AS_ADVANCED(
+mark_as_advanced(
LATEX_COMPILER
PDFLATEX_COMPILER
BIBTEX_COMPILER
diff --git a/Modules/FindLibLZMA.cmake b/Modules/FindLibLZMA.cmake
index 729f5ce732..852d613142 100644
--- a/Modules/FindLibLZMA.cmake
+++ b/Modules/FindLibLZMA.cmake
@@ -29,30 +29,30 @@
# License text for the above reference.)
-FIND_PATH(LIBLZMA_INCLUDE_DIR lzma.h )
-FIND_LIBRARY(LIBLZMA_LIBRARY lzma)
+find_path(LIBLZMA_INCLUDE_DIR lzma.h )
+find_library(LIBLZMA_LIBRARY lzma)
-IF(LIBLZMA_INCLUDE_DIR AND EXISTS "${LIBLZMA_INCLUDE_DIR}/lzma/version.h")
- FILE(READ "${LIBLZMA_INCLUDE_DIR}/lzma/version.h" LIBLZMA_HEADER_CONTENTS)
+if(LIBLZMA_INCLUDE_DIR AND EXISTS "${LIBLZMA_INCLUDE_DIR}/lzma/version.h")
+ file(READ "${LIBLZMA_INCLUDE_DIR}/lzma/version.h" LIBLZMA_HEADER_CONTENTS)
- STRING(REGEX REPLACE ".*#define LZMA_VERSION_MAJOR ([0-9]+).*" "\\1" LIBLZMA_VERSION_MAJOR "${LIBLZMA_HEADER_CONTENTS}")
- STRING(REGEX REPLACE ".*#define LZMA_VERSION_MINOR ([0-9]+).*" "\\1" LIBLZMA_VERSION_MINOR "${LIBLZMA_HEADER_CONTENTS}")
- STRING(REGEX REPLACE ".*#define LZMA_VERSION_PATCH ([0-9]+).*" "\\1" LIBLZMA_VERSION_PATCH "${LIBLZMA_HEADER_CONTENTS}")
+ string(REGEX REPLACE ".*#define LZMA_VERSION_MAJOR ([0-9]+).*" "\\1" LIBLZMA_VERSION_MAJOR "${LIBLZMA_HEADER_CONTENTS}")
+ string(REGEX REPLACE ".*#define LZMA_VERSION_MINOR ([0-9]+).*" "\\1" LIBLZMA_VERSION_MINOR "${LIBLZMA_HEADER_CONTENTS}")
+ string(REGEX REPLACE ".*#define LZMA_VERSION_PATCH ([0-9]+).*" "\\1" LIBLZMA_VERSION_PATCH "${LIBLZMA_HEADER_CONTENTS}")
- SET(LIBLZMA_VERSION_STRING "${LIBLZMA_VERSION_MAJOR}.${LIBLZMA_VERSION_MINOR}.${LIBLZMA_VERSION_PATCH}")
-ENDIF(LIBLZMA_INCLUDE_DIR AND EXISTS "${LIBLZMA_INCLUDE_DIR}/lzma/version.h")
+ set(LIBLZMA_VERSION_STRING "${LIBLZMA_VERSION_MAJOR}.${LIBLZMA_VERSION_MINOR}.${LIBLZMA_VERSION_PATCH}")
+endif(LIBLZMA_INCLUDE_DIR AND EXISTS "${LIBLZMA_INCLUDE_DIR}/lzma/version.h")
# We're using new code known now as XZ, even library still been called LZMA
# it can be found in http://tukaani.org/xz/
# Avoid using old codebase
-IF (LIBLZMA_LIBRARY)
- INCLUDE(CheckLibraryExists)
+if (LIBLZMA_LIBRARY)
+ include(CheckLibraryExists)
CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARY} lzma_auto_decoder "" LIBLZMA_HAS_AUTO_DECODER)
CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARY} lzma_easy_encoder "" LIBLZMA_HAS_EASY_ENCODER)
CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARY} lzma_lzma_preset "" LIBLZMA_HAS_LZMA_PRESET)
-ENDIF (LIBLZMA_LIBRARY)
+endif (LIBLZMA_LIBRARY)
-INCLUDE(FindPackageHandleStandardArgs)
+include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibLZMA REQUIRED_VARS LIBLZMA_INCLUDE_DIR
LIBLZMA_LIBRARY
LIBLZMA_HAS_AUTO_DECODER
@@ -61,9 +61,9 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibLZMA REQUIRED_VARS LIBLZMA_INCLUDE_DIR
VERSION_VAR LIBLZMA_VERSION_STRING
)
-IF (LIBLZMA_FOUND)
- SET(LIBLZMA_LIBRARIES ${LIBLZMA_LIBRARY})
- SET(LIBLZMA_INCLUDE_DIRS ${LIBLZMA_INCLUDE_DIR})
-ENDIF (LIBLZMA_FOUND)
+if (LIBLZMA_FOUND)
+ set(LIBLZMA_LIBRARIES ${LIBLZMA_LIBRARY})
+ set(LIBLZMA_INCLUDE_DIRS ${LIBLZMA_INCLUDE_DIR})
+endif (LIBLZMA_FOUND)
-MARK_AS_ADVANCED( LIBLZMA_INCLUDE_DIR LIBLZMA_LIBRARY )
+mark_as_advanced( LIBLZMA_INCLUDE_DIR LIBLZMA_LIBRARY )
diff --git a/Modules/FindLibXml2.cmake b/Modules/FindLibXml2.cmake
index 4fc5d88b1c..858496e09a 100644
--- a/Modules/FindLibXml2.cmake
+++ b/Modules/FindLibXml2.cmake
@@ -23,44 +23,44 @@
# License text for the above reference.)
# use pkg-config to get the directories and then use these values
-# in the FIND_PATH() and FIND_LIBRARY() calls
-FIND_PACKAGE(PkgConfig QUIET)
+# in the find_path() and find_library() calls
+find_package(PkgConfig QUIET)
PKG_CHECK_MODULES(PC_LIBXML QUIET libxml-2.0)
-SET(LIBXML2_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER})
+set(LIBXML2_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER})
-FIND_PATH(LIBXML2_INCLUDE_DIR NAMES libxml/xpath.h
+find_path(LIBXML2_INCLUDE_DIR NAMES libxml/xpath.h
HINTS
${PC_LIBXML_INCLUDEDIR}
${PC_LIBXML_INCLUDE_DIRS}
PATH_SUFFIXES libxml2
)
-FIND_LIBRARY(LIBXML2_LIBRARIES NAMES xml2 libxml2
+find_library(LIBXML2_LIBRARIES NAMES xml2 libxml2
HINTS
${PC_LIBXML_LIBDIR}
${PC_LIBXML_LIBRARY_DIRS}
)
-FIND_PROGRAM(LIBXML2_XMLLINT_EXECUTABLE xmllint)
+find_program(LIBXML2_XMLLINT_EXECUTABLE xmllint)
# for backwards compat. with KDE 4.0.x:
-SET(XMLLINT_EXECUTABLE "${LIBXML2_XMLLINT_EXECUTABLE}")
+set(XMLLINT_EXECUTABLE "${LIBXML2_XMLLINT_EXECUTABLE}")
-IF(PC_LIBXML_VERSION)
- SET(LIBXML2_VERSION_STRING ${PC_LIBXML_VERSION})
-ELSEIF(LIBXML2_INCLUDE_DIR AND EXISTS "${LIBXML2_INCLUDE_DIR}/libxml/xmlversion.h")
- FILE(STRINGS "${LIBXML2_INCLUDE_DIR}/libxml/xmlversion.h" libxml2_version_str
+if(PC_LIBXML_VERSION)
+ set(LIBXML2_VERSION_STRING ${PC_LIBXML_VERSION})
+elseif(LIBXML2_INCLUDE_DIR AND EXISTS "${LIBXML2_INCLUDE_DIR}/libxml/xmlversion.h")
+ file(STRINGS "${LIBXML2_INCLUDE_DIR}/libxml/xmlversion.h" libxml2_version_str
REGEX "^#define[\t ]+LIBXML_DOTTED_VERSION[\t ]+\".*\"")
- STRING(REGEX REPLACE "^#define[\t ]+LIBXML_DOTTED_VERSION[\t ]+\"([^\"]*)\".*" "\\1"
+ string(REGEX REPLACE "^#define[\t ]+LIBXML_DOTTED_VERSION[\t ]+\"([^\"]*)\".*" "\\1"
LIBXML2_VERSION_STRING "${libxml2_version_str}")
- UNSET(libxml2_version_str)
-ENDIF()
+ unset(libxml2_version_str)
+endif()
# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2
REQUIRED_VARS LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR
VERSION_VAR LIBXML2_VERSION_STRING)
-MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES LIBXML2_XMLLINT_EXECUTABLE)
+mark_as_advanced(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES LIBXML2_XMLLINT_EXECUTABLE)
diff --git a/Modules/FindLibXslt.cmake b/Modules/FindLibXslt.cmake
index dd5aac4615..7d142f4309 100644
--- a/Modules/FindLibXslt.cmake
+++ b/Modules/FindLibXslt.cmake
@@ -25,50 +25,50 @@
# License text for the above reference.)
# use pkg-config to get the directories and then use these values
-# in the FIND_PATH() and FIND_LIBRARY() calls
-FIND_PACKAGE(PkgConfig QUIET)
+# in the find_path() and find_library() calls
+find_package(PkgConfig QUIET)
PKG_CHECK_MODULES(PC_LIBXSLT QUIET libxslt)
-SET(LIBXSLT_DEFINITIONS ${PC_LIBXSLT_CFLAGS_OTHER})
+set(LIBXSLT_DEFINITIONS ${PC_LIBXSLT_CFLAGS_OTHER})
-FIND_PATH(LIBXSLT_INCLUDE_DIR NAMES libxslt/xslt.h
+find_path(LIBXSLT_INCLUDE_DIR NAMES libxslt/xslt.h
HINTS
${PC_LIBXSLT_INCLUDEDIR}
${PC_LIBXSLT_INCLUDE_DIRS}
)
-FIND_LIBRARY(LIBXSLT_LIBRARIES NAMES xslt libxslt
+find_library(LIBXSLT_LIBRARIES NAMES xslt libxslt
HINTS
${PC_LIBXSLT_LIBDIR}
${PC_LIBXSLT_LIBRARY_DIRS}
)
-FIND_LIBRARY(LIBXSLT_EXSLT_LIBRARY NAMES exslt libexslt
+find_library(LIBXSLT_EXSLT_LIBRARY NAMES exslt libexslt
HINTS
${PC_LIBXSLT_LIBDIR}
${PC_LIBXSLT_LIBRARY_DIRS}
)
-SET(LIBXSLT_EXSLT_LIBRARIES ${LIBXSLT_EXSLT_LIBRARY} )
+set(LIBXSLT_EXSLT_LIBRARIES ${LIBXSLT_EXSLT_LIBRARY} )
-FIND_PROGRAM(LIBXSLT_XSLTPROC_EXECUTABLE xsltproc)
+find_program(LIBXSLT_XSLTPROC_EXECUTABLE xsltproc)
-IF(PC_LIBXSLT_VERSION)
- SET(LIBXSLT_VERSION_STRING ${PC_LIBXSLT_VERSION})
-ELSEIF(LIBXSLT_INCLUDE_DIR AND EXISTS "${LIBXSLT_INCLUDE_DIR}/libxslt/xsltconfig.h")
- FILE(STRINGS "${LIBXSLT_INCLUDE_DIR}/libxslt/xsltconfig.h" libxslt_version_str
+if(PC_LIBXSLT_VERSION)
+ set(LIBXSLT_VERSION_STRING ${PC_LIBXSLT_VERSION})
+elseif(LIBXSLT_INCLUDE_DIR AND EXISTS "${LIBXSLT_INCLUDE_DIR}/libxslt/xsltconfig.h")
+ file(STRINGS "${LIBXSLT_INCLUDE_DIR}/libxslt/xsltconfig.h" libxslt_version_str
REGEX "^#define[\t ]+LIBXSLT_DOTTED_VERSION[\t ]+\".*\"")
- STRING(REGEX REPLACE "^#define[\t ]+LIBXSLT_DOTTED_VERSION[\t ]+\"([^\"]*)\".*" "\\1"
+ string(REGEX REPLACE "^#define[\t ]+LIBXSLT_DOTTED_VERSION[\t ]+\"([^\"]*)\".*" "\\1"
LIBXSLT_VERSION_STRING "${libxslt_version_str}")
- UNSET(libxslt_version_str)
-ENDIF()
+ unset(libxslt_version_str)
+endif()
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXslt
REQUIRED_VARS LIBXSLT_LIBRARIES LIBXSLT_INCLUDE_DIR
VERSION_VAR LIBXSLT_VERSION_STRING)
-MARK_AS_ADVANCED(LIBXSLT_INCLUDE_DIR
+mark_as_advanced(LIBXSLT_INCLUDE_DIR
LIBXSLT_LIBRARIES
LIBXSLT_EXSLT_LIBRARY
LIBXSLT_XSLTPROC_EXECUTABLE)
diff --git a/Modules/FindLua50.cmake b/Modules/FindLua50.cmake
index 5196cf758f..cfe2e7294b 100644
--- a/Modules/FindLua50.cmake
+++ b/Modules/FindLua50.cmake
@@ -24,7 +24,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PATH(LUA_INCLUDE_DIR lua.h
+find_path(LUA_INCLUDE_DIR lua.h
HINTS
$ENV{LUA_DIR}
PATH_SUFFIXES include/lua50 include/lua5.0 include/lua5 include/lua include
@@ -37,7 +37,7 @@ FIND_PATH(LUA_INCLUDE_DIR lua.h
/opt
)
-FIND_LIBRARY(LUA_LIBRARY_lua
+find_library(LUA_LIBRARY_lua
NAMES lua50 lua5.0 lua-5.0 lua5 lua
HINTS
$ENV{LUA_DIR}
@@ -53,10 +53,10 @@ FIND_LIBRARY(LUA_LIBRARY_lua
# In an OS X framework, lualib is usually included as part of the framework
# (like GLU in OpenGL.framework)
-IF(${LUA_LIBRARY_lua} MATCHES "framework")
- SET( LUA_LIBRARIES "${LUA_LIBRARY_lua}" CACHE STRING "Lua framework")
-ELSE(${LUA_LIBRARY_lua} MATCHES "framework")
- FIND_LIBRARY(LUA_LIBRARY_lualib
+if(${LUA_LIBRARY_lua} MATCHES "framework")
+ set( LUA_LIBRARIES "${LUA_LIBRARY_lua}" CACHE STRING "Lua framework")
+else(${LUA_LIBRARY_lua} MATCHES "framework")
+ find_library(LUA_LIBRARY_lualib
NAMES lualib50 lualib5.0 lualib5 lualib
HINTS
$ENV{LUALIB_DIR}
@@ -68,23 +68,23 @@ ELSE(${LUA_LIBRARY_lua} MATCHES "framework")
/opt/csw
/opt
)
- IF(LUA_LIBRARY_lualib AND LUA_LIBRARY_lua)
+ if(LUA_LIBRARY_lualib AND LUA_LIBRARY_lua)
# include the math library for Unix
- IF(UNIX AND NOT APPLE)
- FIND_LIBRARY(MATH_LIBRARY_FOR_LUA m)
- SET( LUA_LIBRARIES "${LUA_LIBRARY_lualib};${LUA_LIBRARY_lua};${MATH_LIBRARY_FOR_LUA}" CACHE STRING "This is the concatentation of lua and lualib libraries")
+ if(UNIX AND NOT APPLE)
+ find_library(MATH_LIBRARY_FOR_LUA m)
+ set( LUA_LIBRARIES "${LUA_LIBRARY_lualib};${LUA_LIBRARY_lua};${MATH_LIBRARY_FOR_LUA}" CACHE STRING "This is the concatentation of lua and lualib libraries")
# For Windows and Mac, don't need to explicitly include the math library
- ELSE(UNIX AND NOT APPLE)
- SET( LUA_LIBRARIES "${LUA_LIBRARY_lualib};${LUA_LIBRARY_lua}" CACHE STRING "This is the concatentation of lua and lualib libraries")
- ENDIF(UNIX AND NOT APPLE)
- ENDIF(LUA_LIBRARY_lualib AND LUA_LIBRARY_lua)
-ENDIF(${LUA_LIBRARY_lua} MATCHES "framework")
+ else(UNIX AND NOT APPLE)
+ set( LUA_LIBRARIES "${LUA_LIBRARY_lualib};${LUA_LIBRARY_lua}" CACHE STRING "This is the concatentation of lua and lualib libraries")
+ endif(UNIX AND NOT APPLE)
+ endif(LUA_LIBRARY_lualib AND LUA_LIBRARY_lua)
+endif(${LUA_LIBRARY_lua} MATCHES "framework")
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua50 DEFAULT_MSG LUA_LIBRARIES LUA_INCLUDE_DIR)
-MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARIES)
+mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARIES)
diff --git a/Modules/FindLua51.cmake b/Modules/FindLua51.cmake
index 468b5d4fc7..2d189e4c6f 100644
--- a/Modules/FindLua51.cmake
+++ b/Modules/FindLua51.cmake
@@ -25,7 +25,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PATH(LUA_INCLUDE_DIR lua.h
+find_path(LUA_INCLUDE_DIR lua.h
HINTS
$ENV{LUA_DIR}
PATH_SUFFIXES include/lua51 include/lua5.1 include/lua include
@@ -38,7 +38,7 @@ FIND_PATH(LUA_INCLUDE_DIR lua.h
/opt
)
-FIND_LIBRARY(LUA_LIBRARY
+find_library(LUA_LIBRARY
NAMES lua51 lua5.1 lua-5.1 lua
HINTS
$ENV{LUA_DIR}
@@ -52,30 +52,30 @@ FIND_LIBRARY(LUA_LIBRARY
/opt
)
-IF(LUA_LIBRARY)
+if(LUA_LIBRARY)
# include the math library for Unix
- IF(UNIX AND NOT APPLE)
- FIND_LIBRARY(LUA_MATH_LIBRARY m)
- SET( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
+ if(UNIX AND NOT APPLE)
+ find_library(LUA_MATH_LIBRARY m)
+ set( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
# For Windows and Mac, don't need to explicitly include the math library
- ELSE(UNIX AND NOT APPLE)
- SET( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
- ENDIF(UNIX AND NOT APPLE)
-ENDIF(LUA_LIBRARY)
+ else(UNIX AND NOT APPLE)
+ set( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
+ endif(UNIX AND NOT APPLE)
+endif(LUA_LIBRARY)
-IF(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h")
- FILE(STRINGS "${LUA_INCLUDE_DIR}/lua.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua .+\"")
+if(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h")
+ file(STRINGS "${LUA_INCLUDE_DIR}/lua.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua .+\"")
- STRING(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([^\"]+)\".*" "\\1" LUA_VERSION_STRING "${lua_version_str}")
- UNSET(lua_version_str)
-ENDIF()
+ string(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([^\"]+)\".*" "\\1" LUA_VERSION_STRING "${lua_version_str}")
+ unset(lua_version_str)
+endif()
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua51
REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
VERSION_VAR LUA_VERSION_STRING)
-MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)
+mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)
diff --git a/Modules/FindMFC.cmake b/Modules/FindMFC.cmake
index 3df2842412..f45046dca3 100644
--- a/Modules/FindMFC.cmake
+++ b/Modules/FindMFC.cmake
@@ -18,43 +18,43 @@
# License text for the above reference.)
# Assume no MFC support
-SET(MFC_FOUND "NO")
+set(MFC_FOUND "NO")
# Only attempt the try_compile call if it has a chance to succeed:
-SET(MFC_ATTEMPT_TRY_COMPILE 0)
-IF(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW)
- SET(MFC_ATTEMPT_TRY_COMPILE 1)
-ENDIF(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW)
+set(MFC_ATTEMPT_TRY_COMPILE 0)
+if(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW)
+ set(MFC_ATTEMPT_TRY_COMPILE 1)
+endif(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW)
-IF(MFC_ATTEMPT_TRY_COMPILE)
- IF("MFC_HAVE_MFC" MATCHES "^MFC_HAVE_MFC$")
- SET(CHECK_INCLUDE_FILE_VAR "afxwin.h")
- CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in
+if(MFC_ATTEMPT_TRY_COMPILE)
+ if("MFC_HAVE_MFC" MATCHES "^MFC_HAVE_MFC$")
+ set(CHECK_INCLUDE_FILE_VAR "afxwin.h")
+ configure_file(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx)
- MESSAGE(STATUS "Looking for MFC")
- TRY_COMPILE(MFC_HAVE_MFC
+ message(STATUS "Looking for MFC")
+ try_compile(MFC_HAVE_MFC
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx
CMAKE_FLAGS
-DCMAKE_MFC_FLAG:STRING=2
-DCOMPILE_DEFINITIONS:STRING=-D_AFXDLL
OUTPUT_VARIABLE OUTPUT)
- IF(MFC_HAVE_MFC)
- MESSAGE(STATUS "Looking for MFC - found")
- SET(MFC_HAVE_MFC 1 CACHE INTERNAL "Have MFC?")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ if(MFC_HAVE_MFC)
+ message(STATUS "Looking for MFC - found")
+ set(MFC_HAVE_MFC 1 CACHE INTERNAL "Have MFC?")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if MFC exists passed with the following output:\n"
"${OUTPUT}\n\n")
- ELSE(MFC_HAVE_MFC)
- MESSAGE(STATUS "Looking for MFC - not found")
- SET(MFC_HAVE_MFC 0 CACHE INTERNAL "Have MFC?")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ else(MFC_HAVE_MFC)
+ message(STATUS "Looking for MFC - not found")
+ set(MFC_HAVE_MFC 0 CACHE INTERNAL "Have MFC?")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if MFC exists failed with the following output:\n"
"${OUTPUT}\n\n")
- ENDIF(MFC_HAVE_MFC)
- ENDIF("MFC_HAVE_MFC" MATCHES "^MFC_HAVE_MFC$")
+ endif(MFC_HAVE_MFC)
+ endif("MFC_HAVE_MFC" MATCHES "^MFC_HAVE_MFC$")
- IF(MFC_HAVE_MFC)
- SET(MFC_FOUND "YES")
- ENDIF(MFC_HAVE_MFC)
-ENDIF(MFC_ATTEMPT_TRY_COMPILE)
+ if(MFC_HAVE_MFC)
+ set(MFC_FOUND "YES")
+ endif(MFC_HAVE_MFC)
+endif(MFC_ATTEMPT_TRY_COMPILE)
diff --git a/Modules/FindMPEG.cmake b/Modules/FindMPEG.cmake
index 545e0490cb..698329e9b0 100644
--- a/Modules/FindMPEG.cmake
+++ b/Modules/FindMPEG.cmake
@@ -20,25 +20,25 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PATH(MPEG_INCLUDE_DIR mpeg2dec/include/video_out.h
+find_path(MPEG_INCLUDE_DIR mpeg2dec/include/video_out.h
/usr/local/livid
)
-FIND_LIBRARY(MPEG_mpeg2_LIBRARY mpeg2
+find_library(MPEG_mpeg2_LIBRARY mpeg2
/usr/local/livid/mpeg2dec/libmpeg2/.libs
)
-FIND_LIBRARY( MPEG_vo_LIBRARY vo
+find_library( MPEG_vo_LIBRARY vo
/usr/local/livid/mpeg2dec/libvo/.libs
)
# handle the QUIETLY and REQUIRED arguments and set MPEG2_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG DEFAULT_MSG MPEG_INCLUDE_DIR MPEG_mpeg2_LIBRARY MPEG_vo_LIBRARY)
-IF(MPEG_FOUND)
- SET( MPEG_LIBRARIES ${MPEG_mpeg2_LIBRARY} ${MPEG_vo_LIBRARY} )
-ENDIF(MPEG_FOUND)
+if(MPEG_FOUND)
+ set( MPEG_LIBRARIES ${MPEG_mpeg2_LIBRARY} ${MPEG_vo_LIBRARY} )
+endif(MPEG_FOUND)
-MARK_AS_ADVANCED(MPEG_INCLUDE_DIR MPEG_mpeg2_LIBRARY MPEG_vo_LIBRARY)
+mark_as_advanced(MPEG_INCLUDE_DIR MPEG_mpeg2_LIBRARY MPEG_vo_LIBRARY)
diff --git a/Modules/FindMPEG2.cmake b/Modules/FindMPEG2.cmake
index 5456e20b6b..153ed7f573 100644
--- a/Modules/FindMPEG2.cmake
+++ b/Modules/FindMPEG2.cmake
@@ -20,35 +20,35 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PATH(MPEG2_INCLUDE_DIR
+find_path(MPEG2_INCLUDE_DIR
NAMES mpeg2.h mpeg2dec/mpeg2.h
PATHS /usr/local/livid
)
-FIND_LIBRARY(MPEG2_mpeg2_LIBRARY mpeg2
+find_library(MPEG2_mpeg2_LIBRARY mpeg2
/usr/local/livid/mpeg2dec/libmpeg2/.libs
)
-FIND_LIBRARY( MPEG2_vo_LIBRARY vo
+find_library( MPEG2_vo_LIBRARY vo
/usr/local/livid/mpeg2dec/libvo/.libs
)
# handle the QUIETLY and REQUIRED arguments and set MPEG2_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG2 DEFAULT_MSG MPEG2_mpeg2_LIBRARY MPEG2_INCLUDE_DIR)
-IF(MPEG2_FOUND)
- SET( MPEG2_LIBRARIES ${MPEG2_mpeg2_LIBRARY}
+if(MPEG2_FOUND)
+ set( MPEG2_LIBRARIES ${MPEG2_mpeg2_LIBRARY}
${MPEG2_vo_LIBRARY})
#some native mpeg2 installations will depend
#on libSDL, if found, add it in.
- INCLUDE( FindSDL )
- IF(SDL_FOUND)
- SET( MPEG2_LIBRARIES ${MPEG2_LIBRARIES} ${SDL_LIBRARY})
- ENDIF(SDL_FOUND)
-ENDIF(MPEG2_FOUND)
+ include( FindSDL )
+ if(SDL_FOUND)
+ set( MPEG2_LIBRARIES ${MPEG2_LIBRARIES} ${SDL_LIBRARY})
+ endif(SDL_FOUND)
+endif(MPEG2_FOUND)
-MARK_AS_ADVANCED(MPEG2_INCLUDE_DIR MPEG2_mpeg2_LIBRARY MPEG2_vo_LIBRARY)
+mark_as_advanced(MPEG2_INCLUDE_DIR MPEG2_mpeg2_LIBRARY MPEG2_vo_LIBRARY)
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index 1cdb07174b..20dc1daf91 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -19,75 +19,75 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-SET(MATLAB_FOUND 0)
-IF(WIN32)
- IF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
- SET(MATLAB_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT]/extern/lib/win32/microsoft/msvc60")
- ELSE(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
- IF(${CMAKE_GENERATOR} MATCHES "Visual Studio 7")
+set(MATLAB_FOUND 0)
+if(WIN32)
+ if(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
+ set(MATLAB_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT]/extern/lib/win32/microsoft/msvc60")
+ else(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
+ if(${CMAKE_GENERATOR} MATCHES "Visual Studio 7")
# Assume people are generally using 7.1,
# if using 7.0 need to link to: ../extern/lib/win32/microsoft/msvc70
- SET(MATLAB_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT]/extern/lib/win32/microsoft/msvc71")
- ELSE(${CMAKE_GENERATOR} MATCHES "Visual Studio 7")
- IF(${CMAKE_GENERATOR} MATCHES "Borland")
+ set(MATLAB_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT]/extern/lib/win32/microsoft/msvc71")
+ else(${CMAKE_GENERATOR} MATCHES "Visual Studio 7")
+ if(${CMAKE_GENERATOR} MATCHES "Borland")
# Same here, there are also: bcc50 and bcc51 directories
- SET(MATLAB_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT]/extern/lib/win32/microsoft/bcc54")
- ELSE(${CMAKE_GENERATOR} MATCHES "Borland")
- IF(MATLAB_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Generator not compatible: ${CMAKE_GENERATOR}")
- ENDIF(MATLAB_FIND_REQUIRED)
- ENDIF(${CMAKE_GENERATOR} MATCHES "Borland")
- ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio 7")
- ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
- FIND_LIBRARY(MATLAB_MEX_LIBRARY
+ set(MATLAB_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT]/extern/lib/win32/microsoft/bcc54")
+ else(${CMAKE_GENERATOR} MATCHES "Borland")
+ if(MATLAB_FIND_REQUIRED)
+ message(FATAL_ERROR "Generator not compatible: ${CMAKE_GENERATOR}")
+ endif(MATLAB_FIND_REQUIRED)
+ endif(${CMAKE_GENERATOR} MATCHES "Borland")
+ endif(${CMAKE_GENERATOR} MATCHES "Visual Studio 7")
+ endif(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
+ find_library(MATLAB_MEX_LIBRARY
libmex
${MATLAB_ROOT}
)
- FIND_LIBRARY(MATLAB_MX_LIBRARY
+ find_library(MATLAB_MX_LIBRARY
libmx
${MATLAB_ROOT}
)
- FIND_LIBRARY(MATLAB_ENG_LIBRARY
+ find_library(MATLAB_ENG_LIBRARY
libeng
${MATLAB_ROOT}
)
- FIND_PATH(MATLAB_INCLUDE_DIR
+ find_path(MATLAB_INCLUDE_DIR
"mex.h"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT]/extern/include"
)
-ELSE( WIN32 )
- IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
+else( WIN32 )
+ if(CMAKE_SIZEOF_VOID_P EQUAL 4)
# Regular x86
- SET(MATLAB_ROOT
+ set(MATLAB_ROOT
/usr/local/matlab-7sp1/bin/glnx86/
/opt/matlab-7sp1/bin/glnx86/
$ENV{HOME}/matlab-7sp1/bin/glnx86/
$ENV{HOME}/redhat-matlab/bin/glnx86/
)
- ELSE(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ else(CMAKE_SIZEOF_VOID_P EQUAL 4)
# AMD64:
- SET(MATLAB_ROOT
+ set(MATLAB_ROOT
/usr/local/matlab-7sp1/bin/glnxa64/
/opt/matlab-7sp1/bin/glnxa64/
$ENV{HOME}/matlab7_64/bin/glnxa64/
$ENV{HOME}/matlab-7sp1/bin/glnxa64/
$ENV{HOME}/redhat-matlab/bin/glnxa64/
)
- ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 4)
- FIND_LIBRARY(MATLAB_MEX_LIBRARY
+ endif(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ find_library(MATLAB_MEX_LIBRARY
mex
${MATLAB_ROOT}
)
- FIND_LIBRARY(MATLAB_MX_LIBRARY
+ find_library(MATLAB_MX_LIBRARY
mx
${MATLAB_ROOT}
)
- FIND_LIBRARY(MATLAB_ENG_LIBRARY
+ find_library(MATLAB_ENG_LIBRARY
eng
${MATLAB_ROOT}
)
- FIND_PATH(MATLAB_INCLUDE_DIR
+ find_path(MATLAB_INCLUDE_DIR
"mex.h"
"/usr/local/matlab-7sp1/extern/include/"
"/opt/matlab-7sp1/extern/include/"
@@ -95,20 +95,20 @@ ELSE( WIN32 )
"$ENV{HOME}/redhat-matlab/extern/include/"
)
-ENDIF(WIN32)
+endif(WIN32)
# This is common to UNIX and Win32:
-SET(MATLAB_LIBRARIES
+set(MATLAB_LIBRARIES
${MATLAB_MEX_LIBRARY}
${MATLAB_MX_LIBRARY}
${MATLAB_ENG_LIBRARY}
)
-IF(MATLAB_INCLUDE_DIR AND MATLAB_LIBRARIES)
- SET(MATLAB_FOUND 1)
-ENDIF(MATLAB_INCLUDE_DIR AND MATLAB_LIBRARIES)
+if(MATLAB_INCLUDE_DIR AND MATLAB_LIBRARIES)
+ set(MATLAB_FOUND 1)
+endif(MATLAB_INCLUDE_DIR AND MATLAB_LIBRARIES)
-MARK_AS_ADVANCED(
+mark_as_advanced(
MATLAB_LIBRARIES
MATLAB_MEX_LIBRARY
MATLAB_MX_LIBRARY
diff --git a/Modules/FindMotif.cmake b/Modules/FindMotif.cmake
index 57da1c1e96..5b7e6a108b 100644
--- a/Modules/FindMotif.cmake
+++ b/Modules/FindMotif.cmake
@@ -17,28 +17,28 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-SET(MOTIF_FOUND 0)
+set(MOTIF_FOUND 0)
-IF(UNIX)
- FIND_PATH(MOTIF_INCLUDE_DIR
+if(UNIX)
+ find_path(MOTIF_INCLUDE_DIR
Xm/Xm.h
/usr/openwin/include
)
- FIND_LIBRARY(MOTIF_LIBRARIES
+ find_library(MOTIF_LIBRARIES
Xm
/usr/openwin/lib
)
-ENDIF(UNIX)
+endif(UNIX)
# handle the QUIETLY and REQUIRED arguments and set MOTIF_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Motif DEFAULT_MSG MOTIF_LIBRARIES MOTIF_INCLUDE_DIR)
-MARK_AS_ADVANCED(
+mark_as_advanced(
MOTIF_INCLUDE_DIR
MOTIF_LIBRARIES
)
diff --git a/Modules/FindOpenAL.cmake b/Modules/FindOpenAL.cmake
index fdac455180..311a11a7f0 100644
--- a/Modules/FindOpenAL.cmake
+++ b/Modules/FindOpenAL.cmake
@@ -61,7 +61,7 @@
# OPENAL_LIBRARY to override this selection or set the CMake environment
# CMAKE_INCLUDE_PATH to modify the search paths.
-FIND_PATH(OPENAL_INCLUDE_DIR al.h
+find_path(OPENAL_INCLUDE_DIR al.h
HINTS
$ENV{OPENALDIR}
PATH_SUFFIXES include/AL include/OpenAL include
@@ -75,7 +75,7 @@ FIND_PATH(OPENAL_INCLUDE_DIR al.h
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Creative\ Labs\\OpenAL\ 1.1\ Software\ Development\ Kit\\1.00.0000;InstallDir]
)
-FIND_LIBRARY(OPENAL_LIBRARY
+find_library(OPENAL_LIBRARY
NAMES OpenAL al openal OpenAL32
HINTS
$ENV{OPENALDIR}
@@ -93,7 +93,7 @@ FIND_LIBRARY(OPENAL_LIBRARY
# handle the QUIETLY and REQUIRED arguments and set OPENAL_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenAL DEFAULT_MSG OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
-MARK_AS_ADVANCED(OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
+mark_as_advanced(OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake
index 322972a59f..15650117b3 100644
--- a/Modules/FindOpenGL.cmake
+++ b/Modules/FindOpenGL.cmake
@@ -28,45 +28,45 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-IF (WIN32)
- IF (CYGWIN)
+if (WIN32)
+ if (CYGWIN)
- FIND_PATH(OPENGL_INCLUDE_DIR GL/gl.h )
+ find_path(OPENGL_INCLUDE_DIR GL/gl.h )
- FIND_LIBRARY(OPENGL_gl_LIBRARY opengl32 )
+ find_library(OPENGL_gl_LIBRARY opengl32 )
- FIND_LIBRARY(OPENGL_glu_LIBRARY glu32 )
+ find_library(OPENGL_glu_LIBRARY glu32 )
- ELSE (CYGWIN)
+ else (CYGWIN)
- IF(BORLAND)
- SET (OPENGL_gl_LIBRARY import32 CACHE STRING "OpenGL library for win32")
- SET (OPENGL_glu_LIBRARY import32 CACHE STRING "GLU library for win32")
- ELSE(BORLAND)
- SET (OPENGL_gl_LIBRARY opengl32 CACHE STRING "OpenGL library for win32")
- SET (OPENGL_glu_LIBRARY glu32 CACHE STRING "GLU library for win32")
- ENDIF(BORLAND)
+ if(BORLAND)
+ set (OPENGL_gl_LIBRARY import32 CACHE STRING "OpenGL library for win32")
+ set (OPENGL_glu_LIBRARY import32 CACHE STRING "GLU library for win32")
+ else(BORLAND)
+ set (OPENGL_gl_LIBRARY opengl32 CACHE STRING "OpenGL library for win32")
+ set (OPENGL_glu_LIBRARY glu32 CACHE STRING "GLU library for win32")
+ endif(BORLAND)
- ENDIF (CYGWIN)
+ endif (CYGWIN)
-ELSE (WIN32)
+else (WIN32)
- IF (APPLE)
+ if (APPLE)
- FIND_LIBRARY(OPENGL_gl_LIBRARY OpenGL DOC "OpenGL lib for OSX")
- FIND_LIBRARY(OPENGL_glu_LIBRARY AGL DOC "AGL lib for OSX")
- FIND_PATH(OPENGL_INCLUDE_DIR OpenGL/gl.h DOC "Include for OpenGL on OSX")
+ find_library(OPENGL_gl_LIBRARY OpenGL DOC "OpenGL lib for OSX")
+ find_library(OPENGL_glu_LIBRARY AGL DOC "AGL lib for OSX")
+ find_path(OPENGL_INCLUDE_DIR OpenGL/gl.h DOC "Include for OpenGL on OSX")
- ELSE(APPLE)
+ else(APPLE)
# Handle HP-UX cases where we only want to find OpenGL in either hpux64
# or hpux32 depending on if we're doing a 64 bit build.
- IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
- SET(HPUX_IA_OPENGL_LIB_PATH /opt/graphics/OpenGL/lib/hpux32/)
- ELSE(CMAKE_SIZEOF_VOID_P EQUAL 4)
- SET(HPUX_IA_OPENGL_LIB_PATH
+ if(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ set(HPUX_IA_OPENGL_LIB_PATH /opt/graphics/OpenGL/lib/hpux32/)
+ else(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ set(HPUX_IA_OPENGL_LIB_PATH
/opt/graphics/OpenGL/lib/hpux64/
/opt/graphics/OpenGL/lib/pa20_64)
- ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ endif(CMAKE_SIZEOF_VOID_P EQUAL 4)
# The first line below is to make sure that the proper headers
# are used on a Linux machine with the NVidia drivers installed.
@@ -76,19 +76,19 @@ ELSE (WIN32)
# Make sure the NVIDIA directory comes BEFORE the others.
# - Atanas Georgiev <atanas@cs.columbia.edu>
- FIND_PATH(OPENGL_INCLUDE_DIR GL/gl.h
+ find_path(OPENGL_INCLUDE_DIR GL/gl.h
/usr/share/doc/NVIDIA_GLX-1.0/include
/usr/openwin/share/include
/opt/graphics/OpenGL/include /usr/X11R6/include
)
- FIND_PATH(OPENGL_xmesa_INCLUDE_DIR GL/xmesa.h
+ find_path(OPENGL_xmesa_INCLUDE_DIR GL/xmesa.h
/usr/share/doc/NVIDIA_GLX-1.0/include
/usr/openwin/share/include
/opt/graphics/OpenGL/include /usr/X11R6/include
)
- FIND_LIBRARY(OPENGL_gl_LIBRARY
+ find_library(OPENGL_gl_LIBRARY
NAMES GL MesaGL
PATHS /opt/graphics/OpenGL/lib
/usr/openwin/lib
@@ -101,18 +101,18 @@ ELSE (WIN32)
# think this is always true.
# It's not true on OSX.
- IF (OPENGL_gl_LIBRARY)
- IF(NOT X11_FOUND)
- INCLUDE(FindX11)
- ENDIF(NOT X11_FOUND)
- IF (X11_FOUND)
- IF (NOT APPLE)
- SET (OPENGL_LIBRARIES ${X11_LIBRARIES})
- ENDIF (NOT APPLE)
- ENDIF (X11_FOUND)
- ENDIF (OPENGL_gl_LIBRARY)
-
- FIND_LIBRARY(OPENGL_glu_LIBRARY
+ if (OPENGL_gl_LIBRARY)
+ if(NOT X11_FOUND)
+ include(FindX11)
+ endif(NOT X11_FOUND)
+ if (X11_FOUND)
+ if (NOT APPLE)
+ set (OPENGL_LIBRARIES ${X11_LIBRARIES})
+ endif (NOT APPLE)
+ endif (X11_FOUND)
+ endif (OPENGL_gl_LIBRARY)
+
+ find_library(OPENGL_glu_LIBRARY
NAMES GLU MesaGLU
PATHS ${OPENGL_gl_LIBRARY}
/opt/graphics/OpenGL/lib
@@ -120,39 +120,39 @@ ELSE (WIN32)
/usr/shlib /usr/X11R6/lib
)
- ENDIF(APPLE)
-ENDIF (WIN32)
+ endif(APPLE)
+endif (WIN32)
-IF(OPENGL_gl_LIBRARY)
+if(OPENGL_gl_LIBRARY)
- IF(OPENGL_xmesa_INCLUDE_DIR)
- SET( OPENGL_XMESA_FOUND "YES" )
- ELSE(OPENGL_xmesa_INCLUDE_DIR)
- SET( OPENGL_XMESA_FOUND "NO" )
- ENDIF(OPENGL_xmesa_INCLUDE_DIR)
+ if(OPENGL_xmesa_INCLUDE_DIR)
+ set( OPENGL_XMESA_FOUND "YES" )
+ else(OPENGL_xmesa_INCLUDE_DIR)
+ set( OPENGL_XMESA_FOUND "NO" )
+ endif(OPENGL_xmesa_INCLUDE_DIR)
- SET( OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_LIBRARIES})
- IF(OPENGL_glu_LIBRARY)
- SET( OPENGL_GLU_FOUND "YES" )
- SET( OPENGL_LIBRARIES ${OPENGL_glu_LIBRARY} ${OPENGL_LIBRARIES} )
- ELSE(OPENGL_glu_LIBRARY)
- SET( OPENGL_GLU_FOUND "NO" )
- ENDIF(OPENGL_glu_LIBRARY)
+ set( OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_LIBRARIES})
+ if(OPENGL_glu_LIBRARY)
+ set( OPENGL_GLU_FOUND "YES" )
+ set( OPENGL_LIBRARIES ${OPENGL_glu_LIBRARY} ${OPENGL_LIBRARIES} )
+ else(OPENGL_glu_LIBRARY)
+ set( OPENGL_GLU_FOUND "NO" )
+ endif(OPENGL_glu_LIBRARY)
# This deprecated setting is for backward compatibility with CMake1.4
- SET (OPENGL_LIBRARY ${OPENGL_LIBRARIES})
+ set (OPENGL_LIBRARY ${OPENGL_LIBRARIES})
-ENDIF(OPENGL_gl_LIBRARY)
+endif(OPENGL_gl_LIBRARY)
# This deprecated setting is for backward compatibility with CMake1.4
-SET(OPENGL_INCLUDE_PATH ${OPENGL_INCLUDE_DIR})
+set(OPENGL_INCLUDE_PATH ${OPENGL_INCLUDE_DIR})
# handle the QUIETLY and REQUIRED arguments and set OPENGL_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenGL DEFAULT_MSG OPENGL_gl_LIBRARY)
-MARK_AS_ADVANCED(
+mark_as_advanced(
OPENGL_INCLUDE_DIR
OPENGL_xmesa_INCLUDE_DIR
OPENGL_glu_LIBRARY
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index 6642915ce2..b812b22bb2 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -29,16 +29,16 @@ if (UNIX)
pkg_check_modules(_OPENSSL QUIET openssl)
endif (UNIX)
-IF (WIN32)
+if (WIN32)
# http://www.slproweb.com/products/Win32OpenSSL.html
- SET(_OPENSSL_ROOT_HINTS
+ set(_OPENSSL_ROOT_HINTS
${OPENSSL_ROOT_DIR}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;Inno Setup: App Path]"
ENV OPENSSL_ROOT_DIR
)
- FILE(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
- SET(_OPENSSL_ROOT_PATHS
+ file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
+ set(_OPENSSL_ROOT_PATHS
"${_programfiles}/OpenSSL"
"${_programfiles}/OpenSSL-Win32"
"${_programfiles}/OpenSSL-Win64"
@@ -46,19 +46,19 @@ IF (WIN32)
"C:/OpenSSL-Win32/"
"C:/OpenSSL-Win64/"
)
- UNSET(_programfiles)
- SET(_OPENSSL_ROOT_HINTS_AND_PATHS
+ unset(_programfiles)
+ set(_OPENSSL_ROOT_HINTS_AND_PATHS
HINTS ${_OPENSSL_ROOT_HINTS}
PATHS ${_OPENSSL_ROOT_PATHS}
)
-ELSE ()
- SET(_OPENSSL_ROOT_HINTS
+else ()
+ set(_OPENSSL_ROOT_HINTS
${OPENSSL_ROOT_DIR}
ENV OPENSSL_ROOT_DIR
)
-ENDIF ()
+endif ()
-FIND_PATH(OPENSSL_INCLUDE_DIR
+find_path(OPENSSL_INCLUDE_DIR
NAMES
openssl/ssl.h
HINTS
@@ -68,8 +68,8 @@ FIND_PATH(OPENSSL_INCLUDE_DIR
include
)
-IF(WIN32 AND NOT CYGWIN)
- IF(MSVC)
+if(WIN32 AND NOT CYGWIN)
+ if(MSVC)
# /MD and /MDd are the standard values - if someone wants to use
# others, the libnames have to change here too
# use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b
@@ -84,7 +84,7 @@ IF(WIN32 AND NOT CYGWIN)
# We are using the libraries located in the VC subdir instead of the parent directory eventhough :
# libeay32MD.lib is identical to ../libeay32.lib, and
# ssleay32MD.lib is identical to ../ssleay32.lib
- FIND_LIBRARY(LIB_EAY_DEBUG
+ find_library(LIB_EAY_DEBUG
NAMES
libeay32MDd
${_OPENSSL_ROOT_HINTS_AND_PATHS}
@@ -94,7 +94,7 @@ IF(WIN32 AND NOT CYGWIN)
"lib/VC"
)
- FIND_LIBRARY(LIB_EAY_RELEASE
+ find_library(LIB_EAY_RELEASE
NAMES
libeay32MD
libeay32
@@ -105,7 +105,7 @@ IF(WIN32 AND NOT CYGWIN)
"lib/VC"
)
- FIND_LIBRARY(SSL_EAY_DEBUG
+ find_library(SSL_EAY_DEBUG
NAMES
ssleay32MDd
${_OPENSSL_ROOT_HINTS_AND_PATHS}
@@ -115,7 +115,7 @@ IF(WIN32 AND NOT CYGWIN)
"lib/VC"
)
- FIND_LIBRARY(SSL_EAY_RELEASE
+ find_library(SSL_EAY_RELEASE
NAMES
ssleay32MD
ssleay32
@@ -132,15 +132,15 @@ IF(WIN32 AND NOT CYGWIN)
select_library_configurations(SSL_EAY)
set( OPENSSL_LIBRARIES ${SSL_EAY_LIBRARY} ${LIB_EAY_LIBRARY} )
- ELSEIF(MINGW)
+ elseif(MINGW)
# same player, for MingW
- SET(LIB_EAY_NAMES libeay32)
- SET(SSL_EAY_NAMES ssleay32)
- IF(CMAKE_CROSS_COMPILING)
- LIST(APPEND LIB_EAY_NAMES crypto)
- LIST(APPEND SSL_EAY_NAMES ssl)
- ENDIF()
- FIND_LIBRARY(LIB_EAY
+ set(LIB_EAY_NAMES libeay32)
+ set(SSL_EAY_NAMES ssleay32)
+ if(CMAKE_CROSS_COMPILING)
+ list(APPEND LIB_EAY_NAMES crypto)
+ list(APPEND SSL_EAY_NAMES ssl)
+ endif()
+ find_library(LIB_EAY
NAMES
${LIB_EAY_NAMES}
${_OPENSSL_ROOT_HINTS_AND_PATHS}
@@ -149,7 +149,7 @@ IF(WIN32 AND NOT CYGWIN)
"lib/MinGW"
)
- FIND_LIBRARY(SSL_EAY
+ find_library(SSL_EAY
NAMES
${SSL_EAY_NAMES}
${_OPENSSL_ROOT_HINTS_AND_PATHS}
@@ -158,13 +158,13 @@ IF(WIN32 AND NOT CYGWIN)
"lib/MinGW"
)
- MARK_AS_ADVANCED(SSL_EAY LIB_EAY)
+ mark_as_advanced(SSL_EAY LIB_EAY)
set( OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} )
unset(LIB_EAY_NAMES)
unset(SSL_EAY_NAMES)
- ELSE(MSVC)
+ else(MSVC)
# Not sure what to pick for -say- intel, let's use the toplevel ones and hope someone report issues:
- FIND_LIBRARY(LIB_EAY
+ find_library(LIB_EAY
NAMES
libeay32
HINTS
@@ -174,7 +174,7 @@ IF(WIN32 AND NOT CYGWIN)
lib
)
- FIND_LIBRARY(SSL_EAY
+ find_library(SSL_EAY
NAMES
ssleay32
HINTS
@@ -184,12 +184,12 @@ IF(WIN32 AND NOT CYGWIN)
lib
)
- MARK_AS_ADVANCED(SSL_EAY LIB_EAY)
+ mark_as_advanced(SSL_EAY LIB_EAY)
set( OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} )
- ENDIF(MSVC)
-ELSE(WIN32 AND NOT CYGWIN)
+ endif(MSVC)
+else(WIN32 AND NOT CYGWIN)
- FIND_LIBRARY(OPENSSL_SSL_LIBRARY
+ find_library(OPENSSL_SSL_LIBRARY
NAMES
ssl
ssleay32
@@ -201,7 +201,7 @@ ELSE(WIN32 AND NOT CYGWIN)
lib
)
- FIND_LIBRARY(OPENSSL_CRYPTO_LIBRARY
+ find_library(OPENSSL_CRYPTO_LIBRARY
NAMES
crypto
HINTS
@@ -211,15 +211,15 @@ ELSE(WIN32 AND NOT CYGWIN)
lib
)
- MARK_AS_ADVANCED(OPENSSL_CRYPTO_LIBRARY OPENSSL_SSL_LIBRARY)
+ mark_as_advanced(OPENSSL_CRYPTO_LIBRARY OPENSSL_SSL_LIBRARY)
# compat defines
- SET(OPENSSL_SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY})
- SET(OPENSSL_CRYPTO_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY})
+ set(OPENSSL_SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY})
+ set(OPENSSL_CRYPTO_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY})
- SET(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
+ set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
-ENDIF(WIN32 AND NOT CYGWIN)
+endif(WIN32 AND NOT CYGWIN)
function(from_hex HEX DEC)
string(TOUPPER "${HEX}" HEX)
@@ -309,4 +309,4 @@ else (OPENSSL_VERSION)
)
endif (OPENSSL_VERSION)
-MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES)
+mark_as_advanced(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES)
diff --git a/Modules/FindOpenSceneGraph.cmake b/Modules/FindOpenSceneGraph.cmake
index 9dd2c28f0c..17ab05776f 100644
--- a/Modules/FindOpenSceneGraph.cmake
+++ b/Modules/FindOpenSceneGraph.cmake
@@ -161,7 +161,7 @@ if(OpenSceneGraph_FIND_QUIETLY)
set(_osg_quiet "QUIET")
endif()
#
-# Here we call FIND_PACKAGE() on all of the components
+# Here we call find_package() on all of the components
#
foreach(_osg_module ${_osg_modules_to_process})
if(OpenSceneGraph_DEBUG)
diff --git a/Modules/FindPHP4.cmake b/Modules/FindPHP4.cmake
index abdabe144e..2c6a7c8d0f 100644
--- a/Modules/FindPHP4.cmake
+++ b/Modules/FindPHP4.cmake
@@ -20,7 +20,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-SET(PHP4_POSSIBLE_INCLUDE_PATHS
+set(PHP4_POSSIBLE_INCLUDE_PATHS
/usr/include/php4
/usr/local/include/php4
/usr/include/php
@@ -28,33 +28,33 @@ SET(PHP4_POSSIBLE_INCLUDE_PATHS
/usr/local/apache/php
)
-SET(PHP4_POSSIBLE_LIB_PATHS
+set(PHP4_POSSIBLE_LIB_PATHS
/usr/lib
)
-FIND_PATH(PHP4_FOUND_INCLUDE_PATH main/php.h
+find_path(PHP4_FOUND_INCLUDE_PATH main/php.h
${PHP4_POSSIBLE_INCLUDE_PATHS})
-IF(PHP4_FOUND_INCLUDE_PATH)
- SET(php4_paths "${PHP4_POSSIBLE_INCLUDE_PATHS}")
- FOREACH(php4_path Zend main TSRM)
- SET(php4_paths ${php4_paths} "${PHP4_FOUND_INCLUDE_PATH}/${php4_path}")
- ENDFOREACH(php4_path Zend main TSRM)
- SET(PHP4_INCLUDE_PATH "${php4_paths}" INTERNAL "PHP4 include paths")
-ENDIF(PHP4_FOUND_INCLUDE_PATH)
+if(PHP4_FOUND_INCLUDE_PATH)
+ set(php4_paths "${PHP4_POSSIBLE_INCLUDE_PATHS}")
+ foreach(php4_path Zend main TSRM)
+ set(php4_paths ${php4_paths} "${PHP4_FOUND_INCLUDE_PATH}/${php4_path}")
+ endforeach(php4_path Zend main TSRM)
+ set(PHP4_INCLUDE_PATH "${php4_paths}" INTERNAL "PHP4 include paths")
+endif(PHP4_FOUND_INCLUDE_PATH)
-FIND_PROGRAM(PHP4_EXECUTABLE NAMES php4 php )
+find_program(PHP4_EXECUTABLE NAMES php4 php )
-MARK_AS_ADVANCED(
+mark_as_advanced(
PHP4_EXECUTABLE
PHP4_FOUND_INCLUDE_PATH
)
-IF(APPLE)
+if(APPLE)
# this is a hack for now
- SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS
+ set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS
"${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -Wl,-flat_namespace")
- FOREACH(symbol
+ foreach(symbol
__efree
__emalloc
__estrdup
@@ -76,10 +76,10 @@ IF(APPLE)
_zend_wrong_param_count
_zval_used_for_init
)
- SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS
+ set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS
"${CMAKE_SHARED_MODULE_CREATE_C_FLAGS},-U,${symbol}")
- ENDFOREACH(symbol)
-ENDIF(APPLE)
+ endforeach(symbol)
+endif(APPLE)
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PHP4 DEFAULT_MSG PHP4_EXECUTABLE PHP4_INCLUDE_PATH)
diff --git a/Modules/FindPNG.cmake b/Modules/FindPNG.cmake
index a6c181cb15..50cb7d85e4 100644
--- a/Modules/FindPNG.cmake
+++ b/Modules/FindPNG.cmake
@@ -43,15 +43,15 @@ if(ZLIB_FOUND)
if (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR)
# png.h includes zlib.h. Sigh.
- SET(PNG_INCLUDE_DIRS ${PNG_PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
- SET(PNG_INCLUDE_DIR ${PNG_INCLUDE_DIRS} ) # for backward compatiblity
- SET(PNG_LIBRARIES ${PNG_LIBRARY} ${ZLIB_LIBRARY})
+ set(PNG_INCLUDE_DIRS ${PNG_PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
+ set(PNG_INCLUDE_DIR ${PNG_INCLUDE_DIRS} ) # for backward compatiblity
+ set(PNG_LIBRARIES ${PNG_LIBRARY} ${ZLIB_LIBRARY})
if (CYGWIN)
if(BUILD_SHARED_LIBS)
# No need to define PNG_USE_DLL here, because it's default for Cygwin.
else(BUILD_SHARED_LIBS)
- SET (PNG_DEFINITIONS -DPNG_STATIC)
+ set (PNG_DEFINITIONS -DPNG_STATIC)
endif(BUILD_SHARED_LIBS)
endif (CYGWIN)
diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake
index cdcf9ca7c1..1dd8652819 100644
--- a/Modules/FindPackageHandleStandardArgs.cmake
+++ b/Modules/FindPackageHandleStandardArgs.cmake
@@ -1,7 +1,7 @@
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> ... )
#
# This function is intended to be used in FindXXX.cmake modules files.
-# It handles the REQUIRED, QUIET and version-related arguments to FIND_PACKAGE().
+# It handles the REQUIRED, QUIET and version-related arguments to find_package().
# It also sets the <UPPERCASED_NAME>_FOUND variable.
# The package is considered found if all variables <var1>... listed contain
# valid results, e.g. valid filepaths.
@@ -68,9 +68,9 @@
#
# Another example for mode 2:
#
-# FIND_PACKAGE(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
+# find_package(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(Automoc4 CONFIG_MODE)
-# In this case, FindAutmoc4.cmake wraps a call to FIND_PACKAGE(Automoc4 NO_MODULE)
+# In this case, FindAutmoc4.cmake wraps a call to find_package(Automoc4 NO_MODULE)
# and adds an additional search directory for automoc4.
# The following FIND_PACKAGE_HANDLE_STANDARD_ARGS() call produces a proper
# success/error message.
@@ -88,209 +88,209 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE(FindPackageMessage)
-INCLUDE(CMakeParseArguments)
+include(FindPackageMessage)
+include(CMakeParseArguments)
# internal helper macro
-MACRO(_FPHSA_FAILURE_MESSAGE _msg)
- IF (${_NAME}_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "${_msg}")
- ELSE (${_NAME}_FIND_REQUIRED)
- IF (NOT ${_NAME}_FIND_QUIETLY)
- MESSAGE(STATUS "${_msg}")
- ENDIF (NOT ${_NAME}_FIND_QUIETLY)
- ENDIF (${_NAME}_FIND_REQUIRED)
-ENDMACRO(_FPHSA_FAILURE_MESSAGE _msg)
+macro(_FPHSA_FAILURE_MESSAGE _msg)
+ if (${_NAME}_FIND_REQUIRED)
+ message(FATAL_ERROR "${_msg}")
+ else (${_NAME}_FIND_REQUIRED)
+ if (NOT ${_NAME}_FIND_QUIETLY)
+ message(STATUS "${_msg}")
+ endif (NOT ${_NAME}_FIND_QUIETLY)
+ endif (${_NAME}_FIND_REQUIRED)
+endmacro(_FPHSA_FAILURE_MESSAGE _msg)
# internal helper macro to generate the failure message when used in CONFIG_MODE:
-MACRO(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
+macro(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
# <name>_CONFIG is set, but FOUND is false, this means that some other of the REQUIRED_VARS was not found:
- IF(${_NAME}_CONFIG)
+ if(${_NAME}_CONFIG)
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing: ${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})")
- ELSE(${_NAME}_CONFIG)
+ else(${_NAME}_CONFIG)
# If _CONSIDERED_CONFIGS is set, the config-file has been found, but no suitable version.
# List them all in the error message:
- IF(${_NAME}_CONSIDERED_CONFIGS)
- SET(configsText "")
- LIST(LENGTH ${_NAME}_CONSIDERED_CONFIGS configsCount)
- MATH(EXPR configsCount "${configsCount} - 1")
- FOREACH(currentConfigIndex RANGE ${configsCount})
- LIST(GET ${_NAME}_CONSIDERED_CONFIGS ${currentConfigIndex} filename)
- LIST(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version)
- SET(configsText "${configsText} ${filename} (version ${version})\n")
- ENDFOREACH(currentConfigIndex)
+ if(${_NAME}_CONSIDERED_CONFIGS)
+ set(configsText "")
+ list(LENGTH ${_NAME}_CONSIDERED_CONFIGS configsCount)
+ math(EXPR configsCount "${configsCount} - 1")
+ foreach(currentConfigIndex RANGE ${configsCount})
+ list(GET ${_NAME}_CONSIDERED_CONFIGS ${currentConfigIndex} filename)
+ list(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version)
+ set(configsText "${configsText} ${filename} (version ${version})\n")
+ endforeach(currentConfigIndex)
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} ${VERSION_MSG}, checked the following files:\n${configsText}")
- ELSE(${_NAME}_CONSIDERED_CONFIGS)
+ else(${_NAME}_CONSIDERED_CONFIGS)
# Simple case: No Config-file was found at all:
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: found neither ${_NAME}Config.cmake nor ${_NAME_LOWER}-config.cmake ${VERSION_MSG}")
- ENDIF(${_NAME}_CONSIDERED_CONFIGS)
- ENDIF(${_NAME}_CONFIG)
-ENDMACRO(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
+ endif(${_NAME}_CONSIDERED_CONFIGS)
+ endif(${_NAME}_CONFIG)
+endmacro(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
-FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
+function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
# set up the arguments for CMAKE_PARSE_ARGUMENTS and check whether we are in
# new extended or in the "old" mode:
- SET(options CONFIG_MODE HANDLE_COMPONENTS)
- SET(oneValueArgs FAIL_MESSAGE VERSION_VAR)
- SET(multiValueArgs REQUIRED_VARS)
- SET(_KEYWORDS_FOR_EXTENDED_MODE ${options} ${oneValueArgs} ${multiValueArgs} )
- LIST(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX)
-
- IF(${INDEX} EQUAL -1)
- SET(FPHSA_FAIL_MESSAGE ${_FIRST_ARG})
- SET(FPHSA_REQUIRED_VARS ${ARGN})
- SET(FPHSA_VERSION_VAR)
- ELSE(${INDEX} EQUAL -1)
+ set(options CONFIG_MODE HANDLE_COMPONENTS)
+ set(oneValueArgs FAIL_MESSAGE VERSION_VAR)
+ set(multiValueArgs REQUIRED_VARS)
+ set(_KEYWORDS_FOR_EXTENDED_MODE ${options} ${oneValueArgs} ${multiValueArgs} )
+ list(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX)
+
+ if(${INDEX} EQUAL -1)
+ set(FPHSA_FAIL_MESSAGE ${_FIRST_ARG})
+ set(FPHSA_REQUIRED_VARS ${ARGN})
+ set(FPHSA_VERSION_VAR)
+ else(${INDEX} EQUAL -1)
CMAKE_PARSE_ARGUMENTS(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}" ${_FIRST_ARG} ${ARGN})
- IF(FPHSA_UNPARSED_ARGUMENTS)
- MESSAGE(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"")
- ENDIF(FPHSA_UNPARSED_ARGUMENTS)
+ if(FPHSA_UNPARSED_ARGUMENTS)
+ message(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"")
+ endif(FPHSA_UNPARSED_ARGUMENTS)
- IF(NOT FPHSA_FAIL_MESSAGE)
- SET(FPHSA_FAIL_MESSAGE "DEFAULT_MSG")
- ENDIF(NOT FPHSA_FAIL_MESSAGE)
- ENDIF(${INDEX} EQUAL -1)
+ if(NOT FPHSA_FAIL_MESSAGE)
+ set(FPHSA_FAIL_MESSAGE "DEFAULT_MSG")
+ endif(NOT FPHSA_FAIL_MESSAGE)
+ endif(${INDEX} EQUAL -1)
# now that we collected all arguments, process them
- IF("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
- SET(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}")
- ENDIF("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
+ if("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
+ set(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}")
+ endif("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
# In config-mode, we rely on the variable <package>_CONFIG, which is set by find_package()
# when it successfully found the config-file, including version checking:
- IF(FPHSA_CONFIG_MODE)
- LIST(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG)
- LIST(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS)
- SET(FPHSA_VERSION_VAR ${_NAME}_VERSION)
- ENDIF(FPHSA_CONFIG_MODE)
+ if(FPHSA_CONFIG_MODE)
+ list(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG)
+ list(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS)
+ set(FPHSA_VERSION_VAR ${_NAME}_VERSION)
+ endif(FPHSA_CONFIG_MODE)
- IF(NOT FPHSA_REQUIRED_VARS)
- MESSAGE(FATAL_ERROR "No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()")
- ENDIF(NOT FPHSA_REQUIRED_VARS)
+ if(NOT FPHSA_REQUIRED_VARS)
+ message(FATAL_ERROR "No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()")
+ endif(NOT FPHSA_REQUIRED_VARS)
- LIST(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR)
+ list(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR)
- STRING(TOUPPER ${_NAME} _NAME_UPPER)
- STRING(TOLOWER ${_NAME} _NAME_LOWER)
+ string(TOUPPER ${_NAME} _NAME_UPPER)
+ string(TOLOWER ${_NAME} _NAME_LOWER)
# collect all variables which were not found, so they can be printed, so the
# user knows better what went wrong (#6375)
- SET(MISSING_VARS "")
- SET(DETAILS "")
- SET(${_NAME_UPPER}_FOUND TRUE)
+ set(MISSING_VARS "")
+ set(DETAILS "")
+ set(${_NAME_UPPER}_FOUND TRUE)
# check if all passed variables are valid
- FOREACH(_CURRENT_VAR ${FPHSA_REQUIRED_VARS})
- IF(NOT ${_CURRENT_VAR})
- SET(${_NAME_UPPER}_FOUND FALSE)
- SET(MISSING_VARS "${MISSING_VARS} ${_CURRENT_VAR}")
- ELSE(NOT ${_CURRENT_VAR})
- SET(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]")
- ENDIF(NOT ${_CURRENT_VAR})
- ENDFOREACH(_CURRENT_VAR)
+ foreach(_CURRENT_VAR ${FPHSA_REQUIRED_VARS})
+ if(NOT ${_CURRENT_VAR})
+ set(${_NAME_UPPER}_FOUND FALSE)
+ set(MISSING_VARS "${MISSING_VARS} ${_CURRENT_VAR}")
+ else(NOT ${_CURRENT_VAR})
+ set(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]")
+ endif(NOT ${_CURRENT_VAR})
+ endforeach(_CURRENT_VAR)
# component handling
- UNSET(FOUND_COMPONENTS_MSG)
- UNSET(MISSING_COMPONENTS_MSG)
+ unset(FOUND_COMPONENTS_MSG)
+ unset(MISSING_COMPONENTS_MSG)
- IF(FPHSA_HANDLE_COMPONENTS)
- FOREACH(comp ${${_NAME}_FIND_COMPONENTS})
- IF(${_NAME}_${comp}_FOUND)
+ if(FPHSA_HANDLE_COMPONENTS)
+ foreach(comp ${${_NAME}_FIND_COMPONENTS})
+ if(${_NAME}_${comp}_FOUND)
- IF(NOT DEFINED FOUND_COMPONENTS_MSG)
- SET(FOUND_COMPONENTS_MSG "found components: ")
- ENDIF()
- SET(FOUND_COMPONENTS_MSG "${FOUND_COMPONENTS_MSG} ${comp}")
+ if(NOT DEFINED FOUND_COMPONENTS_MSG)
+ set(FOUND_COMPONENTS_MSG "found components: ")
+ endif()
+ set(FOUND_COMPONENTS_MSG "${FOUND_COMPONENTS_MSG} ${comp}")
- ELSE()
+ else()
- IF(NOT DEFINED MISSING_COMPONENTS_MSG)
- SET(MISSING_COMPONENTS_MSG "missing components: ")
- ENDIF()
- SET(MISSING_COMPONENTS_MSG "${MISSING_COMPONENTS_MSG} ${comp}")
+ if(NOT DEFINED MISSING_COMPONENTS_MSG)
+ set(MISSING_COMPONENTS_MSG "missing components: ")
+ endif()
+ set(MISSING_COMPONENTS_MSG "${MISSING_COMPONENTS_MSG} ${comp}")
- IF(${_NAME}_FIND_REQUIRED_${comp})
- SET(${_NAME_UPPER}_FOUND FALSE)
- SET(MISSING_VARS "${MISSING_VARS} ${comp}")
- ENDIF()
+ if(${_NAME}_FIND_REQUIRED_${comp})
+ set(${_NAME_UPPER}_FOUND FALSE)
+ set(MISSING_VARS "${MISSING_VARS} ${comp}")
+ endif()
- ENDIF()
- ENDFOREACH(comp)
- SET(COMPONENT_MSG "${FOUND_COMPONENTS_MSG} ${MISSING_COMPONENTS_MSG}")
- SET(DETAILS "${DETAILS}[c${COMPONENT_MSG}]")
- ENDIF(FPHSA_HANDLE_COMPONENTS)
+ endif()
+ endforeach(comp)
+ set(COMPONENT_MSG "${FOUND_COMPONENTS_MSG} ${MISSING_COMPONENTS_MSG}")
+ set(DETAILS "${DETAILS}[c${COMPONENT_MSG}]")
+ endif(FPHSA_HANDLE_COMPONENTS)
# version handling:
- SET(VERSION_MSG "")
- SET(VERSION_OK TRUE)
- SET(VERSION ${${FPHSA_VERSION_VAR}} )
- IF (${_NAME}_FIND_VERSION)
-
- IF(VERSION)
-
- IF(${_NAME}_FIND_VERSION_EXACT) # exact version required
- IF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
- SET(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"")
- SET(VERSION_OK FALSE)
- ELSE (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
- SET(VERSION_MSG "(found suitable exact version \"${VERSION}\")")
- ENDIF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
-
- ELSE(${_NAME}_FIND_VERSION_EXACT) # minimum version specified:
- IF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
- SET(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"")
- SET(VERSION_OK FALSE)
- ELSE ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
- SET(VERSION_MSG "(found suitable version \"${VERSION}\", required is \"${${_NAME}_FIND_VERSION}\")")
- ENDIF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
- ENDIF(${_NAME}_FIND_VERSION_EXACT)
-
- ELSE(VERSION)
+ set(VERSION_MSG "")
+ set(VERSION_OK TRUE)
+ set(VERSION ${${FPHSA_VERSION_VAR}} )
+ if (${_NAME}_FIND_VERSION)
+
+ if(VERSION)
+
+ if(${_NAME}_FIND_VERSION_EXACT) # exact version required
+ if (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
+ set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"")
+ set(VERSION_OK FALSE)
+ else (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
+ set(VERSION_MSG "(found suitable exact version \"${VERSION}\")")
+ endif (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
+
+ else(${_NAME}_FIND_VERSION_EXACT) # minimum version specified:
+ if ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
+ set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"")
+ set(VERSION_OK FALSE)
+ else ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
+ set(VERSION_MSG "(found suitable version \"${VERSION}\", required is \"${${_NAME}_FIND_VERSION}\")")
+ endif ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
+ endif(${_NAME}_FIND_VERSION_EXACT)
+
+ else(VERSION)
# if the package was not found, but a version was given, add that to the output:
- IF(${_NAME}_FIND_VERSION_EXACT)
- SET(VERSION_MSG "(Required is exact version \"${${_NAME}_FIND_VERSION}\")")
- ELSE(${_NAME}_FIND_VERSION_EXACT)
- SET(VERSION_MSG "(Required is at least version \"${${_NAME}_FIND_VERSION}\")")
- ENDIF(${_NAME}_FIND_VERSION_EXACT)
-
- ENDIF(VERSION)
- ELSE (${_NAME}_FIND_VERSION)
- IF(VERSION)
- SET(VERSION_MSG "(found version \"${VERSION}\")")
- ENDIF(VERSION)
- ENDIF (${_NAME}_FIND_VERSION)
-
- IF(VERSION_OK)
- SET(DETAILS "${DETAILS}[v${VERSION}(${${_NAME}_FIND_VERSION})]")
- ELSE(VERSION_OK)
- SET(${_NAME_UPPER}_FOUND FALSE)
- ENDIF(VERSION_OK)
+ if(${_NAME}_FIND_VERSION_EXACT)
+ set(VERSION_MSG "(Required is exact version \"${${_NAME}_FIND_VERSION}\")")
+ else(${_NAME}_FIND_VERSION_EXACT)
+ set(VERSION_MSG "(Required is at least version \"${${_NAME}_FIND_VERSION}\")")
+ endif(${_NAME}_FIND_VERSION_EXACT)
+
+ endif(VERSION)
+ else (${_NAME}_FIND_VERSION)
+ if(VERSION)
+ set(VERSION_MSG "(found version \"${VERSION}\")")
+ endif(VERSION)
+ endif (${_NAME}_FIND_VERSION)
+
+ if(VERSION_OK)
+ set(DETAILS "${DETAILS}[v${VERSION}(${${_NAME}_FIND_VERSION})]")
+ else(VERSION_OK)
+ set(${_NAME_UPPER}_FOUND FALSE)
+ endif(VERSION_OK)
# print the result:
- IF (${_NAME_UPPER}_FOUND)
+ if (${_NAME_UPPER}_FOUND)
FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG} ${COMPONENT_MSG}" "${DETAILS}")
- ELSE (${_NAME_UPPER}_FOUND)
+ else (${_NAME_UPPER}_FOUND)
- IF(FPHSA_CONFIG_MODE)
+ if(FPHSA_CONFIG_MODE)
_FPHSA_HANDLE_FAILURE_CONFIG_MODE()
- ELSE(FPHSA_CONFIG_MODE)
- IF(NOT VERSION_OK)
+ else(FPHSA_CONFIG_MODE)
+ if(NOT VERSION_OK)
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})")
- ELSE(NOT VERSION_OK)
+ else(NOT VERSION_OK)
_FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing: ${MISSING_VARS}) ${VERSION_MSG}")
- ENDIF(NOT VERSION_OK)
- ENDIF(FPHSA_CONFIG_MODE)
+ endif(NOT VERSION_OK)
+ endif(FPHSA_CONFIG_MODE)
- ENDIF (${_NAME_UPPER}_FOUND)
+ endif (${_NAME_UPPER}_FOUND)
- SET(${_NAME_UPPER}_FOUND ${${_NAME_UPPER}_FOUND} PARENT_SCOPE)
+ set(${_NAME_UPPER}_FOUND ${${_NAME_UPPER}_FOUND} PARENT_SCOPE)
-ENDFUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _FIRST_ARG)
+endfunction(FIND_PACKAGE_HANDLE_STANDARD_ARGS _FIRST_ARG)
diff --git a/Modules/FindPackageMessage.cmake b/Modules/FindPackageMessage.cmake
index 48d3472b5d..f78792d26b 100644
--- a/Modules/FindPackageMessage.cmake
+++ b/Modules/FindPackageMessage.cmake
@@ -11,12 +11,12 @@
#
# Example:
#
-# IF(X11_FOUND)
+# if(X11_FOUND)
# FIND_PACKAGE_MESSAGE(X11 "Found X11: ${X11_X11_LIB}"
# "[${X11_X11_LIB}][${X11_INCLUDE_DIR}]")
-# ELSE(X11_FOUND)
+# else(X11_FOUND)
# ...
-# ENDIF(X11_FOUND)
+# endif(X11_FOUND)
#=============================================================================
# Copyright 2008-2009 Kitware, Inc.
@@ -31,19 +31,19 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FUNCTION(FIND_PACKAGE_MESSAGE pkg msg details)
+function(FIND_PACKAGE_MESSAGE pkg msg details)
# Avoid printing a message repeatedly for the same find result.
- IF(NOT ${pkg}_FIND_QUIETLY)
- STRING(REGEX REPLACE "[\n]" "" details "${details}")
- SET(DETAILS_VAR FIND_PACKAGE_MESSAGE_DETAILS_${pkg})
- IF(NOT "${details}" STREQUAL "${${DETAILS_VAR}}")
+ if(NOT ${pkg}_FIND_QUIETLY)
+ string(REGEX REPLACE "[\n]" "" details "${details}")
+ set(DETAILS_VAR FIND_PACKAGE_MESSAGE_DETAILS_${pkg})
+ if(NOT "${details}" STREQUAL "${${DETAILS_VAR}}")
# The message has not yet been printed.
- MESSAGE(STATUS "${msg}")
+ message(STATUS "${msg}")
# Save the find details in the cache to avoid printing the same
# message again.
- SET("${DETAILS_VAR}" "${details}"
+ set("${DETAILS_VAR}" "${details}"
CACHE INTERNAL "Details about finding ${pkg}")
- ENDIF(NOT "${details}" STREQUAL "${${DETAILS_VAR}}")
- ENDIF(NOT ${pkg}_FIND_QUIETLY)
-ENDFUNCTION(FIND_PACKAGE_MESSAGE)
+ endif(NOT "${details}" STREQUAL "${${DETAILS_VAR}}")
+ endif(NOT ${pkg}_FIND_QUIETLY)
+endfunction(FIND_PACKAGE_MESSAGE)
diff --git a/Modules/FindPerl.cmake b/Modules/FindPerl.cmake
index bedb839d1c..4f45da619b 100644
--- a/Modules/FindPerl.cmake
+++ b/Modules/FindPerl.cmake
@@ -18,31 +18,31 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE(FindCygwin)
+include(FindCygwin)
-SET(PERL_POSSIBLE_BIN_PATHS
+set(PERL_POSSIBLE_BIN_PATHS
${CYGWIN_INSTALL_PATH}/bin
)
-IF(WIN32)
- GET_FILENAME_COMPONENT(
+if(WIN32)
+ get_filename_component(
ActivePerl_CurrentVersion
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl;CurrentVersion]"
NAME)
- SET(PERL_POSSIBLE_BIN_PATHS ${PERL_POSSIBLE_BIN_PATHS}
+ set(PERL_POSSIBLE_BIN_PATHS ${PERL_POSSIBLE_BIN_PATHS}
"C:/Perl/bin"
[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl\\${ActivePerl_CurrentVersion}]/bin
)
-ENDIF(WIN32)
+endif(WIN32)
-FIND_PROGRAM(PERL_EXECUTABLE
+find_program(PERL_EXECUTABLE
NAMES perl
PATHS ${PERL_POSSIBLE_BIN_PATHS}
)
-IF(PERL_EXECUTABLE)
+if(PERL_EXECUTABLE)
### PERL_VERSION
- EXECUTE_PROCESS(
+ execute_process(
COMMAND
${PERL_EXECUTABLE} -V:version
OUTPUT_VARIABLE
@@ -52,32 +52,32 @@ IF(PERL_EXECUTABLE)
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
- IF(NOT PERL_VERSION_RESULT_VARIABLE AND NOT PERL_VERSION_OUTPUT_VARIABLE MATCHES "^version='UNKNOWN'")
- STRING(REGEX REPLACE "version='([^']+)'.*" "\\1" PERL_VERSION_STRING ${PERL_VERSION_OUTPUT_VARIABLE})
- ELSE()
- EXECUTE_PROCESS(
+ if(NOT PERL_VERSION_RESULT_VARIABLE AND NOT PERL_VERSION_OUTPUT_VARIABLE MATCHES "^version='UNKNOWN'")
+ string(REGEX REPLACE "version='([^']+)'.*" "\\1" PERL_VERSION_STRING ${PERL_VERSION_OUTPUT_VARIABLE})
+ else()
+ execute_process(
COMMAND ${PERL_EXECUTABLE} -v
OUTPUT_VARIABLE PERL_VERSION_OUTPUT_VARIABLE
RESULT_VARIABLE PERL_VERSION_RESULT_VARIABLE
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
- IF(NOT PERL_VERSION_RESULT_VARIABLE AND PERL_VERSION_OUTPUT_VARIABLE MATCHES "This is perl.*[ \\(]v([0-9\\._]+)[ \\)]")
- STRING(REGEX REPLACE ".*This is perl.*[ \\(]v([0-9\\._]+)[ \\)].*" "\\1" PERL_VERSION_STRING ${PERL_VERSION_OUTPUT_VARIABLE})
- ELSEIF(NOT PERL_VERSION_RESULT_VARIABLE AND PERL_VERSION_OUTPUT_VARIABLE MATCHES "This is perl, version ([0-9\\._]+) +")
- STRING(REGEX REPLACE ".*This is perl, version ([0-9\\._]+) +.*" "\\1" PERL_VERSION_STRING ${PERL_VERSION_OUTPUT_VARIABLE})
- ENDIF()
- ENDIF()
-ENDIF(PERL_EXECUTABLE)
+ if(NOT PERL_VERSION_RESULT_VARIABLE AND PERL_VERSION_OUTPUT_VARIABLE MATCHES "This is perl.*[ \\(]v([0-9\\._]+)[ \\)]")
+ string(REGEX REPLACE ".*This is perl.*[ \\(]v([0-9\\._]+)[ \\)].*" "\\1" PERL_VERSION_STRING ${PERL_VERSION_OUTPUT_VARIABLE})
+ elseif(NOT PERL_VERSION_RESULT_VARIABLE AND PERL_VERSION_OUTPUT_VARIABLE MATCHES "This is perl, version ([0-9\\._]+) +")
+ string(REGEX REPLACE ".*This is perl, version ([0-9\\._]+) +.*" "\\1" PERL_VERSION_STRING ${PERL_VERSION_OUTPUT_VARIABLE})
+ endif()
+ endif()
+endif(PERL_EXECUTABLE)
# Deprecated settings for compatibility with CMake1.4
-SET(PERL ${PERL_EXECUTABLE})
+set(PERL ${PERL_EXECUTABLE})
# handle the QUIETLY and REQUIRED arguments and set PERL_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Perl
REQUIRED_VARS PERL_EXECUTABLE
VERSION_VAR PERL_VERSION_STRING)
-MARK_AS_ADVANCED(PERL_EXECUTABLE)
+mark_as_advanced(PERL_EXECUTABLE)
diff --git a/Modules/FindPerlLibs.cmake b/Modules/FindPerlLibs.cmake
index 3db67acc4e..101aebfd40 100644
--- a/Modules/FindPerlLibs.cmake
+++ b/Modules/FindPerlLibs.cmake
@@ -9,7 +9,7 @@
# PERL_EXECUTABLE = full path to the perl binary
#
# The minimum required version of Perl can be specified using the
-# standard syntax, e.g. FIND_PACKAGE(PerlLibs 6.0)
+# standard syntax, e.g. find_package(PerlLibs 6.0)
#
# The following variables are also available if needed
# (introduced after CMake 2.6.4)
diff --git a/Modules/FindPhysFS.cmake b/Modules/FindPhysFS.cmake
index 45f9d2e6f9..ae78b27ce8 100644
--- a/Modules/FindPhysFS.cmake
+++ b/Modules/FindPhysFS.cmake
@@ -23,7 +23,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PATH(PHYSFS_INCLUDE_DIR physfs.h
+find_path(PHYSFS_INCLUDE_DIR physfs.h
HINTS
$ENV{PHYSFSDIR}
PATH_SUFFIXES include/physfs include
@@ -36,7 +36,7 @@ FIND_PATH(PHYSFS_INCLUDE_DIR physfs.h
/opt
)
-FIND_LIBRARY(PHYSFS_LIBRARY
+find_library(PHYSFS_LIBRARY
NAMES physfs
HINTS
$ENV{PHYSFSDIR}
@@ -52,6 +52,6 @@ FIND_LIBRARY(PHYSFS_LIBRARY
# handle the QUIETLY and REQUIRED arguments and set PHYSFS_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PhysFS DEFAULT_MSG PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR)
diff --git a/Modules/FindPike.cmake b/Modules/FindPike.cmake
index 125e428321..5b48ab4e75 100644
--- a/Modules/FindPike.cmake
+++ b/Modules/FindPike.cmake
@@ -20,18 +20,18 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FILE(GLOB PIKE_POSSIBLE_INCLUDE_PATHS
+file(GLOB PIKE_POSSIBLE_INCLUDE_PATHS
/usr/include/pike/*
/usr/local/include/pike/*)
-FIND_PATH(PIKE_INCLUDE_PATH program.h
+find_path(PIKE_INCLUDE_PATH program.h
${PIKE_POSSIBLE_INCLUDE_PATHS})
-FIND_PROGRAM(PIKE_EXECUTABLE
+find_program(PIKE_EXECUTABLE
NAMES pike7.4
)
-MARK_AS_ADVANCED(
+mark_as_advanced(
PIKE_EXECUTABLE
PIKE_INCLUDE_PATH
)
diff --git a/Modules/FindPostgreSQL.cmake b/Modules/FindPostgreSQL.cmake
index 94e5676fed..ad671603ba 100644
--- a/Modules/FindPostgreSQL.cmake
+++ b/Modules/FindPostgreSQL.cmake
@@ -35,7 +35,7 @@
#
# To use this variable just do something like this:
# set(PostgreSQL_ADDITIONAL_VERSIONS "9.2" "8.4.4")
-# before calling FIND_PACKAGE(PostgreSQL) in your CMakeLists.txt file.
+# before calling find_package(PostgreSQL) in your CMakeLists.txt file.
# This will mean that the versions you set here will be found first in the order
# specified before the default ones are searched.
#
@@ -61,7 +61,7 @@
# PostgreSQL_LIBRARY_DIR to wherever the library pq (or libpq in windows) is
# 2) Use CMAKE_INCLUDE_PATH to set a path to <Your Path>/PostgreSQL<-version>. This will allow find_path()
# to locate PostgreSQL_INCLUDE_DIR by utilizing the PATH_SUFFIXES option. e.g. In your CMakeLists.txt file
-# SET(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "<Your Path>/include")
+# set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "<Your Path>/include")
# 3) Set an environment variable called ${PostgreSQL_ROOT} that points to the root of where you have
# installed PostgreSQL, e.g. <Your Path>.
#
diff --git a/Modules/FindProducer.cmake b/Modules/FindProducer.cmake
index f7840c5d15..20266cbf79 100644
--- a/Modules/FindProducer.cmake
+++ b/Modules/FindProducer.cmake
@@ -42,7 +42,7 @@
# #include <Producer/CameraGroup>
# Try the user's environment request before anything else.
-FIND_PATH(PRODUCER_INCLUDE_DIR Producer/CameraGroup
+find_path(PRODUCER_INCLUDE_DIR Producer/CameraGroup
HINTS
$ENV{PRODUCER_DIR}
$ENV{OSG_DIR}
@@ -59,7 +59,7 @@ FIND_PATH(PRODUCER_INCLUDE_DIR Producer/CameraGroup
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
)
-FIND_LIBRARY(PRODUCER_LIBRARY
+find_library(PRODUCER_LIBRARY
NAMES Producer
HINTS
$ENV{PRODUCER_DIR}
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index 11ff19623f..932fbdcc9c 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -32,57 +32,57 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE(CMakeFindFrameworks)
+include(CMakeFindFrameworks)
# Search for the python framework on Apple.
CMAKE_FIND_FRAMEWORKS(Python)
-SET(_PYTHON1_VERSIONS 1.6 1.5)
-SET(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
-SET(_PYTHON3_VERSIONS 3.3 3.2 3.1 3.0)
-
-IF(PythonLibs_FIND_VERSION)
- IF(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
- STRING(REGEX REPLACE "^([0-9]+\\.[0-9]+).*" "\\1" _PYTHON_FIND_MAJ_MIN "${PythonLibs_FIND_VERSION}")
- STRING(REGEX REPLACE "^([0-9]+).*" "\\1" _PYTHON_FIND_MAJ "${_PYTHON_FIND_MAJ_MIN}")
- UNSET(_PYTHON_FIND_OTHER_VERSIONS)
- IF(PythonLibs_FIND_VERSION_EXACT)
- IF(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION)
- SET(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}")
- ELSE(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION)
- SET(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}" "${_PYTHON_FIND_MAJ_MIN}")
- ENDIF(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION)
- ELSE(PythonLibs_FIND_VERSION_EXACT)
- FOREACH(_PYTHON_V ${_PYTHON${_PYTHON_FIND_MAJ}_VERSIONS})
- IF(NOT _PYTHON_V VERSION_LESS _PYTHON_FIND_MAJ_MIN)
- LIST(APPEND _PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_V})
- ENDIF()
- ENDFOREACH()
- ENDIF(PythonLibs_FIND_VERSION_EXACT)
- UNSET(_PYTHON_FIND_MAJ_MIN)
- UNSET(_PYTHON_FIND_MAJ)
- ELSE(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
- SET(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON${PythonLibs_FIND_VERSION}_VERSIONS})
- ENDIF(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
-ELSE(PythonLibs_FIND_VERSION)
- SET(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS})
-ENDIF(PythonLibs_FIND_VERSION)
+set(_PYTHON1_VERSIONS 1.6 1.5)
+set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
+set(_PYTHON3_VERSIONS 3.3 3.2 3.1 3.0)
+
+if(PythonLibs_FIND_VERSION)
+ if(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
+ string(REGEX REPLACE "^([0-9]+\\.[0-9]+).*" "\\1" _PYTHON_FIND_MAJ_MIN "${PythonLibs_FIND_VERSION}")
+ string(REGEX REPLACE "^([0-9]+).*" "\\1" _PYTHON_FIND_MAJ "${_PYTHON_FIND_MAJ_MIN}")
+ unset(_PYTHON_FIND_OTHER_VERSIONS)
+ if(PythonLibs_FIND_VERSION_EXACT)
+ if(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION)
+ set(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}")
+ else(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION)
+ set(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}" "${_PYTHON_FIND_MAJ_MIN}")
+ endif(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION)
+ else(PythonLibs_FIND_VERSION_EXACT)
+ foreach(_PYTHON_V ${_PYTHON${_PYTHON_FIND_MAJ}_VERSIONS})
+ if(NOT _PYTHON_V VERSION_LESS _PYTHON_FIND_MAJ_MIN)
+ list(APPEND _PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_V})
+ endif()
+ endforeach()
+ endif(PythonLibs_FIND_VERSION_EXACT)
+ unset(_PYTHON_FIND_MAJ_MIN)
+ unset(_PYTHON_FIND_MAJ)
+ else(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
+ set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON${PythonLibs_FIND_VERSION}_VERSIONS})
+ endif(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
+else(PythonLibs_FIND_VERSION)
+ set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS})
+endif(PythonLibs_FIND_VERSION)
# Set up the versions we know about, in the order we will search. Always add
# the user supplied additional versions to the front.
-SET(_Python_VERSIONS
+set(_Python_VERSIONS
${Python_ADDITIONAL_VERSIONS}
${_PYTHON_FIND_OTHER_VERSIONS}
)
-UNSET(_PYTHON_FIND_OTHER_VERSIONS)
-UNSET(_PYTHON1_VERSIONS)
-UNSET(_PYTHON2_VERSIONS)
-UNSET(_PYTHON3_VERSIONS)
+unset(_PYTHON_FIND_OTHER_VERSIONS)
+unset(_PYTHON1_VERSIONS)
+unset(_PYTHON2_VERSIONS)
+unset(_PYTHON3_VERSIONS)
-FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
- STRING(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
- IF(WIN32)
- FIND_LIBRARY(PYTHON_DEBUG_LIBRARY
+foreach(_CURRENT_VERSION ${_Python_VERSIONS})
+ string(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
+ if(WIN32)
+ find_library(PYTHON_DEBUG_LIBRARY
NAMES python${_CURRENT_VERSION_NO_DOTS}_d python
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
@@ -90,9 +90,9 @@ FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
)
- ENDIF(WIN32)
+ endif(WIN32)
- FIND_LIBRARY(PYTHON_LIBRARY
+ find_library(PYTHON_LIBRARY
NAMES
python${_CURRENT_VERSION_NO_DOTS}
python${_CURRENT_VERSION}mu
@@ -106,7 +106,7 @@ FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
NO_SYSTEM_ENVIRONMENT_PATH
)
# Look for the static library in the Python config directory
- FIND_LIBRARY(PYTHON_LIBRARY
+ find_library(PYTHON_LIBRARY
NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
# Avoid finding the .dll in the PATH. We want the .lib.
NO_SYSTEM_ENVIRONMENT_PATH
@@ -116,20 +116,20 @@ FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
# For backward compatibility, honour value of PYTHON_INCLUDE_PATH, if
# PYTHON_INCLUDE_DIR is not set.
- IF(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR)
- SET(PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_PATH}" CACHE PATH
+ if(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR)
+ set(PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_PATH}" CACHE PATH
"Path to where Python.h is found" FORCE)
- ENDIF(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR)
+ endif(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR)
- SET(PYTHON_FRAMEWORK_INCLUDES)
- IF(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR)
- FOREACH(dir ${Python_FRAMEWORKS})
- SET(PYTHON_FRAMEWORK_INCLUDES ${PYTHON_FRAMEWORK_INCLUDES}
+ set(PYTHON_FRAMEWORK_INCLUDES)
+ if(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR)
+ foreach(dir ${Python_FRAMEWORKS})
+ set(PYTHON_FRAMEWORK_INCLUDES ${PYTHON_FRAMEWORK_INCLUDES}
${dir}/Versions/${_CURRENT_VERSION}/include/python${_CURRENT_VERSION})
- ENDFOREACH(dir)
- ENDIF(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR)
+ endforeach(dir)
+ endif(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR)
- FIND_PATH(PYTHON_INCLUDE_DIR
+ find_path(PYTHON_INCLUDE_DIR
NAMES Python.h
PATHS
${PYTHON_FRAMEWORK_INCLUDES}
@@ -143,22 +143,22 @@ FOREACH(_CURRENT_VERSION ${_Python_VERSIONS})
)
# For backward compatibility, set PYTHON_INCLUDE_PATH.
- SET(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}")
+ set(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}")
- IF(PYTHON_INCLUDE_DIR AND EXISTS "${PYTHON_INCLUDE_DIR}/patchlevel.h")
- FILE(STRINGS "${PYTHON_INCLUDE_DIR}/patchlevel.h" python_version_str
+ if(PYTHON_INCLUDE_DIR AND EXISTS "${PYTHON_INCLUDE_DIR}/patchlevel.h")
+ file(STRINGS "${PYTHON_INCLUDE_DIR}/patchlevel.h" python_version_str
REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"")
- STRING(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"]+)\".*" "\\1"
+ string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"]+)\".*" "\\1"
PYTHONLIBS_VERSION_STRING "${python_version_str}")
- UNSET(python_version_str)
- ENDIF(PYTHON_INCLUDE_DIR AND EXISTS "${PYTHON_INCLUDE_DIR}/patchlevel.h")
+ unset(python_version_str)
+ endif(PYTHON_INCLUDE_DIR AND EXISTS "${PYTHON_INCLUDE_DIR}/patchlevel.h")
- IF(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR)
- BREAK()
- ENDIF(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR)
-ENDFOREACH(_CURRENT_VERSION)
+ if(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR)
+ break()
+ endif(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR)
+endforeach(_CURRENT_VERSION)
-MARK_AS_ADVANCED(
+mark_as_advanced(
PYTHON_DEBUG_LIBRARY
PYTHON_LIBRARY
PYTHON_INCLUDE_DIR
@@ -168,21 +168,21 @@ MARK_AS_ADVANCED(
# cache entries because they are meant to specify the location of a single
# library. We now set the variables listed by the documentation for this
# module.
-SET(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
-SET(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")
+set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
+set(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")
# These variables have been historically named in this module different from
# what SELECT_LIBRARY_CONFIGURATIONS() expects.
-SET(PYTHON_LIBRARY_DEBUG "${PYTHON_DEBUG_LIBRARY}")
-SET(PYTHON_LIBRARY_RELEASE "${PYTHON_LIBRARY}")
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
+set(PYTHON_LIBRARY_DEBUG "${PYTHON_DEBUG_LIBRARY}")
+set(PYTHON_LIBRARY_RELEASE "${PYTHON_LIBRARY}")
+include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
SELECT_LIBRARY_CONFIGURATIONS(PYTHON)
# SELECT_LIBRARY_CONFIGURATIONS() sets ${PREFIX}_FOUND if it has a library.
# Unset this, this prefix doesn't match the module prefix, they are different
# for historical reasons.
-UNSET(PYTHON_FOUND)
+unset(PYTHON_FOUND)
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs
REQUIRED_VARS PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS
VERSION_VAR PYTHONLIBS_VERSION_STRING)
@@ -190,51 +190,51 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs
# PYTHON_ADD_MODULE(<name> src1 src2 ... srcN) is used to build modules for python.
# PYTHON_WRITE_MODULES_HEADER(<filename>) writes a header file you can include
# in your sources to initialize the static python modules
-FUNCTION(PYTHON_ADD_MODULE _NAME )
- GET_PROPERTY(_TARGET_SUPPORTS_SHARED_LIBS
+function(PYTHON_ADD_MODULE _NAME )
+ get_property(_TARGET_SUPPORTS_SHARED_LIBS
GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS)
- OPTION(PYTHON_ENABLE_MODULE_${_NAME} "Add module ${_NAME}" TRUE)
- OPTION(PYTHON_MODULE_${_NAME}_BUILD_SHARED
+ option(PYTHON_ENABLE_MODULE_${_NAME} "Add module ${_NAME}" TRUE)
+ option(PYTHON_MODULE_${_NAME}_BUILD_SHARED
"Add module ${_NAME} shared" ${_TARGET_SUPPORTS_SHARED_LIBS})
# Mark these options as advanced
- MARK_AS_ADVANCED(PYTHON_ENABLE_MODULE_${_NAME}
+ mark_as_advanced(PYTHON_ENABLE_MODULE_${_NAME}
PYTHON_MODULE_${_NAME}_BUILD_SHARED)
- IF(PYTHON_ENABLE_MODULE_${_NAME})
- IF(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
- SET(PY_MODULE_TYPE MODULE)
- ELSE(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
- SET(PY_MODULE_TYPE STATIC)
- SET_PROPERTY(GLOBAL APPEND PROPERTY PY_STATIC_MODULES_LIST ${_NAME})
- ENDIF(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
+ if(PYTHON_ENABLE_MODULE_${_NAME})
+ if(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
+ set(PY_MODULE_TYPE MODULE)
+ else(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
+ set(PY_MODULE_TYPE STATIC)
+ set_property(GLOBAL APPEND PROPERTY PY_STATIC_MODULES_LIST ${_NAME})
+ endif(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
- SET_PROPERTY(GLOBAL APPEND PROPERTY PY_MODULES_LIST ${_NAME})
- ADD_LIBRARY(${_NAME} ${PY_MODULE_TYPE} ${ARGN})
-# TARGET_LINK_LIBRARIES(${_NAME} ${PYTHON_LIBRARIES})
+ set_property(GLOBAL APPEND PROPERTY PY_MODULES_LIST ${_NAME})
+ add_library(${_NAME} ${PY_MODULE_TYPE} ${ARGN})
+# target_link_libraries(${_NAME} ${PYTHON_LIBRARIES})
- IF(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
- SET_TARGET_PROPERTIES(${_NAME} PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}")
- IF(WIN32 AND NOT CYGWIN)
- SET_TARGET_PROPERTIES(${_NAME} PROPERTIES SUFFIX ".pyd")
- ENDIF(WIN32 AND NOT CYGWIN)
- ENDIF(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
+ if(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
+ set_target_properties(${_NAME} PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}")
+ if(WIN32 AND NOT CYGWIN)
+ set_target_properties(${_NAME} PROPERTIES SUFFIX ".pyd")
+ endif(WIN32 AND NOT CYGWIN)
+ endif(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
- ENDIF(PYTHON_ENABLE_MODULE_${_NAME})
-ENDFUNCTION(PYTHON_ADD_MODULE)
+ endif(PYTHON_ENABLE_MODULE_${_NAME})
+endfunction(PYTHON_ADD_MODULE)
-FUNCTION(PYTHON_WRITE_MODULES_HEADER _filename)
+function(PYTHON_WRITE_MODULES_HEADER _filename)
- GET_PROPERTY(PY_STATIC_MODULES_LIST GLOBAL PROPERTY PY_STATIC_MODULES_LIST)
+ get_property(PY_STATIC_MODULES_LIST GLOBAL PROPERTY PY_STATIC_MODULES_LIST)
- GET_FILENAME_COMPONENT(_name "${_filename}" NAME)
- STRING(REPLACE "." "_" _name "${_name}")
- STRING(TOUPPER ${_name} _nameUpper)
- SET(_filename ${CMAKE_CURRENT_BINARY_DIR}/${_filename})
+ get_filename_component(_name "${_filename}" NAME)
+ string(REPLACE "." "_" _name "${_name}")
+ string(TOUPPER ${_name} _nameUpper)
+ set(_filename ${CMAKE_CURRENT_BINARY_DIR}/${_filename})
- SET(_filenameTmp "${_filename}.in")
- FILE(WRITE ${_filenameTmp} "/*Created by cmake, do not edit, changes will be lost*/\n")
- FILE(APPEND ${_filenameTmp}
+ set(_filenameTmp "${_filename}.in")
+ file(WRITE ${_filenameTmp} "/*Created by cmake, do not edit, changes will be lost*/\n")
+ file(APPEND ${_filenameTmp}
"#ifndef ${_nameUpper}
#define ${_nameUpper}
@@ -246,11 +246,11 @@ extern \"C\" {
")
- FOREACH(_currentModule ${PY_STATIC_MODULES_LIST})
- FILE(APPEND ${_filenameTmp} "extern void init${PYTHON_MODULE_PREFIX}${_currentModule}(void);\n\n")
- ENDFOREACH(_currentModule ${PY_STATIC_MODULES_LIST})
+ foreach(_currentModule ${PY_STATIC_MODULES_LIST})
+ file(APPEND ${_filenameTmp} "extern void init${PYTHON_MODULE_PREFIX}${_currentModule}(void);\n\n")
+ endforeach(_currentModule ${PY_STATIC_MODULES_LIST})
- FILE(APPEND ${_filenameTmp}
+ file(APPEND ${_filenameTmp}
"#ifdef __cplusplus
}
#endif /* __cplusplus */
@@ -258,18 +258,18 @@ extern \"C\" {
")
- FOREACH(_currentModule ${PY_STATIC_MODULES_LIST})
- FILE(APPEND ${_filenameTmp} "int ${_name}_${_currentModule}(void) \n{\n static char name[]=\"${PYTHON_MODULE_PREFIX}${_currentModule}\"; return PyImport_AppendInittab(name, init${PYTHON_MODULE_PREFIX}${_currentModule});\n}\n\n")
- ENDFOREACH(_currentModule ${PY_STATIC_MODULES_LIST})
+ foreach(_currentModule ${PY_STATIC_MODULES_LIST})
+ file(APPEND ${_filenameTmp} "int ${_name}_${_currentModule}(void) \n{\n static char name[]=\"${PYTHON_MODULE_PREFIX}${_currentModule}\"; return PyImport_AppendInittab(name, init${PYTHON_MODULE_PREFIX}${_currentModule});\n}\n\n")
+ endforeach(_currentModule ${PY_STATIC_MODULES_LIST})
- FILE(APPEND ${_filenameTmp} "void ${_name}_LoadAllPythonModules(void)\n{\n")
- FOREACH(_currentModule ${PY_STATIC_MODULES_LIST})
- FILE(APPEND ${_filenameTmp} " ${_name}_${_currentModule}();\n")
- ENDFOREACH(_currentModule ${PY_STATIC_MODULES_LIST})
- FILE(APPEND ${_filenameTmp} "}\n\n")
- FILE(APPEND ${_filenameTmp} "#ifndef EXCLUDE_LOAD_ALL_FUNCTION\nvoid CMakeLoadAllPythonModules(void)\n{\n ${_name}_LoadAllPythonModules();\n}\n#endif\n\n#endif\n")
+ file(APPEND ${_filenameTmp} "void ${_name}_LoadAllPythonModules(void)\n{\n")
+ foreach(_currentModule ${PY_STATIC_MODULES_LIST})
+ file(APPEND ${_filenameTmp} " ${_name}_${_currentModule}();\n")
+ endforeach(_currentModule ${PY_STATIC_MODULES_LIST})
+ file(APPEND ${_filenameTmp} "}\n\n")
+ file(APPEND ${_filenameTmp} "#ifndef EXCLUDE_LOAD_ALL_FUNCTION\nvoid CMakeLoadAllPythonModules(void)\n{\n ${_name}_LoadAllPythonModules();\n}\n#endif\n\n#endif\n")
-# with CONFIGURE_FILE() cmake complains that you may not use a file created using FILE(WRITE) as input file for CONFIGURE_FILE()
- EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_filenameTmp}" "${_filename}" OUTPUT_QUIET ERROR_QUIET)
+# with configure_file() cmake complains that you may not use a file created using file(WRITE) as input file for configure_file()
+ execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_filenameTmp}" "${_filename}" OUTPUT_QUIET ERROR_QUIET)
-ENDFUNCTION(PYTHON_WRITE_MODULES_HEADER)
+endfunction(PYTHON_WRITE_MODULES_HEADER)
diff --git a/Modules/FindQt.cmake b/Modules/FindQt.cmake
index 5a1f6fc38b..53b1da7cf0 100644
--- a/Modules/FindQt.cmake
+++ b/Modules/FindQt.cmake
@@ -31,52 +31,52 @@
# License text for the above reference.)
# look for signs of qt3 installations
-FILE(GLOB GLOB_TEMP_VAR /usr/lib/qt-3*/bin/qmake)
-IF(GLOB_TEMP_VAR)
- SET(QT3_INSTALLED TRUE)
-ENDIF(GLOB_TEMP_VAR)
-SET(GLOB_TEMP_VAR)
+file(GLOB GLOB_TEMP_VAR /usr/lib/qt-3*/bin/qmake)
+if(GLOB_TEMP_VAR)
+ set(QT3_INSTALLED TRUE)
+endif(GLOB_TEMP_VAR)
+set(GLOB_TEMP_VAR)
-FILE(GLOB GLOB_TEMP_VAR /usr/local/qt-x11-commercial-3*/bin/qmake)
-IF(GLOB_TEMP_VAR)
- SET(QT3_INSTALLED TRUE)
-ENDIF(GLOB_TEMP_VAR)
-SET(GLOB_TEMP_VAR)
+file(GLOB GLOB_TEMP_VAR /usr/local/qt-x11-commercial-3*/bin/qmake)
+if(GLOB_TEMP_VAR)
+ set(QT3_INSTALLED TRUE)
+endif(GLOB_TEMP_VAR)
+set(GLOB_TEMP_VAR)
# look for qt4 installations
-FILE(GLOB GLOB_TEMP_VAR /usr/local/qt-x11-commercial-4*/bin/qmake)
-IF(GLOB_TEMP_VAR)
- SET(QT4_INSTALLED TRUE)
-ENDIF(GLOB_TEMP_VAR)
-SET(GLOB_TEMP_VAR)
+file(GLOB GLOB_TEMP_VAR /usr/local/qt-x11-commercial-4*/bin/qmake)
+if(GLOB_TEMP_VAR)
+ set(QT4_INSTALLED TRUE)
+endif(GLOB_TEMP_VAR)
+set(GLOB_TEMP_VAR)
-FILE(GLOB GLOB_TEMP_VAR /usr/local/Trolltech/Qt-4*/bin/qmake)
-IF(GLOB_TEMP_VAR)
- SET(QT4_INSTALLED TRUE)
-ENDIF(GLOB_TEMP_VAR)
-SET(GLOB_TEMP_VAR)
+file(GLOB GLOB_TEMP_VAR /usr/local/Trolltech/Qt-4*/bin/qmake)
+if(GLOB_TEMP_VAR)
+ set(QT4_INSTALLED TRUE)
+endif(GLOB_TEMP_VAR)
+set(GLOB_TEMP_VAR)
# now find qmake
-FIND_PROGRAM(QT_QMAKE_EXECUTABLE_FINDQT NAMES qmake PATHS "${QT_SEARCH_PATH}/bin" "$ENV{QTDIR}/bin")
-IF(QT_QMAKE_EXECUTABLE_FINDQT)
- EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE_FINDQT} ARGS "-query QT_VERSION"
+find_program(QT_QMAKE_EXECUTABLE_FINDQT NAMES qmake PATHS "${QT_SEARCH_PATH}/bin" "$ENV{QTDIR}/bin")
+if(QT_QMAKE_EXECUTABLE_FINDQT)
+ exec_program(${QT_QMAKE_EXECUTABLE_FINDQT} ARGS "-query QT_VERSION"
OUTPUT_VARIABLE QTVERSION)
- IF(QTVERSION MATCHES "4.*")
- SET(QT_QMAKE_EXECUTABLE ${QT_QMAKE_EXECUTABLE_FINDQT} CACHE PATH "QT4 qmake program.")
- SET(QT4_INSTALLED TRUE)
- ENDIF(QTVERSION MATCHES "4.*")
- IF(QTVERSION MATCHES "Unknown")
- SET(QT3_INSTALLED TRUE)
- ENDIF(QTVERSION MATCHES "Unknown")
-ENDIF(QT_QMAKE_EXECUTABLE_FINDQT)
+ if(QTVERSION MATCHES "4.*")
+ set(QT_QMAKE_EXECUTABLE ${QT_QMAKE_EXECUTABLE_FINDQT} CACHE PATH "QT4 qmake program.")
+ set(QT4_INSTALLED TRUE)
+ endif(QTVERSION MATCHES "4.*")
+ if(QTVERSION MATCHES "Unknown")
+ set(QT3_INSTALLED TRUE)
+ endif(QTVERSION MATCHES "Unknown")
+endif(QT_QMAKE_EXECUTABLE_FINDQT)
-IF(QT_QMAKE_EXECUTABLE_FINDQT)
- EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE_FINDQT}
+if(QT_QMAKE_EXECUTABLE_FINDQT)
+ exec_program( ${QT_QMAKE_EXECUTABLE_FINDQT}
ARGS "-query QT_INSTALL_HEADERS"
OUTPUT_VARIABLE qt_headers )
-ENDIF(QT_QMAKE_EXECUTABLE_FINDQT)
+endif(QT_QMAKE_EXECUTABLE_FINDQT)
-FIND_FILE( QT4_QGLOBAL_H_FILE qglobal.h
+find_file( QT4_QGLOBAL_H_FILE qglobal.h
"${QT_SEARCH_PATH}/Qt/include"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/include/Qt"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/include/Qt"
@@ -89,11 +89,11 @@ FIND_FILE( QT4_QGLOBAL_H_FILE qglobal.h
/usr/share/qt4/include/Qt
C:/Progra~1/qt/include/Qt )
-IF(QT4_QGLOBAL_H_FILE)
- SET(QT4_INSTALLED TRUE)
-ENDIF(QT4_QGLOBAL_H_FILE)
+if(QT4_QGLOBAL_H_FILE)
+ set(QT4_INSTALLED TRUE)
+endif(QT4_QGLOBAL_H_FILE)
-FIND_FILE( QT3_QGLOBAL_H_FILE qglobal.h
+find_file( QT3_QGLOBAL_H_FILE qglobal.h
"${QT_SEARCH_PATH}/Qt/include"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/include/Qt"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt"
@@ -109,52 +109,52 @@ FIND_FILE( QT3_QGLOBAL_H_FILE qglobal.h
C:/Progra~1/qt/include
/usr/include/qt3 )
-IF(QT3_QGLOBAL_H_FILE)
- SET(QT3_INSTALLED TRUE)
-ENDIF(QT3_QGLOBAL_H_FILE)
+if(QT3_QGLOBAL_H_FILE)
+ set(QT3_INSTALLED TRUE)
+endif(QT3_QGLOBAL_H_FILE)
-IF(QT3_INSTALLED AND QT4_INSTALLED )
+if(QT3_INSTALLED AND QT4_INSTALLED )
# force user to pick if we have both
- SET(DESIRED_QT_VERSION 0 CACHE STRING "Pick a version of QT to use: 3 or 4")
-ELSE(QT3_INSTALLED AND QT4_INSTALLED )
+ set(DESIRED_QT_VERSION 0 CACHE STRING "Pick a version of QT to use: 3 or 4")
+else(QT3_INSTALLED AND QT4_INSTALLED )
# if only one found then pick that one
- IF(QT3_INSTALLED)
- SET(DESIRED_QT_VERSION 3 CACHE STRING "Pick a version of QT to use: 3 or 4")
- ENDIF(QT3_INSTALLED)
- IF(QT4_INSTALLED)
- SET(DESIRED_QT_VERSION 4 CACHE STRING "Pick a version of QT to use: 3 or 4")
- ENDIF(QT4_INSTALLED)
-ENDIF(QT3_INSTALLED AND QT4_INSTALLED )
+ if(QT3_INSTALLED)
+ set(DESIRED_QT_VERSION 3 CACHE STRING "Pick a version of QT to use: 3 or 4")
+ endif(QT3_INSTALLED)
+ if(QT4_INSTALLED)
+ set(DESIRED_QT_VERSION 4 CACHE STRING "Pick a version of QT to use: 3 or 4")
+ endif(QT4_INSTALLED)
+endif(QT3_INSTALLED AND QT4_INSTALLED )
-IF(DESIRED_QT_VERSION MATCHES 3)
- SET(Qt3_FIND_REQUIRED ${Qt_FIND_REQUIRED})
- SET(Qt3_FIND_QUIETLY ${Qt_FIND_QUIETLY})
- INCLUDE(FindQt3)
-ENDIF(DESIRED_QT_VERSION MATCHES 3)
-IF(DESIRED_QT_VERSION MATCHES 4)
- SET(Qt4_FIND_REQUIRED ${Qt_FIND_REQUIRED})
- SET(Qt4_FIND_QUIETLY ${Qt_FIND_QUIETLY})
- INCLUDE(FindQt4)
-ENDIF(DESIRED_QT_VERSION MATCHES 4)
+if(DESIRED_QT_VERSION MATCHES 3)
+ set(Qt3_FIND_REQUIRED ${Qt_FIND_REQUIRED})
+ set(Qt3_FIND_QUIETLY ${Qt_FIND_QUIETLY})
+ include(FindQt3)
+endif(DESIRED_QT_VERSION MATCHES 3)
+if(DESIRED_QT_VERSION MATCHES 4)
+ set(Qt4_FIND_REQUIRED ${Qt_FIND_REQUIRED})
+ set(Qt4_FIND_QUIETLY ${Qt_FIND_QUIETLY})
+ include(FindQt4)
+endif(DESIRED_QT_VERSION MATCHES 4)
-IF(NOT QT3_INSTALLED AND NOT QT4_INSTALLED)
- IF(QT_REQUIRED)
- MESSAGE(SEND_ERROR "CMake was unable to find any QT versions, put qmake in your path, or set QT_QMAKE_EXECUTABLE.")
- ENDIF(QT_REQUIRED)
-ELSE(NOT QT3_INSTALLED AND NOT QT4_INSTALLED)
- IF(NOT QT_FOUND AND NOT DESIRED_QT_VERSION)
- IF(QT_REQUIRED)
- MESSAGE(SEND_ERROR "Multiple versions of QT found please set DESIRED_QT_VERSION")
- ELSE(QT_REQUIRED)
- MESSAGE("Multiple versions of QT found please set DESIRED_QT_VERSION")
- ENDIF(QT_REQUIRED)
- ENDIF(NOT QT_FOUND AND NOT DESIRED_QT_VERSION)
- IF(NOT QT_FOUND AND DESIRED_QT_VERSION)
- IF(QT_REQUIRED)
- MESSAGE(FATAL_ERROR "CMake was unable to find QT version: ${DESIRED_QT_VERSION}. Set advanced values QT_QMAKE_EXECUTABLE and QT${DESIRED_QT_VERSION}_QGLOBAL_FILE, if those are set then QT_QT_LIBRARY or QT_LIBRARY_DIR.")
- ELSE(QT_REQUIRED)
- MESSAGE( "CMake was unable to find desired QT version: ${DESIRED_QT_VERSION}. Set advanced values QT_QMAKE_EXECUTABLE and QT${DESIRED_QT_VERSION}_QGLOBAL_FILE.")
- ENDIF(QT_REQUIRED)
- ENDIF(NOT QT_FOUND AND DESIRED_QT_VERSION)
-ENDIF(NOT QT3_INSTALLED AND NOT QT4_INSTALLED)
-MARK_AS_ADVANCED(QT3_QGLOBAL_H_FILE QT4_QGLOBAL_H_FILE QT_QMAKE_EXECUTABLE_FINDQT)
+if(NOT QT3_INSTALLED AND NOT QT4_INSTALLED)
+ if(QT_REQUIRED)
+ message(SEND_ERROR "CMake was unable to find any QT versions, put qmake in your path, or set QT_QMAKE_EXECUTABLE.")
+ endif(QT_REQUIRED)
+else(NOT QT3_INSTALLED AND NOT QT4_INSTALLED)
+ if(NOT QT_FOUND AND NOT DESIRED_QT_VERSION)
+ if(QT_REQUIRED)
+ message(SEND_ERROR "Multiple versions of QT found please set DESIRED_QT_VERSION")
+ else(QT_REQUIRED)
+ message("Multiple versions of QT found please set DESIRED_QT_VERSION")
+ endif(QT_REQUIRED)
+ endif(NOT QT_FOUND AND NOT DESIRED_QT_VERSION)
+ if(NOT QT_FOUND AND DESIRED_QT_VERSION)
+ if(QT_REQUIRED)
+ message(FATAL_ERROR "CMake was unable to find QT version: ${DESIRED_QT_VERSION}. Set advanced values QT_QMAKE_EXECUTABLE and QT${DESIRED_QT_VERSION}_QGLOBAL_FILE, if those are set then QT_QT_LIBRARY or QT_LIBRARY_DIR.")
+ else(QT_REQUIRED)
+ message( "CMake was unable to find desired QT version: ${DESIRED_QT_VERSION}. Set advanced values QT_QMAKE_EXECUTABLE and QT${DESIRED_QT_VERSION}_QGLOBAL_FILE.")
+ endif(QT_REQUIRED)
+ endif(NOT QT_FOUND AND DESIRED_QT_VERSION)
+endif(NOT QT3_INSTALLED AND NOT QT4_INSTALLED)
+mark_as_advanced(QT3_QGLOBAL_H_FILE QT4_QGLOBAL_H_FILE QT_QMAKE_EXECUTABLE_FINDQT)
diff --git a/Modules/FindQt3.cmake b/Modules/FindQt3.cmake
index 2d8dbde22b..0440a85923 100644
--- a/Modules/FindQt3.cmake
+++ b/Modules/FindQt3.cmake
@@ -35,23 +35,23 @@
# License text for the above reference.)
# If Qt4 has already been found, fail.
-IF(QT4_FOUND)
- IF(Qt3_FIND_REQUIRED)
- MESSAGE( FATAL_ERROR "Qt3 and Qt4 cannot be used together in one project.")
- ELSE(Qt3_FIND_REQUIRED)
- IF(NOT Qt3_FIND_QUIETLY)
- MESSAGE( STATUS "Qt3 and Qt4 cannot be used together in one project.")
- ENDIF(NOT Qt3_FIND_QUIETLY)
- RETURN()
- ENDIF(Qt3_FIND_REQUIRED)
-ENDIF(QT4_FOUND)
+if(QT4_FOUND)
+ if(Qt3_FIND_REQUIRED)
+ message( FATAL_ERROR "Qt3 and Qt4 cannot be used together in one project.")
+ else(Qt3_FIND_REQUIRED)
+ if(NOT Qt3_FIND_QUIETLY)
+ message( STATUS "Qt3 and Qt4 cannot be used together in one project.")
+ endif(NOT Qt3_FIND_QUIETLY)
+ return()
+ endif(Qt3_FIND_REQUIRED)
+endif(QT4_FOUND)
-FILE(GLOB GLOB_PATHS /usr/lib/qt-3*)
-FOREACH(GLOB_PATH ${GLOB_PATHS})
- LIST(APPEND GLOB_PATHS_BIN "${GLOB_PATH}/bin")
-ENDFOREACH(GLOB_PATH)
-FIND_PATH(QT_INCLUDE_DIR qt.h
+file(GLOB GLOB_PATHS /usr/lib/qt-3*)
+foreach(GLOB_PATH ${GLOB_PATHS})
+ list(APPEND GLOB_PATHS_BIN "${GLOB_PATH}/bin")
+endforeach(GLOB_PATH)
+find_path(QT_INCLUDE_DIR qt.h
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/include/Qt"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt"
@@ -68,25 +68,25 @@ FIND_PATH(QT_INCLUDE_DIR qt.h
# if qglobal.h is not in the qt_include_dir then set
# QT_INCLUDE_DIR to NOTFOUND
-IF(NOT EXISTS ${QT_INCLUDE_DIR}/qglobal.h)
- SET(QT_INCLUDE_DIR QT_INCLUDE_DIR-NOTFOUND CACHE PATH "path to Qt3 include directory" FORCE)
-ENDIF(NOT EXISTS ${QT_INCLUDE_DIR}/qglobal.h)
+if(NOT EXISTS ${QT_INCLUDE_DIR}/qglobal.h)
+ set(QT_INCLUDE_DIR QT_INCLUDE_DIR-NOTFOUND CACHE PATH "path to Qt3 include directory" FORCE)
+endif(NOT EXISTS ${QT_INCLUDE_DIR}/qglobal.h)
-IF(QT_INCLUDE_DIR)
+if(QT_INCLUDE_DIR)
#extract the version string from qglobal.h
- FILE(READ ${QT_INCLUDE_DIR}/qglobal.h QGLOBAL_H)
- STRING(REGEX MATCH "#define[\t ]+QT_VERSION_STR[\t ]+\"[0-9]+.[0-9]+.[0-9]+[a-z]*\"" QGLOBAL_H "${QGLOBAL_H}")
- STRING(REGEX REPLACE ".*\"([0-9]+.[0-9]+.[0-9]+[a-z]*)\".*" "\\1" qt_version_str "${QGLOBAL_H}")
+ file(READ ${QT_INCLUDE_DIR}/qglobal.h QGLOBAL_H)
+ string(REGEX MATCH "#define[\t ]+QT_VERSION_STR[\t ]+\"[0-9]+.[0-9]+.[0-9]+[a-z]*\"" QGLOBAL_H "${QGLOBAL_H}")
+ string(REGEX REPLACE ".*\"([0-9]+.[0-9]+.[0-9]+[a-z]*)\".*" "\\1" qt_version_str "${QGLOBAL_H}")
# Under windows the qt library (MSVC) has the format qt-mtXYZ where XYZ is the
# version X.Y.Z, so we need to remove the dots from version
- STRING(REGEX REPLACE "\\." "" qt_version_str_lib "${qt_version_str}")
- SET(QT_VERSION_STRING "${qt_version_str}")
-ENDIF(QT_INCLUDE_DIR)
+ string(REGEX REPLACE "\\." "" qt_version_str_lib "${qt_version_str}")
+ set(QT_VERSION_STRING "${qt_version_str}")
+endif(QT_INCLUDE_DIR)
-FILE(GLOB GLOB_PATHS_LIB /usr/lib/qt-3*/lib/)
-IF (QT_MT_REQUIRED)
- FIND_LIBRARY(QT_QT_LIBRARY
+file(GLOB GLOB_PATHS_LIB /usr/lib/qt-3*/lib/)
+if (QT_MT_REQUIRED)
+ find_library(QT_QT_LIBRARY
NAMES
qt-mt qt-mt${qt_version_str_lib} qt-mtnc${qt_version_str_lib}
qt-mtedu${qt_version_str_lib} qt-mt230nc qt-mtnc321 qt-mt3
@@ -104,8 +104,8 @@ IF (QT_MT_REQUIRED)
C:/Progra~1/qt/lib
)
-ELSE (QT_MT_REQUIRED)
- FIND_LIBRARY(QT_QT_LIBRARY
+else (QT_MT_REQUIRED)
+ find_library(QT_QT_LIBRARY
NAMES
qt qt-${qt_version_str_lib} qt-edu${qt_version_str_lib}
qt-mt qt-mt${qt_version_str_lib} qt-mtnc${qt_version_str_lib}
@@ -123,10 +123,10 @@ ELSE (QT_MT_REQUIRED)
/usr/share/qt3/lib
C:/Progra~1/qt/lib
)
-ENDIF (QT_MT_REQUIRED)
+endif (QT_MT_REQUIRED)
-FIND_LIBRARY(QT_QASSISTANTCLIENT_LIBRARY
+find_library(QT_QASSISTANTCLIENT_LIBRARY
NAMES qassistantclient
PATHS
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/lib"
@@ -142,7 +142,7 @@ FIND_LIBRARY(QT_QASSISTANTCLIENT_LIBRARY
)
# qt 3 should prefer QTDIR over the PATH
-FIND_PROGRAM(QT_MOC_EXECUTABLE
+find_program(QT_MOC_EXECUTABLE
NAMES moc-qt3 moc
HINTS
$ENV{QTDIR}/bin
@@ -160,12 +160,12 @@ FIND_PROGRAM(QT_MOC_EXECUTABLE
/usr/X11R6/bin
)
-IF(QT_MOC_EXECUTABLE)
- SET ( QT_WRAP_CPP "YES")
-ENDIF(QT_MOC_EXECUTABLE)
+if(QT_MOC_EXECUTABLE)
+ set ( QT_WRAP_CPP "YES")
+endif(QT_MOC_EXECUTABLE)
# qt 3 should prefer QTDIR over the PATH
-FIND_PROGRAM(QT_UIC_EXECUTABLE
+find_program(QT_UIC_EXECUTABLE
NAMES uic-qt3 uic
HINTS
$ENV{QTDIR}/bin
@@ -182,12 +182,12 @@ FIND_PROGRAM(QT_UIC_EXECUTABLE
/usr/X11R6/bin
)
-IF(QT_UIC_EXECUTABLE)
- SET ( QT_WRAP_UI "YES")
-ENDIF(QT_UIC_EXECUTABLE)
+if(QT_UIC_EXECUTABLE)
+ set ( QT_WRAP_UI "YES")
+endif(QT_UIC_EXECUTABLE)
-IF (WIN32)
- FIND_LIBRARY(QT_QTMAIN_LIBRARY qtmain
+if (WIN32)
+ find_library(QT_QTMAIN_LIBRARY qtmain
HINTS
$ENV{QTDIR}/lib
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/lib"
@@ -198,99 +198,99 @@ IF (WIN32)
"C:/Program Files/qt/lib"
DOC "This Library is only needed by and included with Qt3 on MSWindows. It should be NOTFOUND, undefined or IGNORE otherwise."
)
-ENDIF (WIN32)
+endif (WIN32)
#support old QT_MIN_VERSION if set, but not if version is supplied by find_package()
-IF(NOT Qt3_FIND_VERSION AND QT_MIN_VERSION)
- SET(Qt3_FIND_VERSION ${QT_MIN_VERSION})
-ENDIF(NOT Qt3_FIND_VERSION AND QT_MIN_VERSION)
+if(NOT Qt3_FIND_VERSION AND QT_MIN_VERSION)
+ set(Qt3_FIND_VERSION ${QT_MIN_VERSION})
+endif(NOT Qt3_FIND_VERSION AND QT_MIN_VERSION)
# if the include a library are found then we have it
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt3
REQUIRED_VARS QT_QT_LIBRARY QT_INCLUDE_DIR QT_MOC_EXECUTABLE
VERSION_VAR QT_VERSION_STRING)
-SET(QT_FOUND ${QT3_FOUND} )
+set(QT_FOUND ${QT3_FOUND} )
-IF(QT_FOUND)
- SET( QT_LIBRARIES ${QT_LIBRARIES} ${QT_QT_LIBRARY} )
- SET( QT_DEFINITIONS "")
+if(QT_FOUND)
+ set( QT_LIBRARIES ${QT_LIBRARIES} ${QT_QT_LIBRARY} )
+ set( QT_DEFINITIONS "")
- IF (WIN32 AND NOT CYGWIN)
- IF (QT_QTMAIN_LIBRARY)
+ if (WIN32 AND NOT CYGWIN)
+ if (QT_QTMAIN_LIBRARY)
# for version 3
- SET (QT_DEFINITIONS -DQT_DLL -DQT_THREAD_SUPPORT -DNO_DEBUG)
- SET (QT_LIBRARIES imm32.lib ${QT_QT_LIBRARY} ${QT_QTMAIN_LIBRARY} )
- SET (QT_LIBRARIES ${QT_LIBRARIES} winmm wsock32)
- ELSE (QT_QTMAIN_LIBRARY)
+ set (QT_DEFINITIONS -DQT_DLL -DQT_THREAD_SUPPORT -DNO_DEBUG)
+ set (QT_LIBRARIES imm32.lib ${QT_QT_LIBRARY} ${QT_QTMAIN_LIBRARY} )
+ set (QT_LIBRARIES ${QT_LIBRARIES} winmm wsock32)
+ else (QT_QTMAIN_LIBRARY)
# for version 2
- SET (QT_LIBRARIES imm32.lib ws2_32.lib ${QT_QT_LIBRARY} )
- ENDIF (QT_QTMAIN_LIBRARY)
- ELSE (WIN32 AND NOT CYGWIN)
- SET (QT_LIBRARIES ${QT_QT_LIBRARY} )
+ set (QT_LIBRARIES imm32.lib ws2_32.lib ${QT_QT_LIBRARY} )
+ endif (QT_QTMAIN_LIBRARY)
+ else (WIN32 AND NOT CYGWIN)
+ set (QT_LIBRARIES ${QT_QT_LIBRARY} )
- SET (QT_DEFINITIONS -DQT_SHARED -DQT_NO_DEBUG)
- IF(QT_QT_LIBRARY MATCHES "qt-mt")
- SET (QT_DEFINITIONS ${QT_DEFINITIONS} -DQT_THREAD_SUPPORT -D_REENTRANT)
- ENDIF(QT_QT_LIBRARY MATCHES "qt-mt")
+ set (QT_DEFINITIONS -DQT_SHARED -DQT_NO_DEBUG)
+ if(QT_QT_LIBRARY MATCHES "qt-mt")
+ set (QT_DEFINITIONS ${QT_DEFINITIONS} -DQT_THREAD_SUPPORT -D_REENTRANT)
+ endif(QT_QT_LIBRARY MATCHES "qt-mt")
- ENDIF (WIN32 AND NOT CYGWIN)
+ endif (WIN32 AND NOT CYGWIN)
- IF (QT_QASSISTANTCLIENT_LIBRARY)
- SET (QT_LIBRARIES ${QT_QASSISTANTCLIENT_LIBRARY} ${QT_LIBRARIES})
- ENDIF (QT_QASSISTANTCLIENT_LIBRARY)
+ if (QT_QASSISTANTCLIENT_LIBRARY)
+ set (QT_LIBRARIES ${QT_QASSISTANTCLIENT_LIBRARY} ${QT_LIBRARIES})
+ endif (QT_QASSISTANTCLIENT_LIBRARY)
# Backwards compatibility for CMake1.4 and 1.2
- SET (QT_MOC_EXE ${QT_MOC_EXECUTABLE} )
- SET (QT_UIC_EXE ${QT_UIC_EXECUTABLE} )
+ set (QT_MOC_EXE ${QT_MOC_EXECUTABLE} )
+ set (QT_UIC_EXE ${QT_UIC_EXECUTABLE} )
# for unix add X11 stuff
- IF(UNIX)
- FIND_PACKAGE(X11)
- IF (X11_FOUND)
- SET (QT_LIBRARIES ${QT_LIBRARIES} ${X11_LIBRARIES})
- ENDIF (X11_FOUND)
- IF (CMAKE_DL_LIBS)
- SET (QT_LIBRARIES ${QT_LIBRARIES} ${CMAKE_DL_LIBS})
- ENDIF (CMAKE_DL_LIBS)
- ENDIF(UNIX)
- IF(QT_QT_LIBRARY MATCHES "qt-mt")
- FIND_PACKAGE(Threads)
- SET(QT_LIBRARIES ${QT_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
- ENDIF(QT_QT_LIBRARY MATCHES "qt-mt")
-ENDIF(QT_FOUND)
+ if(UNIX)
+ find_package(X11)
+ if (X11_FOUND)
+ set (QT_LIBRARIES ${QT_LIBRARIES} ${X11_LIBRARIES})
+ endif (X11_FOUND)
+ if (CMAKE_DL_LIBS)
+ set (QT_LIBRARIES ${QT_LIBRARIES} ${CMAKE_DL_LIBS})
+ endif (CMAKE_DL_LIBS)
+ endif(UNIX)
+ if(QT_QT_LIBRARY MATCHES "qt-mt")
+ find_package(Threads)
+ set(QT_LIBRARIES ${QT_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
+ endif(QT_QT_LIBRARY MATCHES "qt-mt")
+endif(QT_FOUND)
-IF(QT_MOC_EXECUTABLE)
- EXECUTE_PROCESS(COMMAND ${QT_MOC_EXECUTABLE} "-v"
+if(QT_MOC_EXECUTABLE)
+ execute_process(COMMAND ${QT_MOC_EXECUTABLE} "-v"
OUTPUT_VARIABLE QTVERSION_MOC
ERROR_QUIET)
-ENDIF(QT_MOC_EXECUTABLE)
-IF(QT_UIC_EXECUTABLE)
- EXECUTE_PROCESS(COMMAND ${QT_UIC_EXECUTABLE} "-version"
+endif(QT_MOC_EXECUTABLE)
+if(QT_UIC_EXECUTABLE)
+ execute_process(COMMAND ${QT_UIC_EXECUTABLE} "-version"
OUTPUT_VARIABLE QTVERSION_UIC
ERROR_QUIET)
-ENDIF(QT_UIC_EXECUTABLE)
+endif(QT_UIC_EXECUTABLE)
-SET(_QT_UIC_VERSION_3 FALSE)
-IF("${QTVERSION_UIC}" MATCHES ".* 3..*")
- SET(_QT_UIC_VERSION_3 TRUE)
-ENDIF("${QTVERSION_UIC}" MATCHES ".* 3..*")
+set(_QT_UIC_VERSION_3 FALSE)
+if("${QTVERSION_UIC}" MATCHES ".* 3..*")
+ set(_QT_UIC_VERSION_3 TRUE)
+endif("${QTVERSION_UIC}" MATCHES ".* 3..*")
-SET(_QT_MOC_VERSION_3 FALSE)
-IF("${QTVERSION_MOC}" MATCHES ".* 3..*")
- SET(_QT_MOC_VERSION_3 TRUE)
-ENDIF("${QTVERSION_MOC}" MATCHES ".* 3..*")
+set(_QT_MOC_VERSION_3 FALSE)
+if("${QTVERSION_MOC}" MATCHES ".* 3..*")
+ set(_QT_MOC_VERSION_3 TRUE)
+endif("${QTVERSION_MOC}" MATCHES ".* 3..*")
-SET(QT_WRAP_CPP FALSE)
-IF (QT_MOC_EXECUTABLE AND _QT_MOC_VERSION_3)
- SET ( QT_WRAP_CPP TRUE)
-ENDIF (QT_MOC_EXECUTABLE AND _QT_MOC_VERSION_3)
+set(QT_WRAP_CPP FALSE)
+if (QT_MOC_EXECUTABLE AND _QT_MOC_VERSION_3)
+ set ( QT_WRAP_CPP TRUE)
+endif (QT_MOC_EXECUTABLE AND _QT_MOC_VERSION_3)
-SET(QT_WRAP_UI FALSE)
-IF (QT_UIC_EXECUTABLE AND _QT_UIC_VERSION_3)
- SET ( QT_WRAP_UI TRUE)
-ENDIF (QT_UIC_EXECUTABLE AND _QT_UIC_VERSION_3)
+set(QT_WRAP_UI FALSE)
+if (QT_UIC_EXECUTABLE AND _QT_UIC_VERSION_3)
+ set ( QT_WRAP_UI TRUE)
+endif (QT_UIC_EXECUTABLE AND _QT_UIC_VERSION_3)
-MARK_AS_ADVANCED(
+mark_as_advanced(
QT_INCLUDE_DIR
QT_QT_LIBRARY
QT_QTMAIN_LIBRARY
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index e3eb1e69b3..e20e76465c 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -334,139 +334,139 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-# Use FIND_PACKAGE( Qt4 COMPONENTS ... ) to enable modules
-IF( Qt4_FIND_COMPONENTS )
- FOREACH( component ${Qt4_FIND_COMPONENTS} )
- STRING( TOUPPER ${component} _COMPONENT )
- SET( QT_USE_${_COMPONENT} 1 )
- ENDFOREACH( component )
+# Use find_package( Qt4 COMPONENTS ... ) to enable modules
+if( Qt4_FIND_COMPONENTS )
+ foreach( component ${Qt4_FIND_COMPONENTS} )
+ string( TOUPPER ${component} _COMPONENT )
+ set( QT_USE_${_COMPONENT} 1 )
+ endforeach( component )
# To make sure we don't use QtCore or QtGui when not in COMPONENTS
- IF(NOT QT_USE_QTCORE)
- SET( QT_DONT_USE_QTCORE 1 )
- ENDIF(NOT QT_USE_QTCORE)
+ if(NOT QT_USE_QTCORE)
+ set( QT_DONT_USE_QTCORE 1 )
+ endif(NOT QT_USE_QTCORE)
- IF(NOT QT_USE_QTGUI)
- SET( QT_DONT_USE_QTGUI 1 )
- ENDIF(NOT QT_USE_QTGUI)
+ if(NOT QT_USE_QTGUI)
+ set( QT_DONT_USE_QTGUI 1 )
+ endif(NOT QT_USE_QTGUI)
-ENDIF( Qt4_FIND_COMPONENTS )
+endif( Qt4_FIND_COMPONENTS )
# If Qt3 has already been found, fail.
-IF(QT_QT_LIBRARY)
- IF(Qt4_FIND_REQUIRED)
- MESSAGE( FATAL_ERROR "Qt3 and Qt4 cannot be used together in one project. If switching to Qt4, the CMakeCache.txt needs to be cleaned.")
- ELSE(Qt4_FIND_REQUIRED)
- IF(NOT Qt4_FIND_QUIETLY)
- MESSAGE( STATUS "Qt3 and Qt4 cannot be used together in one project. If switching to Qt4, the CMakeCache.txt needs to be cleaned.")
- ENDIF(NOT Qt4_FIND_QUIETLY)
- RETURN()
- ENDIF(Qt4_FIND_REQUIRED)
-ENDIF(QT_QT_LIBRARY)
+if(QT_QT_LIBRARY)
+ if(Qt4_FIND_REQUIRED)
+ message( FATAL_ERROR "Qt3 and Qt4 cannot be used together in one project. If switching to Qt4, the CMakeCache.txt needs to be cleaned.")
+ else(Qt4_FIND_REQUIRED)
+ if(NOT Qt4_FIND_QUIETLY)
+ message( STATUS "Qt3 and Qt4 cannot be used together in one project. If switching to Qt4, the CMakeCache.txt needs to be cleaned.")
+ endif(NOT Qt4_FIND_QUIETLY)
+ return()
+ endif(Qt4_FIND_REQUIRED)
+endif(QT_QT_LIBRARY)
-INCLUDE(CheckCXXSymbolExists)
-INCLUDE(MacroAddFileDependencies)
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(CheckCXXSymbolExists)
+include(MacroAddFileDependencies)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-SET(QT_USE_FILE ${CMAKE_ROOT}/Modules/UseQt4.cmake)
+set(QT_USE_FILE ${CMAKE_ROOT}/Modules/UseQt4.cmake)
-SET( QT_DEFINITIONS "")
+set( QT_DEFINITIONS "")
# convenience macro for dealing with debug/release library names
-MACRO (_QT4_ADJUST_LIB_VARS _camelCaseBasename)
+macro (_QT4_ADJUST_LIB_VARS _camelCaseBasename)
- STRING(TOUPPER "${_camelCaseBasename}" basename)
+ string(TOUPPER "${_camelCaseBasename}" basename)
# The name of the imported targets, i.e. the prefix "Qt4::" must not change,
# since it is stored in EXPORT-files as name of a required library. If the name would change
# here, this would lead to the imported Qt4-library targets not being resolved by cmake anymore.
- IF (QT_${basename}_LIBRARY_RELEASE OR QT_${basename}_LIBRARY_DEBUG)
+ if (QT_${basename}_LIBRARY_RELEASE OR QT_${basename}_LIBRARY_DEBUG)
- IF(NOT TARGET Qt4::${_camelCaseBasename})
- ADD_LIBRARY(Qt4::${_camelCaseBasename} UNKNOWN IMPORTED )
+ if(NOT TARGET Qt4::${_camelCaseBasename})
+ add_library(Qt4::${_camelCaseBasename} UNKNOWN IMPORTED )
- IF (QT_${basename}_LIBRARY_RELEASE)
- SET_PROPERTY(TARGET Qt4::${_camelCaseBasename} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
+ if (QT_${basename}_LIBRARY_RELEASE)
+ set_property(TARGET Qt4::${_camelCaseBasename} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
if(QT_USE_FRAMEWORKS)
- SET_PROPERTY(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_RELEASE "${QT_${basename}_LIBRARY_RELEASE}/${_camelCaseBasename}" )
+ set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_RELEASE "${QT_${basename}_LIBRARY_RELEASE}/${_camelCaseBasename}" )
else()
- SET_PROPERTY(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_RELEASE "${QT_${basename}_LIBRARY_RELEASE}" )
+ set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_RELEASE "${QT_${basename}_LIBRARY_RELEASE}" )
endif()
- ENDIF (QT_${basename}_LIBRARY_RELEASE)
+ endif (QT_${basename}_LIBRARY_RELEASE)
- IF (QT_${basename}_LIBRARY_DEBUG)
- SET_PROPERTY(TARGET Qt4::${_camelCaseBasename} APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
+ if (QT_${basename}_LIBRARY_DEBUG)
+ set_property(TARGET Qt4::${_camelCaseBasename} APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
if(QT_USE_FRAMEWORKS)
- SET_PROPERTY(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_DEBUG "${QT_${basename}_LIBRARY_DEBUG}/${_camelCaseBasename}" )
+ set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_DEBUG "${QT_${basename}_LIBRARY_DEBUG}/${_camelCaseBasename}" )
else()
- SET_PROPERTY(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_DEBUG "${QT_${basename}_LIBRARY_DEBUG}" )
+ set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_DEBUG "${QT_${basename}_LIBRARY_DEBUG}" )
endif()
- ENDIF (QT_${basename}_LIBRARY_DEBUG)
- ENDIF(NOT TARGET Qt4::${_camelCaseBasename})
+ endif (QT_${basename}_LIBRARY_DEBUG)
+ endif(NOT TARGET Qt4::${_camelCaseBasename})
# If QT_USE_IMPORTED_TARGETS is enabled, the QT_QTFOO_LIBRARY variables are set to point at these
# imported targets. This works better in general, and is also in almost all cases fully
# backward compatible. The only issue is when a project A which had this enabled then exports its
- # libraries via export or EXPORT_LIBRARY_DEPENDENCIES(). In this case the libraries from project
+ # libraries via export or export_library_dependencies(). In this case the libraries from project
# A will depend on the imported Qt targets, and the names of these imported targets will be stored
# in the dependency files on disk. This means when a project B then uses project A, these imported
# targets must be created again, otherwise e.g. "Qt4__QtCore" will be interpreted as name of a
# library file on disk, and not as a target, and linking will fail:
- IF(QT_USE_IMPORTED_TARGETS)
- SET(QT_${basename}_LIBRARY Qt4::${_camelCaseBasename} )
- SET(QT_${basename}_LIBRARIES Qt4::${_camelCaseBasename} )
- ELSE(QT_USE_IMPORTED_TARGETS)
+ if(QT_USE_IMPORTED_TARGETS)
+ set(QT_${basename}_LIBRARY Qt4::${_camelCaseBasename} )
+ set(QT_${basename}_LIBRARIES Qt4::${_camelCaseBasename} )
+ else(QT_USE_IMPORTED_TARGETS)
# if the release- as well as the debug-version of the library have been found:
- IF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE)
+ if (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE)
# if the generator supports configuration types then set
# optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
- IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- SET(QT_${basename}_LIBRARY optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG})
- ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
+ if (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
+ set(QT_${basename}_LIBRARY optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG})
+ else(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
# if there are no configuration types and CMAKE_BUILD_TYPE has no value
# then just use the release libraries
- SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_RELEASE} )
- ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- SET(QT_${basename}_LIBRARIES optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG})
- ENDIF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE)
+ set(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_RELEASE} )
+ endif(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
+ set(QT_${basename}_LIBRARIES optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG})
+ endif (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE)
# if only the release version was found, set the debug variable also to the release version
- IF (QT_${basename}_LIBRARY_RELEASE AND NOT QT_${basename}_LIBRARY_DEBUG)
- SET(QT_${basename}_LIBRARY_DEBUG ${QT_${basename}_LIBRARY_RELEASE})
- SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_RELEASE})
- SET(QT_${basename}_LIBRARIES ${QT_${basename}_LIBRARY_RELEASE})
- ENDIF (QT_${basename}_LIBRARY_RELEASE AND NOT QT_${basename}_LIBRARY_DEBUG)
+ if (QT_${basename}_LIBRARY_RELEASE AND NOT QT_${basename}_LIBRARY_DEBUG)
+ set(QT_${basename}_LIBRARY_DEBUG ${QT_${basename}_LIBRARY_RELEASE})
+ set(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_RELEASE})
+ set(QT_${basename}_LIBRARIES ${QT_${basename}_LIBRARY_RELEASE})
+ endif (QT_${basename}_LIBRARY_RELEASE AND NOT QT_${basename}_LIBRARY_DEBUG)
# if only the debug version was found, set the release variable also to the debug version
- IF (QT_${basename}_LIBRARY_DEBUG AND NOT QT_${basename}_LIBRARY_RELEASE)
- SET(QT_${basename}_LIBRARY_RELEASE ${QT_${basename}_LIBRARY_DEBUG})
- SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_DEBUG})
- SET(QT_${basename}_LIBRARIES ${QT_${basename}_LIBRARY_DEBUG})
- ENDIF (QT_${basename}_LIBRARY_DEBUG AND NOT QT_${basename}_LIBRARY_RELEASE)
+ if (QT_${basename}_LIBRARY_DEBUG AND NOT QT_${basename}_LIBRARY_RELEASE)
+ set(QT_${basename}_LIBRARY_RELEASE ${QT_${basename}_LIBRARY_DEBUG})
+ set(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_DEBUG})
+ set(QT_${basename}_LIBRARIES ${QT_${basename}_LIBRARY_DEBUG})
+ endif (QT_${basename}_LIBRARY_DEBUG AND NOT QT_${basename}_LIBRARY_RELEASE)
# put the value in the cache:
- SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY} CACHE STRING "The Qt ${basename} library" FORCE)
+ set(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY} CACHE STRING "The Qt ${basename} library" FORCE)
- ENDIF(QT_USE_IMPORTED_TARGETS)
+ endif(QT_USE_IMPORTED_TARGETS)
- SET(QT_${basename}_FOUND 1)
+ set(QT_${basename}_FOUND 1)
- ELSE (QT_${basename}_LIBRARY_RELEASE OR QT_${basename}_LIBRARY_DEBUG)
+ else (QT_${basename}_LIBRARY_RELEASE OR QT_${basename}_LIBRARY_DEBUG)
- SET(QT_${basename}_LIBRARY "" CACHE STRING "The Qt ${basename} library" FORCE)
+ set(QT_${basename}_LIBRARY "" CACHE STRING "The Qt ${basename} library" FORCE)
- ENDIF (QT_${basename}_LIBRARY_RELEASE OR QT_${basename}_LIBRARY_DEBUG)
+ endif (QT_${basename}_LIBRARY_RELEASE OR QT_${basename}_LIBRARY_DEBUG)
- IF (QT_${basename}_INCLUDE_DIR)
+ if (QT_${basename}_INCLUDE_DIR)
#add the include directory to QT_INCLUDES
- SET(QT_INCLUDES "${QT_${basename}_INCLUDE_DIR}" ${QT_INCLUDES})
- ENDIF (QT_${basename}_INCLUDE_DIR)
+ set(QT_INCLUDES "${QT_${basename}_INCLUDE_DIR}" ${QT_INCLUDES})
+ endif (QT_${basename}_INCLUDE_DIR)
# Make variables changeble to the advanced user
- MARK_AS_ADVANCED(QT_${basename}_LIBRARY QT_${basename}_LIBRARY_RELEASE QT_${basename}_LIBRARY_DEBUG QT_${basename}_INCLUDE_DIR)
-ENDMACRO (_QT4_ADJUST_LIB_VARS)
+ mark_as_advanced(QT_${basename}_LIBRARY QT_${basename}_LIBRARY_RELEASE QT_${basename}_LIBRARY_DEBUG QT_${basename}_INCLUDE_DIR)
+endmacro (_QT4_ADJUST_LIB_VARS)
function(_QT4_QUERY_QMAKE VAR RESULT)
execute_process(COMMAND "${QT_QMAKE_EXECUTABLE}" -query ${VAR}
@@ -480,13 +480,13 @@ function(_QT4_QUERY_QMAKE VAR RESULT)
endfunction(_QT4_QUERY_QMAKE)
-SET(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
+set(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
-GET_FILENAME_COMPONENT(qt_install_version "[HKEY_CURRENT_USER\\Software\\trolltech\\Versions;DefaultQtVersion]" NAME)
+get_filename_component(qt_install_version "[HKEY_CURRENT_USER\\Software\\trolltech\\Versions;DefaultQtVersion]" NAME)
# check for qmake
# Debian uses qmake-qt4
# macports' Qt uses qmake-mac
-FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 qmake-mac PATHS
+find_program(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 qmake-mac PATHS
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]/bin"
@@ -495,224 +495,224 @@ FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 qmake-mac PATHS
)
# double check that it was a Qt4 qmake, if not, re-find with different names
-IF (QT_QMAKE_EXECUTABLE)
+if (QT_QMAKE_EXECUTABLE)
- IF(QT_QMAKE_EXECUTABLE_LAST)
- STRING(COMPARE NOTEQUAL "${QT_QMAKE_EXECUTABLE_LAST}" "${QT_QMAKE_EXECUTABLE}" QT_QMAKE_CHANGED)
- ENDIF(QT_QMAKE_EXECUTABLE_LAST)
+ if(QT_QMAKE_EXECUTABLE_LAST)
+ string(COMPARE NOTEQUAL "${QT_QMAKE_EXECUTABLE_LAST}" "${QT_QMAKE_EXECUTABLE}" QT_QMAKE_CHANGED)
+ endif(QT_QMAKE_EXECUTABLE_LAST)
- SET(QT_QMAKE_EXECUTABLE_LAST "${QT_QMAKE_EXECUTABLE}" CACHE INTERNAL "" FORCE)
+ set(QT_QMAKE_EXECUTABLE_LAST "${QT_QMAKE_EXECUTABLE}" CACHE INTERNAL "" FORCE)
_qt4_query_qmake(QT_VERSION QTVERSION)
# check for qt3 qmake and then try and find qmake4 or qmake-qt4 in the path
- IF(NOT QTVERSION)
- SET(QT_QMAKE_EXECUTABLE NOTFOUND CACHE FILEPATH "" FORCE)
- FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake-qt4 PATHS
+ if(NOT QTVERSION)
+ set(QT_QMAKE_EXECUTABLE NOTFOUND CACHE FILEPATH "" FORCE)
+ find_program(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake-qt4 PATHS
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin"
$ENV{QTDIR}/bin
DOC "The qmake executable for the Qt installation to use"
)
- IF(QT_QMAKE_EXECUTABLE)
+ if(QT_QMAKE_EXECUTABLE)
_qt4_query_qmake(QT_VERSION QTVERSION)
- ENDIF(QT_QMAKE_EXECUTABLE)
- ENDIF(NOT QTVERSION)
+ endif(QT_QMAKE_EXECUTABLE)
+ endif(NOT QTVERSION)
-ENDIF (QT_QMAKE_EXECUTABLE)
+endif (QT_QMAKE_EXECUTABLE)
-IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
+if (QT_QMAKE_EXECUTABLE AND QTVERSION)
# ask qmake for the mkspecs directory
# we do this first because QT_LIBINFIX might be set
- IF (NOT QT_MKSPECS_DIR OR QT_QMAKE_CHANGED)
+ if (NOT QT_MKSPECS_DIR OR QT_QMAKE_CHANGED)
_qt4_query_qmake(QMAKE_MKSPECS qt_mkspecs_dirs)
# do not replace : on windows as it might be a drive letter
# and windows should already use ; as a separator
- IF(NOT WIN32)
- STRING(REPLACE ":" ";" qt_mkspecs_dirs "${qt_mkspecs_dirs}")
- ENDIF(NOT WIN32)
+ if(NOT WIN32)
+ string(REPLACE ":" ";" qt_mkspecs_dirs "${qt_mkspecs_dirs}")
+ endif(NOT WIN32)
set(qt_cross_paths)
foreach(qt_cross_path ${CMAKE_FIND_ROOT_PATH})
set(qt_cross_paths ${qt_cross_paths} "${qt_cross_path}/mkspecs")
endforeach(qt_cross_path)
- SET(QT_MKSPECS_DIR NOTFOUND)
- FIND_PATH(QT_MKSPECS_DIR NAMES qconfig.pri
+ set(QT_MKSPECS_DIR NOTFOUND)
+ find_path(QT_MKSPECS_DIR NAMES qconfig.pri
HINTS ${qt_cross_paths} ${qt_mkspecs_dirs}
DOC "The location of the Qt mkspecs containing qconfig.pri")
- ENDIF()
-
- IF(EXISTS "${QT_MKSPECS_DIR}/qconfig.pri")
- FILE(READ ${QT_MKSPECS_DIR}/qconfig.pri _qconfig_FILE_contents)
- STRING(REGEX MATCH "QT_CONFIG[^\n]+" QT_QCONFIG "${_qconfig_FILE_contents}")
- STRING(REGEX MATCH "CONFIG[^\n]+" QT_CONFIG "${_qconfig_FILE_contents}")
- STRING(REGEX MATCH "EDITION[^\n]+" QT_EDITION "${_qconfig_FILE_contents}")
- STRING(REGEX MATCH "QT_LIBINFIX[^\n]+" _qconfig_qt_libinfix "${_qconfig_FILE_contents}")
- STRING(REGEX REPLACE "QT_LIBINFIX *= *([^\n]*)" "\\1" QT_LIBINFIX "${_qconfig_qt_libinfix}")
- ENDIF(EXISTS "${QT_MKSPECS_DIR}/qconfig.pri")
- IF("${QT_EDITION}" MATCHES "DesktopLight")
- SET(QT_EDITION_DESKTOPLIGHT 1)
- ENDIF("${QT_EDITION}" MATCHES "DesktopLight")
+ endif()
+
+ if(EXISTS "${QT_MKSPECS_DIR}/qconfig.pri")
+ file(READ ${QT_MKSPECS_DIR}/qconfig.pri _qconfig_FILE_contents)
+ string(REGEX MATCH "QT_CONFIG[^\n]+" QT_QCONFIG "${_qconfig_FILE_contents}")
+ string(REGEX MATCH "CONFIG[^\n]+" QT_CONFIG "${_qconfig_FILE_contents}")
+ string(REGEX MATCH "EDITION[^\n]+" QT_EDITION "${_qconfig_FILE_contents}")
+ string(REGEX MATCH "QT_LIBINFIX[^\n]+" _qconfig_qt_libinfix "${_qconfig_FILE_contents}")
+ string(REGEX REPLACE "QT_LIBINFIX *= *([^\n]*)" "\\1" QT_LIBINFIX "${_qconfig_qt_libinfix}")
+ endif(EXISTS "${QT_MKSPECS_DIR}/qconfig.pri")
+ if("${QT_EDITION}" MATCHES "DesktopLight")
+ set(QT_EDITION_DESKTOPLIGHT 1)
+ endif("${QT_EDITION}" MATCHES "DesktopLight")
# ask qmake for the library dir as a hint, then search for QtCore library and use that as a reference for finding the
# others and for setting QT_LIBRARY_DIR
- IF (NOT (QT_QTCORE_LIBRARY_RELEASE OR QT_QTCORE_LIBRARY_DEBUG) OR QT_QMAKE_CHANGED)
+ if (NOT (QT_QTCORE_LIBRARY_RELEASE OR QT_QTCORE_LIBRARY_DEBUG) OR QT_QMAKE_CHANGED)
_qt4_query_qmake(QT_INSTALL_LIBS QT_LIBRARY_DIR_TMP)
- SET(QT_QTCORE_LIBRARY_RELEASE NOTFOUND)
- SET(QT_QTCORE_LIBRARY_DEBUG NOTFOUND)
- FIND_LIBRARY(QT_QTCORE_LIBRARY_RELEASE
+ set(QT_QTCORE_LIBRARY_RELEASE NOTFOUND)
+ set(QT_QTCORE_LIBRARY_DEBUG NOTFOUND)
+ find_library(QT_QTCORE_LIBRARY_RELEASE
NAMES QtCore${QT_LIBINFIX} QtCore${QT_LIBINFIX}4
HINTS ${QT_LIBRARY_DIR_TMP}
NO_DEFAULT_PATH
)
- FIND_LIBRARY(QT_QTCORE_LIBRARY_DEBUG
+ find_library(QT_QTCORE_LIBRARY_DEBUG
NAMES QtCore${QT_LIBINFIX}_debug QtCore${QT_LIBINFIX}d QtCore${QT_LIBINFIX}d4
HINTS ${QT_LIBRARY_DIR_TMP}
NO_DEFAULT_PATH
)
- IF(NOT QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCORE_LIBRARY_DEBUG)
- FIND_LIBRARY(QT_QTCORE_LIBRARY_RELEASE
+ if(NOT QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCORE_LIBRARY_DEBUG)
+ find_library(QT_QTCORE_LIBRARY_RELEASE
NAMES QtCore${QT_LIBINFIX} QtCore${QT_LIBINFIX}4
HINTS ${QT_LIBRARY_DIR_TMP}
)
- FIND_LIBRARY(QT_QTCORE_LIBRARY_DEBUG
+ find_library(QT_QTCORE_LIBRARY_DEBUG
NAMES QtCore${QT_LIBINFIX}_debug QtCore${QT_LIBINFIX}d QtCore${QT_LIBINFIX}d4
HINTS ${QT_LIBRARY_DIR_TMP}
)
- ENDIF(NOT QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCORE_LIBRARY_DEBUG)
+ endif(NOT QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCORE_LIBRARY_DEBUG)
# try dropping a hint if trying to use Visual Studio with Qt built by mingw
- IF(NOT QT_QTCORE_LIBRARY_RELEASE AND MSVC)
- IF(EXISTS ${QT_LIBRARY_DIR_TMP}/libqtmain.a)
- MESSAGE( FATAL_ERROR "It appears you're trying to use Visual Studio with Qt built by mingw. Those compilers do not produce code compatible with each other.")
- ENDIF(EXISTS ${QT_LIBRARY_DIR_TMP}/libqtmain.a)
- ENDIF(NOT QT_QTCORE_LIBRARY_RELEASE AND MSVC)
+ if(NOT QT_QTCORE_LIBRARY_RELEASE AND MSVC)
+ if(EXISTS ${QT_LIBRARY_DIR_TMP}/libqtmain.a)
+ message( FATAL_ERROR "It appears you're trying to use Visual Studio with Qt built by mingw. Those compilers do not produce code compatible with each other.")
+ endif(EXISTS ${QT_LIBRARY_DIR_TMP}/libqtmain.a)
+ endif(NOT QT_QTCORE_LIBRARY_RELEASE AND MSVC)
- ENDIF ()
+ endif ()
# set QT_LIBRARY_DIR based on location of QtCore found.
- IF(QT_QTCORE_LIBRARY_RELEASE)
- GET_FILENAME_COMPONENT(QT_LIBRARY_DIR_TMP "${QT_QTCORE_LIBRARY_RELEASE}" PATH)
- SET(QT_LIBRARY_DIR ${QT_LIBRARY_DIR_TMP} CACHE INTERNAL "Qt library dir" FORCE)
- SET(QT_QTCORE_FOUND 1)
- ELSEIF(QT_QTCORE_LIBRARY_DEBUG)
- GET_FILENAME_COMPONENT(QT_LIBRARY_DIR_TMP "${QT_QTCORE_LIBRARY_DEBUG}" PATH)
- SET(QT_LIBRARY_DIR ${QT_LIBRARY_DIR_TMP} CACHE INTERNAL "Qt library dir" FORCE)
- SET(QT_QTCORE_FOUND 1)
- ELSE()
- MESSAGE(WARNING "${QT_QMAKE_EXECUTABLE} reported QT_INSTALL_LIBS as \"${QT_LIBRARY_DIR_TMP}\" "
+ if(QT_QTCORE_LIBRARY_RELEASE)
+ get_filename_component(QT_LIBRARY_DIR_TMP "${QT_QTCORE_LIBRARY_RELEASE}" PATH)
+ set(QT_LIBRARY_DIR ${QT_LIBRARY_DIR_TMP} CACHE INTERNAL "Qt library dir" FORCE)
+ set(QT_QTCORE_FOUND 1)
+ elseif(QT_QTCORE_LIBRARY_DEBUG)
+ get_filename_component(QT_LIBRARY_DIR_TMP "${QT_QTCORE_LIBRARY_DEBUG}" PATH)
+ set(QT_LIBRARY_DIR ${QT_LIBRARY_DIR_TMP} CACHE INTERNAL "Qt library dir" FORCE)
+ set(QT_QTCORE_FOUND 1)
+ else()
+ message(WARNING "${QT_QMAKE_EXECUTABLE} reported QT_INSTALL_LIBS as \"${QT_LIBRARY_DIR_TMP}\" "
"but QtCore could not be found there. "
"Qt is NOT installed correctly for the target build environment.")
- IF(Qt4_FIND_REQUIRED)
- MESSAGE( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details.")
- ENDIF(Qt4_FIND_REQUIRED)
- ENDIF()
+ if(Qt4_FIND_REQUIRED)
+ message( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details.")
+ endif(Qt4_FIND_REQUIRED)
+ endif()
# ask qmake for the binary dir
- IF (NOT QT_BINARY_DIR OR QT_QMAKE_CHANGED)
+ if (NOT QT_BINARY_DIR OR QT_QMAKE_CHANGED)
_qt4_query_qmake(QT_INSTALL_BINS qt_bins)
- SET(QT_BINARY_DIR ${qt_bins} CACHE INTERNAL "" FORCE)
- ENDIF (NOT QT_BINARY_DIR OR QT_QMAKE_CHANGED)
-
- IF (APPLE)
- SET(CMAKE_FIND_FRAMEWORK_OLD ${CMAKE_FIND_FRAMEWORK})
- IF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
- SET(QT_USE_FRAMEWORKS ON CACHE INTERNAL "" FORCE)
- SET(CMAKE_FIND_FRAMEWORK FIRST)
- ELSE (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
- SET(QT_USE_FRAMEWORKS OFF CACHE INTERNAL "" FORCE)
- SET(CMAKE_FIND_FRAMEWORK LAST)
- ENDIF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
- ENDIF (APPLE)
+ set(QT_BINARY_DIR ${qt_bins} CACHE INTERNAL "" FORCE)
+ endif (NOT QT_BINARY_DIR OR QT_QMAKE_CHANGED)
+
+ if (APPLE)
+ set(CMAKE_FIND_FRAMEWORK_OLD ${CMAKE_FIND_FRAMEWORK})
+ if (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
+ set(QT_USE_FRAMEWORKS ON CACHE INTERNAL "" FORCE)
+ set(CMAKE_FIND_FRAMEWORK FIRST)
+ else (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
+ set(QT_USE_FRAMEWORKS OFF CACHE INTERNAL "" FORCE)
+ set(CMAKE_FIND_FRAMEWORK LAST)
+ endif (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
+ endif (APPLE)
# ask qmake for the include dir
- IF (QT_LIBRARY_DIR AND (NOT QT_QTCORE_INCLUDE_DIR OR NOT QT_HEADERS_DIR OR QT_QMAKE_CHANGED))
+ if (QT_LIBRARY_DIR AND (NOT QT_QTCORE_INCLUDE_DIR OR NOT QT_HEADERS_DIR OR QT_QMAKE_CHANGED))
_qt4_query_qmake(QT_INSTALL_HEADERS qt_headers)
- SET(QT_QTCORE_INCLUDE_DIR NOTFOUND)
- FIND_PATH(QT_QTCORE_INCLUDE_DIR QtCore
+ set(QT_QTCORE_INCLUDE_DIR NOTFOUND)
+ find_path(QT_QTCORE_INCLUDE_DIR QtCore
HINTS ${qt_headers} ${QT_LIBRARY_DIR}
PATH_SUFFIXES QtCore qt4/QtCore
)
# Set QT_HEADERS_DIR based on finding QtCore header
- IF(QT_QTCORE_INCLUDE_DIR)
- IF(QT_USE_FRAMEWORKS)
- SET(QT_HEADERS_DIR "${qt_headers}" CACHE INTERNAL "" FORCE)
- ELSE(QT_USE_FRAMEWORKS)
- GET_FILENAME_COMPONENT(qt_headers "${QT_QTCORE_INCLUDE_DIR}/../" ABSOLUTE)
- SET(QT_HEADERS_DIR "${qt_headers}" CACHE INTERNAL "" FORCE)
- ENDIF(QT_USE_FRAMEWORKS)
- ELSEIF()
- MESSAGE("Warning: QT_QMAKE_EXECUTABLE reported QT_INSTALL_HEADERS as ${qt_headers}")
- MESSAGE("Warning: But QtCore couldn't be found. Qt must NOT be installed correctly.")
- ENDIF()
- ENDIF()
-
- IF(APPLE)
- SET(CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_OLD})
- ENDIF(APPLE)
+ if(QT_QTCORE_INCLUDE_DIR)
+ if(QT_USE_FRAMEWORKS)
+ set(QT_HEADERS_DIR "${qt_headers}" CACHE INTERNAL "" FORCE)
+ else(QT_USE_FRAMEWORKS)
+ get_filename_component(qt_headers "${QT_QTCORE_INCLUDE_DIR}/../" ABSOLUTE)
+ set(QT_HEADERS_DIR "${qt_headers}" CACHE INTERNAL "" FORCE)
+ endif(QT_USE_FRAMEWORKS)
+ elseif()
+ message("Warning: QT_QMAKE_EXECUTABLE reported QT_INSTALL_HEADERS as ${qt_headers}")
+ message("Warning: But QtCore couldn't be found. Qt must NOT be installed correctly.")
+ endif()
+ endif()
+
+ if(APPLE)
+ set(CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_OLD})
+ endif(APPLE)
# Set QT_INCLUDE_DIR based on QT_HEADERS_DIR
- IF(QT_HEADERS_DIR)
- IF(QT_USE_FRAMEWORKS)
+ if(QT_HEADERS_DIR)
+ if(QT_USE_FRAMEWORKS)
# Qt/Mac frameworks has two include dirs.
# One is the framework include for which CMake will add a -F flag
# and the other is an include dir for non-framework Qt modules
- SET(QT_INCLUDE_DIR ${QT_HEADERS_DIR} ${QT_QTCORE_LIBRARY_RELEASE} )
- ELSE(QT_USE_FRAMEWORKS)
- SET(QT_INCLUDE_DIR ${QT_HEADERS_DIR})
- ENDIF(QT_USE_FRAMEWORKS)
- ENDIF(QT_HEADERS_DIR)
+ set(QT_INCLUDE_DIR ${QT_HEADERS_DIR} ${QT_QTCORE_LIBRARY_RELEASE} )
+ else(QT_USE_FRAMEWORKS)
+ set(QT_INCLUDE_DIR ${QT_HEADERS_DIR})
+ endif(QT_USE_FRAMEWORKS)
+ endif(QT_HEADERS_DIR)
# Set QT_INCLUDES
- SET( QT_INCLUDES ${QT_MKSPECS_DIR}/default ${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR})
+ set( QT_INCLUDES ${QT_MKSPECS_DIR}/default ${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR})
# ask qmake for the documentation directory
- IF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR OR QT_QMAKE_CHANGED)
+ if (QT_LIBRARY_DIR AND NOT QT_DOC_DIR OR QT_QMAKE_CHANGED)
_qt4_query_qmake(QT_INSTALL_DOCS qt_doc_dir)
- SET(QT_DOC_DIR ${qt_doc_dir} CACHE PATH "The location of the Qt docs" FORCE)
- ENDIF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR OR QT_QMAKE_CHANGED)
+ set(QT_DOC_DIR ${qt_doc_dir} CACHE PATH "The location of the Qt docs" FORCE)
+ endif (QT_LIBRARY_DIR AND NOT QT_DOC_DIR OR QT_QMAKE_CHANGED)
# ask qmake for the plugins directory
- IF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR OR QT_QMAKE_CHANGED)
+ if (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR OR QT_QMAKE_CHANGED)
_qt4_query_qmake(QT_INSTALL_PLUGINS qt_plugins_dir)
- SET(QT_PLUGINS_DIR NOTFOUND)
+ set(QT_PLUGINS_DIR NOTFOUND)
foreach(qt_cross_path ${CMAKE_FIND_ROOT_PATH})
set(qt_cross_paths ${qt_cross_paths} "${qt_cross_path}/plugins")
endforeach(qt_cross_path)
- FIND_PATH(QT_PLUGINS_DIR NAMES accessible imageformats sqldrivers codecs designer
+ find_path(QT_PLUGINS_DIR NAMES accessible imageformats sqldrivers codecs designer
HINTS ${qt_cross_paths} ${qt_plugins_dir}
DOC "The location of the Qt plugins")
- ENDIF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR OR QT_QMAKE_CHANGED)
+ endif (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR OR QT_QMAKE_CHANGED)
# ask qmake for the translations directory
- IF (QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR OR QT_QMAKE_CHANGED)
+ if (QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR OR QT_QMAKE_CHANGED)
_qt4_query_qmake(QT_INSTALL_TRANSLATIONS qt_translations_dir)
- SET(QT_TRANSLATIONS_DIR ${qt_translations_dir} CACHE PATH "The location of the Qt translations" FORCE)
- ENDIF (QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR OR QT_QMAKE_CHANGED)
+ set(QT_TRANSLATIONS_DIR ${qt_translations_dir} CACHE PATH "The location of the Qt translations" FORCE)
+ endif (QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR OR QT_QMAKE_CHANGED)
# ask qmake for the imports directory
- IF (QT_LIBRARY_DIR AND NOT QT_IMPORTS_DIR OR QT_QMAKE_CHANGED)
+ if (QT_LIBRARY_DIR AND NOT QT_IMPORTS_DIR OR QT_QMAKE_CHANGED)
_qt4_query_qmake(QT_INSTALL_IMPORTS qt_imports_dir)
if(qt_imports_dir)
- SET(QT_IMPORTS_DIR NOTFOUND)
+ set(QT_IMPORTS_DIR NOTFOUND)
foreach(qt_cross_path ${CMAKE_FIND_ROOT_PATH})
set(qt_cross_paths ${qt_cross_paths} "${qt_cross_path}/imports")
endforeach(qt_cross_path)
- FIND_PATH(QT_IMPORTS_DIR NAMES Qt
+ find_path(QT_IMPORTS_DIR NAMES Qt
HINTS ${qt_cross_paths} ${qt_imports_dir}
DOC "The location of the Qt imports"
NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH
NO_CMAKE_SYSTEM_PATH)
mark_as_advanced(QT_IMPORTS_DIR)
endif(qt_imports_dir)
- ENDIF (QT_LIBRARY_DIR AND NOT QT_IMPORTS_DIR OR QT_QMAKE_CHANGED)
+ endif (QT_LIBRARY_DIR AND NOT QT_IMPORTS_DIR OR QT_QMAKE_CHANGED)
# Make variables changeble to the advanced user
- MARK_AS_ADVANCED( QT_LIBRARY_DIR QT_DOC_DIR QT_MKSPECS_DIR
+ mark_as_advanced( QT_LIBRARY_DIR QT_DOC_DIR QT_MKSPECS_DIR
QT_PLUGINS_DIR QT_TRANSLATIONS_DIR)
@@ -724,32 +724,32 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
#
#############################################
# Save required variable
- SET(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES})
- SET(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
+ set(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES})
+ set(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
# Add QT_INCLUDE_DIR to CMAKE_REQUIRED_INCLUDES
- SET(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${QT_INCLUDE_DIR}")
+ set(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${QT_INCLUDE_DIR}")
# Check for Window system symbols (note: only one should end up being set)
CHECK_CXX_SYMBOL_EXISTS(Q_WS_X11 "QtCore/qglobal.h" Q_WS_X11)
CHECK_CXX_SYMBOL_EXISTS(Q_WS_WIN "QtCore/qglobal.h" Q_WS_WIN)
CHECK_CXX_SYMBOL_EXISTS(Q_WS_QWS "QtCore/qglobal.h" Q_WS_QWS)
CHECK_CXX_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC)
- IF(Q_WS_MAC)
- IF(QT_QMAKE_CHANGED)
- UNSET(QT_MAC_USE_COCOA CACHE)
- ENDIF(QT_QMAKE_CHANGED)
+ if(Q_WS_MAC)
+ if(QT_QMAKE_CHANGED)
+ unset(QT_MAC_USE_COCOA CACHE)
+ endif(QT_QMAKE_CHANGED)
CHECK_CXX_SYMBOL_EXISTS(QT_MAC_USE_COCOA "QtCore/qconfig.h" QT_MAC_USE_COCOA)
- ENDIF(Q_WS_MAC)
+ endif(Q_WS_MAC)
- IF (QT_QTCOPY_REQUIRED)
+ if (QT_QTCOPY_REQUIRED)
CHECK_CXX_SYMBOL_EXISTS(QT_IS_QTCOPY "QtCore/qglobal.h" QT_KDE_QT_COPY)
- IF (NOT QT_IS_QTCOPY)
- MESSAGE(FATAL_ERROR "qt-copy is required, but hasn't been found")
- ENDIF (NOT QT_IS_QTCOPY)
- ENDIF (QT_QTCOPY_REQUIRED)
+ if (NOT QT_IS_QTCOPY)
+ message(FATAL_ERROR "qt-copy is required, but hasn't been found")
+ endif (NOT QT_IS_QTCOPY)
+ endif (QT_QTCOPY_REQUIRED)
# Restore CMAKE_REQUIRED_INCLUDES and CMAKE_REQUIRED_FLAGS variables
- SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE})
- SET(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
+ set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE})
+ set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
#
#############################################
@@ -761,48 +761,48 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
#
########################################
- SET(QT_MODULES QtGui Qt3Support QtSvg QtScript QtTest QtUiTools
+ set(QT_MODULES QtGui Qt3Support QtSvg QtScript QtTest QtUiTools
QtHelp QtWebKit QtXmlPatterns phonon QtNetwork QtMultimedia
QtNsPlugin QtOpenGL QtSql QtXml QtDesigner QtDBus QtScriptTools
QtDeclarative)
- IF(Q_WS_X11)
- SET(QT_MODULES ${QT_MODULES} QtMotif)
- ENDIF(Q_WS_X11)
-
- IF(QT_QMAKE_CHANGED)
- FOREACH(QT_MODULE ${QT_MODULES})
- STRING(TOUPPER ${QT_MODULE} _upper_qt_module)
- SET(QT_${_upper_qt_module}_INCLUDE_DIR NOTFOUND)
- SET(QT_${_upper_qt_module}_LIBRARY_RELEASE NOTFOUND)
- SET(QT_${_upper_qt_module}_LIBRARY_DEBUG NOTFOUND)
- ENDFOREACH(QT_MODULE)
- SET(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR NOTFOUND)
- SET(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NOTFOUND)
- SET(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NOTFOUND)
- SET(QT_QTASSISTANTCLIENT_INCLUDE_DIR NOTFOUND)
- SET(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NOTFOUND)
- SET(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NOTFOUND)
- SET(QT_QTASSISTANT_INCLUDE_DIR NOTFOUND)
- SET(QT_QTASSISTANT_LIBRARY_RELEASE NOTFOUND)
- SET(QT_QTASSISTANT_LIBRARY_DEBUG NOTFOUND)
- SET(QT_QTCLUCENE_LIBRARY_RELEASE NOTFOUND)
- SET(QT_QTCLUCENE_LIBRARY_DEBUG NOTFOUND)
- SET(QT_QAXCONTAINER_INCLUDE_DIR NOTFOUND)
- SET(QT_QAXCONTAINER_LIBRARY_RELEASE NOTFOUND)
- SET(QT_QAXCONTAINER_LIBRARY_DEBUG NOTFOUND)
- SET(QT_QAXSERVER_INCLUDE_DIR NOTFOUND)
- SET(QT_QAXSERVER_LIBRARY_RELEASE NOTFOUND)
- SET(QT_QAXSERVER_LIBRARY_DEBUG NOTFOUND)
- IF(Q_WS_WIN)
- SET(QT_QTMAIN_LIBRARY_DEBUG NOTFOUND)
- SET(QT_QTMAIN_LIBRARY_RELEASE NOTFOUND)
- ENDIF(Q_WS_WIN)
- ENDIF(QT_QMAKE_CHANGED)
-
- FOREACH(QT_MODULE ${QT_MODULES})
- STRING(TOUPPER ${QT_MODULE} _upper_qt_module)
- FIND_PATH(QT_${_upper_qt_module}_INCLUDE_DIR ${QT_MODULE}
+ if(Q_WS_X11)
+ set(QT_MODULES ${QT_MODULES} QtMotif)
+ endif(Q_WS_X11)
+
+ if(QT_QMAKE_CHANGED)
+ foreach(QT_MODULE ${QT_MODULES})
+ string(TOUPPER ${QT_MODULE} _upper_qt_module)
+ set(QT_${_upper_qt_module}_INCLUDE_DIR NOTFOUND)
+ set(QT_${_upper_qt_module}_LIBRARY_RELEASE NOTFOUND)
+ set(QT_${_upper_qt_module}_LIBRARY_DEBUG NOTFOUND)
+ endforeach(QT_MODULE)
+ set(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR NOTFOUND)
+ set(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NOTFOUND)
+ set(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NOTFOUND)
+ set(QT_QTASSISTANTCLIENT_INCLUDE_DIR NOTFOUND)
+ set(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NOTFOUND)
+ set(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NOTFOUND)
+ set(QT_QTASSISTANT_INCLUDE_DIR NOTFOUND)
+ set(QT_QTASSISTANT_LIBRARY_RELEASE NOTFOUND)
+ set(QT_QTASSISTANT_LIBRARY_DEBUG NOTFOUND)
+ set(QT_QTCLUCENE_LIBRARY_RELEASE NOTFOUND)
+ set(QT_QTCLUCENE_LIBRARY_DEBUG NOTFOUND)
+ set(QT_QAXCONTAINER_INCLUDE_DIR NOTFOUND)
+ set(QT_QAXCONTAINER_LIBRARY_RELEASE NOTFOUND)
+ set(QT_QAXCONTAINER_LIBRARY_DEBUG NOTFOUND)
+ set(QT_QAXSERVER_INCLUDE_DIR NOTFOUND)
+ set(QT_QAXSERVER_LIBRARY_RELEASE NOTFOUND)
+ set(QT_QAXSERVER_LIBRARY_DEBUG NOTFOUND)
+ if(Q_WS_WIN)
+ set(QT_QTMAIN_LIBRARY_DEBUG NOTFOUND)
+ set(QT_QTMAIN_LIBRARY_RELEASE NOTFOUND)
+ endif(Q_WS_WIN)
+ endif(QT_QMAKE_CHANGED)
+
+ foreach(QT_MODULE ${QT_MODULES})
+ string(TOUPPER ${QT_MODULE} _upper_qt_module)
+ find_path(QT_${_upper_qt_module}_INCLUDE_DIR ${QT_MODULE}
PATHS
${QT_HEADERS_DIR}/${QT_MODULE}
${QT_LIBRARY_DIR}/${QT_MODULE}.framework/Headers
@@ -810,31 +810,31 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
)
# phonon doesn't seem consistent, let's try phonondefs.h for some
# installations
- IF(${QT_MODULE} STREQUAL "phonon")
- FIND_PATH(QT_${_upper_qt_module}_INCLUDE_DIR phonondefs.h
+ if(${QT_MODULE} STREQUAL "phonon")
+ find_path(QT_${_upper_qt_module}_INCLUDE_DIR phonondefs.h
PATHS
${QT_HEADERS_DIR}/${QT_MODULE}
${QT_LIBRARY_DIR}/${QT_MODULE}.framework/Headers
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
- ENDIF(${QT_MODULE} STREQUAL "phonon")
- ENDFOREACH(QT_MODULE)
+ endif(${QT_MODULE} STREQUAL "phonon")
+ endforeach(QT_MODULE)
- IF(Q_WS_WIN)
- SET(QT_MODULES ${QT_MODULES} QAxContainer QAxServer)
+ if(Q_WS_WIN)
+ set(QT_MODULES ${QT_MODULES} QAxContainer QAxServer)
# Set QT_AXCONTAINER_INCLUDE_DIR and QT_AXSERVER_INCLUDE_DIR
- FIND_PATH(QT_QAXCONTAINER_INCLUDE_DIR ActiveQt
+ find_path(QT_QAXCONTAINER_INCLUDE_DIR ActiveQt
PATHS ${QT_HEADERS_DIR}/ActiveQt
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
- FIND_PATH(QT_QAXSERVER_INCLUDE_DIR ActiveQt
+ find_path(QT_QAXSERVER_INCLUDE_DIR ActiveQt
PATHS ${QT_HEADERS_DIR}/ActiveQt
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
- ENDIF(Q_WS_WIN)
+ endif(Q_WS_WIN)
# Set QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR
- FIND_PATH(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR QDesignerComponents
+ find_path(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR QDesignerComponents
PATHS
${QT_HEADERS_DIR}/QtDesigner
${QT_LIBRARY_DIR}/QtDesigner.framework/Headers
@@ -842,7 +842,7 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
)
# Set QT_QTASSISTANT_INCLUDE_DIR
- FIND_PATH(QT_QTASSISTANT_INCLUDE_DIR QtAssistant
+ find_path(QT_QTASSISTANT_INCLUDE_DIR QtAssistant
PATHS
${QT_HEADERS_DIR}/QtAssistant
${QT_LIBRARY_DIR}/QtAssistant.framework/Headers
@@ -850,7 +850,7 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
)
# Set QT_QTASSISTANTCLIENT_INCLUDE_DIR
- FIND_PATH(QT_QTASSISTANTCLIENT_INCLUDE_DIR QAssistantClient
+ find_path(QT_QTASSISTANTCLIENT_INCLUDE_DIR QAssistantClient
PATHS
${QT_HEADERS_DIR}/QtAssistant
${QT_LIBRARY_DIR}/QtAssistant.framework/Headers
@@ -864,48 +864,48 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
########################################
# find the libraries
- FOREACH(QT_MODULE ${QT_MODULES})
- STRING(TOUPPER ${QT_MODULE} _upper_qt_module)
- FIND_LIBRARY(QT_${_upper_qt_module}_LIBRARY_RELEASE
+ foreach(QT_MODULE ${QT_MODULES})
+ string(TOUPPER ${QT_MODULE} _upper_qt_module)
+ find_library(QT_${_upper_qt_module}_LIBRARY_RELEASE
NAMES ${QT_MODULE}${QT_LIBINFIX} ${QT_MODULE}${QT_LIBINFIX}4
PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
- FIND_LIBRARY(QT_${_upper_qt_module}_LIBRARY_DEBUG
+ find_library(QT_${_upper_qt_module}_LIBRARY_DEBUG
NAMES ${QT_MODULE}${QT_LIBINFIX}_debug ${QT_MODULE}${QT_LIBINFIX}d ${QT_MODULE}${QT_LIBINFIX}d4
PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
- ENDFOREACH(QT_MODULE)
+ endforeach(QT_MODULE)
# QtUiTools is sometimes not in the same directory as the other found libraries
# e.g. on Mac, its never a framework like the others are
- IF(QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE)
- FIND_LIBRARY(QT_QTUITOOLS_LIBRARY_RELEASE NAMES QtUiTools${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR})
- ENDIF(QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE)
+ if(QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE)
+ find_library(QT_QTUITOOLS_LIBRARY_RELEASE NAMES QtUiTools${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR})
+ endif(QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE)
# Set QT_QTDESIGNERCOMPONENTS_LIBRARY
- FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NAMES QtDesignerComponents${QT_LIBINFIX} QtDesignerComponents${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
- FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NAMES QtDesignerComponents${QT_LIBINFIX}_debug QtDesignerComponents${QT_LIBINFIX}d QtDesignerComponents${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ find_library(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NAMES QtDesignerComponents${QT_LIBINFIX} QtDesignerComponents${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ find_library(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NAMES QtDesignerComponents${QT_LIBINFIX}_debug QtDesignerComponents${QT_LIBINFIX}d QtDesignerComponents${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
# Set QT_QTMAIN_LIBRARY
- IF(Q_WS_WIN)
- FIND_LIBRARY(QT_QTMAIN_LIBRARY_RELEASE NAMES qtmain${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
- FIND_LIBRARY(QT_QTMAIN_LIBRARY_DEBUG NAMES qtmain${QT_LIBINFIX}d PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
- ENDIF(Q_WS_WIN)
+ if(Q_WS_WIN)
+ find_library(QT_QTMAIN_LIBRARY_RELEASE NAMES qtmain${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ find_library(QT_QTMAIN_LIBRARY_DEBUG NAMES qtmain${QT_LIBINFIX}d PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ endif(Q_WS_WIN)
# Set QT_QTASSISTANTCLIENT_LIBRARY
- FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
- FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ find_library(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ find_library(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
# Set QT_QTASSISTANT_LIBRARY
- FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 QtAssistant${QT_LIBINFIX} QtAssistant${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
- FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_DEBUG NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 QtAssistant${QT_LIBINFIX}_debug QtAssistant${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ find_library(QT_QTASSISTANT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 QtAssistant${QT_LIBINFIX} QtAssistant${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ find_library(QT_QTASSISTANT_LIBRARY_DEBUG NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 QtAssistant${QT_LIBINFIX}_debug QtAssistant${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
# Set QT_QTHELP_LIBRARY
- FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene${QT_LIBINFIX} QtCLucene${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
- FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_DEBUG NAMES QtCLucene${QT_LIBINFIX}_debug QtCLucene${QT_LIBINFIX}d QtCLucene${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
- IF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE)
- FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR})
- ENDIF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE)
+ find_library(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene${QT_LIBINFIX} QtCLucene${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ find_library(QT_QTCLUCENE_LIBRARY_DEBUG NAMES QtCLucene${QT_LIBINFIX}_debug QtCLucene${QT_LIBINFIX}d QtCLucene${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ if(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE)
+ find_library(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR})
+ endif(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE)
############################################
@@ -919,9 +919,9 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
# library include path to QT_INCLUDES
_QT4_ADJUST_LIB_VARS(QtCore)
- FOREACH(QT_MODULE ${QT_MODULES})
+ foreach(QT_MODULE ${QT_MODULES})
_QT4_ADJUST_LIB_VARS(${QT_MODULE})
- ENDFOREACH(QT_MODULE)
+ endforeach(QT_MODULE)
_QT4_ADJUST_LIB_VARS(QtAssistant)
_QT4_ADJUST_LIB_VARS(QtAssistantClient)
@@ -929,11 +929,11 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
_QT4_ADJUST_LIB_VARS(QtDesignerComponents)
# platform dependent libraries
- IF(Q_WS_WIN)
+ if(Q_WS_WIN)
_QT4_ADJUST_LIB_VARS(qtmain)
_QT4_ADJUST_LIB_VARS(QAxServer)
_QT4_ADJUST_LIB_VARS(QAxContainer)
- ENDIF(Q_WS_WIN)
+ endif(Q_WS_WIN)
#######################################
@@ -944,104 +944,104 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
#######################################
- IF(QT_QMAKE_CHANGED)
- SET(QT_UIC_EXECUTABLE NOTFOUND)
- SET(QT_MOC_EXECUTABLE NOTFOUND)
- SET(QT_UIC3_EXECUTABLE NOTFOUND)
- SET(QT_RCC_EXECUTABLE NOTFOUND)
- SET(QT_DBUSCPP2XML_EXECUTABLE NOTFOUND)
- SET(QT_DBUSXML2CPP_EXECUTABLE NOTFOUND)
- SET(QT_LUPDATE_EXECUTABLE NOTFOUND)
- SET(QT_LRELEASE_EXECUTABLE NOTFOUND)
- SET(QT_QCOLLECTIONGENERATOR_EXECUTABLE NOTFOUND)
- SET(QT_DESIGNER_EXECUTABLE NOTFOUND)
- SET(QT_LINGUIST_EXECUTABLE NOTFOUND)
- ENDIF(QT_QMAKE_CHANGED)
-
- FIND_PROGRAM(QT_MOC_EXECUTABLE
+ if(QT_QMAKE_CHANGED)
+ set(QT_UIC_EXECUTABLE NOTFOUND)
+ set(QT_MOC_EXECUTABLE NOTFOUND)
+ set(QT_UIC3_EXECUTABLE NOTFOUND)
+ set(QT_RCC_EXECUTABLE NOTFOUND)
+ set(QT_DBUSCPP2XML_EXECUTABLE NOTFOUND)
+ set(QT_DBUSXML2CPP_EXECUTABLE NOTFOUND)
+ set(QT_LUPDATE_EXECUTABLE NOTFOUND)
+ set(QT_LRELEASE_EXECUTABLE NOTFOUND)
+ set(QT_QCOLLECTIONGENERATOR_EXECUTABLE NOTFOUND)
+ set(QT_DESIGNER_EXECUTABLE NOTFOUND)
+ set(QT_LINGUIST_EXECUTABLE NOTFOUND)
+ endif(QT_QMAKE_CHANGED)
+
+ find_program(QT_MOC_EXECUTABLE
NAMES moc-qt4 moc
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
- FIND_PROGRAM(QT_UIC_EXECUTABLE
+ find_program(QT_UIC_EXECUTABLE
NAMES uic-qt4 uic
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
- FIND_PROGRAM(QT_UIC3_EXECUTABLE
+ find_program(QT_UIC3_EXECUTABLE
NAMES uic3
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
- FIND_PROGRAM(QT_RCC_EXECUTABLE
+ find_program(QT_RCC_EXECUTABLE
NAMES rcc
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
- FIND_PROGRAM(QT_DBUSCPP2XML_EXECUTABLE
+ find_program(QT_DBUSCPP2XML_EXECUTABLE
NAMES qdbuscpp2xml
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
- FIND_PROGRAM(QT_DBUSXML2CPP_EXECUTABLE
+ find_program(QT_DBUSXML2CPP_EXECUTABLE
NAMES qdbusxml2cpp
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
- FIND_PROGRAM(QT_LUPDATE_EXECUTABLE
+ find_program(QT_LUPDATE_EXECUTABLE
NAMES lupdate-qt4 lupdate
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
- FIND_PROGRAM(QT_LRELEASE_EXECUTABLE
+ find_program(QT_LRELEASE_EXECUTABLE
NAMES lrelease-qt4 lrelease
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
- FIND_PROGRAM(QT_QCOLLECTIONGENERATOR_EXECUTABLE
+ find_program(QT_QCOLLECTIONGENERATOR_EXECUTABLE
NAMES qcollectiongenerator-qt4 qcollectiongenerator
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
- FIND_PROGRAM(QT_DESIGNER_EXECUTABLE
+ find_program(QT_DESIGNER_EXECUTABLE
NAMES designer-qt4 designer
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
- FIND_PROGRAM(QT_LINGUIST_EXECUTABLE
+ find_program(QT_LINGUIST_EXECUTABLE
NAMES linguist-qt4 linguist
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
- IF (QT_MOC_EXECUTABLE)
- SET(QT_WRAP_CPP "YES")
- ENDIF (QT_MOC_EXECUTABLE)
+ if (QT_MOC_EXECUTABLE)
+ set(QT_WRAP_CPP "YES")
+ endif (QT_MOC_EXECUTABLE)
- IF (QT_UIC_EXECUTABLE)
- SET(QT_WRAP_UI "YES")
- ENDIF (QT_UIC_EXECUTABLE)
+ if (QT_UIC_EXECUTABLE)
+ set(QT_WRAP_UI "YES")
+ endif (QT_UIC_EXECUTABLE)
- MARK_AS_ADVANCED( QT_UIC_EXECUTABLE QT_UIC3_EXECUTABLE QT_MOC_EXECUTABLE
+ mark_as_advanced( QT_UIC_EXECUTABLE QT_UIC3_EXECUTABLE QT_MOC_EXECUTABLE
QT_RCC_EXECUTABLE QT_DBUSXML2CPP_EXECUTABLE QT_DBUSCPP2XML_EXECUTABLE
QT_LUPDATE_EXECUTABLE QT_LRELEASE_EXECUTABLE QT_QCOLLECTIONGENERATOR_EXECUTABLE
QT_DESIGNER_EXECUTABLE QT_LINGUIST_EXECUTABLE)
# get the directory of the current file, used later on in the file
- GET_FILENAME_COMPONENT( _qt4_current_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
+ get_filename_component( _qt4_current_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
###############################################
@@ -1050,7 +1050,7 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
#
###############################################
- INCLUDE("${_qt4_current_dir}/Qt4ConfigDependentSettings.cmake")
+ include("${_qt4_current_dir}/Qt4ConfigDependentSettings.cmake")
#######################################
@@ -1059,84 +1059,84 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
#
#######################################
- SET( QT_PLUGIN_TYPES accessible bearer codecs decorations designer gfxdrivers graphicssystems iconengines imageformats inputmethods mousedrivers phonon_backend script sqldrivers )
-
- SET( QT_ACCESSIBLE_PLUGINS qtaccessiblecompatwidgets qtaccessiblewidgets )
- SET( QT_BEARER_PLUGINS qcorewlanbearer qgenericbearer )
- SET( QT_CODECS_PLUGINS qcncodecs qjpcodecs qkrcodecs qtwcodecs )
- SET( QT_DECORATIONS_PLUGINS qdecorationdefault qdecorationwindows )
- SET( QT_DESIGNER_PLUGINS arthurplugin containerextension customwidgetplugin phononwidgets qdeclarativeview qt3supportwidgets qwebview taskmenuextension worldtimeclockplugin )
- SET( QT_GRAPHICSDRIVERS_PLUGINS qgfxtransformed qgfxvnc qscreenvfb )
- SET( QT_GRAPHICSSYSTEMS_PLUGINS qglgraphicssystem qtracegraphicssystem )
- SET( QT_ICONENGINES_PLUGINS qsvgicon )
- SET( QT_IMAGEFORMATS_PLUGINS qgif qjpeg qmng qico qsvg qtiff )
- SET( QT_INPUTMETHODS_PLUGINS qimsw_multi )
- SET( QT_MOUSEDRIVERS_PLUGINS qwstslibmousehandler )
- IF(APPLE)
- SET( QT_PHONON_BACKEND_PLUGINS phonon_qt7 )
- ELSEIF(WIN32)
- SET( QT_PHONON_BACKEND_PLUGINS phonon_ds9 )
- ENDIF()
- SET( QT_SCRIPT_PLUGINS qtscriptdbus )
- SET( QT_SQLDRIVERS_PLUGINS qsqldb2 qsqlibase qsqlite qsqlite2 qsqlmysql qsqloci qsqlodbc qsqlpsql qsqltds )
-
- SET( QT_PHONON_PLUGINS ${QT_PHONON_BACKEND_PLUGINS} )
- SET( QT_QT3SUPPORT_PLUGINS qtaccessiblecompatwidgets )
- SET( QT_QTCORE_PLUGINS ${QT_BEARER_PLUGINS} ${QT_CODECS_PLUGINS} )
- SET( QT_QTGUI_PLUGINS qtaccessiblewidgets qgif qjpeg qmng qico qtiff ${QT_DECORATIONS_PLUGINS} ${QT_GRAPHICSDRIVERS_PLUGINS} ${QT_GRAPHICSSYSTEMS_PLUGINS} ${QT_INPUTMETHODS_PLUGINS} ${QT_MOUSEDRIVERS_PLUGINS} )
- SET( QT_QTSCRIPT_PLUGINS ${QT_SCRIPT_PLUGINS} )
- SET( QT_QTSQL_PLUGINS ${QT_SQLDRIVERS_PLUGINS} )
- SET( QT_QTSVG_PLUGINS qsvg qsvgicon )
-
- IF(QT_QMAKE_CHANGED)
- FOREACH(QT_PLUGIN_TYPE ${QT_PLUGIN_TYPES})
- STRING(TOUPPER ${QT_PLUGIN_TYPE} _upper_qt_plugin_type)
- SET(QT_${_upper_qt_plugin_type}_PLUGINS_DIR ${QT_PLUGINS_DIR}/${QT_PLUGIN_TYPE})
- FOREACH(QT_PLUGIN ${QT_${_upper_qt_plugin_type}_PLUGINS})
- STRING(TOUPPER ${QT_PLUGIN} _upper_qt_plugin)
- UNSET(QT_${_upper_qt_plugin}_LIBRARY_RELEASE CACHE)
- UNSET(QT_${_upper_qt_plugin}_LIBRARY_DEBUG CACHE)
- UNSET(QT_${_upper_qt_plugin}_LIBRARY CACHE)
- UNSET(QT_${_upper_qt_plugin}_PLUGIN_RELEASE CACHE)
- UNSET(QT_${_upper_qt_plugin}_PLUGIN_DEBUG CACHE)
- UNSET(QT_${_upper_qt_plugin}_PLUGIN CACHE)
- ENDFOREACH(QT_PLUGIN)
- ENDFOREACH(QT_PLUGIN_TYPE)
- ENDIF(QT_QMAKE_CHANGED)
+ set( QT_PLUGIN_TYPES accessible bearer codecs decorations designer gfxdrivers graphicssystems iconengines imageformats inputmethods mousedrivers phonon_backend script sqldrivers )
+
+ set( QT_ACCESSIBLE_PLUGINS qtaccessiblecompatwidgets qtaccessiblewidgets )
+ set( QT_BEARER_PLUGINS qcorewlanbearer qgenericbearer )
+ set( QT_CODECS_PLUGINS qcncodecs qjpcodecs qkrcodecs qtwcodecs )
+ set( QT_DECORATIONS_PLUGINS qdecorationdefault qdecorationwindows )
+ set( QT_DESIGNER_PLUGINS arthurplugin containerextension customwidgetplugin phononwidgets qdeclarativeview qt3supportwidgets qwebview taskmenuextension worldtimeclockplugin )
+ set( QT_GRAPHICSDRIVERS_PLUGINS qgfxtransformed qgfxvnc qscreenvfb )
+ set( QT_GRAPHICSSYSTEMS_PLUGINS qglgraphicssystem qtracegraphicssystem )
+ set( QT_ICONENGINES_PLUGINS qsvgicon )
+ set( QT_IMAGEFORMATS_PLUGINS qgif qjpeg qmng qico qsvg qtiff )
+ set( QT_INPUTMETHODS_PLUGINS qimsw_multi )
+ set( QT_MOUSEDRIVERS_PLUGINS qwstslibmousehandler )
+ if(APPLE)
+ set( QT_PHONON_BACKEND_PLUGINS phonon_qt7 )
+ elseif(WIN32)
+ set( QT_PHONON_BACKEND_PLUGINS phonon_ds9 )
+ endif()
+ set( QT_SCRIPT_PLUGINS qtscriptdbus )
+ set( QT_SQLDRIVERS_PLUGINS qsqldb2 qsqlibase qsqlite qsqlite2 qsqlmysql qsqloci qsqlodbc qsqlpsql qsqltds )
+
+ set( QT_PHONON_PLUGINS ${QT_PHONON_BACKEND_PLUGINS} )
+ set( QT_QT3SUPPORT_PLUGINS qtaccessiblecompatwidgets )
+ set( QT_QTCORE_PLUGINS ${QT_BEARER_PLUGINS} ${QT_CODECS_PLUGINS} )
+ set( QT_QTGUI_PLUGINS qtaccessiblewidgets qgif qjpeg qmng qico qtiff ${QT_DECORATIONS_PLUGINS} ${QT_GRAPHICSDRIVERS_PLUGINS} ${QT_GRAPHICSSYSTEMS_PLUGINS} ${QT_INPUTMETHODS_PLUGINS} ${QT_MOUSEDRIVERS_PLUGINS} )
+ set( QT_QTSCRIPT_PLUGINS ${QT_SCRIPT_PLUGINS} )
+ set( QT_QTSQL_PLUGINS ${QT_SQLDRIVERS_PLUGINS} )
+ set( QT_QTSVG_PLUGINS qsvg qsvgicon )
+
+ if(QT_QMAKE_CHANGED)
+ foreach(QT_PLUGIN_TYPE ${QT_PLUGIN_TYPES})
+ string(TOUPPER ${QT_PLUGIN_TYPE} _upper_qt_plugin_type)
+ set(QT_${_upper_qt_plugin_type}_PLUGINS_DIR ${QT_PLUGINS_DIR}/${QT_PLUGIN_TYPE})
+ foreach(QT_PLUGIN ${QT_${_upper_qt_plugin_type}_PLUGINS})
+ string(TOUPPER ${QT_PLUGIN} _upper_qt_plugin)
+ unset(QT_${_upper_qt_plugin}_LIBRARY_RELEASE CACHE)
+ unset(QT_${_upper_qt_plugin}_LIBRARY_DEBUG CACHE)
+ unset(QT_${_upper_qt_plugin}_LIBRARY CACHE)
+ unset(QT_${_upper_qt_plugin}_PLUGIN_RELEASE CACHE)
+ unset(QT_${_upper_qt_plugin}_PLUGIN_DEBUG CACHE)
+ unset(QT_${_upper_qt_plugin}_PLUGIN CACHE)
+ endforeach(QT_PLUGIN)
+ endforeach(QT_PLUGIN_TYPE)
+ endif(QT_QMAKE_CHANGED)
# find_library works better than find_file but we need to set prefixes to only match plugins
- FOREACH(QT_PLUGIN_TYPE ${QT_PLUGIN_TYPES})
- STRING(TOUPPER ${QT_PLUGIN_TYPE} _upper_qt_plugin_type)
- SET(QT_${_upper_qt_plugin_type}_PLUGINS_DIR ${QT_PLUGINS_DIR}/${QT_PLUGIN_TYPE})
- FOREACH(QT_PLUGIN ${QT_${_upper_qt_plugin_type}_PLUGINS})
- STRING(TOUPPER ${QT_PLUGIN} _upper_qt_plugin)
- IF(QT_IS_STATIC)
- FIND_LIBRARY(QT_${_upper_qt_plugin}_LIBRARY_RELEASE
+ foreach(QT_PLUGIN_TYPE ${QT_PLUGIN_TYPES})
+ string(TOUPPER ${QT_PLUGIN_TYPE} _upper_qt_plugin_type)
+ set(QT_${_upper_qt_plugin_type}_PLUGINS_DIR ${QT_PLUGINS_DIR}/${QT_PLUGIN_TYPE})
+ foreach(QT_PLUGIN ${QT_${_upper_qt_plugin_type}_PLUGINS})
+ string(TOUPPER ${QT_PLUGIN} _upper_qt_plugin)
+ if(QT_IS_STATIC)
+ find_library(QT_${_upper_qt_plugin}_LIBRARY_RELEASE
NAMES ${QT_PLUGIN}${QT_LIBINFIX} ${QT_PLUGIN}${QT_LIBINFIX}4
PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
- FIND_LIBRARY(QT_${_upper_qt_plugin}_LIBRARY_DEBUG
+ find_library(QT_${_upper_qt_plugin}_LIBRARY_DEBUG
NAMES ${QT_PLUGIN}${QT_LIBINFIX}_debug ${QT_PLUGIN}${QT_LIBINFIX}d ${QT_PLUGIN}${QT_LIBINFIX}d4
PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
_QT4_ADJUST_LIB_VARS(${QT_PLUGIN})
- ELSE(QT_IS_STATIC)
+ else(QT_IS_STATIC)
# find_library works easier/better than find_file but we need to set suffixes to only match plugins
- SET(CMAKE_FIND_LIBRARY_SUFFIXES_DEFAULT ${CMAKE_FIND_LIBRARY_SUFFIXES})
- SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_SHARED_MODULE_SUFFIX} ${CMAKE_SHARED_LIBRARY_SUFFIX})
- FIND_LIBRARY(QT_${_upper_qt_plugin}_PLUGIN_RELEASE
+ set(CMAKE_FIND_LIBRARY_SUFFIXES_DEFAULT ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_SHARED_MODULE_SUFFIX} ${CMAKE_SHARED_LIBRARY_SUFFIX})
+ find_library(QT_${_upper_qt_plugin}_PLUGIN_RELEASE
NAMES ${QT_PLUGIN}${QT_LIBINFIX} ${QT_PLUGIN}${QT_LIBINFIX}4
PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
- FIND_LIBRARY(QT_${_upper_qt_plugin}_PLUGIN_DEBUG
+ find_library(QT_${_upper_qt_plugin}_PLUGIN_DEBUG
NAMES ${QT_PLUGIN}${QT_LIBINFIX}_debug ${QT_PLUGIN}${QT_LIBINFIX}d ${QT_PLUGIN}${QT_LIBINFIX}d4
PATHS ${QT_${_upper_qt_plugin_type}_PLUGINS_DIR} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
- MARK_AS_ADVANCED(QT_${_upper_qt_plugin}_PLUGIN_RELEASE QT_${_upper_qt_plugin}_PLUGIN_DEBUG)
- SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_DEFAULT})
- ENDIF(QT_IS_STATIC)
- ENDFOREACH(QT_PLUGIN)
- ENDFOREACH(QT_PLUGIN_TYPE)
+ mark_as_advanced(QT_${_upper_qt_plugin}_PLUGIN_RELEASE QT_${_upper_qt_plugin}_PLUGIN_DEBUG)
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_DEFAULT})
+ endif(QT_IS_STATIC)
+ endforeach(QT_PLUGIN)
+ endforeach(QT_PLUGIN_TYPE)
######################################
@@ -1145,57 +1145,57 @@ IF (QT_QMAKE_EXECUTABLE AND QTVERSION)
#
######################################
- INCLUDE("${_qt4_current_dir}/Qt4Macros.cmake")
+ include("${_qt4_current_dir}/Qt4Macros.cmake")
# set version variables
- STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}")
- STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}")
- STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}")
+ string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}")
+ string(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}")
+ string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}")
-ENDIF(QT_QMAKE_EXECUTABLE AND QTVERSION)
+endif(QT_QMAKE_EXECUTABLE AND QTVERSION)
#support old QT_MIN_VERSION if set, but not if version is supplied by find_package()
-IF(NOT Qt4_FIND_VERSION AND QT_MIN_VERSION)
- SET(Qt4_FIND_VERSION ${QT_MIN_VERSION})
-ENDIF(NOT Qt4_FIND_VERSION AND QT_MIN_VERSION)
+if(NOT Qt4_FIND_VERSION AND QT_MIN_VERSION)
+ set(Qt4_FIND_VERSION ${QT_MIN_VERSION})
+endif(NOT Qt4_FIND_VERSION AND QT_MIN_VERSION)
-IF( Qt4_FIND_COMPONENTS )
+if( Qt4_FIND_COMPONENTS )
# if components specified in find_package(), make sure each of those pieces were found
- SET(_QT4_FOUND_REQUIRED_VARS QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR)
- FOREACH( component ${Qt4_FIND_COMPONENTS} )
- STRING( TOUPPER ${component} _COMPONENT )
+ set(_QT4_FOUND_REQUIRED_VARS QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR)
+ foreach( component ${Qt4_FIND_COMPONENTS} )
+ string( TOUPPER ${component} _COMPONENT )
if(${_COMPONENT} STREQUAL "QTMAIN")
- IF(Q_WS_WIN)
- SET(_QT4_FOUND_REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} QT_${_COMPONENT}_LIBRARY)
- ENDIF(Q_WS_WIN)
+ if(Q_WS_WIN)
+ set(_QT4_FOUND_REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} QT_${_COMPONENT}_LIBRARY)
+ endif(Q_WS_WIN)
else(${_COMPONENT} STREQUAL "QTMAIN")
- SET(_QT4_FOUND_REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} QT_${_COMPONENT}_INCLUDE_DIR QT_${_COMPONENT}_LIBRARY)
+ set(_QT4_FOUND_REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} QT_${_COMPONENT}_INCLUDE_DIR QT_${_COMPONENT}_LIBRARY)
endif(${_COMPONENT} STREQUAL "QTMAIN")
- ENDFOREACH( component )
+ endforeach( component )
if(Qt4_FIND_COMPONENTS MATCHES QtGui)
- SET(_QT4_FOUND_REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} QT_UIC_EXECUTABLE)
+ set(_QT4_FOUND_REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} QT_UIC_EXECUTABLE)
endif(Qt4_FIND_COMPONENTS MATCHES QtGui)
-ELSE( Qt4_FIND_COMPONENTS )
+else( Qt4_FIND_COMPONENTS )
# if no components specified, we'll make a default set of required variables to say Qt is found
- SET(_QT4_FOUND_REQUIRED_VARS QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_UIC_EXECUTABLE QT_INCLUDE_DIR
+ set(_QT4_FOUND_REQUIRED_VARS QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_UIC_EXECUTABLE QT_INCLUDE_DIR
QT_LIBRARY_DIR QT_QTCORE_LIBRARY)
-ENDIF( Qt4_FIND_COMPONENTS )
+endif( Qt4_FIND_COMPONENTS )
if (QT_VERSION_MAJOR GREATER 4)
- SET(VERSION_MSG "Found unsuitable Qt version \"${QTVERSION}\" from ${QT_QMAKE_EXECUTABLE}")
- SET(QT4_FOUND FALSE)
- IF(Qt4_FIND_REQUIRED)
- MESSAGE( FATAL_ERROR "${VERSION_MSG}, this code requires Qt 4.x")
- ELSE(Qt4_FIND_REQUIRED)
- IF(NOT Qt4_FIND_QUIETLY)
- MESSAGE( STATUS "${VERSION_MSG}")
- ENDIF(NOT Qt4_FIND_QUIETLY)
- ENDIF(Qt4_FIND_REQUIRED)
+ set(VERSION_MSG "Found unsuitable Qt version \"${QTVERSION}\" from ${QT_QMAKE_EXECUTABLE}")
+ set(QT4_FOUND FALSE)
+ if(Qt4_FIND_REQUIRED)
+ message( FATAL_ERROR "${VERSION_MSG}, this code requires Qt 4.x")
+ else(Qt4_FIND_REQUIRED)
+ if(NOT Qt4_FIND_QUIETLY)
+ message( STATUS "${VERSION_MSG}")
+ endif(NOT Qt4_FIND_QUIETLY)
+ endif(Qt4_FIND_REQUIRED)
else()
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt4
REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS}
@@ -1209,8 +1209,8 @@ endif()
#
#######################################
# Backwards compatibility for CMake1.4 and 1.2
-SET (QT_MOC_EXE ${QT_MOC_EXECUTABLE} )
-SET (QT_UIC_EXE ${QT_UIC_EXECUTABLE} )
-SET( QT_QT_LIBRARY "")
-SET(QT_FOUND ${QT4_FOUND})
+set (QT_MOC_EXE ${QT_MOC_EXECUTABLE} )
+set (QT_UIC_EXE ${QT_UIC_EXECUTABLE} )
+set( QT_QT_LIBRARY "")
+set(QT_FOUND ${QT4_FOUND})
diff --git a/Modules/FindQuickTime.cmake b/Modules/FindQuickTime.cmake
index ccbcb31874..518f423232 100644
--- a/Modules/FindQuickTime.cmake
+++ b/Modules/FindQuickTime.cmake
@@ -25,23 +25,23 @@
# QuickTime on OS X looks different than QuickTime for Windows,
# so I am going to case the two.
-IF(APPLE)
- FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime/QuickTime.h)
- FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime)
-ELSE(APPLE)
- FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime.h
+if(APPLE)
+ find_path(QUICKTIME_INCLUDE_DIR QuickTime/QuickTime.h)
+ find_library(QUICKTIME_LIBRARY QuickTime)
+else(APPLE)
+ find_path(QUICKTIME_INCLUDE_DIR QuickTime.h
HINTS
$ENV{QUICKTIME_DIR}/include
$ENV{QUICKTIME_DIR}
)
- FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime
+ find_library(QUICKTIME_LIBRARY QuickTime
HINTS
$ENV{QUICKTIME_DIR}/lib
$ENV{QUICKTIME_DIR}
)
-ENDIF(APPLE)
+endif(APPLE)
# handle the QUIETLY and REQUIRED arguments and set QUICKTIME_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(QuickTime DEFAULT_MSG QUICKTIME_LIBRARY QUICKTIME_INCLUDE_DIR)
diff --git a/Modules/FindRTI.cmake b/Modules/FindRTI.cmake
index 031c138542..e806e03bad 100644
--- a/Modules/FindRTI.cmake
+++ b/Modules/FindRTI.cmake
@@ -29,73 +29,73 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-MACRO(RTI_MESSAGE_QUIETLY QUIET TYPE MSG)
- IF(NOT ${QUIET})
- MESSAGE(${TYPE} "${MSG}")
- ENDIF(NOT ${QUIET})
-ENDMACRO(RTI_MESSAGE_QUIETLY QUIET TYPE MSG)
+macro(RTI_MESSAGE_QUIETLY QUIET TYPE MSG)
+ if(NOT ${QUIET})
+ message(${TYPE} "${MSG}")
+ endif(NOT ${QUIET})
+endmacro(RTI_MESSAGE_QUIETLY QUIET TYPE MSG)
# Detect the CERTI installation, http://www.cert.fr/CERTI
-IF ("$ENV{CERTI_HOME}" STRGREATER "")
- FILE(TO_CMAKE_PATH "$ENV{CERTI_HOME}" CERTI_HOME)
+if ("$ENV{CERTI_HOME}" STRGREATER "")
+ file(TO_CMAKE_PATH "$ENV{CERTI_HOME}" CERTI_HOME)
RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "Using environment defined CERTI_HOME: ${CERTI_HOME}")
-ENDIF ("$ENV{CERTI_HOME}" STRGREATER "")
+endif ("$ENV{CERTI_HOME}" STRGREATER "")
-SET(RTI_DEFINITIONS "-DRTI_USES_STD_FSTREAM")
+set(RTI_DEFINITIONS "-DRTI_USES_STD_FSTREAM")
# Detect the MAK Technologies RTI installation, http://www.mak.com/products/rti.php
# note: the following list is ordered to find the most recent version first
-SET(RTI_POSSIBLE_DIRS
+set(RTI_POSSIBLE_DIRS
${CERTI_HOME}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MAK Technologies\\MAK RTI 3.2 MSVC++ 8.0;Location]"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MAK RTI 3.2-win32-msvc++8.0;InstallLocation]"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MAK Technologies\\MAK RTI 2.2;Location]"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MAK RTI 2.2;InstallLocation]")
-SET(RTI_OLD_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}")
+set(RTI_OLD_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}")
# The MAK RTI has the "lib" prefix even on Windows.
-SET(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")
+set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")
-FIND_LIBRARY(RTI_LIBRARY
+find_library(RTI_LIBRARY
NAMES RTI RTI-NG
PATHS ${RTI_POSSIBLE_DIRS}
PATH_SUFFIXES lib
DOC "The RTI Library")
-IF (RTI_LIBRARY)
- SET(RTI_LIBRARIES ${RTI_LIBRARY})
+if (RTI_LIBRARY)
+ set(RTI_LIBRARIES ${RTI_LIBRARY})
RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI library found: ${RTI_LIBRARY}")
-ELSE (RTI_LIBRARY)
+else (RTI_LIBRARY)
RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI library NOT found")
-ENDIF (RTI_LIBRARY)
+endif (RTI_LIBRARY)
-FIND_LIBRARY(RTI_FEDTIME_LIBRARY
+find_library(RTI_FEDTIME_LIBRARY
NAMES FedTime
PATHS ${RTI_POSSIBLE_DIRS}
PATH_SUFFIXES lib
DOC "The FedTime Library")
-IF (RTI_FEDTIME_LIBRARY)
- SET(RTI_LIBRARIES ${RTI_LIBRARIES} ${RTI_FEDTIME_LIBRARY})
+if (RTI_FEDTIME_LIBRARY)
+ set(RTI_LIBRARIES ${RTI_LIBRARIES} ${RTI_FEDTIME_LIBRARY})
RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI FedTime found: ${RTI_FEDTIME_LIBRARY}")
-ENDIF (RTI_FEDTIME_LIBRARY)
+endif (RTI_FEDTIME_LIBRARY)
-FIND_PATH(RTI_INCLUDE_DIR
+find_path(RTI_INCLUDE_DIR
NAMES RTI.hh
PATHS ${RTI_POSSIBLE_DIRS}
PATH_SUFFIXES include
DOC "The RTI Include Files")
-IF (RTI_INCLUDE_DIR)
+if (RTI_INCLUDE_DIR)
RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI headers found: ${RTI_INCLUDE_DIR}")
-ELSE (RTI_INCLUDE_DIR)
+else (RTI_INCLUDE_DIR)
RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI headers NOT found")
-ENDIF (RTI_INCLUDE_DIR)
+endif (RTI_INCLUDE_DIR)
# Set the modified system variables back to the original value.
-SET(CMAKE_FIND_LIBRARY_PREFIXES "${RTI_OLD_FIND_LIBRARY_PREFIXES}")
+set(CMAKE_FIND_LIBRARY_PREFIXES "${RTI_OLD_FIND_LIBRARY_PREFIXES}")
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(RTI DEFAULT_MSG
RTI_LIBRARY RTI_INCLUDE_DIR)
diff --git a/Modules/FindRuby.cmake b/Modules/FindRuby.cmake
index 5e973e4855..b4a306a078 100644
--- a/Modules/FindRuby.cmake
+++ b/Modules/FindRuby.cmake
@@ -3,7 +3,7 @@
# and libraries are. Ruby 1.8 and 1.9 are supported.
#
# The minimum required version of Ruby can be specified using the
-# standard syntax, e.g. FIND_PACKAGE(Ruby 1.8)
+# standard syntax, e.g. find_package(Ruby 1.8)
#
# It also determines what the name of the library is. This
# code sets the following variables:
@@ -37,43 +37,43 @@
# RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'`
# uncomment the following line to get debug output for this file
-# SET(_RUBY_DEBUG_OUTPUT TRUE)
+# set(_RUBY_DEBUG_OUTPUT TRUE)
# Determine the list of possible names of the ruby executable depending
# on which version of ruby is required
-SET(_RUBY_POSSIBLE_EXECUTABLE_NAMES ruby)
+set(_RUBY_POSSIBLE_EXECUTABLE_NAMES ruby)
# if 1.9 is required, don't look for ruby18 and ruby1.8, default to version 1.8
-IF(Ruby_FIND_VERSION_MAJOR AND Ruby_FIND_VERSION_MINOR)
- SET(Ruby_FIND_VERSION_SHORT_NODOT "${Ruby_FIND_VERSION_MAJOR}${RUBY_FIND_VERSION_MINOR}")
-ELSE(Ruby_FIND_VERSION_MAJOR AND Ruby_FIND_VERSION_MINOR)
- SET(Ruby_FIND_VERSION_SHORT_NODOT "18")
-ENDIF(Ruby_FIND_VERSION_MAJOR AND Ruby_FIND_VERSION_MINOR)
+if(Ruby_FIND_VERSION_MAJOR AND Ruby_FIND_VERSION_MINOR)
+ set(Ruby_FIND_VERSION_SHORT_NODOT "${Ruby_FIND_VERSION_MAJOR}${RUBY_FIND_VERSION_MINOR}")
+else(Ruby_FIND_VERSION_MAJOR AND Ruby_FIND_VERSION_MINOR)
+ set(Ruby_FIND_VERSION_SHORT_NODOT "18")
+endif(Ruby_FIND_VERSION_MAJOR AND Ruby_FIND_VERSION_MINOR)
-SET(_RUBY_POSSIBLE_EXECUTABLE_NAMES ${_RUBY_POSSIBLE_EXECUTABLE_NAMES} ruby1.9 ruby19)
+set(_RUBY_POSSIBLE_EXECUTABLE_NAMES ${_RUBY_POSSIBLE_EXECUTABLE_NAMES} ruby1.9 ruby19)
# if we want a version below 1.9, also look for ruby 1.8
-IF("${Ruby_FIND_VERSION_SHORT_NODOT}" VERSION_LESS "19")
- SET(_RUBY_POSSIBLE_EXECUTABLE_NAMES ${_RUBY_POSSIBLE_EXECUTABLE_NAMES} ruby1.8 ruby18)
-ENDIF("${Ruby_FIND_VERSION_SHORT_NODOT}" VERSION_LESS "19")
+if("${Ruby_FIND_VERSION_SHORT_NODOT}" VERSION_LESS "19")
+ set(_RUBY_POSSIBLE_EXECUTABLE_NAMES ${_RUBY_POSSIBLE_EXECUTABLE_NAMES} ruby1.8 ruby18)
+endif("${Ruby_FIND_VERSION_SHORT_NODOT}" VERSION_LESS "19")
-FIND_PROGRAM(RUBY_EXECUTABLE NAMES ${_RUBY_POSSIBLE_EXECUTABLE_NAMES})
+find_program(RUBY_EXECUTABLE NAMES ${_RUBY_POSSIBLE_EXECUTABLE_NAMES})
-IF(RUBY_EXECUTABLE AND NOT RUBY_VERSION_MAJOR)
- FUNCTION(_RUBY_CONFIG_VAR RBVAR OUTVAR)
- EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['${RBVAR}']"
+if(RUBY_EXECUTABLE AND NOT RUBY_VERSION_MAJOR)
+ function(_RUBY_CONFIG_VAR RBVAR OUTVAR)
+ execute_process(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print RbConfig::CONFIG['${RBVAR}']"
RESULT_VARIABLE _RUBY_SUCCESS
OUTPUT_VARIABLE _RUBY_OUTPUT
ERROR_QUIET)
- IF(_RUBY_SUCCESS OR NOT _RUBY_OUTPUT)
- EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['${RBVAR}']"
+ if(_RUBY_SUCCESS OR NOT _RUBY_OUTPUT)
+ execute_process(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['${RBVAR}']"
RESULT_VARIABLE _RUBY_SUCCESS
OUTPUT_VARIABLE _RUBY_OUTPUT
ERROR_QUIET)
- ENDIF(_RUBY_SUCCESS OR NOT _RUBY_OUTPUT)
- SET(${OUTVAR} "${_RUBY_OUTPUT}" PARENT_SCOPE)
- ENDFUNCTION(_RUBY_CONFIG_VAR)
+ endif(_RUBY_SUCCESS OR NOT _RUBY_OUTPUT)
+ set(${OUTVAR} "${_RUBY_OUTPUT}" PARENT_SCOPE)
+ endfunction(_RUBY_CONFIG_VAR)
# query the ruby version
@@ -93,29 +93,29 @@ IF(RUBY_EXECUTABLE AND NOT RUBY_VERSION_MAJOR)
_RUBY_CONFIG_VAR("sitelibdir" RUBY_SITELIB_DIR)
# vendor_ruby available ?
- EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r vendor-specific -e "print 'true'"
+ execute_process(COMMAND ${RUBY_EXECUTABLE} -r vendor-specific -e "print 'true'"
OUTPUT_VARIABLE RUBY_HAS_VENDOR_RUBY ERROR_QUIET)
- IF(RUBY_HAS_VENDOR_RUBY)
+ if(RUBY_HAS_VENDOR_RUBY)
_RUBY_CONFIG_VAR("vendorlibdir" RUBY_VENDORLIB_DIR)
_RUBY_CONFIG_VAR("vendorarchdir" RUBY_VENDORARCH_DIR)
- ENDIF(RUBY_HAS_VENDOR_RUBY)
+ endif(RUBY_HAS_VENDOR_RUBY)
# save the results in the cache so we don't have to run ruby the next time again
- SET(RUBY_VERSION_MAJOR ${RUBY_VERSION_MAJOR} CACHE PATH "The Ruby major version" FORCE)
- SET(RUBY_VERSION_MINOR ${RUBY_VERSION_MINOR} CACHE PATH "The Ruby minor version" FORCE)
- SET(RUBY_VERSION_PATCH ${RUBY_VERSION_PATCH} CACHE PATH "The Ruby patch version" FORCE)
- SET(RUBY_ARCH_DIR ${RUBY_ARCH_DIR} CACHE PATH "The Ruby arch dir" FORCE)
- SET(RUBY_HDR_DIR ${RUBY_HDR_DIR} CACHE PATH "The Ruby header dir (1.9)" FORCE)
- SET(RUBY_POSSIBLE_LIB_DIR ${RUBY_POSSIBLE_LIB_DIR} CACHE PATH "The Ruby lib dir" FORCE)
- SET(RUBY_RUBY_LIB_DIR ${RUBY_RUBY_LIB_DIR} CACHE PATH "The Ruby ruby-lib dir" FORCE)
- SET(RUBY_SITEARCH_DIR ${RUBY_SITEARCH_DIR} CACHE PATH "The Ruby site arch dir" FORCE)
- SET(RUBY_SITELIB_DIR ${RUBY_SITELIB_DIR} CACHE PATH "The Ruby site lib dir" FORCE)
- SET(RUBY_HAS_VENDOR_RUBY ${RUBY_HAS_VENDOR_RUBY} CACHE BOOL "Vendor Ruby is available" FORCE)
- SET(RUBY_VENDORARCH_DIR ${RUBY_VENDORARCH_DIR} CACHE PATH "The Ruby vendor arch dir" FORCE)
- SET(RUBY_VENDORLIB_DIR ${RUBY_VENDORLIB_DIR} CACHE PATH "The Ruby vendor lib dir" FORCE)
-
- MARK_AS_ADVANCED(
+ set(RUBY_VERSION_MAJOR ${RUBY_VERSION_MAJOR} CACHE PATH "The Ruby major version" FORCE)
+ set(RUBY_VERSION_MINOR ${RUBY_VERSION_MINOR} CACHE PATH "The Ruby minor version" FORCE)
+ set(RUBY_VERSION_PATCH ${RUBY_VERSION_PATCH} CACHE PATH "The Ruby patch version" FORCE)
+ set(RUBY_ARCH_DIR ${RUBY_ARCH_DIR} CACHE PATH "The Ruby arch dir" FORCE)
+ set(RUBY_HDR_DIR ${RUBY_HDR_DIR} CACHE PATH "The Ruby header dir (1.9)" FORCE)
+ set(RUBY_POSSIBLE_LIB_DIR ${RUBY_POSSIBLE_LIB_DIR} CACHE PATH "The Ruby lib dir" FORCE)
+ set(RUBY_RUBY_LIB_DIR ${RUBY_RUBY_LIB_DIR} CACHE PATH "The Ruby ruby-lib dir" FORCE)
+ set(RUBY_SITEARCH_DIR ${RUBY_SITEARCH_DIR} CACHE PATH "The Ruby site arch dir" FORCE)
+ set(RUBY_SITELIB_DIR ${RUBY_SITELIB_DIR} CACHE PATH "The Ruby site lib dir" FORCE)
+ set(RUBY_HAS_VENDOR_RUBY ${RUBY_HAS_VENDOR_RUBY} CACHE BOOL "Vendor Ruby is available" FORCE)
+ set(RUBY_VENDORARCH_DIR ${RUBY_VENDORARCH_DIR} CACHE PATH "The Ruby vendor arch dir" FORCE)
+ set(RUBY_VENDORLIB_DIR ${RUBY_VENDORLIB_DIR} CACHE PATH "The Ruby vendor lib dir" FORCE)
+
+ mark_as_advanced(
RUBY_ARCH_DIR
RUBY_ARCH
RUBY_HDR_DIR
@@ -130,107 +130,107 @@ IF(RUBY_EXECUTABLE AND NOT RUBY_VERSION_MAJOR)
RUBY_VERSION_MINOR
RUBY_VERSION_PATCH
)
-ENDIF(RUBY_EXECUTABLE AND NOT RUBY_VERSION_MAJOR)
+endif(RUBY_EXECUTABLE AND NOT RUBY_VERSION_MAJOR)
# In case RUBY_EXECUTABLE could not be executed (e.g. cross compiling)
# try to detect which version we found. This is not too good.
-IF(RUBY_EXECUTABLE AND NOT RUBY_VERSION_MAJOR)
+if(RUBY_EXECUTABLE AND NOT RUBY_VERSION_MAJOR)
# by default assume 1.8.0
- SET(RUBY_VERSION_MAJOR 1)
- SET(RUBY_VERSION_MINOR 8)
- SET(RUBY_VERSION_PATCH 0)
+ set(RUBY_VERSION_MAJOR 1)
+ set(RUBY_VERSION_MINOR 8)
+ set(RUBY_VERSION_PATCH 0)
# check whether we found 1.9.x
- IF(${RUBY_EXECUTABLE} MATCHES "ruby1.?9" OR RUBY_HDR_DIR)
- SET(RUBY_VERSION_MAJOR 1)
- SET(RUBY_VERSION_MINOR 9)
- ENDIF(${RUBY_EXECUTABLE} MATCHES "ruby1.?9" OR RUBY_HDR_DIR)
-ENDIF(RUBY_EXECUTABLE AND NOT RUBY_VERSION_MAJOR)
-
-IF(RUBY_VERSION_MAJOR)
- SET(RUBY_VERSION "${RUBY_VERSION_MAJOR}.${RUBY_VERSION_MINOR}.${RUBY_VERSION_PATCH}")
- SET(_RUBY_VERSION_SHORT "${RUBY_VERSION_MAJOR}.${RUBY_VERSION_MINOR}")
- SET(_RUBY_VERSION_SHORT_NODOT "${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR}")
- SET(_RUBY_NODOT_VERSION "${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR}${RUBY_VERSION_PATCH}")
-ENDIF(RUBY_VERSION_MAJOR)
-
-FIND_PATH(RUBY_INCLUDE_DIR
+ if(${RUBY_EXECUTABLE} MATCHES "ruby1.?9" OR RUBY_HDR_DIR)
+ set(RUBY_VERSION_MAJOR 1)
+ set(RUBY_VERSION_MINOR 9)
+ endif(${RUBY_EXECUTABLE} MATCHES "ruby1.?9" OR RUBY_HDR_DIR)
+endif(RUBY_EXECUTABLE AND NOT RUBY_VERSION_MAJOR)
+
+if(RUBY_VERSION_MAJOR)
+ set(RUBY_VERSION "${RUBY_VERSION_MAJOR}.${RUBY_VERSION_MINOR}.${RUBY_VERSION_PATCH}")
+ set(_RUBY_VERSION_SHORT "${RUBY_VERSION_MAJOR}.${RUBY_VERSION_MINOR}")
+ set(_RUBY_VERSION_SHORT_NODOT "${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR}")
+ set(_RUBY_NODOT_VERSION "${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR}${RUBY_VERSION_PATCH}")
+endif(RUBY_VERSION_MAJOR)
+
+find_path(RUBY_INCLUDE_DIR
NAMES ruby.h
HINTS
${RUBY_HDR_DIR}
${RUBY_ARCH_DIR}
/usr/lib/ruby/${_RUBY_VERSION_SHORT}/i586-linux-gnu/ )
-SET(RUBY_INCLUDE_DIRS ${RUBY_INCLUDE_DIR} )
+set(RUBY_INCLUDE_DIRS ${RUBY_INCLUDE_DIR} )
# if ruby > 1.8 is required or if ruby > 1.8 was found, search for the config.h dir
-IF( "${Ruby_FIND_VERSION_SHORT_NODOT}" GREATER 18 OR "${_RUBY_VERSION_SHORT_NODOT}" GREATER 18 OR RUBY_HDR_DIR)
- FIND_PATH(RUBY_CONFIG_INCLUDE_DIR
+if( "${Ruby_FIND_VERSION_SHORT_NODOT}" GREATER 18 OR "${_RUBY_VERSION_SHORT_NODOT}" GREATER 18 OR RUBY_HDR_DIR)
+ find_path(RUBY_CONFIG_INCLUDE_DIR
NAMES ruby/config.h config.h
HINTS
${RUBY_HDR_DIR}/${RUBY_ARCH}
${RUBY_ARCH_DIR}
)
- SET(RUBY_INCLUDE_DIRS ${RUBY_INCLUDE_DIRS} ${RUBY_CONFIG_INCLUDE_DIR} )
-ENDIF( "${Ruby_FIND_VERSION_SHORT_NODOT}" GREATER 18 OR "${_RUBY_VERSION_SHORT_NODOT}" GREATER 18 OR RUBY_HDR_DIR)
+ set(RUBY_INCLUDE_DIRS ${RUBY_INCLUDE_DIRS} ${RUBY_CONFIG_INCLUDE_DIR} )
+endif( "${Ruby_FIND_VERSION_SHORT_NODOT}" GREATER 18 OR "${_RUBY_VERSION_SHORT_NODOT}" GREATER 18 OR RUBY_HDR_DIR)
# Determine the list of possible names for the ruby library
-SET(_RUBY_POSSIBLE_LIB_NAMES ruby ruby-static ruby${_RUBY_VERSION_SHORT} ruby${_RUBY_VERSION_SHORT_NODOT} ruby-${_RUBY_VERSION_SHORT} ruby-${RUBY_VERSION})
-
-IF(WIN32)
- SET( _RUBY_MSVC_RUNTIME "" )
- IF( MSVC60 )
- SET( _RUBY_MSVC_RUNTIME "60" )
- ENDIF( MSVC60 )
- IF( MSVC70 )
- SET( _RUBY_MSVC_RUNTIME "70" )
- ENDIF( MSVC70 )
- IF( MSVC71 )
- SET( _RUBY_MSVC_RUNTIME "71" )
- ENDIF( MSVC71 )
- IF( MSVC80 )
- SET( _RUBY_MSVC_RUNTIME "80" )
- ENDIF( MSVC80 )
- IF( MSVC90 )
- SET( _RUBY_MSVC_RUNTIME "90" )
- ENDIF( MSVC90 )
-
- LIST(APPEND _RUBY_POSSIBLE_LIB_NAMES
+set(_RUBY_POSSIBLE_LIB_NAMES ruby ruby-static ruby${_RUBY_VERSION_SHORT} ruby${_RUBY_VERSION_SHORT_NODOT} ruby-${_RUBY_VERSION_SHORT} ruby-${RUBY_VERSION})
+
+if(WIN32)
+ set( _RUBY_MSVC_RUNTIME "" )
+ if( MSVC60 )
+ set( _RUBY_MSVC_RUNTIME "60" )
+ endif( MSVC60 )
+ if( MSVC70 )
+ set( _RUBY_MSVC_RUNTIME "70" )
+ endif( MSVC70 )
+ if( MSVC71 )
+ set( _RUBY_MSVC_RUNTIME "71" )
+ endif( MSVC71 )
+ if( MSVC80 )
+ set( _RUBY_MSVC_RUNTIME "80" )
+ endif( MSVC80 )
+ if( MSVC90 )
+ set( _RUBY_MSVC_RUNTIME "90" )
+ endif( MSVC90 )
+
+ list(APPEND _RUBY_POSSIBLE_LIB_NAMES
"msvcr${_RUBY_MSVC_RUNTIME}-ruby${_RUBY_NODOT_VERSION}"
"msvcr${_RUBY_MSVC_RUNTIME}-ruby${_RUBY_NODOT_VERSION}-static"
"msvcrt-ruby${_RUBY_NODOT_VERSION}"
"msvcrt-ruby${_RUBY_NODOT_VERSION}-static" )
-ENDIF(WIN32)
-
-FIND_LIBRARY(RUBY_LIBRARY NAMES ${_RUBY_POSSIBLE_LIB_NAMES} HINTS ${RUBY_POSSIBLE_LIB_DIR} )
-
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-SET(_RUBY_REQUIRED_VARS RUBY_EXECUTABLE RUBY_INCLUDE_DIR RUBY_LIBRARY)
-IF(_RUBY_VERSION_SHORT_NODOT GREATER 18)
- LIST(APPEND _RUBY_REQUIRED_VARS RUBY_CONFIG_INCLUDE_DIR)
-ENDIF(_RUBY_VERSION_SHORT_NODOT GREATER 18)
-
-IF(_RUBY_DEBUG_OUTPUT)
- MESSAGE(STATUS "--------FindRuby.cmake debug------------")
- MESSAGE(STATUS "_RUBY_POSSIBLE_EXECUTABLE_NAMES: ${_RUBY_POSSIBLE_EXECUTABLE_NAMES}")
- MESSAGE(STATUS "_RUBY_POSSIBLE_LIB_NAMES: ${_RUBY_POSSIBLE_LIB_NAMES}")
- MESSAGE(STATUS "RUBY_ARCH_DIR: ${RUBY_ARCH_DIR}")
- MESSAGE(STATUS "RUBY_HDR_DIR: ${RUBY_HDR_DIR}")
- MESSAGE(STATUS "RUBY_POSSIBLE_LIB_DIR: ${RUBY_POSSIBLE_LIB_DIR}")
- MESSAGE(STATUS "Found RUBY_VERSION: \"${RUBY_VERSION}\" , short: \"${_RUBY_VERSION_SHORT}\", nodot: \"${_RUBY_VERSION_SHORT_NODOT}\"")
- MESSAGE(STATUS "_RUBY_REQUIRED_VARS: ${_RUBY_REQUIRED_VARS}")
- MESSAGE(STATUS "RUBY_EXECUTABLE: ${RUBY_EXECUTABLE}")
- MESSAGE(STATUS "RUBY_LIBRARY: ${RUBY_LIBRARY}")
- MESSAGE(STATUS "RUBY_INCLUDE_DIR: ${RUBY_INCLUDE_DIR}")
- MESSAGE(STATUS "RUBY_CONFIG_INCLUDE_DIR: ${RUBY_CONFIG_INCLUDE_DIR}")
- MESSAGE(STATUS "--------------------")
-ENDIF(_RUBY_DEBUG_OUTPUT)
+endif(WIN32)
+
+find_library(RUBY_LIBRARY NAMES ${_RUBY_POSSIBLE_LIB_NAMES} HINTS ${RUBY_POSSIBLE_LIB_DIR} )
+
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+set(_RUBY_REQUIRED_VARS RUBY_EXECUTABLE RUBY_INCLUDE_DIR RUBY_LIBRARY)
+if(_RUBY_VERSION_SHORT_NODOT GREATER 18)
+ list(APPEND _RUBY_REQUIRED_VARS RUBY_CONFIG_INCLUDE_DIR)
+endif(_RUBY_VERSION_SHORT_NODOT GREATER 18)
+
+if(_RUBY_DEBUG_OUTPUT)
+ message(STATUS "--------FindRuby.cmake debug------------")
+ message(STATUS "_RUBY_POSSIBLE_EXECUTABLE_NAMES: ${_RUBY_POSSIBLE_EXECUTABLE_NAMES}")
+ message(STATUS "_RUBY_POSSIBLE_LIB_NAMES: ${_RUBY_POSSIBLE_LIB_NAMES}")
+ message(STATUS "RUBY_ARCH_DIR: ${RUBY_ARCH_DIR}")
+ message(STATUS "RUBY_HDR_DIR: ${RUBY_HDR_DIR}")
+ message(STATUS "RUBY_POSSIBLE_LIB_DIR: ${RUBY_POSSIBLE_LIB_DIR}")
+ message(STATUS "Found RUBY_VERSION: \"${RUBY_VERSION}\" , short: \"${_RUBY_VERSION_SHORT}\", nodot: \"${_RUBY_VERSION_SHORT_NODOT}\"")
+ message(STATUS "_RUBY_REQUIRED_VARS: ${_RUBY_REQUIRED_VARS}")
+ message(STATUS "RUBY_EXECUTABLE: ${RUBY_EXECUTABLE}")
+ message(STATUS "RUBY_LIBRARY: ${RUBY_LIBRARY}")
+ message(STATUS "RUBY_INCLUDE_DIR: ${RUBY_INCLUDE_DIR}")
+ message(STATUS "RUBY_CONFIG_INCLUDE_DIR: ${RUBY_CONFIG_INCLUDE_DIR}")
+ message(STATUS "--------------------")
+endif(_RUBY_DEBUG_OUTPUT)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ruby REQUIRED_VARS ${_RUBY_REQUIRED_VARS}
VERSION_VAR RUBY_VERSION )
-MARK_AS_ADVANCED(
+mark_as_advanced(
RUBY_EXECUTABLE
RUBY_LIBRARY
RUBY_INCLUDE_DIR
@@ -238,6 +238,6 @@ MARK_AS_ADVANCED(
)
# Set some variables for compatibility with previous version of this file
-SET(RUBY_POSSIBLE_LIB_PATH ${RUBY_POSSIBLE_LIB_DIR})
-SET(RUBY_RUBY_LIB_PATH ${RUBY_RUBY_LIB_DIR})
-SET(RUBY_INCLUDE_PATH ${RUBY_INCLUDE_DIRS})
+set(RUBY_POSSIBLE_LIB_PATH ${RUBY_POSSIBLE_LIB_DIR})
+set(RUBY_RUBY_LIB_PATH ${RUBY_RUBY_LIB_DIR})
+set(RUBY_INCLUDE_PATH ${RUBY_INCLUDE_DIRS})
diff --git a/Modules/FindSDL.cmake b/Modules/FindSDL.cmake
index 363591f0c2..65fea848d5 100644
--- a/Modules/FindSDL.cmake
+++ b/Modules/FindSDL.cmake
@@ -65,7 +65,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PATH(SDL_INCLUDE_DIR SDL.h
+find_path(SDL_INCLUDE_DIR SDL.h
HINTS
$ENV{SDLDIR}
PATH_SUFFIXES include/SDL include
@@ -84,7 +84,7 @@ FIND_PATH(SDL_INCLUDE_DIR SDL.h
# SDL-1.1 is the name used by FreeBSD ports...
# don't confuse it for the version number.
-FIND_LIBRARY(SDL_LIBRARY_TEMP
+find_library(SDL_LIBRARY_TEMP
NAMES SDL SDL-1.1
HINTS
$ENV{SDLDIR}
@@ -96,13 +96,13 @@ FIND_LIBRARY(SDL_LIBRARY_TEMP
/opt
)
-IF(NOT SDL_BUILDING_LIBRARY)
- IF(NOT ${SDL_INCLUDE_DIR} MATCHES ".framework")
+if(NOT SDL_BUILDING_LIBRARY)
+ if(NOT ${SDL_INCLUDE_DIR} MATCHES ".framework")
# Non-OS X framework versions expect you to also dynamically link to
# SDLmain. This is mainly for Windows and OS X. Other (Unix) platforms
# seem to provide SDLmain for compatibility even though they don't
# necessarily need it.
- FIND_LIBRARY(SDLMAIN_LIBRARY
+ find_library(SDLMAIN_LIBRARY
NAMES SDLmain SDLmain-1.1
HINTS
$ENV{SDLDIR}
@@ -113,31 +113,31 @@ IF(NOT SDL_BUILDING_LIBRARY)
/opt/csw
/opt
)
- ENDIF(NOT ${SDL_INCLUDE_DIR} MATCHES ".framework")
-ENDIF(NOT SDL_BUILDING_LIBRARY)
+ endif(NOT ${SDL_INCLUDE_DIR} MATCHES ".framework")
+endif(NOT SDL_BUILDING_LIBRARY)
# SDL may require threads on your system.
# The Apple build may not need an explicit flag because one of the
# frameworks may already provide it.
# But for non-OSX systems, I will use the CMake Threads package.
-IF(NOT APPLE)
- FIND_PACKAGE(Threads)
-ENDIF(NOT APPLE)
+if(NOT APPLE)
+ find_package(Threads)
+endif(NOT APPLE)
# MinGW needs an additional library, mwindows
# It's total link flags should look like -lmingw32 -lSDLmain -lSDL -lmwindows
# (Actually on second look, I think it only needs one of the m* libraries.)
-IF(MINGW)
- SET(MINGW32_LIBRARY mingw32 CACHE STRING "mwindows for MinGW")
-ENDIF(MINGW)
+if(MINGW)
+ set(MINGW32_LIBRARY mingw32 CACHE STRING "mwindows for MinGW")
+endif(MINGW)
-IF(SDL_LIBRARY_TEMP)
+if(SDL_LIBRARY_TEMP)
# For SDLmain
- IF(NOT SDL_BUILDING_LIBRARY)
- IF(SDLMAIN_LIBRARY)
- SET(SDL_LIBRARY_TEMP ${SDLMAIN_LIBRARY} ${SDL_LIBRARY_TEMP})
- ENDIF(SDLMAIN_LIBRARY)
- ENDIF(NOT SDL_BUILDING_LIBRARY)
+ if(NOT SDL_BUILDING_LIBRARY)
+ if(SDLMAIN_LIBRARY)
+ set(SDL_LIBRARY_TEMP ${SDLMAIN_LIBRARY} ${SDL_LIBRARY_TEMP})
+ endif(SDLMAIN_LIBRARY)
+ endif(NOT SDL_BUILDING_LIBRARY)
# For OS X, SDL uses Cocoa as a backend so it must link to Cocoa.
# CMake doesn't display the -framework Cocoa string in the UI even
@@ -145,29 +145,29 @@ IF(SDL_LIBRARY_TEMP)
# I think it has something to do with the CACHE STRING.
# So I use a temporary variable until the end so I can set the
# "real" variable in one-shot.
- IF(APPLE)
- SET(SDL_LIBRARY_TEMP ${SDL_LIBRARY_TEMP} "-framework Cocoa")
- ENDIF(APPLE)
+ if(APPLE)
+ set(SDL_LIBRARY_TEMP ${SDL_LIBRARY_TEMP} "-framework Cocoa")
+ endif(APPLE)
# For threads, as mentioned Apple doesn't need this.
# In fact, there seems to be a problem if I used the Threads package
# and try using this line, so I'm just skipping it entirely for OS X.
- IF(NOT APPLE)
- SET(SDL_LIBRARY_TEMP ${SDL_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT})
- ENDIF(NOT APPLE)
+ if(NOT APPLE)
+ set(SDL_LIBRARY_TEMP ${SDL_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT})
+ endif(NOT APPLE)
# For MinGW library
- IF(MINGW)
- SET(SDL_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL_LIBRARY_TEMP})
- ENDIF(MINGW)
+ if(MINGW)
+ set(SDL_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL_LIBRARY_TEMP})
+ endif(MINGW)
# Set the final string here so the GUI reflects the final state.
- SET(SDL_LIBRARY ${SDL_LIBRARY_TEMP} CACHE STRING "Where the SDL Library can be found")
+ set(SDL_LIBRARY ${SDL_LIBRARY_TEMP} CACHE STRING "Where the SDL Library can be found")
# Set the temp variable to INTERNAL so it is not seen in the CMake GUI
- SET(SDL_LIBRARY_TEMP "${SDL_LIBRARY_TEMP}" CACHE INTERNAL "")
-ENDIF(SDL_LIBRARY_TEMP)
+ set(SDL_LIBRARY_TEMP "${SDL_LIBRARY_TEMP}" CACHE INTERNAL "")
+endif(SDL_LIBRARY_TEMP)
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL
REQUIRED_VARS SDL_LIBRARY SDL_INCLUDE_DIR)
diff --git a/Modules/FindSDL_image.cmake b/Modules/FindSDL_image.cmake
index 7128f67fb0..3c1f7a00ef 100644
--- a/Modules/FindSDL_image.cmake
+++ b/Modules/FindSDL_image.cmake
@@ -25,7 +25,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PATH(SDLIMAGE_INCLUDE_DIR SDL_image.h
+find_path(SDLIMAGE_INCLUDE_DIR SDL_image.h
HINTS
$ENV{SDLIMAGEDIR}
$ENV{SDLDIR}
@@ -49,7 +49,7 @@ FIND_PATH(SDLIMAGE_INCLUDE_DIR SDL_image.h
/opt/include
)
-FIND_LIBRARY(SDLIMAGE_LIBRARY
+find_library(SDLIMAGE_LIBRARY
NAMES SDL_image
HINTS
$ENV{SDLIMAGEDIR}
@@ -64,7 +64,7 @@ FIND_LIBRARY(SDLIMAGE_LIBRARY
/opt
)
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDLIMAGE
REQUIRED_VARS SDLIMAGE_LIBRARY SDLIMAGE_INCLUDE_DIR)
diff --git a/Modules/FindSDL_mixer.cmake b/Modules/FindSDL_mixer.cmake
index e8da6407a2..ed333eec40 100644
--- a/Modules/FindSDL_mixer.cmake
+++ b/Modules/FindSDL_mixer.cmake
@@ -25,7 +25,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PATH(SDLMIXER_INCLUDE_DIR SDL_mixer.h
+find_path(SDLMIXER_INCLUDE_DIR SDL_mixer.h
HINTS
$ENV{SDLMIXERDIR}
$ENV{SDLDIR}
@@ -49,7 +49,7 @@ FIND_PATH(SDLMIXER_INCLUDE_DIR SDL_mixer.h
/opt/include
)
-FIND_LIBRARY(SDLMIXER_LIBRARY
+find_library(SDLMIXER_LIBRARY
NAMES SDL_mixer
HINTS
$ENV{SDLMIXERDIR}
@@ -64,7 +64,7 @@ FIND_LIBRARY(SDLMIXER_LIBRARY
/opt
)
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDLMIXER
REQUIRED_VARS SDLMIXER_LIBRARY SDLMIXER_INCLUDE_DIR)
diff --git a/Modules/FindSDL_net.cmake b/Modules/FindSDL_net.cmake
index f1bd0919e2..dcab3fd646 100644
--- a/Modules/FindSDL_net.cmake
+++ b/Modules/FindSDL_net.cmake
@@ -25,7 +25,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PATH(SDLNET_INCLUDE_DIR SDL_net.h
+find_path(SDLNET_INCLUDE_DIR SDL_net.h
HINTS
$ENV{SDLNETDIR}
$ENV{SDLDIR}
@@ -48,7 +48,7 @@ FIND_PATH(SDLNET_INCLUDE_DIR SDL_net.h
/opt/include/SDL
/opt/include
)
-FIND_LIBRARY(SDLNET_LIBRARY
+find_library(SDLNET_LIBRARY
NAMES SDL_net
HINTS
$ENV{SDLNETDIR}
@@ -63,7 +63,7 @@ FIND_LIBRARY(SDLNET_LIBRARY
/opt
)
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDLNET
REQUIRED_VARS SDLNET_LIBRARY SDLNET_INCLUDE_DIR)
diff --git a/Modules/FindSDL_sound.cmake b/Modules/FindSDL_sound.cmake
index 963a811f54..06ae203ad9 100644
--- a/Modules/FindSDL_sound.cmake
+++ b/Modules/FindSDL_sound.cmake
@@ -69,11 +69,11 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-SET(SDL_SOUND_EXTRAS "" CACHE STRING "SDL_sound extra flags")
-MARK_AS_ADVANCED(SDL_SOUND_EXTRAS)
+set(SDL_SOUND_EXTRAS "" CACHE STRING "SDL_sound extra flags")
+mark_as_advanced(SDL_SOUND_EXTRAS)
# Find SDL_sound.h
-FIND_PATH(SDL_SOUND_INCLUDE_DIR SDL_sound.h
+find_path(SDL_SOUND_INCLUDE_DIR SDL_sound.h
HINTS
$ENV{SDLSOUNDDIR}/include
$ENV{SDLSOUNDDIR}
@@ -96,7 +96,7 @@ FIND_PATH(SDL_SOUND_INCLUDE_DIR SDL_sound.h
/opt/include
)
-FIND_LIBRARY(SDL_SOUND_LIBRARY
+find_library(SDL_SOUND_LIBRARY
NAMES SDL_sound
HINTS
$ENV{SDLSOUNDDIR}/lib
@@ -110,7 +110,7 @@ FIND_LIBRARY(SDL_SOUND_LIBRARY
/opt/lib
)
-IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
+if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
# CMake is giving me problems using TRY_COMPILE with the CMAKE_FLAGS
# for the :STRING syntax if I have multiple values contained in a
@@ -121,12 +121,12 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
# To get multiple single variables to work, I must separate them with a "\;"
# I could go back and modify the FindSDL.cmake module, but that's kind of painful.
# The solution would be to try something like:
- # SET(SDL_TRY_COMPILE_LIBRARY_LIST "${SDL_TRY_COMPILE_LIBRARY_LIST}\;${CMAKE_THREAD_LIBS_INIT}")
+ # set(SDL_TRY_COMPILE_LIBRARY_LIST "${SDL_TRY_COMPILE_LIBRARY_LIST}\;${CMAKE_THREAD_LIBS_INIT}")
# Instead, it was suggested on the mailing list to write a temporary CMakeLists.txt
# with a temporary test project and invoke that with TRY_COMPILE.
# See message thread "Figuring out dependencies for a library in order to build"
# 2005-07-16
- # TRY_COMPILE(
+ # try_compile(
# MY_RESULT
# ${CMAKE_BINARY_DIR}
# ${PROJECT_SOURCE_DIR}/DetermineSoundLibs.c
@@ -139,7 +139,7 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
# To minimize external dependencies, create a sdlsound test program
# which will be used to figure out if additional link dependencies are
# required for the link phase.
- FILE(WRITE ${PROJECT_BINARY_DIR}/CMakeTmp/DetermineSoundLibs.c
+ file(WRITE ${PROJECT_BINARY_DIR}/CMakeTmp/DetermineSoundLibs.c
"#include \"SDL_sound.h\"
#include \"SDL.h\"
int main(int argc, char* argv[])
@@ -163,32 +163,32 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
)
# Calling
- # TARGET_LINK_LIBRARIES(DetermineSoundLibs "${SDL_SOUND_LIBRARY} ${SDL_LIBRARY})
+ # target_link_libraries(DetermineSoundLibs "${SDL_SOUND_LIBRARY} ${SDL_LIBRARY})
# causes problems when SDL_LIBRARY looks like
# /Library/Frameworks/SDL.framework;-framework Cocoa
# The ;-framework Cocoa seems to be confusing CMake once the OS X
# framework support was added. I was told that breaking up the list
# would fix the problem.
- SET(TMP_TRY_LIBS)
- FOREACH(lib ${SDL_SOUND_LIBRARY} ${SDL_LIBRARY})
- SET(TMP_TRY_LIBS "${TMP_TRY_LIBS} \"${lib}\"")
- ENDFOREACH(lib)
+ set(TMP_TRY_LIBS)
+ foreach(lib ${SDL_SOUND_LIBRARY} ${SDL_LIBRARY})
+ set(TMP_TRY_LIBS "${TMP_TRY_LIBS} \"${lib}\"")
+ endforeach(lib)
- # MESSAGE("TMP_TRY_LIBS ${TMP_TRY_LIBS}")
+ # message("TMP_TRY_LIBS ${TMP_TRY_LIBS}")
# Write the CMakeLists.txt and test project
# Weird, this is still sketchy. If I don't quote the variables
# in the TARGET_LINK_LIBRARIES, I seem to loose everything
# in the SDL_LIBRARY string after the "-framework".
# But if I quote the stuff in INCLUDE_DIRECTORIES, it doesn't work.
- FILE(WRITE ${PROJECT_BINARY_DIR}/CMakeTmp/CMakeLists.txt
- "PROJECT(DetermineSoundLibs)
- INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR} ${SDL_SOUND_INCLUDE_DIR})
- ADD_EXECUTABLE(DetermineSoundLibs DetermineSoundLibs.c)
- TARGET_LINK_LIBRARIES(DetermineSoundLibs ${TMP_TRY_LIBS})"
+ file(WRITE ${PROJECT_BINARY_DIR}/CMakeTmp/CMakeLists.txt
+ "project(DetermineSoundLibs)
+ include_directories(${SDL_INCLUDE_DIR} ${SDL_SOUND_INCLUDE_DIR})
+ add_executable(DetermineSoundLibs DetermineSoundLibs.c)
+ target_link_libraries(DetermineSoundLibs ${TMP_TRY_LIBS})"
)
- TRY_COMPILE(
+ try_compile(
MY_RESULT
${PROJECT_BINARY_DIR}/CMakeTmp
${PROJECT_BINARY_DIR}/CMakeTmp
@@ -196,20 +196,20 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
OUTPUT_VARIABLE MY_OUTPUT
)
- # MESSAGE("${MY_RESULT}")
- # MESSAGE(${MY_OUTPUT})
+ # message("${MY_RESULT}")
+ # message(${MY_OUTPUT})
- IF(NOT MY_RESULT)
+ if(NOT MY_RESULT)
# I expect that MPGLIB, VOC, WAV, AIFF, and SHN are compiled in statically.
# I think Timidity is also compiled in statically.
# I've never had to explcitly link against Quicktime, so I'll skip that for now.
- SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARY})
+ set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARY})
# Find MikMod
- IF("${MY_OUTPUT}" MATCHES "MikMod_")
- FIND_LIBRARY(MIKMOD_LIBRARY
+ if("${MY_OUTPUT}" MATCHES "MikMod_")
+ find_library(MIKMOD_LIBRARY
NAMES libmikmod-coreaudio mikmod
PATHS
$ENV{MIKMODDIR}/lib
@@ -223,14 +223,14 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
/opt/csw/lib
/opt/lib
)
- IF(MIKMOD_LIBRARY)
- SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${MIKMOD_LIBRARY})
- ENDIF(MIKMOD_LIBRARY)
- ENDIF("${MY_OUTPUT}" MATCHES "MikMod_")
+ if(MIKMOD_LIBRARY)
+ set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${MIKMOD_LIBRARY})
+ endif(MIKMOD_LIBRARY)
+ endif("${MY_OUTPUT}" MATCHES "MikMod_")
# Find ModPlug
- IF("${MY_OUTPUT}" MATCHES "MODPLUG_")
- FIND_LIBRARY(MODPLUG_LIBRARY
+ if("${MY_OUTPUT}" MATCHES "MODPLUG_")
+ find_library(MODPLUG_LIBRARY
NAMES modplug
PATHS
$ENV{MODPLUGDIR}/lib
@@ -244,15 +244,15 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
/opt/csw/lib
/opt/lib
)
- IF(MODPLUG_LIBRARY)
- SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${MODPLUG_LIBRARY})
- ENDIF(MODPLUG_LIBRARY)
- ENDIF("${MY_OUTPUT}" MATCHES "MODPLUG_")
+ if(MODPLUG_LIBRARY)
+ set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${MODPLUG_LIBRARY})
+ endif(MODPLUG_LIBRARY)
+ endif("${MY_OUTPUT}" MATCHES "MODPLUG_")
# Find Ogg and Vorbis
- IF("${MY_OUTPUT}" MATCHES "ov_")
- FIND_LIBRARY(VORBIS_LIBRARY
+ if("${MY_OUTPUT}" MATCHES "ov_")
+ find_library(VORBIS_LIBRARY
NAMES vorbis Vorbis VORBIS
PATHS
$ENV{VORBISDIR}/lib
@@ -268,11 +268,11 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
/opt/csw/lib
/opt/lib
)
- IF(VORBIS_LIBRARY)
- SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${VORBIS_LIBRARY})
- ENDIF(VORBIS_LIBRARY)
+ if(VORBIS_LIBRARY)
+ set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${VORBIS_LIBRARY})
+ endif(VORBIS_LIBRARY)
- FIND_LIBRARY(OGG_LIBRARY
+ find_library(OGG_LIBRARY
NAMES ogg Ogg OGG
PATHS
$ENV{OGGDIR}/lib
@@ -288,15 +288,15 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
/opt/csw/lib
/opt/lib
)
- IF(OGG_LIBRARY)
- SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${OGG_LIBRARY})
- ENDIF(OGG_LIBRARY)
- ENDIF("${MY_OUTPUT}" MATCHES "ov_")
+ if(OGG_LIBRARY)
+ set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${OGG_LIBRARY})
+ endif(OGG_LIBRARY)
+ endif("${MY_OUTPUT}" MATCHES "ov_")
# Find SMPEG
- IF("${MY_OUTPUT}" MATCHES "SMPEG_")
- FIND_LIBRARY(SMPEG_LIBRARY
+ if("${MY_OUTPUT}" MATCHES "SMPEG_")
+ find_library(SMPEG_LIBRARY
NAMES smpeg SMPEG Smpeg SMpeg
PATHS
$ENV{SMPEGDIR}/lib
@@ -310,15 +310,15 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
/opt/csw/lib
/opt/lib
)
- IF(SMPEG_LIBRARY)
- SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${SMPEG_LIBRARY})
- ENDIF(SMPEG_LIBRARY)
- ENDIF("${MY_OUTPUT}" MATCHES "SMPEG_")
+ if(SMPEG_LIBRARY)
+ set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${SMPEG_LIBRARY})
+ endif(SMPEG_LIBRARY)
+ endif("${MY_OUTPUT}" MATCHES "SMPEG_")
# Find FLAC
- IF("${MY_OUTPUT}" MATCHES "FLAC_")
- FIND_LIBRARY(FLAC_LIBRARY
+ if("${MY_OUTPUT}" MATCHES "FLAC_")
+ find_library(FLAC_LIBRARY
NAMES flac FLAC
PATHS
$ENV{FLACDIR}/lib
@@ -332,18 +332,18 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
/opt/csw/lib
/opt/lib
)
- IF(FLAC_LIBRARY)
- SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${FLAC_LIBRARY})
- ENDIF(FLAC_LIBRARY)
- ENDIF("${MY_OUTPUT}" MATCHES "FLAC_")
+ if(FLAC_LIBRARY)
+ set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${FLAC_LIBRARY})
+ endif(FLAC_LIBRARY)
+ endif("${MY_OUTPUT}" MATCHES "FLAC_")
# Hmmm...Speex seems to depend on Ogg. This might be a problem if
# the TRY_COMPILE attempt gets blocked at SPEEX before it can pull
# in the Ogg symbols. I'm not sure if I should duplicate the ogg stuff
# above for here or if two ogg entries will screw up things.
- IF("${MY_OUTPUT}" MATCHES "speex_")
- FIND_LIBRARY(SPEEX_LIBRARY
+ if("${MY_OUTPUT}" MATCHES "speex_")
+ find_library(SPEEX_LIBRARY
NAMES speex SPEEX
PATHS
$ENV{SPEEXDIR}/lib
@@ -357,14 +357,14 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
/opt/csw/lib
/opt/lib
)
- IF(SPEEX_LIBRARY)
- SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${SPEEX_LIBRARY})
- ENDIF(SPEEX_LIBRARY)
+ if(SPEEX_LIBRARY)
+ set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${SPEEX_LIBRARY})
+ endif(SPEEX_LIBRARY)
# Find OGG (needed for Speex)
# We might have already found Ogg for Vorbis, so skip it if so.
- IF(NOT OGG_LIBRARY)
- FIND_LIBRARY(OGG_LIBRARY
+ if(NOT OGG_LIBRARY)
+ find_library(OGG_LIBRARY
NAMES ogg Ogg OGG
PATHS
$ENV{OGGDIR}/lib
@@ -382,20 +382,20 @@ IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
/opt/csw/lib
/opt/lib
)
- IF(OGG_LIBRARY)
- SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${OGG_LIBRARY})
- ENDIF(OGG_LIBRARY)
- ENDIF(NOT OGG_LIBRARY)
- ENDIF("${MY_OUTPUT}" MATCHES "speex_")
+ if(OGG_LIBRARY)
+ set(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${OGG_LIBRARY})
+ endif(OGG_LIBRARY)
+ endif(NOT OGG_LIBRARY)
+ endif("${MY_OUTPUT}" MATCHES "speex_")
- ELSE(NOT MY_RESULT)
- SET(SDL_SOUND_LIBRARIES "${SDL_SOUND_EXTRAS} ${SDL_SOUND_LIBRARY}" CACHE INTERNAL "SDL_sound and dependent libraries")
- ENDIF(NOT MY_RESULT)
+ else(NOT MY_RESULT)
+ set(SDL_SOUND_LIBRARIES "${SDL_SOUND_EXTRAS} ${SDL_SOUND_LIBRARY}" CACHE INTERNAL "SDL_sound and dependent libraries")
+ endif(NOT MY_RESULT)
- SET(SDL_SOUND_LIBRARIES "${SDL_SOUND_EXTRAS} ${SDL_SOUND_LIBRARIES_TMP}" CACHE INTERNAL "SDL_sound and dependent libraries")
- ENDIF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
+ set(SDL_SOUND_LIBRARIES "${SDL_SOUND_EXTRAS} ${SDL_SOUND_LIBRARIES_TMP}" CACHE INTERNAL "SDL_sound and dependent libraries")
+ endif(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL_SOUND
REQUIRED_VARS SDL_SOUND_LIBRARIES SDL_SOUND_INCLUDE_DIR)
diff --git a/Modules/FindSDL_ttf.cmake b/Modules/FindSDL_ttf.cmake
index 8bba2130f2..6f238e6a6e 100644
--- a/Modules/FindSDL_ttf.cmake
+++ b/Modules/FindSDL_ttf.cmake
@@ -25,7 +25,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PATH(SDLTTF_INCLUDE_DIR SDL_ttf.h
+find_path(SDLTTF_INCLUDE_DIR SDL_ttf.h
HINTS
$ENV{SDLTTFDIR}
$ENV{SDLDIR}
@@ -49,7 +49,7 @@ FIND_PATH(SDLTTF_INCLUDE_DIR SDL_ttf.h
/opt/include
)
-FIND_LIBRARY(SDLTTF_LIBRARY
+find_library(SDLTTF_LIBRARY
NAMES SDL_ttf
HINTS
$ENV{SDLTTFDIR}
@@ -64,7 +64,7 @@ FIND_LIBRARY(SDLTTF_LIBRARY
PATH_SUFFIXES lib64 lib
)
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDLTTF
REQUIRED_VARS SDLTTF_LIBRARY SDLTTF_INCLUDE_DIR)
diff --git a/Modules/FindSWIG.cmake b/Modules/FindSWIG.cmake
index d11d1e47bb..33cf9d16d4 100644
--- a/Modules/FindSWIG.cmake
+++ b/Modules/FindSWIG.cmake
@@ -6,7 +6,7 @@
# SWIG_VERSION - the version number of the swig executable
#
# The minimum required version of SWIG can be specified using the
-# standard syntax, e.g. FIND_PACKAGE(SWIG 1.1)
+# standard syntax, e.g. find_package(SWIG 1.1)
#
# All information is collected from the SWIG_EXECUTABLE so the
# version to be found can be changed from the command line by
@@ -27,42 +27,42 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PROGRAM(SWIG_EXECUTABLE NAMES swig2.0 swig)
+find_program(SWIG_EXECUTABLE NAMES swig2.0 swig)
-IF(SWIG_EXECUTABLE)
- EXECUTE_PROCESS(COMMAND ${SWIG_EXECUTABLE} -swiglib
+if(SWIG_EXECUTABLE)
+ execute_process(COMMAND ${SWIG_EXECUTABLE} -swiglib
OUTPUT_VARIABLE SWIG_swiglib_output
ERROR_VARIABLE SWIG_swiglib_error
RESULT_VARIABLE SWIG_swiglib_result)
- IF(SWIG_swiglib_result)
- IF(SWIG_FIND_REQUIRED)
- MESSAGE(SEND_ERROR "Command \"${SWIG_EXECUTABLE} -swiglib\" failed with output:\n${SWIG_swiglib_error}")
- ELSE(SWIG_FIND_REQUIRED)
- MESSAGE(STATUS "Command \"${SWIG_EXECUTABLE} -swiglib\" failed with output:\n${SWIG_swiglib_error}")
- ENDIF(SWIG_FIND_REQUIRED)
- ELSE(SWIG_swiglib_result)
- STRING(REGEX REPLACE "[\n\r]+" ";" SWIG_swiglib_output ${SWIG_swiglib_output})
+ if(SWIG_swiglib_result)
+ if(SWIG_FIND_REQUIRED)
+ message(SEND_ERROR "Command \"${SWIG_EXECUTABLE} -swiglib\" failed with output:\n${SWIG_swiglib_error}")
+ else(SWIG_FIND_REQUIRED)
+ message(STATUS "Command \"${SWIG_EXECUTABLE} -swiglib\" failed with output:\n${SWIG_swiglib_error}")
+ endif(SWIG_FIND_REQUIRED)
+ else(SWIG_swiglib_result)
+ string(REGEX REPLACE "[\n\r]+" ";" SWIG_swiglib_output ${SWIG_swiglib_output})
# force the path to be computed each time in case SWIG_EXECUTABLE has changed.
- SET(SWIG_DIR SWIG_DIR-NOTFOUND)
- FIND_PATH(SWIG_DIR swig.swg PATHS ${SWIG_swiglib_output})
- IF(SWIG_DIR)
- SET(SWIG_USE_FILE ${CMAKE_ROOT}/Modules/UseSWIG.cmake)
- EXECUTE_PROCESS(COMMAND ${SWIG_EXECUTABLE} -version
+ set(SWIG_DIR SWIG_DIR-NOTFOUND)
+ find_path(SWIG_DIR swig.swg PATHS ${SWIG_swiglib_output})
+ if(SWIG_DIR)
+ set(SWIG_USE_FILE ${CMAKE_ROOT}/Modules/UseSWIG.cmake)
+ execute_process(COMMAND ${SWIG_EXECUTABLE} -version
OUTPUT_VARIABLE SWIG_version_output
ERROR_VARIABLE SWIG_version_output
RESULT_VARIABLE SWIG_version_result)
- IF(SWIG_version_result)
- MESSAGE(SEND_ERROR "Command \"${SWIG_EXECUTABLE} -version\" failed with output:\n${SWIG_version_output}")
- ELSE(SWIG_version_result)
- STRING(REGEX REPLACE ".*SWIG Version[^0-9.]*\([0-9.]+\).*" "\\1"
+ if(SWIG_version_result)
+ message(SEND_ERROR "Command \"${SWIG_EXECUTABLE} -version\" failed with output:\n${SWIG_version_output}")
+ else(SWIG_version_result)
+ string(REGEX REPLACE ".*SWIG Version[^0-9.]*\([0-9.]+\).*" "\\1"
SWIG_version_output "${SWIG_version_output}")
- SET(SWIG_VERSION ${SWIG_version_output} CACHE STRING "Swig version" FORCE)
- ENDIF(SWIG_version_result)
- ENDIF(SWIG_DIR)
- ENDIF(SWIG_swiglib_result)
-ENDIF(SWIG_EXECUTABLE)
+ set(SWIG_VERSION ${SWIG_version_output} CACHE STRING "Swig version" FORCE)
+ endif(SWIG_version_result)
+ endif(SWIG_DIR)
+ endif(SWIG_swiglib_result)
+endif(SWIG_EXECUTABLE)
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SWIG REQUIRED_VARS SWIG_EXECUTABLE SWIG_DIR
VERSION_VAR SWIG_VERSION )
diff --git a/Modules/FindSelfPackers.cmake b/Modules/FindSelfPackers.cmake
index d13b0c4ddc..7d446616cd 100644
--- a/Modules/FindSelfPackers.cmake
+++ b/Modules/FindSelfPackers.cmake
@@ -18,9 +18,9 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE(FindCygwin)
+include(FindCygwin)
-FIND_PROGRAM(SELF_PACKER_FOR_EXECUTABLE
+find_program(SELF_PACKER_FOR_EXECUTABLE
upx
${CYGWIN_INSTALL_PATH}/bin
/bin
@@ -29,7 +29,7 @@ FIND_PROGRAM(SELF_PACKER_FOR_EXECUTABLE
/sbin
)
-FIND_PROGRAM(SELF_PACKER_FOR_SHARED_LIB
+find_program(SELF_PACKER_FOR_SHARED_LIB
upx
${CYGWIN_INSTALL_PATH}/bin
/bin
@@ -38,7 +38,7 @@ FIND_PROGRAM(SELF_PACKER_FOR_SHARED_LIB
/sbin
)
-MARK_AS_ADVANCED(
+mark_as_advanced(
SELF_PACKER_FOR_EXECUTABLE
SELF_PACKER_FOR_SHARED_LIB
)
@@ -46,23 +46,23 @@ MARK_AS_ADVANCED(
#
# Set flags
#
-IF (SELF_PACKER_FOR_EXECUTABLE MATCHES "upx")
- SET (SELF_PACKER_FOR_EXECUTABLE_FLAGS "-q" CACHE STRING
+if (SELF_PACKER_FOR_EXECUTABLE MATCHES "upx")
+ set (SELF_PACKER_FOR_EXECUTABLE_FLAGS "-q" CACHE STRING
"Flags for the executable self-packer.")
-ELSE (SELF_PACKER_FOR_EXECUTABLE MATCHES "upx")
- SET (SELF_PACKER_FOR_EXECUTABLE_FLAGS "" CACHE STRING
+else (SELF_PACKER_FOR_EXECUTABLE MATCHES "upx")
+ set (SELF_PACKER_FOR_EXECUTABLE_FLAGS "" CACHE STRING
"Flags for the executable self-packer.")
-ENDIF (SELF_PACKER_FOR_EXECUTABLE MATCHES "upx")
+endif (SELF_PACKER_FOR_EXECUTABLE MATCHES "upx")
-IF (SELF_PACKER_FOR_SHARED_LIB MATCHES "upx")
- SET (SELF_PACKER_FOR_SHARED_LIB_FLAGS "-q" CACHE STRING
+if (SELF_PACKER_FOR_SHARED_LIB MATCHES "upx")
+ set (SELF_PACKER_FOR_SHARED_LIB_FLAGS "-q" CACHE STRING
"Flags for the shared lib self-packer.")
-ELSE (SELF_PACKER_FOR_SHARED_LIB MATCHES "upx")
- SET (SELF_PACKER_FOR_SHARED_LIB_FLAGS "" CACHE STRING
+else (SELF_PACKER_FOR_SHARED_LIB MATCHES "upx")
+ set (SELF_PACKER_FOR_SHARED_LIB_FLAGS "" CACHE STRING
"Flags for the shared lib self-packer.")
-ENDIF (SELF_PACKER_FOR_SHARED_LIB MATCHES "upx")
+endif (SELF_PACKER_FOR_SHARED_LIB MATCHES "upx")
-MARK_AS_ADVANCED(
+mark_as_advanced(
SELF_PACKER_FOR_EXECUTABLE_FLAGS
SELF_PACKER_FOR_SHARED_LIB_FLAGS
)
diff --git a/Modules/FindSquish.cmake b/Modules/FindSquish.cmake
index 3b69b07f74..0127edccc4 100644
--- a/Modules/FindSquish.cmake
+++ b/Modules/FindSquish.cmake
@@ -16,11 +16,11 @@
# macro SQUISH_ADD_TEST(testName applicationUnderTest testSuite testCase)
#
# ---- Typical Use
-# ENABLE_TESTING()
-# FIND_PACKAGE(Squish)
-# IF (SQUISH_FOUND)
+# enable_testing()
+# find_package(Squish)
+# if (SQUISH_FOUND)
# SQUISH_ADD_TEST(myTestName myApplication testSuiteName testCaseName)
-# ENDIF (SQUISH_FOUND)
+# endif (SQUISH_FOUND)
#
#=============================================================================
@@ -36,24 +36,24 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-SET(SQUISH_INSTALL_DIR_STRING "Directory containing the bin, doc, and lib directories for Squish; this should be the root of the installation directory.")
-SET(SQUISH_SERVER_EXECUTABLE_STRING "The squishserver executable program.")
-SET(SQUISH_CLIENT_EXECUTABLE_STRING "The squishclient executable program.")
+set(SQUISH_INSTALL_DIR_STRING "Directory containing the bin, doc, and lib directories for Squish; this should be the root of the installation directory.")
+set(SQUISH_SERVER_EXECUTABLE_STRING "The squishserver executable program.")
+set(SQUISH_CLIENT_EXECUTABLE_STRING "The squishclient executable program.")
# Search only if the location is not already known.
-IF(NOT SQUISH_INSTALL_DIR)
+if(NOT SQUISH_INSTALL_DIR)
# Get the system search path as a list.
- FILE(TO_CMAKE_PATH "$ENV{PATH}" SQUISH_INSTALL_DIR_SEARCH2)
+ file(TO_CMAKE_PATH "$ENV{PATH}" SQUISH_INSTALL_DIR_SEARCH2)
# Construct a set of paths relative to the system search path.
- SET(SQUISH_INSTALL_DIR_SEARCH "")
- FOREACH(dir ${SQUISH_INSTALL_DIR_SEARCH2})
- SET(SQUISH_INSTALL_DIR_SEARCH ${SQUISH_INSTALL_DIR_SEARCH} "${dir}/../lib/fltk")
- ENDFOREACH(dir)
- STRING(REPLACE "//" "/" SQUISH_INSTALL_DIR_SEARCH "${SQUISH_INSTALL_DIR_SEARCH}")
+ set(SQUISH_INSTALL_DIR_SEARCH "")
+ foreach(dir ${SQUISH_INSTALL_DIR_SEARCH2})
+ set(SQUISH_INSTALL_DIR_SEARCH ${SQUISH_INSTALL_DIR_SEARCH} "${dir}/../lib/fltk")
+ endforeach(dir)
+ string(REPLACE "//" "/" SQUISH_INSTALL_DIR_SEARCH "${SQUISH_INSTALL_DIR_SEARCH}")
# Look for an installation
- FIND_PATH(SQUISH_INSTALL_DIR bin/squishrunner
+ find_path(SQUISH_INSTALL_DIR bin/squishrunner
# Look for an environment variable SQUISH_INSTALL_DIR.
$ENV{SQUISH_INSTALL_DIR}
@@ -65,49 +65,49 @@ IF(NOT SQUISH_INSTALL_DIR)
DOC "The ${SQUISH_INSTALL_DIR_STRING}"
)
-ENDIF(NOT SQUISH_INSTALL_DIR)
+endif(NOT SQUISH_INSTALL_DIR)
# search for the executables
-IF(SQUISH_INSTALL_DIR)
- SET(SQUISH_INSTALL_DIR_FOUND 1)
+if(SQUISH_INSTALL_DIR)
+ set(SQUISH_INSTALL_DIR_FOUND 1)
# find the client program
- IF(NOT SQUISH_CLIENT_EXECUTABLE)
- FIND_PROGRAM(SQUISH_CLIENT_EXECUTABLE ${SQUISH_INSTALL_DIR}/bin/squishrunner DOC "The ${SQUISH_CLIENT_EXECUTABLE_STRING}")
- ENDIF(NOT SQUISH_CLIENT_EXECUTABLE)
+ if(NOT SQUISH_CLIENT_EXECUTABLE)
+ find_program(SQUISH_CLIENT_EXECUTABLE ${SQUISH_INSTALL_DIR}/bin/squishrunner DOC "The ${SQUISH_CLIENT_EXECUTABLE_STRING}")
+ endif(NOT SQUISH_CLIENT_EXECUTABLE)
# find the server program
- IF(NOT SQUISH_SERVER_EXECUTABLE)
- FIND_PROGRAM(SQUISH_SERVER_EXECUTABLE ${SQUISH_INSTALL_DIR}/bin/squishserver DOC "The ${SQUISH_SERVER_EXECUTABLE_STRING}")
- ENDIF(NOT SQUISH_SERVER_EXECUTABLE)
+ if(NOT SQUISH_SERVER_EXECUTABLE)
+ find_program(SQUISH_SERVER_EXECUTABLE ${SQUISH_INSTALL_DIR}/bin/squishserver DOC "The ${SQUISH_SERVER_EXECUTABLE_STRING}")
+ endif(NOT SQUISH_SERVER_EXECUTABLE)
-ELSE(SQUISH_INSTALL_DIR)
- SET(SQUISH_INSTALL_DIR_FOUND 0)
-ENDIF(SQUISH_INSTALL_DIR)
+else(SQUISH_INSTALL_DIR)
+ set(SQUISH_INSTALL_DIR_FOUND 0)
+endif(SQUISH_INSTALL_DIR)
# record if executables are set
-IF(SQUISH_CLIENT_EXECUTABLE)
- SET(SQUISH_CLIENT_EXECUTABLE_FOUND 1)
-ELSE(SQUISH_CLIENT_EXECUTABLE)
- SET(SQUISH_CLIENT_EXECUTABLE_FOUND 0)
-ENDIF(SQUISH_CLIENT_EXECUTABLE)
-
-IF(SQUISH_SERVER_EXECUTABLE)
- SET(SQUISH_SERVER_EXECUTABLE_FOUND 1)
-ELSE(SQUISH_SERVER_EXECUTABLE)
- SET(SQUISH_SERVER_EXECUTABLE_FOUND 0)
-ENDIF(SQUISH_SERVER_EXECUTABLE)
+if(SQUISH_CLIENT_EXECUTABLE)
+ set(SQUISH_CLIENT_EXECUTABLE_FOUND 1)
+else(SQUISH_CLIENT_EXECUTABLE)
+ set(SQUISH_CLIENT_EXECUTABLE_FOUND 0)
+endif(SQUISH_CLIENT_EXECUTABLE)
+
+if(SQUISH_SERVER_EXECUTABLE)
+ set(SQUISH_SERVER_EXECUTABLE_FOUND 1)
+else(SQUISH_SERVER_EXECUTABLE)
+ set(SQUISH_SERVER_EXECUTABLE_FOUND 0)
+endif(SQUISH_SERVER_EXECUTABLE)
# record if Squish was found
-SET(SQUISH_FOUND 1)
-FOREACH(var SQUISH_INSTALL_DIR_FOUND SQUISH_CLIENT_EXECUTABLE_FOUND SQUISH_SERVER_EXECUTABLE_FOUND)
- IF(NOT ${var})
- SET(SQUISH_FOUND 0)
- ENDIF(NOT ${var})
-ENDFOREACH(var)
-
-MACRO(SQUISH_ADD_TEST testName testAUT testCase envVars testWraper)
- ADD_TEST(${testName}
+set(SQUISH_FOUND 1)
+foreach(var SQUISH_INSTALL_DIR_FOUND SQUISH_CLIENT_EXECUTABLE_FOUND SQUISH_SERVER_EXECUTABLE_FOUND)
+ if(NOT ${var})
+ set(SQUISH_FOUND 0)
+ endif(NOT ${var})
+endforeach(var)
+
+macro(SQUISH_ADD_TEST testName testAUT testCase envVars testWraper)
+ add_test(${testName}
${CMAKE_COMMAND} -V -VV
"-Dsquish_aut:STRING=${testAUT}"
"-Dsquish_server_executable:STRING=${SQUISH_SERVER_EXECUTABLE}"
@@ -118,8 +118,8 @@ MACRO(SQUISH_ADD_TEST testName testAUT testCase envVars testWraper)
"-Dsquish_wrapper:STRING=${testWraper}"
-P "${CMAKE_ROOT}/Modules/SquishTestScript.cmake"
)
- SET_TESTS_PROPERTIES(${testName}
+ set_tests_properties(${testName}
PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED;ERROR;FATAL"
)
-ENDMACRO(SQUISH_ADD_TEST)
+endmacro(SQUISH_ADD_TEST)
diff --git a/Modules/FindSubversion.cmake b/Modules/FindSubversion.cmake
index 4166d99abd..85c51059cb 100644
--- a/Modules/FindSubversion.cmake
+++ b/Modules/FindSubversion.cmake
@@ -6,7 +6,7 @@
# SUBVERSION_FOUND - same as Subversion_FOUND, set for compatiblity reasons
#
# The minimum required version of Subversion can be specified using the
-# standard syntax, e.g. FIND_PACKAGE(Subversion 1.4)
+# standard syntax, e.g. find_package(Subversion 1.4)
#
# If the command line client executable is found two macros are defined:
# Subversion_WC_INFO(<dir> <var-prefix>)
@@ -25,13 +25,13 @@
# variable:
# <var-prefix>_LAST_CHANGED_LOG - last log of base revision
# Example usage:
-# FIND_PACKAGE(Subversion)
-# IF(SUBVERSION_FOUND)
+# find_package(Subversion)
+# if(SUBVERSION_FOUND)
# Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project)
-# MESSAGE("Current revision is ${Project_WC_REVISION}")
+# message("Current revision is ${Project_WC_REVISION}")
# Subversion_WC_LOG(${PROJECT_SOURCE_DIR} Project)
-# MESSAGE("Last changed log is ${Project_LAST_CHANGED_LOG}")
-# ENDIF(SUBVERSION_FOUND)
+# message("Last changed log is ${Project_LAST_CHANGED_LOG}")
+# endif(SUBVERSION_FOUND)
#=============================================================================
# Copyright 2006-2009 Kitware, Inc.
@@ -47,85 +47,85 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PROGRAM(Subversion_SVN_EXECUTABLE svn
+find_program(Subversion_SVN_EXECUTABLE svn
DOC "subversion command line client")
-MARK_AS_ADVANCED(Subversion_SVN_EXECUTABLE)
+mark_as_advanced(Subversion_SVN_EXECUTABLE)
-IF(Subversion_SVN_EXECUTABLE)
+if(Subversion_SVN_EXECUTABLE)
# the subversion commands should be executed with the C locale, otherwise
# the message (which are parsed) may be translated, Alex
- SET(_Subversion_SAVED_LC_ALL "$ENV{LC_ALL}")
- SET(ENV{LC_ALL} C)
+ set(_Subversion_SAVED_LC_ALL "$ENV{LC_ALL}")
+ set(ENV{LC_ALL} C)
- EXECUTE_PROCESS(COMMAND ${Subversion_SVN_EXECUTABLE} --version
+ execute_process(COMMAND ${Subversion_SVN_EXECUTABLE} --version
OUTPUT_VARIABLE Subversion_VERSION_SVN
OUTPUT_STRIP_TRAILING_WHITESPACE)
# restore the previous LC_ALL
- SET(ENV{LC_ALL} ${_Subversion_SAVED_LC_ALL})
+ set(ENV{LC_ALL} ${_Subversion_SAVED_LC_ALL})
- STRING(REGEX REPLACE "^(.*\n)?svn, version ([.0-9]+).*"
+ string(REGEX REPLACE "^(.*\n)?svn, version ([.0-9]+).*"
"\\2" Subversion_VERSION_SVN "${Subversion_VERSION_SVN}")
- MACRO(Subversion_WC_INFO dir prefix)
+ macro(Subversion_WC_INFO dir prefix)
# the subversion commands should be executed with the C locale, otherwise
# the message (which are parsed) may be translated, Alex
- SET(_Subversion_SAVED_LC_ALL "$ENV{LC_ALL}")
- SET(ENV{LC_ALL} C)
+ set(_Subversion_SAVED_LC_ALL "$ENV{LC_ALL}")
+ set(ENV{LC_ALL} C)
- EXECUTE_PROCESS(COMMAND ${Subversion_SVN_EXECUTABLE} info ${dir}
+ execute_process(COMMAND ${Subversion_SVN_EXECUTABLE} info ${dir}
OUTPUT_VARIABLE ${prefix}_WC_INFO
ERROR_VARIABLE Subversion_svn_info_error
RESULT_VARIABLE Subversion_svn_info_result
OUTPUT_STRIP_TRAILING_WHITESPACE)
- IF(NOT ${Subversion_svn_info_result} EQUAL 0)
- MESSAGE(SEND_ERROR "Command \"${Subversion_SVN_EXECUTABLE} info ${dir}\" failed with output:\n${Subversion_svn_info_error}")
- ELSE(NOT ${Subversion_svn_info_result} EQUAL 0)
+ if(NOT ${Subversion_svn_info_result} EQUAL 0)
+ message(SEND_ERROR "Command \"${Subversion_SVN_EXECUTABLE} info ${dir}\" failed with output:\n${Subversion_svn_info_error}")
+ else(NOT ${Subversion_svn_info_result} EQUAL 0)
- STRING(REGEX REPLACE "^(.*\n)?URL: ([^\n]+).*"
+ string(REGEX REPLACE "^(.*\n)?URL: ([^\n]+).*"
"\\2" ${prefix}_WC_URL "${${prefix}_WC_INFO}")
- STRING(REGEX REPLACE "^(.*\n)?Repository Root: ([^\n]+).*"
+ string(REGEX REPLACE "^(.*\n)?Repository Root: ([^\n]+).*"
"\\2" ${prefix}_WC_ROOT "${${prefix}_WC_INFO}")
- STRING(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*"
+ string(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*"
"\\2" ${prefix}_WC_REVISION "${${prefix}_WC_INFO}")
- STRING(REGEX REPLACE "^(.*\n)?Last Changed Author: ([^\n]+).*"
+ string(REGEX REPLACE "^(.*\n)?Last Changed Author: ([^\n]+).*"
"\\2" ${prefix}_WC_LAST_CHANGED_AUTHOR "${${prefix}_WC_INFO}")
- STRING(REGEX REPLACE "^(.*\n)?Last Changed Rev: ([^\n]+).*"
+ string(REGEX REPLACE "^(.*\n)?Last Changed Rev: ([^\n]+).*"
"\\2" ${prefix}_WC_LAST_CHANGED_REV "${${prefix}_WC_INFO}")
- STRING(REGEX REPLACE "^(.*\n)?Last Changed Date: ([^\n]+).*"
+ string(REGEX REPLACE "^(.*\n)?Last Changed Date: ([^\n]+).*"
"\\2" ${prefix}_WC_LAST_CHANGED_DATE "${${prefix}_WC_INFO}")
- ENDIF(NOT ${Subversion_svn_info_result} EQUAL 0)
+ endif(NOT ${Subversion_svn_info_result} EQUAL 0)
# restore the previous LC_ALL
- SET(ENV{LC_ALL} ${_Subversion_SAVED_LC_ALL})
+ set(ENV{LC_ALL} ${_Subversion_SAVED_LC_ALL})
- ENDMACRO(Subversion_WC_INFO)
+ endmacro(Subversion_WC_INFO)
- MACRO(Subversion_WC_LOG dir prefix)
+ macro(Subversion_WC_LOG dir prefix)
# This macro can block if the certificate is not signed:
# svn ask you to accept the certificate and wait for your answer
# This macro requires a svn server network access (Internet most of the time)
# and can also be slow since it access the svn server
- EXECUTE_PROCESS(COMMAND
+ execute_process(COMMAND
${Subversion_SVN_EXECUTABLE} --non-interactive log -r BASE ${dir}
OUTPUT_VARIABLE ${prefix}_LAST_CHANGED_LOG
ERROR_VARIABLE Subversion_svn_log_error
RESULT_VARIABLE Subversion_svn_log_result
OUTPUT_STRIP_TRAILING_WHITESPACE)
- IF(NOT ${Subversion_svn_log_result} EQUAL 0)
- MESSAGE(SEND_ERROR "Command \"${Subversion_SVN_EXECUTABLE} log -r BASE ${dir}\" failed with output:\n${Subversion_svn_log_error}")
- ENDIF(NOT ${Subversion_svn_log_result} EQUAL 0)
- ENDMACRO(Subversion_WC_LOG)
+ if(NOT ${Subversion_svn_log_result} EQUAL 0)
+ message(SEND_ERROR "Command \"${Subversion_SVN_EXECUTABLE} log -r BASE ${dir}\" failed with output:\n${Subversion_svn_log_error}")
+ endif(NOT ${Subversion_svn_log_result} EQUAL 0)
+ endmacro(Subversion_WC_LOG)
-ENDIF(Subversion_SVN_EXECUTABLE)
+endif(Subversion_SVN_EXECUTABLE)
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Subversion REQUIRED_VARS Subversion_SVN_EXECUTABLE
VERSION_VAR Subversion_VERSION_SVN )
# for compatibility
-SET(Subversion_FOUND ${SUBVERSION_FOUND})
-SET(Subversion_SVN_FOUND ${SUBVERSION_FOUND})
+set(Subversion_FOUND ${SUBVERSION_FOUND})
+set(Subversion_SVN_FOUND ${SUBVERSION_FOUND})
diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake
index 763b5ef54c..9fe2c7aeb7 100644
--- a/Modules/FindTCL.cmake
+++ b/Modules/FindTCL.cmake
@@ -44,38 +44,38 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE(CMakeFindFrameworks)
-INCLUDE(FindTclsh)
-INCLUDE(FindWish)
-
-IF(TCLSH_VERSION_STRING)
- SET(TCL_TCLSH_VERSION "${TCLSH_VERSION_STRING}")
-ELSE(TCLSH_VERSION_STRING)
- GET_FILENAME_COMPONENT(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH)
- GET_FILENAME_COMPONENT(TCL_TCLSH_PATH_PARENT "${TCL_TCLSH_PATH}" PATH)
- STRING(REGEX REPLACE
+include(CMakeFindFrameworks)
+include(FindTclsh)
+include(FindWish)
+
+if(TCLSH_VERSION_STRING)
+ set(TCL_TCLSH_VERSION "${TCLSH_VERSION_STRING}")
+else(TCLSH_VERSION_STRING)
+ get_filename_component(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH)
+ get_filename_component(TCL_TCLSH_PATH_PARENT "${TCL_TCLSH_PATH}" PATH)
+ string(REGEX REPLACE
"^.*tclsh([0-9]\\.*[0-9]).*$" "\\1" TCL_TCLSH_VERSION "${TCL_TCLSH}")
-ENDIF(TCLSH_VERSION_STRING)
+endif(TCLSH_VERSION_STRING)
-GET_FILENAME_COMPONENT(TK_WISH_PATH "${TK_WISH}" PATH)
-GET_FILENAME_COMPONENT(TK_WISH_PATH_PARENT "${TK_WISH_PATH}" PATH)
-STRING(REGEX REPLACE
+get_filename_component(TK_WISH_PATH "${TK_WISH}" PATH)
+get_filename_component(TK_WISH_PATH_PARENT "${TK_WISH_PATH}" PATH)
+string(REGEX REPLACE
"^.*wish([0-9]\\.*[0-9]).*$" "\\1" TK_WISH_VERSION "${TK_WISH}")
-GET_FILENAME_COMPONENT(TCL_INCLUDE_PATH_PARENT "${TCL_INCLUDE_PATH}" PATH)
-GET_FILENAME_COMPONENT(TK_INCLUDE_PATH_PARENT "${TK_INCLUDE_PATH}" PATH)
+get_filename_component(TCL_INCLUDE_PATH_PARENT "${TCL_INCLUDE_PATH}" PATH)
+get_filename_component(TK_INCLUDE_PATH_PARENT "${TK_INCLUDE_PATH}" PATH)
-GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH)
-GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH_PARENT "${TCL_LIBRARY_PATH}" PATH)
-STRING(REGEX REPLACE
+get_filename_component(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH)
+get_filename_component(TCL_LIBRARY_PATH_PARENT "${TCL_LIBRARY_PATH}" PATH)
+string(REGEX REPLACE
"^.*tcl([0-9]\\.*[0-9]).*$" "\\1" TCL_LIBRARY_VERSION "${TCL_LIBRARY}")
-GET_FILENAME_COMPONENT(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH)
-GET_FILENAME_COMPONENT(TK_LIBRARY_PATH_PARENT "${TK_LIBRARY_PATH}" PATH)
-STRING(REGEX REPLACE
+get_filename_component(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH)
+get_filename_component(TK_LIBRARY_PATH_PARENT "${TK_LIBRARY_PATH}" PATH)
+string(REGEX REPLACE
"^.*tk([0-9]\\.*[0-9]).*$" "\\1" TK_LIBRARY_VERSION "${TK_LIBRARY}")
-SET(TCLTK_POSSIBLE_LIB_PATHS
+set(TCLTK_POSSIBLE_LIB_PATHS
"${TCL_INCLUDE_PATH_PARENT}/lib"
"${TK_INCLUDE_PATH_PARENT}/lib"
"${TCL_LIBRARY_PATH}"
@@ -84,12 +84,12 @@ SET(TCLTK_POSSIBLE_LIB_PATHS
"${TK_WISH_PATH_PARENT}/lib"
)
-IF(WIN32)
- GET_FILENAME_COMPONENT(
+if(WIN32)
+ get_filename_component(
ActiveTcl_CurrentVersion
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]"
NAME)
- SET(TCLTK_POSSIBLE_LIB_PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
+ set(TCLTK_POSSIBLE_LIB_PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/lib"
@@ -101,9 +101,9 @@ IF(WIN32)
"C:/Program Files/Tcl/lib"
"C:/Tcl/lib"
)
-ENDIF(WIN32)
+endif(WIN32)
-FIND_LIBRARY(TCL_LIBRARY
+find_library(TCL_LIBRARY
NAMES
tcl
tcl${TCL_LIBRARY_VERSION} tcl${TCL_TCLSH_VERSION} tcl${TK_WISH_VERSION}
@@ -116,7 +116,7 @@ FIND_LIBRARY(TCL_LIBRARY
PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
)
-FIND_LIBRARY(TK_LIBRARY
+find_library(TK_LIBRARY
NAMES
tk
tk${TK_LIBRARY_VERSION} tk${TCL_TCLSH_VERSION} tk${TK_WISH_VERSION}
@@ -132,26 +132,26 @@ FIND_LIBRARY(TK_LIBRARY
CMAKE_FIND_FRAMEWORKS(Tcl)
CMAKE_FIND_FRAMEWORKS(Tk)
-SET(TCL_FRAMEWORK_INCLUDES)
-IF(Tcl_FRAMEWORKS)
- IF(NOT TCL_INCLUDE_PATH)
- FOREACH(dir ${Tcl_FRAMEWORKS})
- SET(TCL_FRAMEWORK_INCLUDES ${TCL_FRAMEWORK_INCLUDES} ${dir}/Headers)
- ENDFOREACH(dir)
- ENDIF(NOT TCL_INCLUDE_PATH)
-ENDIF(Tcl_FRAMEWORKS)
-
-SET(TK_FRAMEWORK_INCLUDES)
-IF(Tk_FRAMEWORKS)
- IF(NOT TK_INCLUDE_PATH)
- FOREACH(dir ${Tk_FRAMEWORKS})
- SET(TK_FRAMEWORK_INCLUDES ${TK_FRAMEWORK_INCLUDES}
+set(TCL_FRAMEWORK_INCLUDES)
+if(Tcl_FRAMEWORKS)
+ if(NOT TCL_INCLUDE_PATH)
+ foreach(dir ${Tcl_FRAMEWORKS})
+ set(TCL_FRAMEWORK_INCLUDES ${TCL_FRAMEWORK_INCLUDES} ${dir}/Headers)
+ endforeach(dir)
+ endif(NOT TCL_INCLUDE_PATH)
+endif(Tcl_FRAMEWORKS)
+
+set(TK_FRAMEWORK_INCLUDES)
+if(Tk_FRAMEWORKS)
+ if(NOT TK_INCLUDE_PATH)
+ foreach(dir ${Tk_FRAMEWORKS})
+ set(TK_FRAMEWORK_INCLUDES ${TK_FRAMEWORK_INCLUDES}
${dir}/Headers ${dir}/PrivateHeaders)
- ENDFOREACH(dir)
- ENDIF(NOT TK_INCLUDE_PATH)
-ENDIF(Tk_FRAMEWORKS)
+ endforeach(dir)
+ endif(NOT TK_INCLUDE_PATH)
+endif(Tk_FRAMEWORKS)
-SET(TCLTK_POSSIBLE_INCLUDE_PATHS
+set(TCLTK_POSSIBLE_INCLUDE_PATHS
"${TCL_LIBRARY_PATH_PARENT}/include"
"${TK_LIBRARY_PATH_PARENT}/include"
"${TCL_INCLUDE_PATH}"
@@ -170,8 +170,8 @@ SET(TCLTK_POSSIBLE_INCLUDE_PATHS
/usr/include/tcl8.0
)
-IF(WIN32)
- SET(TCLTK_POSSIBLE_INCLUDE_PATHS ${TCLTK_POSSIBLE_INCLUDE_PATHS}
+if(WIN32)
+ set(TCLTK_POSSIBLE_INCLUDE_PATHS ${TCLTK_POSSIBLE_INCLUDE_PATHS}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/include"
@@ -183,31 +183,31 @@ IF(WIN32)
"C:/Program Files/Tcl/include"
"C:/Tcl/include"
)
-ENDIF(WIN32)
+endif(WIN32)
-FIND_PATH(TCL_INCLUDE_PATH
+find_path(TCL_INCLUDE_PATH
NAMES tcl.h
HINTS ${TCLTK_POSSIBLE_INCLUDE_PATHS}
)
-FIND_PATH(TK_INCLUDE_PATH
+find_path(TK_INCLUDE_PATH
NAMES tk.h
HINTS ${TCLTK_POSSIBLE_INCLUDE_PATHS}
)
# handle the QUIETLY and REQUIRED arguments and set TCL_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCL DEFAULT_MSG TCL_LIBRARY TCL_INCLUDE_PATH)
-SET(TCLTK_FIND_REQUIRED ${TCL_FIND_REQUIRED})
-SET(TCLTK_FIND_QUIETLY ${TCL_FIND_QUIETLY})
+set(TCLTK_FIND_REQUIRED ${TCL_FIND_REQUIRED})
+set(TCLTK_FIND_QUIETLY ${TCL_FIND_QUIETLY})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCLTK DEFAULT_MSG TCL_LIBRARY TCL_INCLUDE_PATH TK_LIBRARY TK_INCLUDE_PATH)
-SET(TK_FIND_REQUIRED ${TCL_FIND_REQUIRED})
-SET(TK_FIND_QUIETLY ${TCL_FIND_QUIETLY})
+set(TK_FIND_REQUIRED ${TCL_FIND_REQUIRED})
+set(TK_FIND_QUIETLY ${TCL_FIND_QUIETLY})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TK DEFAULT_MSG TK_LIBRARY TK_INCLUDE_PATH)
-MARK_AS_ADVANCED(
+mark_as_advanced(
TCL_INCLUDE_PATH
TK_INCLUDE_PATH
TCL_LIBRARY
diff --git a/Modules/FindTIFF.cmake b/Modules/FindTIFF.cmake
index be410fd03d..c09c4c947a 100644
--- a/Modules/FindTIFF.cmake
+++ b/Modules/FindTIFF.cmake
@@ -20,29 +20,29 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PATH(TIFF_INCLUDE_DIR tiff.h)
+find_path(TIFF_INCLUDE_DIR tiff.h)
-SET(TIFF_NAMES ${TIFF_NAMES} tiff libtiff tiff3 libtiff3)
-FIND_LIBRARY(TIFF_LIBRARY NAMES ${TIFF_NAMES} )
+set(TIFF_NAMES ${TIFF_NAMES} tiff libtiff tiff3 libtiff3)
+find_library(TIFF_LIBRARY NAMES ${TIFF_NAMES} )
-IF(TIFF_INCLUDE_DIR AND EXISTS "${TIFF_INCLUDE_DIR}/tiffvers.h")
- FILE(STRINGS "${TIFF_INCLUDE_DIR}/tiffvers.h" tiff_version_str
+if(TIFF_INCLUDE_DIR AND EXISTS "${TIFF_INCLUDE_DIR}/tiffvers.h")
+ file(STRINGS "${TIFF_INCLUDE_DIR}/tiffvers.h" tiff_version_str
REGEX "^#define[\t ]+TIFFLIB_VERSION_STR[\t ]+\"LIBTIFF, Version .*")
- STRING(REGEX REPLACE "^#define[\t ]+TIFFLIB_VERSION_STR[\t ]+\"LIBTIFF, Version +([^ \\n]*).*"
+ string(REGEX REPLACE "^#define[\t ]+TIFFLIB_VERSION_STR[\t ]+\"LIBTIFF, Version +([^ \\n]*).*"
"\\1" TIFF_VERSION_STRING "${tiff_version_str}")
- UNSET(tiff_version_str)
-ENDIF()
+ unset(tiff_version_str)
+endif()
# handle the QUIETLY and REQUIRED arguments and set TIFF_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TIFF
REQUIRED_VARS TIFF_LIBRARY TIFF_INCLUDE_DIR
VERSION_VAR TIFF_VERSION_STRING)
-IF(TIFF_FOUND)
- SET( TIFF_LIBRARIES ${TIFF_LIBRARY} )
-ENDIF(TIFF_FOUND)
+if(TIFF_FOUND)
+ set( TIFF_LIBRARIES ${TIFF_LIBRARY} )
+endif(TIFF_FOUND)
-MARK_AS_ADVANCED(TIFF_INCLUDE_DIR TIFF_LIBRARY)
+mark_as_advanced(TIFF_INCLUDE_DIR TIFF_LIBRARY)
diff --git a/Modules/FindTclStub.cmake b/Modules/FindTclStub.cmake
index 1e83508117..cb77271212 100644
--- a/Modules/FindTclStub.cmake
+++ b/Modules/FindTclStub.cmake
@@ -34,32 +34,32 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE(FindTCL)
+include(FindTCL)
-GET_FILENAME_COMPONENT(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH)
-GET_FILENAME_COMPONENT(TCL_TCLSH_PATH_PARENT "${TCL_TCLSH_PATH}" PATH)
-STRING(REGEX REPLACE
+get_filename_component(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH)
+get_filename_component(TCL_TCLSH_PATH_PARENT "${TCL_TCLSH_PATH}" PATH)
+string(REGEX REPLACE
"^.*tclsh([0-9]\\.*[0-9]).*$" "\\1" TCL_TCLSH_VERSION "${TCL_TCLSH}")
-GET_FILENAME_COMPONENT(TK_WISH_PATH "${TK_WISH}" PATH)
-GET_FILENAME_COMPONENT(TK_WISH_PATH_PARENT "${TK_WISH_PATH}" PATH)
-STRING(REGEX REPLACE
+get_filename_component(TK_WISH_PATH "${TK_WISH}" PATH)
+get_filename_component(TK_WISH_PATH_PARENT "${TK_WISH_PATH}" PATH)
+string(REGEX REPLACE
"^.*wish([0-9]\\.*[0-9]).*$" "\\1" TK_WISH_VERSION "${TK_WISH}")
-GET_FILENAME_COMPONENT(TCL_INCLUDE_PATH_PARENT "${TCL_INCLUDE_PATH}" PATH)
-GET_FILENAME_COMPONENT(TK_INCLUDE_PATH_PARENT "${TK_INCLUDE_PATH}" PATH)
+get_filename_component(TCL_INCLUDE_PATH_PARENT "${TCL_INCLUDE_PATH}" PATH)
+get_filename_component(TK_INCLUDE_PATH_PARENT "${TK_INCLUDE_PATH}" PATH)
-GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH)
-GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH_PARENT "${TCL_LIBRARY_PATH}" PATH)
-STRING(REGEX REPLACE
+get_filename_component(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH)
+get_filename_component(TCL_LIBRARY_PATH_PARENT "${TCL_LIBRARY_PATH}" PATH)
+string(REGEX REPLACE
"^.*tcl([0-9]\\.*[0-9]).*$" "\\1" TCL_LIBRARY_VERSION "${TCL_LIBRARY}")
-GET_FILENAME_COMPONENT(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH)
-GET_FILENAME_COMPONENT(TK_LIBRARY_PATH_PARENT "${TK_LIBRARY_PATH}" PATH)
-STRING(REGEX REPLACE
+get_filename_component(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH)
+get_filename_component(TK_LIBRARY_PATH_PARENT "${TK_LIBRARY_PATH}" PATH)
+string(REGEX REPLACE
"^.*tk([0-9]\\.*[0-9]).*$" "\\1" TK_LIBRARY_VERSION "${TK_LIBRARY}")
-SET(TCLTK_POSSIBLE_LIB_PATHS
+set(TCLTK_POSSIBLE_LIB_PATHS
"${TCL_INCLUDE_PATH_PARENT}/lib"
"${TK_INCLUDE_PATH_PARENT}/lib"
"${TCL_LIBRARY_PATH}"
@@ -68,12 +68,12 @@ SET(TCLTK_POSSIBLE_LIB_PATHS
"${TK_WISH_PATH_PARENT}/lib"
)
-IF(WIN32)
- GET_FILENAME_COMPONENT(
+if(WIN32)
+ get_filename_component(
ActiveTcl_CurrentVersion
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]"
NAME)
- SET(TCLTK_POSSIBLE_LIB_PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
+ set(TCLTK_POSSIBLE_LIB_PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/lib"
@@ -85,9 +85,9 @@ IF(WIN32)
"C:/Program Files/Tcl/lib"
"C:/Tcl/lib"
)
-ENDIF(WIN32)
+endif(WIN32)
-FIND_LIBRARY(TCL_STUB_LIBRARY
+find_library(TCL_STUB_LIBRARY
NAMES
tclstub
tclstub${TK_LIBRARY_VERSION} tclstub${TCL_TCLSH_VERSION} tclstub${TK_WISH_VERSION}
@@ -100,7 +100,7 @@ FIND_LIBRARY(TCL_STUB_LIBRARY
PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
)
-FIND_LIBRARY(TK_STUB_LIBRARY
+find_library(TK_STUB_LIBRARY
NAMES
tkstub
tkstub${TCL_LIBRARY_VERSION} tkstub${TCL_TCLSH_VERSION} tkstub${TK_WISH_VERSION}
@@ -113,7 +113,7 @@ FIND_LIBRARY(TK_STUB_LIBRARY
PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
)
-FIND_LIBRARY(TTK_STUB_LIBRARY
+find_library(TTK_STUB_LIBRARY
NAMES
ttkstub
ttkstub${TCL_LIBRARY_VERSION} ttkstub${TCL_TCLSH_VERSION} ttkstub${TK_WISH_VERSION}
@@ -124,7 +124,7 @@ FIND_LIBRARY(TTK_STUB_LIBRARY
PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
)
-MARK_AS_ADVANCED(
+mark_as_advanced(
TCL_STUB_LIBRARY
TK_STUB_LIBRARY
)
diff --git a/Modules/FindTclsh.cmake b/Modules/FindTclsh.cmake
index fdeafffaf9..1e356f5264 100644
--- a/Modules/FindTclsh.cmake
+++ b/Modules/FindTclsh.cmake
@@ -20,29 +20,29 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-IF(CYGWIN)
- FIND_PROGRAM(TCL_TCLSH NAMES cygtclsh83 cygtclsh80)
-ENDIF(CYGWIN)
+if(CYGWIN)
+ find_program(TCL_TCLSH NAMES cygtclsh83 cygtclsh80)
+endif(CYGWIN)
-GET_FILENAME_COMPONENT(TK_WISH_PATH "${TK_WISH}" PATH)
-GET_FILENAME_COMPONENT(TK_WISH_PATH_PARENT "${TK_WISH_PATH}" PATH)
-STRING(REGEX REPLACE
+get_filename_component(TK_WISH_PATH "${TK_WISH}" PATH)
+get_filename_component(TK_WISH_PATH_PARENT "${TK_WISH_PATH}" PATH)
+string(REGEX REPLACE
"^.*wish([0-9]\\.*[0-9]).*$" "\\1" TK_WISH_VERSION "${TK_WISH}")
-GET_FILENAME_COMPONENT(TCL_INCLUDE_PATH_PARENT "${TCL_INCLUDE_PATH}" PATH)
-GET_FILENAME_COMPONENT(TK_INCLUDE_PATH_PARENT "${TK_INCLUDE_PATH}" PATH)
+get_filename_component(TCL_INCLUDE_PATH_PARENT "${TCL_INCLUDE_PATH}" PATH)
+get_filename_component(TK_INCLUDE_PATH_PARENT "${TK_INCLUDE_PATH}" PATH)
-GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH)
-GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH_PARENT "${TCL_LIBRARY_PATH}" PATH)
-STRING(REGEX REPLACE
+get_filename_component(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH)
+get_filename_component(TCL_LIBRARY_PATH_PARENT "${TCL_LIBRARY_PATH}" PATH)
+string(REGEX REPLACE
"^.*tcl([0-9]\\.*[0-9]).*$" "\\1" TCL_LIBRARY_VERSION "${TCL_LIBRARY}")
-GET_FILENAME_COMPONENT(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH)
-GET_FILENAME_COMPONENT(TK_LIBRARY_PATH_PARENT "${TK_LIBRARY_PATH}" PATH)
-STRING(REGEX REPLACE
+get_filename_component(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH)
+get_filename_component(TK_LIBRARY_PATH_PARENT "${TK_LIBRARY_PATH}" PATH)
+string(REGEX REPLACE
"^.*tk([0-9]\\.*[0-9]).*$" "\\1" TK_LIBRARY_VERSION "${TK_LIBRARY}")
-SET(TCLTK_POSSIBLE_BIN_PATHS
+set(TCLTK_POSSIBLE_BIN_PATHS
"${TCL_INCLUDE_PATH_PARENT}/bin"
"${TK_INCLUDE_PATH_PARENT}/bin"
"${TCL_LIBRARY_PATH_PARENT}/bin"
@@ -50,12 +50,12 @@ SET(TCLTK_POSSIBLE_BIN_PATHS
"${TK_WISH_PATH_PARENT}/bin"
)
-IF(WIN32)
- GET_FILENAME_COMPONENT(
+if(WIN32)
+ get_filename_component(
ActiveTcl_CurrentVersion
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]"
NAME)
- SET(TCLTK_POSSIBLE_BIN_PATHS ${TCLTK_POSSIBLE_BIN_PATHS}
+ set(TCLTK_POSSIBLE_BIN_PATHS ${TCLTK_POSSIBLE_BIN_PATHS}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/bin"
@@ -64,9 +64,9 @@ IF(WIN32)
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/bin"
)
-ENDIF(WIN32)
+endif(WIN32)
-SET(TCL_TCLSH_NAMES
+set(TCL_TCLSH_NAMES
tclsh
tclsh${TCL_LIBRARY_VERSION} tclsh${TK_LIBRARY_VERSION} tclsh${TK_WISH_VERSION}
tclsh86 tclsh8.6
@@ -77,24 +77,24 @@ SET(TCL_TCLSH_NAMES
tclsh80 tclsh8.0
)
-FIND_PROGRAM(TCL_TCLSH
+find_program(TCL_TCLSH
NAMES ${TCL_TCLSH_NAMES}
HINTS ${TCLTK_POSSIBLE_BIN_PATHS}
)
-IF(TCL_TCLSH)
- EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -E echo puts "\$tcl_version"
+if(TCL_TCLSH)
+ execute_process(COMMAND "${CMAKE_COMMAND}" -E echo puts "\$tcl_version"
COMMAND "${TCL_TCLSH}"
OUTPUT_VARIABLE TCLSH_VERSION_STRING
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
-ENDIF(TCL_TCLSH)
+endif(TCL_TCLSH)
# handle the QUIETLY and REQUIRED arguments and set TIFF_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Tclsh
REQUIRED_VARS TCL_TCLSH
VERSION_VAR TCLSH_VERSION_STRING)
-MARK_AS_ADVANCED(TCL_TCLSH)
+mark_as_advanced(TCL_TCLSH)
diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake
index bb1ba3c9f7..22bffef4ac 100644
--- a/Modules/FindThreads.cmake
+++ b/Modules/FindThreads.cmake
@@ -21,117 +21,117 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE (CheckIncludeFiles)
-INCLUDE (CheckLibraryExists)
-INCLUDE (CheckSymbolExists)
-SET(Threads_FOUND FALSE)
+include (CheckIncludeFiles)
+include (CheckLibraryExists)
+include (CheckSymbolExists)
+set(Threads_FOUND FALSE)
# Do we have sproc?
-IF(CMAKE_SYSTEM MATCHES IRIX AND NOT CMAKE_THREAD_PREFER_PTHREAD)
+if(CMAKE_SYSTEM MATCHES IRIX AND NOT CMAKE_THREAD_PREFER_PTHREAD)
CHECK_INCLUDE_FILES("sys/types.h;sys/prctl.h" CMAKE_HAVE_SPROC_H)
-ENDIF()
+endif()
-IF(CMAKE_HAVE_SPROC_H AND NOT CMAKE_THREAD_PREFER_PTHREAD)
+if(CMAKE_HAVE_SPROC_H AND NOT CMAKE_THREAD_PREFER_PTHREAD)
# We have sproc
- SET(CMAKE_USE_SPROC_INIT 1)
-ELSE()
+ set(CMAKE_USE_SPROC_INIT 1)
+else()
# Do we have pthreads?
CHECK_INCLUDE_FILES("pthread.h" CMAKE_HAVE_PTHREAD_H)
- IF(CMAKE_HAVE_PTHREAD_H)
+ if(CMAKE_HAVE_PTHREAD_H)
#
# We have pthread.h
# Let's check for the library now.
#
- SET(CMAKE_HAVE_THREADS_LIBRARY)
- IF(NOT THREADS_HAVE_PTHREAD_ARG)
+ set(CMAKE_HAVE_THREADS_LIBRARY)
+ if(NOT THREADS_HAVE_PTHREAD_ARG)
# Check if pthread functions are in normal C library
CHECK_SYMBOL_EXISTS(pthread_create pthread.h CMAKE_HAVE_LIBC_CREATE)
- IF(CMAKE_HAVE_LIBC_CREATE)
- SET(CMAKE_THREAD_LIBS_INIT "")
- SET(CMAKE_HAVE_THREADS_LIBRARY 1)
- SET(Threads_FOUND TRUE)
- ENDIF()
+ if(CMAKE_HAVE_LIBC_CREATE)
+ set(CMAKE_THREAD_LIBS_INIT "")
+ set(CMAKE_HAVE_THREADS_LIBRARY 1)
+ set(Threads_FOUND TRUE)
+ endif()
- IF(NOT CMAKE_HAVE_THREADS_LIBRARY)
+ if(NOT CMAKE_HAVE_THREADS_LIBRARY)
# Do we have -lpthreads
CHECK_LIBRARY_EXISTS(pthreads pthread_create "" CMAKE_HAVE_PTHREADS_CREATE)
- IF(CMAKE_HAVE_PTHREADS_CREATE)
- SET(CMAKE_THREAD_LIBS_INIT "-lpthreads")
- SET(CMAKE_HAVE_THREADS_LIBRARY 1)
- SET(Threads_FOUND TRUE)
- ENDIF()
+ if(CMAKE_HAVE_PTHREADS_CREATE)
+ set(CMAKE_THREAD_LIBS_INIT "-lpthreads")
+ set(CMAKE_HAVE_THREADS_LIBRARY 1)
+ set(Threads_FOUND TRUE)
+ endif()
# Ok, how about -lpthread
CHECK_LIBRARY_EXISTS(pthread pthread_create "" CMAKE_HAVE_PTHREAD_CREATE)
- IF(CMAKE_HAVE_PTHREAD_CREATE)
- SET(CMAKE_THREAD_LIBS_INIT "-lpthread")
- SET(CMAKE_HAVE_THREADS_LIBRARY 1)
- SET(Threads_FOUND TRUE)
- ENDIF()
+ if(CMAKE_HAVE_PTHREAD_CREATE)
+ set(CMAKE_THREAD_LIBS_INIT "-lpthread")
+ set(CMAKE_HAVE_THREADS_LIBRARY 1)
+ set(Threads_FOUND TRUE)
+ endif()
- IF(CMAKE_SYSTEM MATCHES "SunOS.*")
+ if(CMAKE_SYSTEM MATCHES "SunOS.*")
# On sun also check for -lthread
CHECK_LIBRARY_EXISTS(thread thr_create "" CMAKE_HAVE_THR_CREATE)
- IF(CMAKE_HAVE_THR_CREATE)
- SET(CMAKE_THREAD_LIBS_INIT "-lthread")
- SET(CMAKE_HAVE_THREADS_LIBRARY 1)
- SET(Threads_FOUND TRUE)
- ENDIF()
- ENDIF(CMAKE_SYSTEM MATCHES "SunOS.*")
- ENDIF(NOT CMAKE_HAVE_THREADS_LIBRARY)
- ENDIF(NOT THREADS_HAVE_PTHREAD_ARG)
-
- IF(NOT CMAKE_HAVE_THREADS_LIBRARY)
+ if(CMAKE_HAVE_THR_CREATE)
+ set(CMAKE_THREAD_LIBS_INIT "-lthread")
+ set(CMAKE_HAVE_THREADS_LIBRARY 1)
+ set(Threads_FOUND TRUE)
+ endif()
+ endif(CMAKE_SYSTEM MATCHES "SunOS.*")
+ endif(NOT CMAKE_HAVE_THREADS_LIBRARY)
+ endif(NOT THREADS_HAVE_PTHREAD_ARG)
+
+ if(NOT CMAKE_HAVE_THREADS_LIBRARY)
# If we did not found -lpthread, -lpthread, or -lthread, look for -pthread
- IF("THREADS_HAVE_PTHREAD_ARG" MATCHES "^THREADS_HAVE_PTHREAD_ARG")
- MESSAGE(STATUS "Check if compiler accepts -pthread")
- TRY_RUN(THREADS_PTHREAD_ARG THREADS_HAVE_PTHREAD_ARG
+ if("THREADS_HAVE_PTHREAD_ARG" MATCHES "^THREADS_HAVE_PTHREAD_ARG")
+ message(STATUS "Check if compiler accepts -pthread")
+ try_run(THREADS_PTHREAD_ARG THREADS_HAVE_PTHREAD_ARG
${CMAKE_BINARY_DIR}
${CMAKE_ROOT}/Modules/CheckForPthreads.c
CMAKE_FLAGS -DLINK_LIBRARIES:STRING=-pthread
COMPILE_OUTPUT_VARIABLE OUTPUT)
- IF(THREADS_HAVE_PTHREAD_ARG)
- IF(THREADS_PTHREAD_ARG MATCHES "^2$")
- SET(Threads_FOUND TRUE)
- MESSAGE(STATUS "Check if compiler accepts -pthread - yes")
- ELSE()
- MESSAGE(STATUS "Check if compiler accepts -pthread - no")
- FILE(APPEND
+ if(THREADS_HAVE_PTHREAD_ARG)
+ if(THREADS_PTHREAD_ARG MATCHES "^2$")
+ set(Threads_FOUND TRUE)
+ message(STATUS "Check if compiler accepts -pthread - yes")
+ else()
+ message(STATUS "Check if compiler accepts -pthread - no")
+ file(APPEND
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if compiler accepts -pthread returned ${THREADS_PTHREAD_ARG} instead of 2. The compiler had the following output:\n${OUTPUT}\n\n")
- ENDIF()
- ELSE()
- MESSAGE(STATUS "Check if compiler accepts -pthread - no")
- FILE(APPEND
+ endif()
+ else()
+ message(STATUS "Check if compiler accepts -pthread - no")
+ file(APPEND
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if compiler accepts -pthread failed with the following output:\n${OUTPUT}\n\n")
- ENDIF()
+ endif()
- ENDIF("THREADS_HAVE_PTHREAD_ARG" MATCHES "^THREADS_HAVE_PTHREAD_ARG")
+ endif("THREADS_HAVE_PTHREAD_ARG" MATCHES "^THREADS_HAVE_PTHREAD_ARG")
- IF(THREADS_HAVE_PTHREAD_ARG)
- SET(Threads_FOUND TRUE)
- SET(CMAKE_THREAD_LIBS_INIT "-pthread")
- ENDIF()
+ if(THREADS_HAVE_PTHREAD_ARG)
+ set(Threads_FOUND TRUE)
+ set(CMAKE_THREAD_LIBS_INIT "-pthread")
+ endif()
- ENDIF(NOT CMAKE_HAVE_THREADS_LIBRARY)
- ENDIF(CMAKE_HAVE_PTHREAD_H)
-ENDIF()
+ endif(NOT CMAKE_HAVE_THREADS_LIBRARY)
+ endif(CMAKE_HAVE_PTHREAD_H)
+endif()
-IF(CMAKE_THREAD_LIBS_INIT OR CMAKE_HAVE_LIBC_CREATE)
- SET(CMAKE_USE_PTHREADS_INIT 1)
- SET(Threads_FOUND TRUE)
-ENDIF()
+if(CMAKE_THREAD_LIBS_INIT OR CMAKE_HAVE_LIBC_CREATE)
+ set(CMAKE_USE_PTHREADS_INIT 1)
+ set(Threads_FOUND TRUE)
+endif()
-IF(CMAKE_SYSTEM MATCHES "Windows")
- SET(CMAKE_USE_WIN32_THREADS_INIT 1)
- SET(Threads_FOUND TRUE)
-ENDIF()
+if(CMAKE_SYSTEM MATCHES "Windows")
+ set(CMAKE_USE_WIN32_THREADS_INIT 1)
+ set(Threads_FOUND TRUE)
+endif()
-IF(CMAKE_USE_PTHREADS_INIT)
- IF(CMAKE_SYSTEM MATCHES "HP-UX-*")
+if(CMAKE_USE_PTHREADS_INIT)
+ if(CMAKE_SYSTEM MATCHES "HP-UX-*")
# Use libcma if it exists and can be used. It provides more
# symbols than the plain pthread library. CMA threads
# have actually been deprecated:
@@ -141,26 +141,26 @@ IF(CMAKE_USE_PTHREADS_INIT)
# The CMAKE_HP_PTHREADS setting actually indicates whether CMA threads
# are available.
CHECK_LIBRARY_EXISTS(cma pthread_attr_create "" CMAKE_HAVE_HP_CMA)
- IF(CMAKE_HAVE_HP_CMA)
- SET(CMAKE_THREAD_LIBS_INIT "-lcma")
- SET(CMAKE_HP_PTHREADS_INIT 1)
- SET(Threads_FOUND TRUE)
- ENDIF(CMAKE_HAVE_HP_CMA)
- SET(CMAKE_USE_PTHREADS_INIT 1)
- ENDIF()
-
- IF(CMAKE_SYSTEM MATCHES "OSF1-V*")
- SET(CMAKE_USE_PTHREADS_INIT 0)
- SET(CMAKE_THREAD_LIBS_INIT )
- ENDIF()
-
- IF(CMAKE_SYSTEM MATCHES "CYGWIN_NT*")
- SET(CMAKE_USE_PTHREADS_INIT 1)
- SET(Threads_FOUND TRUE)
- SET(CMAKE_THREAD_LIBS_INIT )
- SET(CMAKE_USE_WIN32_THREADS_INIT 0)
- ENDIF()
-ENDIF(CMAKE_USE_PTHREADS_INIT)
-
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+ if(CMAKE_HAVE_HP_CMA)
+ set(CMAKE_THREAD_LIBS_INIT "-lcma")
+ set(CMAKE_HP_PTHREADS_INIT 1)
+ set(Threads_FOUND TRUE)
+ endif(CMAKE_HAVE_HP_CMA)
+ set(CMAKE_USE_PTHREADS_INIT 1)
+ endif()
+
+ if(CMAKE_SYSTEM MATCHES "OSF1-V*")
+ set(CMAKE_USE_PTHREADS_INIT 0)
+ set(CMAKE_THREAD_LIBS_INIT )
+ endif()
+
+ if(CMAKE_SYSTEM MATCHES "CYGWIN_NT*")
+ set(CMAKE_USE_PTHREADS_INIT 1)
+ set(Threads_FOUND TRUE)
+ set(CMAKE_THREAD_LIBS_INIT )
+ set(CMAKE_USE_WIN32_THREADS_INIT 0)
+ endif()
+endif(CMAKE_USE_PTHREADS_INIT)
+
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Threads DEFAULT_MSG Threads_FOUND)
diff --git a/Modules/FindUnixCommands.cmake b/Modules/FindUnixCommands.cmake
index 4ada05c47f..a69e3f10c0 100644
--- a/Modules/FindUnixCommands.cmake
+++ b/Modules/FindUnixCommands.cmake
@@ -15,9 +15,9 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE(FindCygwin)
+include(FindCygwin)
-FIND_PROGRAM(BASH
+find_program(BASH
bash
${CYGWIN_INSTALL_PATH}/bin
/bin
@@ -25,11 +25,11 @@ FIND_PROGRAM(BASH
/usr/local/bin
/sbin
)
-MARK_AS_ADVANCED(
+mark_as_advanced(
BASH
)
-FIND_PROGRAM(CP
+find_program(CP
cp
${CYGWIN_INSTALL_PATH}/bin
/bin
@@ -37,11 +37,11 @@ FIND_PROGRAM(CP
/usr/local/bin
/sbin
)
-MARK_AS_ADVANCED(
+mark_as_advanced(
CP
)
-FIND_PROGRAM(GZIP
+find_program(GZIP
gzip
${CYGWIN_INSTALL_PATH}/bin
/bin
@@ -49,11 +49,11 @@ FIND_PROGRAM(GZIP
/usr/local/bin
/sbin
)
-MARK_AS_ADVANCED(
+mark_as_advanced(
GZIP
)
-FIND_PROGRAM(MV
+find_program(MV
mv
${CYGWIN_INSTALL_PATH}/bin
/bin
@@ -61,11 +61,11 @@ FIND_PROGRAM(MV
/usr/local/bin
/sbin
)
-MARK_AS_ADVANCED(
+mark_as_advanced(
MV
)
-FIND_PROGRAM(RM
+find_program(RM
rm
${CYGWIN_INSTALL_PATH}/bin
/bin
@@ -73,11 +73,11 @@ FIND_PROGRAM(RM
/usr/local/bin
/sbin
)
-MARK_AS_ADVANCED(
+mark_as_advanced(
RM
)
-FIND_PROGRAM(TAR
+find_program(TAR
NAMES
tar
gtar
@@ -88,6 +88,6 @@ FIND_PROGRAM(TAR
/usr/local/bin
/sbin
)
-MARK_AS_ADVANCED(
+mark_as_advanced(
TAR
)
diff --git a/Modules/FindVTK.cmake b/Modules/FindVTK.cmake
index fbdac7f8fb..a6257f5e6d 100644
--- a/Modules/FindVTK.cmake
+++ b/Modules/FindVTK.cmake
@@ -41,53 +41,53 @@
# License text for the above reference.)
# Assume not found.
-SET(VTK_FOUND 0)
+set(VTK_FOUND 0)
# VTK 4.0 did not provide VTKConfig.cmake.
-IF("${VTK_FIND_VERSION}" VERSION_LESS 4.1)
- SET(_VTK_40_ALLOW 1)
- IF(VTK_FIND_VERSION)
- SET(_VTK_40_ONLY 1)
- ENDIF()
-ENDIF()
+if("${VTK_FIND_VERSION}" VERSION_LESS 4.1)
+ set(_VTK_40_ALLOW 1)
+ if(VTK_FIND_VERSION)
+ set(_VTK_40_ONLY 1)
+ endif()
+endif()
# Construct consitent error messages for use below.
-SET(VTK_DIR_DESCRIPTION "directory containing VTKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/vtk for an installation.")
-IF(_VTK_40_ALLOW)
- SET(VTK_DIR_DESCRIPTION "${VTK_DIR_DESCRIPTION} For VTK 4.0, this is the location of UseVTK.cmake. This is either the root of the build tree or PREFIX/include/vtk for an installation.")
-ENDIF()
-SET(VTK_DIR_MESSAGE "VTK not found. Set the VTK_DIR cmake cache entry to the ${VTK_DIR_DESCRIPTION}")
+set(VTK_DIR_DESCRIPTION "directory containing VTKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/vtk for an installation.")
+if(_VTK_40_ALLOW)
+ set(VTK_DIR_DESCRIPTION "${VTK_DIR_DESCRIPTION} For VTK 4.0, this is the location of UseVTK.cmake. This is either the root of the build tree or PREFIX/include/vtk for an installation.")
+endif()
+set(VTK_DIR_MESSAGE "VTK not found. Set the VTK_DIR cmake cache entry to the ${VTK_DIR_DESCRIPTION}")
# Check whether VTK 4.0 has already been found.
-IF(_VTK_40_ALLOW AND VTK_DIR)
- IF(EXISTS ${VTK_DIR}/UseVTK.cmake AND NOT EXISTS ${VTK_DIR}/VTKConfig.cmake)
- SET(VTK_FOUND 1)
- INCLUDE(UseVTKConfig40) # No VTKConfig; load VTK 4.0 settings.
- ENDIF()
-ENDIF()
+if(_VTK_40_ALLOW AND VTK_DIR)
+ if(EXISTS ${VTK_DIR}/UseVTK.cmake AND NOT EXISTS ${VTK_DIR}/VTKConfig.cmake)
+ set(VTK_FOUND 1)
+ include(UseVTKConfig40) # No VTKConfig; load VTK 4.0 settings.
+ endif()
+endif()
# Use the Config mode of the find_package() command to find VTKConfig.
# If this succeeds (possibly because VTK_DIR is already set), the
# command will have already loaded VTKConfig.cmake and set VTK_FOUND.
-IF(NOT _VTK_40_ONLY AND NOT VTK_FOUND)
- FIND_PACKAGE(VTK QUIET NO_MODULE)
-ENDIF()
+if(NOT _VTK_40_ONLY AND NOT VTK_FOUND)
+ find_package(VTK QUIET NO_MODULE)
+endif()
# Special search for VTK 4.0.
-IF(_VTK_40_ALLOW AND NOT VTK_DIR)
+if(_VTK_40_ALLOW AND NOT VTK_DIR)
# Old scripts may set these directories in the CMakeCache.txt file.
# They can tell us where to find VTKConfig.cmake.
- SET(VTK_DIR_SEARCH_LEGACY "")
- IF(VTK_BINARY_PATH AND USE_BUILT_VTK)
- SET(VTK_DIR_SEARCH_LEGACY ${VTK_DIR_SEARCH_LEGACY} ${VTK_BINARY_PATH})
- ENDIF(VTK_BINARY_PATH AND USE_BUILT_VTK)
- IF(VTK_INSTALL_PATH AND USE_INSTALLED_VTK)
- SET(VTK_DIR_SEARCH_LEGACY ${VTK_DIR_SEARCH_LEGACY}
+ set(VTK_DIR_SEARCH_LEGACY "")
+ if(VTK_BINARY_PATH AND USE_BUILT_VTK)
+ set(VTK_DIR_SEARCH_LEGACY ${VTK_DIR_SEARCH_LEGACY} ${VTK_BINARY_PATH})
+ endif(VTK_BINARY_PATH AND USE_BUILT_VTK)
+ if(VTK_INSTALL_PATH AND USE_INSTALLED_VTK)
+ set(VTK_DIR_SEARCH_LEGACY ${VTK_DIR_SEARCH_LEGACY}
${VTK_INSTALL_PATH}/lib/vtk)
- ENDIF(VTK_INSTALL_PATH AND USE_INSTALLED_VTK)
+ endif(VTK_INSTALL_PATH AND USE_INSTALLED_VTK)
# Look for UseVTK.cmake in build trees or under <prefix>/include/vtk.
- FIND_PATH(VTK_DIR
+ find_path(VTK_DIR
NAMES UseVTK.cmake
PATH_SUFFIXES vtk-4.0 vtk
HINTS $ENV{VTK_DIR}
@@ -114,28 +114,28 @@ IF(_VTK_40_ALLOW AND NOT VTK_DIR)
DOC "The ${VTK_DIR_DESCRIPTION}"
)
- IF(VTK_DIR)
- IF(EXISTS ${VTK_DIR}/UseVTK.cmake AND NOT EXISTS ${VTK_DIR}/VTKConfig.cmake)
- SET(VTK_FOUND 1)
- INCLUDE(UseVTKConfig40) # No VTKConfig; load VTK 4.0 settings.
- ELSE()
+ if(VTK_DIR)
+ if(EXISTS ${VTK_DIR}/UseVTK.cmake AND NOT EXISTS ${VTK_DIR}/VTKConfig.cmake)
+ set(VTK_FOUND 1)
+ include(UseVTKConfig40) # No VTKConfig; load VTK 4.0 settings.
+ else()
# We found the wrong version. Pretend we did not find it.
- SET(VTK_DIR "VTK_DIR-NOTFOUND" CACHE PATH "The ${VTK_DIR_DESCRIPTION}" FORCE)
- ENDIF()
- ENDIF()
-ENDIF()
+ set(VTK_DIR "VTK_DIR-NOTFOUND" CACHE PATH "The ${VTK_DIR_DESCRIPTION}" FORCE)
+ endif()
+ endif()
+endif()
#-----------------------------------------------------------------------------
-IF(VTK_FOUND)
+if(VTK_FOUND)
# Set USE_VTK_FILE for backward-compatability.
- SET(USE_VTK_FILE ${VTK_USE_FILE})
-ELSE(VTK_FOUND)
+ set(USE_VTK_FILE ${VTK_USE_FILE})
+else(VTK_FOUND)
# VTK not found, explain to the user how to specify its location.
- IF(VTK_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR ${VTK_DIR_MESSAGE})
- ELSE(VTK_FIND_REQUIRED)
- IF(NOT VTK_FIND_QUIETLY)
- MESSAGE(STATUS ${VTK_DIR_MESSAGE})
- ENDIF(NOT VTK_FIND_QUIETLY)
- ENDIF(VTK_FIND_REQUIRED)
-ENDIF(VTK_FOUND)
+ if(VTK_FIND_REQUIRED)
+ message(FATAL_ERROR ${VTK_DIR_MESSAGE})
+ else(VTK_FIND_REQUIRED)
+ if(NOT VTK_FIND_QUIETLY)
+ message(STATUS ${VTK_DIR_MESSAGE})
+ endif(NOT VTK_FIND_QUIETLY)
+ endif(VTK_FIND_REQUIRED)
+endif(VTK_FOUND)
diff --git a/Modules/FindWget.cmake b/Modules/FindWget.cmake
index ee4057dfd2..a1dd47f77e 100644
--- a/Modules/FindWget.cmake
+++ b/Modules/FindWget.cmake
@@ -17,20 +17,20 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE(FindCygwin)
+include(FindCygwin)
-FIND_PROGRAM(WGET_EXECUTABLE
+find_program(WGET_EXECUTABLE
wget
${CYGWIN_INSTALL_PATH}/bin
)
# handle the QUIETLY and REQUIRED arguments and set WGET_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Wget DEFAULT_MSG WGET_EXECUTABLE)
-MARK_AS_ADVANCED( WGET_EXECUTABLE )
+mark_as_advanced( WGET_EXECUTABLE )
# WGET option is deprecated.
# use WGET_EXECUTABLE instead.
-SET (WGET ${WGET_EXECUTABLE} )
+set (WGET ${WGET_EXECUTABLE} )
diff --git a/Modules/FindWish.cmake b/Modules/FindWish.cmake
index 8a1cd8d362..5f1789066d 100644
--- a/Modules/FindWish.cmake
+++ b/Modules/FindWish.cmake
@@ -20,29 +20,29 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-IF(UNIX)
- FIND_PROGRAM(TK_WISH cygwish80 )
-ENDIF(UNIX)
+if(UNIX)
+ find_program(TK_WISH cygwish80 )
+endif(UNIX)
-GET_FILENAME_COMPONENT(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH)
-GET_FILENAME_COMPONENT(TCL_TCLSH_PATH_PARENT "${TCL_TCLSH_PATH}" PATH)
-STRING(REGEX REPLACE
+get_filename_component(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH)
+get_filename_component(TCL_TCLSH_PATH_PARENT "${TCL_TCLSH_PATH}" PATH)
+string(REGEX REPLACE
"^.*tclsh([0-9]\\.*[0-9]).*$" "\\1" TCL_TCLSH_VERSION "${TCL_TCLSH}")
-GET_FILENAME_COMPONENT(TCL_INCLUDE_PATH_PARENT "${TCL_INCLUDE_PATH}" PATH)
-GET_FILENAME_COMPONENT(TK_INCLUDE_PATH_PARENT "${TK_INCLUDE_PATH}" PATH)
+get_filename_component(TCL_INCLUDE_PATH_PARENT "${TCL_INCLUDE_PATH}" PATH)
+get_filename_component(TK_INCLUDE_PATH_PARENT "${TK_INCLUDE_PATH}" PATH)
-GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH)
-GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH_PARENT "${TCL_LIBRARY_PATH}" PATH)
-STRING(REGEX REPLACE
+get_filename_component(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH)
+get_filename_component(TCL_LIBRARY_PATH_PARENT "${TCL_LIBRARY_PATH}" PATH)
+string(REGEX REPLACE
"^.*tcl([0-9]\\.*[0-9]).*$" "\\1" TCL_LIBRARY_VERSION "${TCL_LIBRARY}")
-GET_FILENAME_COMPONENT(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH)
-GET_FILENAME_COMPONENT(TK_LIBRARY_PATH_PARENT "${TK_LIBRARY_PATH}" PATH)
-STRING(REGEX REPLACE
+get_filename_component(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH)
+get_filename_component(TK_LIBRARY_PATH_PARENT "${TK_LIBRARY_PATH}" PATH)
+string(REGEX REPLACE
"^.*tk([0-9]\\.*[0-9]).*$" "\\1" TK_LIBRARY_VERSION "${TK_LIBRARY}")
-SET(TCLTK_POSSIBLE_BIN_PATHS
+set(TCLTK_POSSIBLE_BIN_PATHS
"${TCL_INCLUDE_PATH_PARENT}/bin"
"${TK_INCLUDE_PATH_PARENT}/bin"
"${TCL_LIBRARY_PATH_PARENT}/bin"
@@ -50,12 +50,12 @@ SET(TCLTK_POSSIBLE_BIN_PATHS
"${TCL_TCLSH_PATH_PARENT}/bin"
)
-IF(WIN32)
- GET_FILENAME_COMPONENT(
+if(WIN32)
+ get_filename_component(
ActiveTcl_CurrentVersion
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]"
NAME)
- SET(TCLTK_POSSIBLE_BIN_PATHS ${TCLTK_POSSIBLE_BIN_PATHS}
+ set(TCLTK_POSSIBLE_BIN_PATHS ${TCLTK_POSSIBLE_BIN_PATHS}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/bin"
@@ -64,9 +64,9 @@ IF(WIN32)
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/bin"
)
-ENDIF(WIN32)
+endif(WIN32)
-SET(TK_WISH_NAMES
+set(TK_WISH_NAMES
wish
wish${TCL_LIBRARY_VERSION} wish${TK_LIBRARY_VERSION} wish${TCL_TCLSH_VERSION}
wish86 wish8.6
@@ -77,9 +77,9 @@ SET(TK_WISH_NAMES
wish80 wish8.0
)
-FIND_PROGRAM(TK_WISH
+find_program(TK_WISH
NAMES ${TK_WISH_NAMES}
HINTS ${TCLTK_POSSIBLE_BIN_PATHS}
)
-MARK_AS_ADVANCED(TK_WISH)
+mark_as_advanced(TK_WISH)
diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake
index 76fb3c9114..1c16af5737 100644
--- a/Modules/FindX11.cmake
+++ b/Modules/FindX11.cmake
@@ -54,13 +54,13 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-IF (UNIX)
- SET(X11_FOUND 0)
+if (UNIX)
+ set(X11_FOUND 0)
# X11 is never a framework and some header files may be
# found in tcl on the mac
- SET(CMAKE_FIND_FRAMEWORK_SAVE ${CMAKE_FIND_FRAMEWORK})
- SET(CMAKE_FIND_FRAMEWORK NEVER)
- SET(X11_INC_SEARCH_PATH
+ set(CMAKE_FIND_FRAMEWORK_SAVE ${CMAKE_FIND_FRAMEWORK})
+ set(CMAKE_FIND_FRAMEWORK NEVER)
+ set(X11_INC_SEARCH_PATH
/usr/pkg/xorg/include
/usr/X11R6/include
/usr/X11R7/include
@@ -70,358 +70,358 @@ IF (UNIX)
/opt/graphics/OpenGL/include
)
- SET(X11_LIB_SEARCH_PATH
+ set(X11_LIB_SEARCH_PATH
/usr/pkg/xorg/lib
/usr/X11R6/lib
/usr/X11R7/lib
/usr/openwin/lib
)
- FIND_PATH(X11_X11_INCLUDE_PATH X11/X.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xlib_INCLUDE_PATH X11/Xlib.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_X11_INCLUDE_PATH X11/X.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xlib_INCLUDE_PATH X11/Xlib.h ${X11_INC_SEARCH_PATH})
# Look for includes; keep the list sorted by name of the cmake *_INCLUDE_PATH
# variable (which doesn't need to match the include file name).
# Solaris lacks XKBrules.h, so we should skip kxkbd there.
- FIND_PATH(X11_ICE_INCLUDE_PATH X11/ICE/ICE.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_SM_INCLUDE_PATH X11/SM/SM.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xaccessrules_INCLUDE_PATH X11/extensions/XKBrules.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xaccessstr_INCLUDE_PATH X11/extensions/XKBstr.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xau_INCLUDE_PATH X11/Xauth.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xcomposite_INCLUDE_PATH X11/extensions/Xcomposite.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xcursor_INCLUDE_PATH X11/Xcursor/Xcursor.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xdamage_INCLUDE_PATH X11/extensions/Xdamage.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xdmcp_INCLUDE_PATH X11/Xdmcp.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_dpms_INCLUDE_PATH X11/extensions/dpms.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_xf86misc_INCLUDE_PATH X11/extensions/xf86misc.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_xf86vmode_INCLUDE_PATH X11/extensions/xf86vmode.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xfixes_INCLUDE_PATH X11/extensions/Xfixes.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xft_INCLUDE_PATH X11/Xft/Xft.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xi_INCLUDE_PATH X11/extensions/XInput.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xinerama_INCLUDE_PATH X11/extensions/Xinerama.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xinput_INCLUDE_PATH X11/extensions/XInput.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xkb_INCLUDE_PATH X11/extensions/XKB.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xkblib_INCLUDE_PATH X11/XKBlib.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xkbfile_INCLUDE_PATH X11/extensions/XKBfile.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xmu_INCLUDE_PATH X11/Xmu/Xmu.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xpm_INCLUDE_PATH X11/xpm.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_XTest_INCLUDE_PATH X11/extensions/XTest.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_XShm_INCLUDE_PATH X11/extensions/XShm.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xrandr_INCLUDE_PATH X11/extensions/Xrandr.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xrender_INCLUDE_PATH X11/extensions/Xrender.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_XRes_INCLUDE_PATH X11/extensions/XRes.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xscreensaver_INCLUDE_PATH X11/extensions/scrnsaver.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xshape_INCLUDE_PATH X11/extensions/shape.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xutil_INCLUDE_PATH X11/Xutil.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xt_INCLUDE_PATH X11/Intrinsic.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_Xv_INCLUDE_PATH X11/extensions/Xvlib.h ${X11_INC_SEARCH_PATH})
- FIND_PATH(X11_XSync_INCLUDE_PATH X11/extensions/sync.h ${X11_INC_SEARCH_PATH})
-
-
- FIND_LIBRARY(X11_X11_LIB X11 ${X11_LIB_SEARCH_PATH})
+ find_path(X11_ICE_INCLUDE_PATH X11/ICE/ICE.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_SM_INCLUDE_PATH X11/SM/SM.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xaccessrules_INCLUDE_PATH X11/extensions/XKBrules.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xaccessstr_INCLUDE_PATH X11/extensions/XKBstr.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xau_INCLUDE_PATH X11/Xauth.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xcomposite_INCLUDE_PATH X11/extensions/Xcomposite.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xcursor_INCLUDE_PATH X11/Xcursor/Xcursor.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xdamage_INCLUDE_PATH X11/extensions/Xdamage.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xdmcp_INCLUDE_PATH X11/Xdmcp.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_dpms_INCLUDE_PATH X11/extensions/dpms.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_xf86misc_INCLUDE_PATH X11/extensions/xf86misc.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_xf86vmode_INCLUDE_PATH X11/extensions/xf86vmode.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xfixes_INCLUDE_PATH X11/extensions/Xfixes.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xft_INCLUDE_PATH X11/Xft/Xft.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xi_INCLUDE_PATH X11/extensions/XInput.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xinerama_INCLUDE_PATH X11/extensions/Xinerama.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xinput_INCLUDE_PATH X11/extensions/XInput.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xkb_INCLUDE_PATH X11/extensions/XKB.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xkblib_INCLUDE_PATH X11/XKBlib.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xkbfile_INCLUDE_PATH X11/extensions/XKBfile.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xmu_INCLUDE_PATH X11/Xmu/Xmu.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xpm_INCLUDE_PATH X11/xpm.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_XTest_INCLUDE_PATH X11/extensions/XTest.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_XShm_INCLUDE_PATH X11/extensions/XShm.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xrandr_INCLUDE_PATH X11/extensions/Xrandr.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xrender_INCLUDE_PATH X11/extensions/Xrender.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_XRes_INCLUDE_PATH X11/extensions/XRes.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xscreensaver_INCLUDE_PATH X11/extensions/scrnsaver.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xshape_INCLUDE_PATH X11/extensions/shape.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xutil_INCLUDE_PATH X11/Xutil.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xt_INCLUDE_PATH X11/Intrinsic.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_Xv_INCLUDE_PATH X11/extensions/Xvlib.h ${X11_INC_SEARCH_PATH})
+ find_path(X11_XSync_INCLUDE_PATH X11/extensions/sync.h ${X11_INC_SEARCH_PATH})
+
+
+ find_library(X11_X11_LIB X11 ${X11_LIB_SEARCH_PATH})
# Find additional X libraries. Keep list sorted by library name.
- FIND_LIBRARY(X11_ICE_LIB ICE ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_SM_LIB SM ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_Xau_LIB Xau ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_Xcomposite_LIB Xcomposite ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_Xcursor_LIB Xcursor ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_Xdamage_LIB Xdamage ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_Xdmcp_LIB Xdmcp ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_Xext_LIB Xext ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_Xfixes_LIB Xfixes ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_Xft_LIB Xft ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_Xi_LIB Xi ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_Xinerama_LIB Xinerama ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_Xinput_LIB Xi ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_Xkbfile_LIB xkbfile ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_Xmu_LIB Xmu ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_Xpm_LIB Xpm ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_Xrandr_LIB Xrandr ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_Xrender_LIB Xrender ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_XRes_LIB XRes ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_Xscreensaver_LIB Xss ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_Xt_LIB Xt ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_XTest_LIB Xtst ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_Xv_LIB Xv ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_Xxf86misc_LIB Xxf86misc ${X11_LIB_SEARCH_PATH})
- FIND_LIBRARY(X11_Xxf86vm_LIB Xxf86vm ${X11_LIB_SEARCH_PATH})
-
- SET(X11_LIBRARY_DIR "")
- IF(X11_X11_LIB)
- GET_FILENAME_COMPONENT(X11_LIBRARY_DIR ${X11_X11_LIB} PATH)
- ENDIF(X11_X11_LIB)
-
- SET(X11_INCLUDE_DIR) # start with empty list
- IF(X11_X11_INCLUDE_PATH)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_X11_INCLUDE_PATH})
- ENDIF(X11_X11_INCLUDE_PATH)
-
- IF(X11_Xlib_INCLUDE_PATH)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xlib_INCLUDE_PATH})
- ENDIF(X11_Xlib_INCLUDE_PATH)
-
- IF(X11_Xutil_INCLUDE_PATH)
- SET(X11_Xutil_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xutil_INCLUDE_PATH})
- ENDIF(X11_Xutil_INCLUDE_PATH)
-
- IF(X11_Xshape_INCLUDE_PATH)
- SET(X11_Xshape_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xshape_INCLUDE_PATH})
- ENDIF(X11_Xshape_INCLUDE_PATH)
-
- SET(X11_LIBRARIES) # start with empty list
- IF(X11_X11_LIB)
- SET(X11_LIBRARIES ${X11_LIBRARIES} ${X11_X11_LIB})
- ENDIF(X11_X11_LIB)
-
- IF(X11_Xext_LIB)
- SET(X11_Xext_FOUND TRUE)
- SET(X11_LIBRARIES ${X11_LIBRARIES} ${X11_Xext_LIB})
- ENDIF(X11_Xext_LIB)
-
- IF(X11_Xt_LIB AND X11_Xt_INCLUDE_PATH)
- SET(X11_Xt_FOUND TRUE)
- ENDIF(X11_Xt_LIB AND X11_Xt_INCLUDE_PATH)
-
- IF(X11_Xft_LIB AND X11_Xft_INCLUDE_PATH)
- SET(X11_Xft_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xft_INCLUDE_PATH})
- ENDIF(X11_Xft_LIB AND X11_Xft_INCLUDE_PATH)
-
- IF(X11_Xv_LIB AND X11_Xv_INCLUDE_PATH)
- SET(X11_Xv_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xv_INCLUDE_PATH})
- ENDIF(X11_Xv_LIB AND X11_Xv_INCLUDE_PATH)
-
- IF (X11_Xau_LIB AND X11_Xau_INCLUDE_PATH)
- SET(X11_Xau_FOUND TRUE)
- ENDIF (X11_Xau_LIB AND X11_Xau_INCLUDE_PATH)
-
- IF (X11_Xdmcp_INCLUDE_PATH AND X11_Xdmcp_LIB)
- SET(X11_Xdmcp_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xdmcp_INCLUDE_PATH})
- ENDIF (X11_Xdmcp_INCLUDE_PATH AND X11_Xdmcp_LIB)
-
- IF (X11_Xaccessrules_INCLUDE_PATH AND X11_Xaccessstr_INCLUDE_PATH)
- SET(X11_Xaccess_FOUND TRUE)
- SET(X11_Xaccess_INCLUDE_PATH ${X11_Xaccessstr_INCLUDE_PATH})
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xaccess_INCLUDE_PATH})
- ENDIF (X11_Xaccessrules_INCLUDE_PATH AND X11_Xaccessstr_INCLUDE_PATH)
-
- IF (X11_Xpm_INCLUDE_PATH AND X11_Xpm_LIB)
- SET(X11_Xpm_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xpm_INCLUDE_PATH})
- ENDIF (X11_Xpm_INCLUDE_PATH AND X11_Xpm_LIB)
-
- IF (X11_Xcomposite_INCLUDE_PATH AND X11_Xcomposite_LIB)
- SET(X11_Xcomposite_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xcomposite_INCLUDE_PATH})
- ENDIF (X11_Xcomposite_INCLUDE_PATH AND X11_Xcomposite_LIB)
-
- IF (X11_Xdamage_INCLUDE_PATH AND X11_Xdamage_LIB)
- SET(X11_Xdamage_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xdamage_INCLUDE_PATH})
- ENDIF (X11_Xdamage_INCLUDE_PATH AND X11_Xdamage_LIB)
-
- IF (X11_XShm_INCLUDE_PATH)
- SET(X11_XShm_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_XShm_INCLUDE_PATH})
- ENDIF (X11_XShm_INCLUDE_PATH)
-
- IF (X11_XTest_INCLUDE_PATH AND X11_XTest_LIB)
- SET(X11_XTest_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_XTest_INCLUDE_PATH})
- ENDIF (X11_XTest_INCLUDE_PATH AND X11_XTest_LIB)
-
- IF (X11_Xi_INCLUDE_PATH AND X11_Xi_LIB)
- SET(X11_Xi_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xi_INCLUDE_PATH})
- ENDIF (X11_Xi_INCLUDE_PATH AND X11_Xi_LIB)
-
- IF (X11_Xinerama_INCLUDE_PATH AND X11_Xinerama_LIB)
- SET(X11_Xinerama_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xinerama_INCLUDE_PATH})
- ENDIF (X11_Xinerama_INCLUDE_PATH AND X11_Xinerama_LIB)
-
- IF (X11_Xfixes_INCLUDE_PATH AND X11_Xfixes_LIB)
- SET(X11_Xfixes_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xfixes_INCLUDE_PATH})
- ENDIF (X11_Xfixes_INCLUDE_PATH AND X11_Xfixes_LIB)
-
- IF (X11_Xrender_INCLUDE_PATH AND X11_Xrender_LIB)
- SET(X11_Xrender_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xrender_INCLUDE_PATH})
- ENDIF (X11_Xrender_INCLUDE_PATH AND X11_Xrender_LIB)
-
- IF (X11_XRes_INCLUDE_PATH AND X11_XRes_LIB)
- SET(X11_XRes_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_XRes_INCLUDE_PATH})
- ENDIF (X11_XRes_INCLUDE_PATH AND X11_XRes_LIB)
-
- IF (X11_Xrandr_INCLUDE_PATH AND X11_Xrandr_LIB)
- SET(X11_Xrandr_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xrandr_INCLUDE_PATH})
- ENDIF (X11_Xrandr_INCLUDE_PATH AND X11_Xrandr_LIB)
-
- IF (X11_xf86misc_INCLUDE_PATH AND X11_Xxf86misc_LIB)
- SET(X11_xf86misc_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_xf86misc_INCLUDE_PATH})
- ENDIF (X11_xf86misc_INCLUDE_PATH AND X11_Xxf86misc_LIB)
-
- IF (X11_xf86vmode_INCLUDE_PATH AND X11_Xxf86vm_LIB)
- SET(X11_xf86vmode_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_xf86vmode_INCLUDE_PATH})
- ENDIF (X11_xf86vmode_INCLUDE_PATH AND X11_Xxf86vm_LIB)
-
- IF (X11_Xcursor_INCLUDE_PATH AND X11_Xcursor_LIB)
- SET(X11_Xcursor_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xcursor_INCLUDE_PATH})
- ENDIF (X11_Xcursor_INCLUDE_PATH AND X11_Xcursor_LIB)
-
- IF (X11_Xscreensaver_INCLUDE_PATH AND X11_Xscreensaver_LIB)
- SET(X11_Xscreensaver_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xscreensaver_INCLUDE_PATH})
- ENDIF (X11_Xscreensaver_INCLUDE_PATH AND X11_Xscreensaver_LIB)
-
- IF (X11_dpms_INCLUDE_PATH)
- SET(X11_dpms_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_dpms_INCLUDE_PATH})
- ENDIF (X11_dpms_INCLUDE_PATH)
-
- IF (X11_Xkb_INCLUDE_PATH AND X11_Xkblib_INCLUDE_PATH AND X11_Xlib_INCLUDE_PATH)
- SET(X11_Xkb_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xkb_INCLUDE_PATH} )
- ENDIF (X11_Xkb_INCLUDE_PATH AND X11_Xkblib_INCLUDE_PATH AND X11_Xlib_INCLUDE_PATH)
-
- IF (X11_Xkbfile_INCLUDE_PATH AND X11_Xkbfile_LIB AND X11_Xlib_INCLUDE_PATH)
- SET(X11_Xkbfile_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xkbfile_INCLUDE_PATH} )
- ENDIF (X11_Xkbfile_INCLUDE_PATH AND X11_Xkbfile_LIB AND X11_Xlib_INCLUDE_PATH)
-
- IF (X11_Xmu_INCLUDE_PATH AND X11_Xmu_LIB)
- SET(X11_Xmu_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xmu_INCLUDE_PATH})
- ENDIF (X11_Xmu_INCLUDE_PATH AND X11_Xmu_LIB)
-
- IF (X11_Xinput_INCLUDE_PATH AND X11_Xinput_LIB)
- SET(X11_Xinput_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xinput_INCLUDE_PATH})
- ENDIF (X11_Xinput_INCLUDE_PATH AND X11_Xinput_LIB)
-
- IF (X11_XSync_INCLUDE_PATH)
- SET(X11_XSync_FOUND TRUE)
- SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_XSync_INCLUDE_PATH})
- ENDIF (X11_XSync_INCLUDE_PATH)
-
- IF(X11_ICE_LIB AND X11_ICE_INCLUDE_PATH)
- SET(X11_ICE_FOUND TRUE)
- ENDIF(X11_ICE_LIB AND X11_ICE_INCLUDE_PATH)
-
- IF(X11_SM_LIB AND X11_SM_INCLUDE_PATH)
- SET(X11_SM_FOUND TRUE)
- ENDIF(X11_SM_LIB AND X11_SM_INCLUDE_PATH)
+ find_library(X11_ICE_LIB ICE ${X11_LIB_SEARCH_PATH})
+ find_library(X11_SM_LIB SM ${X11_LIB_SEARCH_PATH})
+ find_library(X11_Xau_LIB Xau ${X11_LIB_SEARCH_PATH})
+ find_library(X11_Xcomposite_LIB Xcomposite ${X11_LIB_SEARCH_PATH})
+ find_library(X11_Xcursor_LIB Xcursor ${X11_LIB_SEARCH_PATH})
+ find_library(X11_Xdamage_LIB Xdamage ${X11_LIB_SEARCH_PATH})
+ find_library(X11_Xdmcp_LIB Xdmcp ${X11_LIB_SEARCH_PATH})
+ find_library(X11_Xext_LIB Xext ${X11_LIB_SEARCH_PATH})
+ find_library(X11_Xfixes_LIB Xfixes ${X11_LIB_SEARCH_PATH})
+ find_library(X11_Xft_LIB Xft ${X11_LIB_SEARCH_PATH})
+ find_library(X11_Xi_LIB Xi ${X11_LIB_SEARCH_PATH})
+ find_library(X11_Xinerama_LIB Xinerama ${X11_LIB_SEARCH_PATH})
+ find_library(X11_Xinput_LIB Xi ${X11_LIB_SEARCH_PATH})
+ find_library(X11_Xkbfile_LIB xkbfile ${X11_LIB_SEARCH_PATH})
+ find_library(X11_Xmu_LIB Xmu ${X11_LIB_SEARCH_PATH})
+ find_library(X11_Xpm_LIB Xpm ${X11_LIB_SEARCH_PATH})
+ find_library(X11_Xrandr_LIB Xrandr ${X11_LIB_SEARCH_PATH})
+ find_library(X11_Xrender_LIB Xrender ${X11_LIB_SEARCH_PATH})
+ find_library(X11_XRes_LIB XRes ${X11_LIB_SEARCH_PATH})
+ find_library(X11_Xscreensaver_LIB Xss ${X11_LIB_SEARCH_PATH})
+ find_library(X11_Xt_LIB Xt ${X11_LIB_SEARCH_PATH})
+ find_library(X11_XTest_LIB Xtst ${X11_LIB_SEARCH_PATH})
+ find_library(X11_Xv_LIB Xv ${X11_LIB_SEARCH_PATH})
+ find_library(X11_Xxf86misc_LIB Xxf86misc ${X11_LIB_SEARCH_PATH})
+ find_library(X11_Xxf86vm_LIB Xxf86vm ${X11_LIB_SEARCH_PATH})
+
+ set(X11_LIBRARY_DIR "")
+ if(X11_X11_LIB)
+ get_filename_component(X11_LIBRARY_DIR ${X11_X11_LIB} PATH)
+ endif(X11_X11_LIB)
+
+ set(X11_INCLUDE_DIR) # start with empty list
+ if(X11_X11_INCLUDE_PATH)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_X11_INCLUDE_PATH})
+ endif(X11_X11_INCLUDE_PATH)
+
+ if(X11_Xlib_INCLUDE_PATH)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xlib_INCLUDE_PATH})
+ endif(X11_Xlib_INCLUDE_PATH)
+
+ if(X11_Xutil_INCLUDE_PATH)
+ set(X11_Xutil_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xutil_INCLUDE_PATH})
+ endif(X11_Xutil_INCLUDE_PATH)
+
+ if(X11_Xshape_INCLUDE_PATH)
+ set(X11_Xshape_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xshape_INCLUDE_PATH})
+ endif(X11_Xshape_INCLUDE_PATH)
+
+ set(X11_LIBRARIES) # start with empty list
+ if(X11_X11_LIB)
+ set(X11_LIBRARIES ${X11_LIBRARIES} ${X11_X11_LIB})
+ endif(X11_X11_LIB)
+
+ if(X11_Xext_LIB)
+ set(X11_Xext_FOUND TRUE)
+ set(X11_LIBRARIES ${X11_LIBRARIES} ${X11_Xext_LIB})
+ endif(X11_Xext_LIB)
+
+ if(X11_Xt_LIB AND X11_Xt_INCLUDE_PATH)
+ set(X11_Xt_FOUND TRUE)
+ endif(X11_Xt_LIB AND X11_Xt_INCLUDE_PATH)
+
+ if(X11_Xft_LIB AND X11_Xft_INCLUDE_PATH)
+ set(X11_Xft_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xft_INCLUDE_PATH})
+ endif(X11_Xft_LIB AND X11_Xft_INCLUDE_PATH)
+
+ if(X11_Xv_LIB AND X11_Xv_INCLUDE_PATH)
+ set(X11_Xv_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xv_INCLUDE_PATH})
+ endif(X11_Xv_LIB AND X11_Xv_INCLUDE_PATH)
+
+ if (X11_Xau_LIB AND X11_Xau_INCLUDE_PATH)
+ set(X11_Xau_FOUND TRUE)
+ endif (X11_Xau_LIB AND X11_Xau_INCLUDE_PATH)
+
+ if (X11_Xdmcp_INCLUDE_PATH AND X11_Xdmcp_LIB)
+ set(X11_Xdmcp_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xdmcp_INCLUDE_PATH})
+ endif (X11_Xdmcp_INCLUDE_PATH AND X11_Xdmcp_LIB)
+
+ if (X11_Xaccessrules_INCLUDE_PATH AND X11_Xaccessstr_INCLUDE_PATH)
+ set(X11_Xaccess_FOUND TRUE)
+ set(X11_Xaccess_INCLUDE_PATH ${X11_Xaccessstr_INCLUDE_PATH})
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xaccess_INCLUDE_PATH})
+ endif (X11_Xaccessrules_INCLUDE_PATH AND X11_Xaccessstr_INCLUDE_PATH)
+
+ if (X11_Xpm_INCLUDE_PATH AND X11_Xpm_LIB)
+ set(X11_Xpm_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xpm_INCLUDE_PATH})
+ endif (X11_Xpm_INCLUDE_PATH AND X11_Xpm_LIB)
+
+ if (X11_Xcomposite_INCLUDE_PATH AND X11_Xcomposite_LIB)
+ set(X11_Xcomposite_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xcomposite_INCLUDE_PATH})
+ endif (X11_Xcomposite_INCLUDE_PATH AND X11_Xcomposite_LIB)
+
+ if (X11_Xdamage_INCLUDE_PATH AND X11_Xdamage_LIB)
+ set(X11_Xdamage_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xdamage_INCLUDE_PATH})
+ endif (X11_Xdamage_INCLUDE_PATH AND X11_Xdamage_LIB)
+
+ if (X11_XShm_INCLUDE_PATH)
+ set(X11_XShm_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_XShm_INCLUDE_PATH})
+ endif (X11_XShm_INCLUDE_PATH)
+
+ if (X11_XTest_INCLUDE_PATH AND X11_XTest_LIB)
+ set(X11_XTest_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_XTest_INCLUDE_PATH})
+ endif (X11_XTest_INCLUDE_PATH AND X11_XTest_LIB)
+
+ if (X11_Xi_INCLUDE_PATH AND X11_Xi_LIB)
+ set(X11_Xi_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xi_INCLUDE_PATH})
+ endif (X11_Xi_INCLUDE_PATH AND X11_Xi_LIB)
+
+ if (X11_Xinerama_INCLUDE_PATH AND X11_Xinerama_LIB)
+ set(X11_Xinerama_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xinerama_INCLUDE_PATH})
+ endif (X11_Xinerama_INCLUDE_PATH AND X11_Xinerama_LIB)
+
+ if (X11_Xfixes_INCLUDE_PATH AND X11_Xfixes_LIB)
+ set(X11_Xfixes_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xfixes_INCLUDE_PATH})
+ endif (X11_Xfixes_INCLUDE_PATH AND X11_Xfixes_LIB)
+
+ if (X11_Xrender_INCLUDE_PATH AND X11_Xrender_LIB)
+ set(X11_Xrender_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xrender_INCLUDE_PATH})
+ endif (X11_Xrender_INCLUDE_PATH AND X11_Xrender_LIB)
+
+ if (X11_XRes_INCLUDE_PATH AND X11_XRes_LIB)
+ set(X11_XRes_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_XRes_INCLUDE_PATH})
+ endif (X11_XRes_INCLUDE_PATH AND X11_XRes_LIB)
+
+ if (X11_Xrandr_INCLUDE_PATH AND X11_Xrandr_LIB)
+ set(X11_Xrandr_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xrandr_INCLUDE_PATH})
+ endif (X11_Xrandr_INCLUDE_PATH AND X11_Xrandr_LIB)
+
+ if (X11_xf86misc_INCLUDE_PATH AND X11_Xxf86misc_LIB)
+ set(X11_xf86misc_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_xf86misc_INCLUDE_PATH})
+ endif (X11_xf86misc_INCLUDE_PATH AND X11_Xxf86misc_LIB)
+
+ if (X11_xf86vmode_INCLUDE_PATH AND X11_Xxf86vm_LIB)
+ set(X11_xf86vmode_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_xf86vmode_INCLUDE_PATH})
+ endif (X11_xf86vmode_INCLUDE_PATH AND X11_Xxf86vm_LIB)
+
+ if (X11_Xcursor_INCLUDE_PATH AND X11_Xcursor_LIB)
+ set(X11_Xcursor_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xcursor_INCLUDE_PATH})
+ endif (X11_Xcursor_INCLUDE_PATH AND X11_Xcursor_LIB)
+
+ if (X11_Xscreensaver_INCLUDE_PATH AND X11_Xscreensaver_LIB)
+ set(X11_Xscreensaver_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xscreensaver_INCLUDE_PATH})
+ endif (X11_Xscreensaver_INCLUDE_PATH AND X11_Xscreensaver_LIB)
+
+ if (X11_dpms_INCLUDE_PATH)
+ set(X11_dpms_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_dpms_INCLUDE_PATH})
+ endif (X11_dpms_INCLUDE_PATH)
+
+ if (X11_Xkb_INCLUDE_PATH AND X11_Xkblib_INCLUDE_PATH AND X11_Xlib_INCLUDE_PATH)
+ set(X11_Xkb_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xkb_INCLUDE_PATH} )
+ endif (X11_Xkb_INCLUDE_PATH AND X11_Xkblib_INCLUDE_PATH AND X11_Xlib_INCLUDE_PATH)
+
+ if (X11_Xkbfile_INCLUDE_PATH AND X11_Xkbfile_LIB AND X11_Xlib_INCLUDE_PATH)
+ set(X11_Xkbfile_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xkbfile_INCLUDE_PATH} )
+ endif (X11_Xkbfile_INCLUDE_PATH AND X11_Xkbfile_LIB AND X11_Xlib_INCLUDE_PATH)
+
+ if (X11_Xmu_INCLUDE_PATH AND X11_Xmu_LIB)
+ set(X11_Xmu_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xmu_INCLUDE_PATH})
+ endif (X11_Xmu_INCLUDE_PATH AND X11_Xmu_LIB)
+
+ if (X11_Xinput_INCLUDE_PATH AND X11_Xinput_LIB)
+ set(X11_Xinput_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xinput_INCLUDE_PATH})
+ endif (X11_Xinput_INCLUDE_PATH AND X11_Xinput_LIB)
+
+ if (X11_XSync_INCLUDE_PATH)
+ set(X11_XSync_FOUND TRUE)
+ set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_XSync_INCLUDE_PATH})
+ endif (X11_XSync_INCLUDE_PATH)
+
+ if(X11_ICE_LIB AND X11_ICE_INCLUDE_PATH)
+ set(X11_ICE_FOUND TRUE)
+ endif(X11_ICE_LIB AND X11_ICE_INCLUDE_PATH)
+
+ if(X11_SM_LIB AND X11_SM_INCLUDE_PATH)
+ set(X11_SM_FOUND TRUE)
+ endif(X11_SM_LIB AND X11_SM_INCLUDE_PATH)
# Deprecated variable for backwards compatibility with CMake 1.4
- IF (X11_X11_INCLUDE_PATH AND X11_LIBRARIES)
- SET(X11_FOUND 1)
- ENDIF (X11_X11_INCLUDE_PATH AND X11_LIBRARIES)
+ if (X11_X11_INCLUDE_PATH AND X11_LIBRARIES)
+ set(X11_FOUND 1)
+ endif (X11_X11_INCLUDE_PATH AND X11_LIBRARIES)
- IF(X11_FOUND)
- INCLUDE(CheckFunctionExists)
- INCLUDE(CheckLibraryExists)
+ if(X11_FOUND)
+ include(CheckFunctionExists)
+ include(CheckLibraryExists)
# Translated from an autoconf-generated configure script.
# See libs.m4 in autoconf's m4 directory.
- IF($ENV{ISC} MATCHES "^yes$")
- SET(X11_X_EXTRA_LIBS -lnsl_s -linet)
- ELSE($ENV{ISC} MATCHES "^yes$")
- SET(X11_X_EXTRA_LIBS "")
+ if($ENV{ISC} MATCHES "^yes$")
+ set(X11_X_EXTRA_LIBS -lnsl_s -linet)
+ else($ENV{ISC} MATCHES "^yes$")
+ set(X11_X_EXTRA_LIBS "")
# See if XOpenDisplay in X11 works by itself.
CHECK_LIBRARY_EXISTS("${X11_LIBRARIES}" "XOpenDisplay" "${X11_LIBRARY_DIR}" X11_LIB_X11_SOLO)
- IF(NOT X11_LIB_X11_SOLO)
+ if(NOT X11_LIB_X11_SOLO)
# Find library needed for dnet_ntoa.
CHECK_LIBRARY_EXISTS("dnet" "dnet_ntoa" "" X11_LIB_DNET_HAS_DNET_NTOA)
- IF (X11_LIB_DNET_HAS_DNET_NTOA)
- SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -ldnet)
- ELSE (X11_LIB_DNET_HAS_DNET_NTOA)
+ if (X11_LIB_DNET_HAS_DNET_NTOA)
+ set (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -ldnet)
+ else (X11_LIB_DNET_HAS_DNET_NTOA)
CHECK_LIBRARY_EXISTS("dnet_stub" "dnet_ntoa" "" X11_LIB_DNET_STUB_HAS_DNET_NTOA)
- IF (X11_LIB_DNET_STUB_HAS_DNET_NTOA)
- SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -ldnet_stub)
- ENDIF (X11_LIB_DNET_STUB_HAS_DNET_NTOA)
- ENDIF (X11_LIB_DNET_HAS_DNET_NTOA)
- ENDIF(NOT X11_LIB_X11_SOLO)
+ if (X11_LIB_DNET_STUB_HAS_DNET_NTOA)
+ set (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -ldnet_stub)
+ endif (X11_LIB_DNET_STUB_HAS_DNET_NTOA)
+ endif (X11_LIB_DNET_HAS_DNET_NTOA)
+ endif(NOT X11_LIB_X11_SOLO)
# Find library needed for gethostbyname.
CHECK_FUNCTION_EXISTS("gethostbyname" CMAKE_HAVE_GETHOSTBYNAME)
- IF(NOT CMAKE_HAVE_GETHOSTBYNAME)
+ if(NOT CMAKE_HAVE_GETHOSTBYNAME)
CHECK_LIBRARY_EXISTS("nsl" "gethostbyname" "" CMAKE_LIB_NSL_HAS_GETHOSTBYNAME)
- IF (CMAKE_LIB_NSL_HAS_GETHOSTBYNAME)
- SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lnsl)
- ELSE (CMAKE_LIB_NSL_HAS_GETHOSTBYNAME)
+ if (CMAKE_LIB_NSL_HAS_GETHOSTBYNAME)
+ set (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lnsl)
+ else (CMAKE_LIB_NSL_HAS_GETHOSTBYNAME)
CHECK_LIBRARY_EXISTS("bsd" "gethostbyname" "" CMAKE_LIB_BSD_HAS_GETHOSTBYNAME)
- IF (CMAKE_LIB_BSD_HAS_GETHOSTBYNAME)
- SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lbsd)
- ENDIF (CMAKE_LIB_BSD_HAS_GETHOSTBYNAME)
- ENDIF (CMAKE_LIB_NSL_HAS_GETHOSTBYNAME)
- ENDIF(NOT CMAKE_HAVE_GETHOSTBYNAME)
+ if (CMAKE_LIB_BSD_HAS_GETHOSTBYNAME)
+ set (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lbsd)
+ endif (CMAKE_LIB_BSD_HAS_GETHOSTBYNAME)
+ endif (CMAKE_LIB_NSL_HAS_GETHOSTBYNAME)
+ endif(NOT CMAKE_HAVE_GETHOSTBYNAME)
# Find library needed for connect.
CHECK_FUNCTION_EXISTS("connect" CMAKE_HAVE_CONNECT)
- IF(NOT CMAKE_HAVE_CONNECT)
+ if(NOT CMAKE_HAVE_CONNECT)
CHECK_LIBRARY_EXISTS("socket" "connect" "" CMAKE_LIB_SOCKET_HAS_CONNECT)
- IF (CMAKE_LIB_SOCKET_HAS_CONNECT)
- SET (X11_X_EXTRA_LIBS -lsocket ${X11_X_EXTRA_LIBS})
- ENDIF (CMAKE_LIB_SOCKET_HAS_CONNECT)
- ENDIF(NOT CMAKE_HAVE_CONNECT)
+ if (CMAKE_LIB_SOCKET_HAS_CONNECT)
+ set (X11_X_EXTRA_LIBS -lsocket ${X11_X_EXTRA_LIBS})
+ endif (CMAKE_LIB_SOCKET_HAS_CONNECT)
+ endif(NOT CMAKE_HAVE_CONNECT)
# Find library needed for remove.
CHECK_FUNCTION_EXISTS("remove" CMAKE_HAVE_REMOVE)
- IF(NOT CMAKE_HAVE_REMOVE)
+ if(NOT CMAKE_HAVE_REMOVE)
CHECK_LIBRARY_EXISTS("posix" "remove" "" CMAKE_LIB_POSIX_HAS_REMOVE)
- IF (CMAKE_LIB_POSIX_HAS_REMOVE)
- SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lposix)
- ENDIF (CMAKE_LIB_POSIX_HAS_REMOVE)
- ENDIF(NOT CMAKE_HAVE_REMOVE)
+ if (CMAKE_LIB_POSIX_HAS_REMOVE)
+ set (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lposix)
+ endif (CMAKE_LIB_POSIX_HAS_REMOVE)
+ endif(NOT CMAKE_HAVE_REMOVE)
# Find library needed for shmat.
CHECK_FUNCTION_EXISTS("shmat" CMAKE_HAVE_SHMAT)
- IF(NOT CMAKE_HAVE_SHMAT)
+ if(NOT CMAKE_HAVE_SHMAT)
CHECK_LIBRARY_EXISTS("ipc" "shmat" "" CMAKE_LIB_IPS_HAS_SHMAT)
- IF (CMAKE_LIB_IPS_HAS_SHMAT)
- SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lipc)
- ENDIF (CMAKE_LIB_IPS_HAS_SHMAT)
- ENDIF(NOT CMAKE_HAVE_SHMAT)
- ENDIF($ENV{ISC} MATCHES "^yes$")
+ if (CMAKE_LIB_IPS_HAS_SHMAT)
+ set (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lipc)
+ endif (CMAKE_LIB_IPS_HAS_SHMAT)
+ endif(NOT CMAKE_HAVE_SHMAT)
+ endif($ENV{ISC} MATCHES "^yes$")
- IF (X11_ICE_FOUND)
+ if (X11_ICE_FOUND)
CHECK_LIBRARY_EXISTS("ICE" "IceConnectionNumber" "${X11_LIBRARY_DIR}"
CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER)
- IF(CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER)
- SET (X11_X_PRE_LIBS ${X11_ICE_LIB})
- IF(X11_SM_LIB)
- SET (X11_X_PRE_LIBS ${X11_SM_LIB} ${X11_X_PRE_LIBS})
- ENDIF(X11_SM_LIB)
- ENDIF(CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER)
- ENDIF (X11_ICE_FOUND)
+ if(CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER)
+ set (X11_X_PRE_LIBS ${X11_ICE_LIB})
+ if(X11_SM_LIB)
+ set (X11_X_PRE_LIBS ${X11_SM_LIB} ${X11_X_PRE_LIBS})
+ endif(X11_SM_LIB)
+ endif(CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER)
+ endif (X11_ICE_FOUND)
# Build the final list of libraries.
- SET(X11_LIBRARIES ${X11_X_PRE_LIBS} ${X11_LIBRARIES} ${X11_X_EXTRA_LIBS})
+ set(X11_LIBRARIES ${X11_X_PRE_LIBS} ${X11_LIBRARIES} ${X11_X_EXTRA_LIBS})
- INCLUDE(FindPackageMessage)
+ include(FindPackageMessage)
FIND_PACKAGE_MESSAGE(X11 "Found X11: ${X11_X11_LIB}"
"[${X11_X11_LIB}][${X11_INCLUDE_DIR}]")
- ELSE (X11_FOUND)
- IF (X11_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Could not find X11")
- ENDIF (X11_FIND_REQUIRED)
- ENDIF (X11_FOUND)
+ else (X11_FOUND)
+ if (X11_FIND_REQUIRED)
+ message(FATAL_ERROR "Could not find X11")
+ endif (X11_FIND_REQUIRED)
+ endif (X11_FOUND)
- MARK_AS_ADVANCED(
+ mark_as_advanced(
X11_X11_INCLUDE_PATH
X11_X11_LIB
X11_Xext_LIB
@@ -486,7 +486,7 @@ IF (UNIX)
X11_SM_INCLUDE_PATH
X11_XSync_INCLUDE_PATH
)
- SET(CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_SAVE})
-ENDIF (UNIX)
+ set(CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_SAVE})
+endif (UNIX)
# X11_FIND_REQUIRED_<component> could be checked too
diff --git a/Modules/FindXMLRPC.cmake b/Modules/FindXMLRPC.cmake
index eccfb487a6..0fae1d7183 100644
--- a/Modules/FindXMLRPC.cmake
+++ b/Modules/FindXMLRPC.cmake
@@ -10,7 +10,7 @@
# cgi-server CGI-based server
# abyss-server ABYSS-based server
# Typical usage:
-# FIND_PACKAGE(XMLRPC REQUIRED libwww-client)
+# find_package(XMLRPC REQUIRED libwww-client)
#=============================================================================
# Copyright 2001-2009 Kitware, Inc.
@@ -26,121 +26,121 @@
# License text for the above reference.)
# First find the config script from which to obtain other values.
-FIND_PROGRAM(XMLRPC_C_CONFIG NAMES xmlrpc-c-config)
+find_program(XMLRPC_C_CONFIG NAMES xmlrpc-c-config)
# Check whether we found anything.
-IF(XMLRPC_C_CONFIG)
- SET(XMLRPC_FOUND 1)
-ELSE(XMLRPC_C_CONFIG)
- SET(XMLRPC_FOUND 0)
-ENDIF(XMLRPC_C_CONFIG)
+if(XMLRPC_C_CONFIG)
+ set(XMLRPC_FOUND 1)
+else(XMLRPC_C_CONFIG)
+ set(XMLRPC_FOUND 0)
+endif(XMLRPC_C_CONFIG)
# Lookup the include directories needed for the components requested.
-IF(XMLRPC_FOUND)
+if(XMLRPC_FOUND)
# Use the newer EXECUTE_PROCESS command if it is available.
- IF(COMMAND EXECUTE_PROCESS)
- EXECUTE_PROCESS(
+ if(COMMAND EXECUTE_PROCESS)
+ execute_process(
COMMAND ${XMLRPC_C_CONFIG} ${XMLRPC_FIND_COMPONENTS} --cflags
OUTPUT_VARIABLE XMLRPC_C_CONFIG_CFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE
RESULT_VARIABLE XMLRPC_C_CONFIG_RESULT
)
- ELSE(COMMAND EXECUTE_PROCESS)
- EXEC_PROGRAM(${XMLRPC_C_CONFIG} ARGS "${XMLRPC_FIND_COMPONENTS} --cflags"
+ else(COMMAND EXECUTE_PROCESS)
+ exec_program(${XMLRPC_C_CONFIG} ARGS "${XMLRPC_FIND_COMPONENTS} --cflags"
OUTPUT_VARIABLE XMLRPC_C_CONFIG_CFLAGS
RETURN_VALUE XMLRPC_C_CONFIG_RESULT
)
- ENDIF(COMMAND EXECUTE_PROCESS)
+ endif(COMMAND EXECUTE_PROCESS)
# Parse the include flags.
- IF("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$")
+ if("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$")
# Convert the compile flags to a CMake list.
- STRING(REGEX REPLACE " +" ";"
+ string(REGEX REPLACE " +" ";"
XMLRPC_C_CONFIG_CFLAGS "${XMLRPC_C_CONFIG_CFLAGS}")
# Look for -I options.
- SET(XMLRPC_INCLUDE_DIRS)
- FOREACH(flag ${XMLRPC_C_CONFIG_CFLAGS})
- IF("${flag}" MATCHES "^-I")
- STRING(REGEX REPLACE "^-I" "" DIR "${flag}")
- FILE(TO_CMAKE_PATH "${DIR}" DIR)
- SET(XMLRPC_INCLUDE_DIRS ${XMLRPC_INCLUDE_DIRS} "${DIR}")
- ENDIF("${flag}" MATCHES "^-I")
- ENDFOREACH(flag)
- ELSE("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$")
- MESSAGE("Error running ${XMLRPC_C_CONFIG}: [${XMLRPC_C_CONFIG_RESULT}]")
- SET(XMLRPC_FOUND 0)
- ENDIF("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$")
-ENDIF(XMLRPC_FOUND)
+ set(XMLRPC_INCLUDE_DIRS)
+ foreach(flag ${XMLRPC_C_CONFIG_CFLAGS})
+ if("${flag}" MATCHES "^-I")
+ string(REGEX REPLACE "^-I" "" DIR "${flag}")
+ file(TO_CMAKE_PATH "${DIR}" DIR)
+ set(XMLRPC_INCLUDE_DIRS ${XMLRPC_INCLUDE_DIRS} "${DIR}")
+ endif("${flag}" MATCHES "^-I")
+ endforeach(flag)
+ else("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$")
+ message("Error running ${XMLRPC_C_CONFIG}: [${XMLRPC_C_CONFIG_RESULT}]")
+ set(XMLRPC_FOUND 0)
+ endif("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$")
+endif(XMLRPC_FOUND)
# Lookup the libraries needed for the components requested.
-IF(XMLRPC_FOUND)
+if(XMLRPC_FOUND)
# Use the newer EXECUTE_PROCESS command if it is available.
- IF(COMMAND EXECUTE_PROCESS)
- EXECUTE_PROCESS(
+ if(COMMAND EXECUTE_PROCESS)
+ execute_process(
COMMAND ${XMLRPC_C_CONFIG} ${XMLRPC_FIND_COMPONENTS} --libs
OUTPUT_VARIABLE XMLRPC_C_CONFIG_LIBS
OUTPUT_STRIP_TRAILING_WHITESPACE
RESULT_VARIABLE XMLRPC_C_CONFIG_RESULT
)
- ELSE(COMMAND EXECUTE_PROCESS)
- EXEC_PROGRAM(${XMLRPC_C_CONFIG} ARGS "${XMLRPC_FIND_COMPONENTS} --libs"
+ else(COMMAND EXECUTE_PROCESS)
+ exec_program(${XMLRPC_C_CONFIG} ARGS "${XMLRPC_FIND_COMPONENTS} --libs"
OUTPUT_VARIABLE XMLRPC_C_CONFIG_LIBS
RETURN_VALUE XMLRPC_C_CONFIG_RESULT
)
- ENDIF(COMMAND EXECUTE_PROCESS)
+ endif(COMMAND EXECUTE_PROCESS)
# Parse the library names and directories.
- IF("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$")
- STRING(REGEX REPLACE " +" ";"
+ if("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$")
+ string(REGEX REPLACE " +" ";"
XMLRPC_C_CONFIG_LIBS "${XMLRPC_C_CONFIG_LIBS}")
# Look for -L flags for directories and -l flags for library names.
- SET(XMLRPC_LIBRARY_DIRS)
- SET(XMLRPC_LIBRARY_NAMES)
- FOREACH(flag ${XMLRPC_C_CONFIG_LIBS})
- IF("${flag}" MATCHES "^-L")
- STRING(REGEX REPLACE "^-L" "" DIR "${flag}")
- FILE(TO_CMAKE_PATH "${DIR}" DIR)
- SET(XMLRPC_LIBRARY_DIRS ${XMLRPC_LIBRARY_DIRS} "${DIR}")
- ELSEIF("${flag}" MATCHES "^-l")
- STRING(REGEX REPLACE "^-l" "" NAME "${flag}")
- SET(XMLRPC_LIBRARY_NAMES ${XMLRPC_LIBRARY_NAMES} "${NAME}")
- ENDIF("${flag}" MATCHES "^-L")
- ENDFOREACH(flag)
+ set(XMLRPC_LIBRARY_DIRS)
+ set(XMLRPC_LIBRARY_NAMES)
+ foreach(flag ${XMLRPC_C_CONFIG_LIBS})
+ if("${flag}" MATCHES "^-L")
+ string(REGEX REPLACE "^-L" "" DIR "${flag}")
+ file(TO_CMAKE_PATH "${DIR}" DIR)
+ set(XMLRPC_LIBRARY_DIRS ${XMLRPC_LIBRARY_DIRS} "${DIR}")
+ elseif("${flag}" MATCHES "^-l")
+ string(REGEX REPLACE "^-l" "" NAME "${flag}")
+ set(XMLRPC_LIBRARY_NAMES ${XMLRPC_LIBRARY_NAMES} "${NAME}")
+ endif("${flag}" MATCHES "^-L")
+ endforeach(flag)
# Search for each library needed using the directories given.
- FOREACH(name ${XMLRPC_LIBRARY_NAMES})
+ foreach(name ${XMLRPC_LIBRARY_NAMES})
# Look for this library.
- FIND_LIBRARY(XMLRPC_${name}_LIBRARY
+ find_library(XMLRPC_${name}_LIBRARY
NAMES ${name}
HINTS ${XMLRPC_LIBRARY_DIRS}
)
- MARK_AS_ADVANCED(XMLRPC_${name}_LIBRARY)
+ mark_as_advanced(XMLRPC_${name}_LIBRARY)
# If any library is not found then the whole package is not found.
- IF(NOT XMLRPC_${name}_LIBRARY)
- SET(XMLRPC_FOUND 0)
- ENDIF(NOT XMLRPC_${name}_LIBRARY)
+ if(NOT XMLRPC_${name}_LIBRARY)
+ set(XMLRPC_FOUND 0)
+ endif(NOT XMLRPC_${name}_LIBRARY)
# Build an ordered list of all the libraries needed.
- SET(XMLRPC_LIBRARIES ${XMLRPC_LIBRARIES} "${XMLRPC_${name}_LIBRARY}")
- ENDFOREACH(name)
- ELSE("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$")
- MESSAGE("Error running ${XMLRPC_C_CONFIG}: [${XMLRPC_C_CONFIG_RESULT}]")
- SET(XMLRPC_FOUND 0)
- ENDIF("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$")
-ENDIF(XMLRPC_FOUND)
+ set(XMLRPC_LIBRARIES ${XMLRPC_LIBRARIES} "${XMLRPC_${name}_LIBRARY}")
+ endforeach(name)
+ else("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$")
+ message("Error running ${XMLRPC_C_CONFIG}: [${XMLRPC_C_CONFIG_RESULT}]")
+ set(XMLRPC_FOUND 0)
+ endif("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$")
+endif(XMLRPC_FOUND)
# Report the results.
-IF(NOT XMLRPC_FOUND)
- SET(XMLRPC_DIR_MESSAGE
+if(NOT XMLRPC_FOUND)
+ set(XMLRPC_DIR_MESSAGE
"XMLRPC was not found. Make sure the entries XMLRPC_* are set.")
- IF(NOT XMLRPC_FIND_QUIETLY)
- MESSAGE(STATUS "${XMLRPC_DIR_MESSAGE}")
- ELSE(NOT XMLRPC_FIND_QUIETLY)
- IF(XMLRPC_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "${XMLRPC_DIR_MESSAGE}")
- ENDIF(XMLRPC_FIND_REQUIRED)
- ENDIF(NOT XMLRPC_FIND_QUIETLY)
-ENDIF(NOT XMLRPC_FOUND)
+ if(NOT XMLRPC_FIND_QUIETLY)
+ message(STATUS "${XMLRPC_DIR_MESSAGE}")
+ else(NOT XMLRPC_FIND_QUIETLY)
+ if(XMLRPC_FIND_REQUIRED)
+ message(FATAL_ERROR "${XMLRPC_DIR_MESSAGE}")
+ endif(XMLRPC_FIND_REQUIRED)
+ endif(NOT XMLRPC_FIND_QUIETLY)
+endif(NOT XMLRPC_FOUND)
diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake
index e42b5a416f..6b3c4cf944 100644
--- a/Modules/FindZLIB.cmake
+++ b/Modules/FindZLIB.cmake
@@ -34,59 +34,59 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-SET(_ZLIB_SEARCHES)
+set(_ZLIB_SEARCHES)
# Search ZLIB_ROOT first if it is set.
-IF(ZLIB_ROOT)
- SET(_ZLIB_SEARCH_ROOT PATHS ${ZLIB_ROOT} NO_DEFAULT_PATH)
- LIST(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_ROOT)
-ENDIF()
+if(ZLIB_ROOT)
+ set(_ZLIB_SEARCH_ROOT PATHS ${ZLIB_ROOT} NO_DEFAULT_PATH)
+ list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_ROOT)
+endif()
# Normal search.
-SET(_ZLIB_SEARCH_NORMAL
+set(_ZLIB_SEARCH_NORMAL
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]"
"$ENV{PROGRAMFILES}/zlib"
)
-LIST(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_NORMAL)
+list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_NORMAL)
-SET(ZLIB_NAMES z zlib zdll zlib1 zlibd zlibd1)
+set(ZLIB_NAMES z zlib zdll zlib1 zlibd zlibd1)
# Try each search configuration.
-FOREACH(search ${_ZLIB_SEARCHES})
- FIND_PATH(ZLIB_INCLUDE_DIR NAMES zlib.h ${${search}} PATH_SUFFIXES include)
- FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES lib)
-ENDFOREACH()
+foreach(search ${_ZLIB_SEARCHES})
+ find_path(ZLIB_INCLUDE_DIR NAMES zlib.h ${${search}} PATH_SUFFIXES include)
+ find_library(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES lib)
+endforeach()
-MARK_AS_ADVANCED(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
+mark_as_advanced(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-IF(ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h")
- FILE(STRINGS "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_H REGEX "^#define ZLIB_VERSION \"[^\"]*\"$")
+if(ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h")
+ file(STRINGS "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_H REGEX "^#define ZLIB_VERSION \"[^\"]*\"$")
- STRING(REGEX REPLACE "^.*ZLIB_VERSION \"([0-9]+).*$" "\\1" ZLIB_VERSION_MAJOR "${ZLIB_H}")
- STRING(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_MINOR "${ZLIB_H}")
- STRING(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_PATCH "${ZLIB_H}")
- SET(ZLIB_VERSION_STRING "${ZLIB_VERSION_MAJOR}.${ZLIB_VERSION_MINOR}.${ZLIB_VERSION_PATCH}")
+ string(REGEX REPLACE "^.*ZLIB_VERSION \"([0-9]+).*$" "\\1" ZLIB_VERSION_MAJOR "${ZLIB_H}")
+ string(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_MINOR "${ZLIB_H}")
+ string(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_PATCH "${ZLIB_H}")
+ set(ZLIB_VERSION_STRING "${ZLIB_VERSION_MAJOR}.${ZLIB_VERSION_MINOR}.${ZLIB_VERSION_PATCH}")
# only append a TWEAK version if it exists:
- SET(ZLIB_VERSION_TWEAK "")
- IF( "${ZLIB_H}" MATCHES "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+).*$")
- SET(ZLIB_VERSION_TWEAK "${CMAKE_MATCH_1}")
- SET(ZLIB_VERSION_STRING "${ZLIB_VERSION_STRING}.${ZLIB_VERSION_TWEAK}")
- ENDIF( "${ZLIB_H}" MATCHES "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+).*$")
+ set(ZLIB_VERSION_TWEAK "")
+ if( "${ZLIB_H}" MATCHES "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+).*$")
+ set(ZLIB_VERSION_TWEAK "${CMAKE_MATCH_1}")
+ set(ZLIB_VERSION_STRING "${ZLIB_VERSION_STRING}.${ZLIB_VERSION_TWEAK}")
+ endif( "${ZLIB_H}" MATCHES "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+).*$")
- SET(ZLIB_MAJOR_VERSION "${ZLIB_VERSION_MAJOR}")
- SET(ZLIB_MINOR_VERSION "${ZLIB_VERSION_MINOR}")
- SET(ZLIB_PATCH_VERSION "${ZLIB_VERSION_PATCH}")
-ENDIF()
+ set(ZLIB_MAJOR_VERSION "${ZLIB_VERSION_MAJOR}")
+ set(ZLIB_MINOR_VERSION "${ZLIB_VERSION_MINOR}")
+ set(ZLIB_PATCH_VERSION "${ZLIB_VERSION_PATCH}")
+endif()
# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_LIBRARY ZLIB_INCLUDE_DIR
VERSION_VAR ZLIB_VERSION_STRING)
-IF(ZLIB_FOUND)
- SET(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
- SET(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
-ENDIF()
+if(ZLIB_FOUND)
+ set(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
+ set(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
+endif()
diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
index bf45dc6164..b1a17a89aa 100644
--- a/Modules/FindwxWidgets.cmake
+++ b/Modules/FindwxWidgets.cmake
@@ -4,7 +4,7 @@
# modules that you will use, you need to name them as components to
# the package:
#
-# FIND_PACKAGE(wxWidgets COMPONENTS core base ...)
+# find_package(wxWidgets COMPONENTS core base ...)
#
# There are two search branches: a windows style and a unix style. For
# windows, the following variables are searched for and set to
@@ -38,7 +38,7 @@
# example, to use the base toolkit found in the /usr/local path, set
# the variable (before calling the FIND_PACKAGE command) as such:
#
-# SET(wxWidgets_CONFIG_OPTIONS --toolkit=base --prefix=/usr)
+# set(wxWidgets_CONFIG_OPTIONS --toolkit=base --prefix=/usr)
#
# The following are set after the configuration is done for both
# windows and unix style:
@@ -62,18 +62,18 @@
#
# Sample usage:
# # Note that for MinGW users the order of libs is important!
-# FIND_PACKAGE(wxWidgets COMPONENTS net gl core base)
-# IF(wxWidgets_FOUND)
-# INCLUDE(${wxWidgets_USE_FILE})
+# find_package(wxWidgets COMPONENTS net gl core base)
+# if(wxWidgets_FOUND)
+# include(${wxWidgets_USE_FILE})
# # and for each of your dependent executable/library targets:
-# TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES})
-# ENDIF(wxWidgets_FOUND)
+# target_link_libraries(<YourTarget> ${wxWidgets_LIBRARIES})
+# endif(wxWidgets_FOUND)
#
# If wxWidgets is required (i.e., not an optional part):
-# FIND_PACKAGE(wxWidgets REQUIRED net gl core base)
-# INCLUDE(${wxWidgets_USE_FILE})
+# find_package(wxWidgets REQUIRED net gl core base)
+# include(${wxWidgets_USE_FILE})
# # and for each of your dependent executable/library targets:
-# TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES})
+# target_link_libraries(<YourTarget> ${wxWidgets_LIBRARIES})
#=============================================================================
# Copyright 2004-2009 Kitware, Inc.
@@ -94,7 +94,7 @@
# Remember to connect back to the upper text.
# Sample usage with monolithic wx build:
#
-# FIND_PACKAGE(wxWidgets COMPONENTS mono)
+# find_package(wxWidgets COMPONENTS mono)
# ...
# NOTES
@@ -143,21 +143,21 @@
#
# Helper macro to control the debugging output globally. There are
# two versions for controlling how verbose your output should be.
-MACRO(DBG_MSG _MSG)
-# MESSAGE(STATUS
+macro(DBG_MSG _MSG)
+# message(STATUS
# "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}")
-ENDMACRO(DBG_MSG)
-MACRO(DBG_MSG_V _MSG)
-# MESSAGE(STATUS
+endmacro(DBG_MSG)
+macro(DBG_MSG_V _MSG)
+# message(STATUS
# "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}")
-ENDMACRO(DBG_MSG_V)
+endmacro(DBG_MSG_V)
# Clear return values in case the module is loaded more than once.
-SET(wxWidgets_FOUND FALSE)
-SET(wxWidgets_INCLUDE_DIRS "")
-SET(wxWidgets_LIBRARIES "")
-SET(wxWidgets_LIBRARY_DIRS "")
-SET(wxWidgets_CXX_FLAGS "")
+set(wxWidgets_FOUND FALSE)
+set(wxWidgets_INCLUDE_DIRS "")
+set(wxWidgets_LIBRARIES "")
+set(wxWidgets_LIBRARY_DIRS "")
+set(wxWidgets_CXX_FLAGS "")
# Using SYSTEM with INCLUDE_DIRECTORIES in conjunction with wxWidgets on
# the Mac produces compiler errors. Set wxWidgets_INCLUDE_DIRS_NO_SYSTEM
@@ -167,9 +167,9 @@ SET(wxWidgets_CXX_FLAGS "")
# http://www.cmake.org/pipermail/cmake/2008-April/021115.html
# http://www.cmake.org/pipermail/cmake/2008-April/021146.html
#
-IF(APPLE OR CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD")
- SET(wxWidgets_INCLUDE_DIRS_NO_SYSTEM 1)
-ENDIF()
+if(APPLE OR CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD")
+ set(wxWidgets_INCLUDE_DIRS_NO_SYSTEM 1)
+endif()
# DEPRECATED: This is a patch to support the DEPRECATED use of
# wxWidgets_USE_LIBS.
@@ -177,9 +177,9 @@ ENDIF()
# If wxWidgets_USE_LIBS is set:
# - if using <components>, then override wxWidgets_USE_LIBS
# - else set wxWidgets_FIND_COMPONENTS to wxWidgets_USE_LIBS
-IF(wxWidgets_USE_LIBS AND NOT wxWidgets_FIND_COMPONENTS)
- SET(wxWidgets_FIND_COMPONENTS ${wxWidgets_USE_LIBS})
-ENDIF(wxWidgets_USE_LIBS AND NOT wxWidgets_FIND_COMPONENTS)
+if(wxWidgets_USE_LIBS AND NOT wxWidgets_FIND_COMPONENTS)
+ set(wxWidgets_FIND_COMPONENTS ${wxWidgets_USE_LIBS})
+endif(wxWidgets_USE_LIBS AND NOT wxWidgets_FIND_COMPONENTS)
DBG_MSG("wxWidgets_FIND_COMPONENTS : ${wxWidgets_FIND_COMPONENTS}")
# Add the convenience use file if available.
@@ -187,50 +187,50 @@ DBG_MSG("wxWidgets_FIND_COMPONENTS : ${wxWidgets_FIND_COMPONENTS}")
# Get dir of this file which may reside in:
# - CMAKE_MAKE_ROOT/Modules on CMake installation
# - CMAKE_MODULE_PATH if user prefers his own specialized version
-SET(wxWidgets_USE_FILE "")
-GET_FILENAME_COMPONENT(
+set(wxWidgets_USE_FILE "")
+get_filename_component(
wxWidgets_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
# Prefer an existing customized version, but the user might override
# the FindwxWidgets module and not the UsewxWidgets one.
-IF(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake")
- SET(wxWidgets_USE_FILE
+if(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake")
+ set(wxWidgets_USE_FILE
"${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake")
-ELSE(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake")
- SET(wxWidgets_USE_FILE UsewxWidgets)
-ENDIF(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake")
+else(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake")
+ set(wxWidgets_USE_FILE UsewxWidgets)
+endif(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake")
#=====================================================================
#=====================================================================
-IF(WIN32 AND NOT CYGWIN AND NOT MSYS)
- SET(wxWidgets_FIND_STYLE "win32")
-ELSE(WIN32 AND NOT CYGWIN AND NOT MSYS)
- IF(UNIX OR MSYS)
- SET(wxWidgets_FIND_STYLE "unix")
- ENDIF(UNIX OR MSYS)
-ENDIF(WIN32 AND NOT CYGWIN AND NOT MSYS)
+if(WIN32 AND NOT CYGWIN AND NOT MSYS)
+ set(wxWidgets_FIND_STYLE "win32")
+else(WIN32 AND NOT CYGWIN AND NOT MSYS)
+ if(UNIX OR MSYS)
+ set(wxWidgets_FIND_STYLE "unix")
+ endif(UNIX OR MSYS)
+endif(WIN32 AND NOT CYGWIN AND NOT MSYS)
#=====================================================================
# WIN32_FIND_STYLE
#=====================================================================
-IF(wxWidgets_FIND_STYLE STREQUAL "win32")
+if(wxWidgets_FIND_STYLE STREQUAL "win32")
# Useful common wx libs needed by almost all components.
- SET(wxWidgets_COMMON_LIBRARIES png tiff jpeg zlib regex expat)
+ set(wxWidgets_COMMON_LIBRARIES png tiff jpeg zlib regex expat)
- # DEPRECATED: Use FIND_PACKAGE(wxWidgets COMPONENTS mono) instead.
- IF(NOT wxWidgets_FIND_COMPONENTS)
- IF(wxWidgets_USE_MONOLITHIC)
- SET(wxWidgets_FIND_COMPONENTS mono)
- ELSE(wxWidgets_USE_MONOLITHIC)
- SET(wxWidgets_FIND_COMPONENTS core base) # this is default
- ENDIF(wxWidgets_USE_MONOLITHIC)
- ENDIF(NOT wxWidgets_FIND_COMPONENTS)
+ # DEPRECATED: Use find_package(wxWidgets COMPONENTS mono) instead.
+ if(NOT wxWidgets_FIND_COMPONENTS)
+ if(wxWidgets_USE_MONOLITHIC)
+ set(wxWidgets_FIND_COMPONENTS mono)
+ else(wxWidgets_USE_MONOLITHIC)
+ set(wxWidgets_FIND_COMPONENTS core base) # this is default
+ endif(wxWidgets_USE_MONOLITHIC)
+ endif(NOT wxWidgets_FIND_COMPONENTS)
# Add the common (usually required libs) unless
# wxWidgets_EXCLUDE_COMMON_LIBRARIES has been set.
- IF(NOT wxWidgets_EXCLUDE_COMMON_LIBRARIES)
- LIST(APPEND wxWidgets_FIND_COMPONENTS
+ if(NOT wxWidgets_EXCLUDE_COMMON_LIBRARIES)
+ list(APPEND wxWidgets_FIND_COMPONENTS
${wxWidgets_COMMON_LIBRARIES})
- ENDIF(NOT wxWidgets_EXCLUDE_COMMON_LIBRARIES)
+ endif(NOT wxWidgets_EXCLUDE_COMMON_LIBRARIES)
#-------------------------------------------------------------------
# WIN32: Helper MACROS
@@ -240,19 +240,19 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
# if _CONFIGURATION = mswunivud, then _UNV=univ, _UCD=u _DBG=d
# if _CONFIGURATION = mswu, then _UNV="", _UCD=u _DBG=""
#
- MACRO(WX_GET_NAME_COMPONENTS _CONFIGURATION _UNV _UCD _DBG)
- STRING(REGEX MATCH "univ" ${_UNV} "${_CONFIGURATION}")
- STRING(REGEX REPLACE "msw.*(u)[d]*$" "u" ${_UCD} "${_CONFIGURATION}")
- IF(${_UCD} STREQUAL ${_CONFIGURATION})
- SET(${_UCD} "")
- ENDIF(${_UCD} STREQUAL ${_CONFIGURATION})
- STRING(REGEX MATCH "d$" ${_DBG} "${_CONFIGURATION}")
- ENDMACRO(WX_GET_NAME_COMPONENTS)
+ macro(WX_GET_NAME_COMPONENTS _CONFIGURATION _UNV _UCD _DBG)
+ string(REGEX MATCH "univ" ${_UNV} "${_CONFIGURATION}")
+ string(REGEX REPLACE "msw.*(u)[d]*$" "u" ${_UCD} "${_CONFIGURATION}")
+ if(${_UCD} STREQUAL ${_CONFIGURATION})
+ set(${_UCD} "")
+ endif(${_UCD} STREQUAL ${_CONFIGURATION})
+ string(REGEX MATCH "d$" ${_DBG} "${_CONFIGURATION}")
+ endmacro(WX_GET_NAME_COMPONENTS)
#
# Find libraries associated to a configuration.
#
- MACRO(WX_FIND_LIBS _UNV _UCD _DBG)
+ macro(WX_FIND_LIBS _UNV _UCD _DBG)
DBG_MSG_V("m_unv = ${_UNV}")
DBG_MSG_V("m_ucd = ${_UCD}")
DBG_MSG_V("m_dbg = ${_DBG}")
@@ -260,19 +260,19 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
# FIXME: What if both regex libs are available. regex should be
# found outside the loop and only wx${LIB}${_UCD}${_DBG}.
# Find wxWidgets common libraries.
- FOREACH(LIB ${wxWidgets_COMMON_LIBRARIES} scintilla)
- FIND_LIBRARY(WX_${LIB}${_DBG}
+ foreach(LIB ${wxWidgets_COMMON_LIBRARIES} scintilla)
+ find_library(WX_${LIB}${_DBG}
NAMES
wx${LIB}${_UCD}${_DBG} # for regex
wx${LIB}${_DBG}
PATHS ${WX_LIB_DIR}
NO_DEFAULT_PATH
)
- MARK_AS_ADVANCED(WX_${LIB}${_DBG})
- ENDFOREACH(LIB)
+ mark_as_advanced(WX_${LIB}${_DBG})
+ endforeach(LIB)
# Find wxWidgets multilib base libraries.
- FIND_LIBRARY(WX_base${_DBG}
+ find_library(WX_base${_DBG}
NAMES
wxbase29${_UCD}${_DBG}
wxbase28${_UCD}${_DBG}
@@ -282,9 +282,9 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
PATHS ${WX_LIB_DIR}
NO_DEFAULT_PATH
)
- MARK_AS_ADVANCED(WX_base${_DBG})
- FOREACH(LIB net odbc xml)
- FIND_LIBRARY(WX_${LIB}${_DBG}
+ mark_as_advanced(WX_base${_DBG})
+ foreach(LIB net odbc xml)
+ find_library(WX_${LIB}${_DBG}
NAMES
wxbase29${_UCD}${_DBG}_${LIB}
wxbase28${_UCD}${_DBG}_${LIB}
@@ -294,11 +294,11 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
PATHS ${WX_LIB_DIR}
NO_DEFAULT_PATH
)
- MARK_AS_ADVANCED(WX_${LIB}${_DBG})
- ENDFOREACH(LIB)
+ mark_as_advanced(WX_${LIB}${_DBG})
+ endforeach(LIB)
# Find wxWidgets monolithic library.
- FIND_LIBRARY(WX_mono${_DBG}
+ find_library(WX_mono${_DBG}
NAMES
wxmsw${_UNV}29${_UCD}${_DBG}
wxmsw${_UNV}28${_UCD}${_DBG}
@@ -308,12 +308,12 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
PATHS ${WX_LIB_DIR}
NO_DEFAULT_PATH
)
- MARK_AS_ADVANCED(WX_mono${_DBG})
+ mark_as_advanced(WX_mono${_DBG})
# Find wxWidgets multilib libraries.
- FOREACH(LIB core adv aui html media xrc dbgrid gl qa richtext
+ foreach(LIB core adv aui html media xrc dbgrid gl qa richtext
stc ribbon propgrid webview)
- FIND_LIBRARY(WX_${LIB}${_DBG}
+ find_library(WX_${LIB}${_DBG}
NAMES
wxmsw${_UNV}29${_UCD}${_DBG}_${LIB}
wxmsw${_UNV}28${_UCD}${_DBG}_${LIB}
@@ -323,102 +323,102 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
PATHS ${WX_LIB_DIR}
NO_DEFAULT_PATH
)
- MARK_AS_ADVANCED(WX_${LIB}${_DBG})
- ENDFOREACH(LIB)
- ENDMACRO(WX_FIND_LIBS)
+ mark_as_advanced(WX_${LIB}${_DBG})
+ endforeach(LIB)
+ endmacro(WX_FIND_LIBS)
#
# Clear all library paths, so that FIND_LIBRARY refinds them.
#
# Clear a lib, reset its found flag, and mark as advanced.
- MACRO(WX_CLEAR_LIB _LIB)
- SET(${_LIB} "${_LIB}-NOTFOUND" CACHE FILEPATH "Cleared." FORCE)
- SET(${_LIB}_FOUND FALSE)
- MARK_AS_ADVANCED(${_LIB})
- ENDMACRO(WX_CLEAR_LIB)
+ macro(WX_CLEAR_LIB _LIB)
+ set(${_LIB} "${_LIB}-NOTFOUND" CACHE FILEPATH "Cleared." FORCE)
+ set(${_LIB}_FOUND FALSE)
+ mark_as_advanced(${_LIB})
+ endmacro(WX_CLEAR_LIB)
# Clear all debug or release library paths (arguments are "d" or "").
- MACRO(WX_CLEAR_ALL_LIBS _DBG)
+ macro(WX_CLEAR_ALL_LIBS _DBG)
# Clear wxWidgets common libraries.
- FOREACH(LIB ${wxWidgets_COMMON_LIBRARIES} scintilla)
+ foreach(LIB ${wxWidgets_COMMON_LIBRARIES} scintilla)
WX_CLEAR_LIB(WX_${LIB}${_DBG})
- ENDFOREACH(LIB)
+ endforeach(LIB)
# Clear wxWidgets multilib base libraries.
WX_CLEAR_LIB(WX_base${_DBG})
- FOREACH(LIB net odbc xml)
+ foreach(LIB net odbc xml)
WX_CLEAR_LIB(WX_${LIB}${_DBG})
- ENDFOREACH(LIB)
+ endforeach(LIB)
# Clear wxWidgets monolithic library.
WX_CLEAR_LIB(WX_mono${_DBG})
# Clear wxWidgets multilib libraries.
- FOREACH(LIB core adv aui html media xrc dbgrid gl qa richtext
+ foreach(LIB core adv aui html media xrc dbgrid gl qa richtext
stc ribbon propgrid)
WX_CLEAR_LIB(WX_${LIB}${_DBG})
- ENDFOREACH(LIB)
- ENDMACRO(WX_CLEAR_ALL_LIBS)
+ endforeach(LIB)
+ endmacro(WX_CLEAR_ALL_LIBS)
# Clear all wxWidgets debug libraries.
- MACRO(WX_CLEAR_ALL_DBG_LIBS)
+ macro(WX_CLEAR_ALL_DBG_LIBS)
WX_CLEAR_ALL_LIBS("d")
- ENDMACRO(WX_CLEAR_ALL_DBG_LIBS)
+ endmacro(WX_CLEAR_ALL_DBG_LIBS)
# Clear all wxWidgets release libraries.
- MACRO(WX_CLEAR_ALL_REL_LIBS)
+ macro(WX_CLEAR_ALL_REL_LIBS)
WX_CLEAR_ALL_LIBS("")
- ENDMACRO(WX_CLEAR_ALL_REL_LIBS)
+ endmacro(WX_CLEAR_ALL_REL_LIBS)
#
# Set the wxWidgets_LIBRARIES variable.
# Also, Sets output variable wxWidgets_FOUND to FALSE if it fails.
#
- MACRO(WX_SET_LIBRARIES _LIBS _DBG)
+ macro(WX_SET_LIBRARIES _LIBS _DBG)
DBG_MSG_V("Looking for ${${_LIBS}}")
- IF(WX_USE_REL_AND_DBG)
- FOREACH(LIB ${${_LIBS}})
+ if(WX_USE_REL_AND_DBG)
+ foreach(LIB ${${_LIBS}})
DBG_MSG_V("Searching for ${LIB} and ${LIB}d")
DBG_MSG_V("WX_${LIB} : ${WX_${LIB}}")
DBG_MSG_V("WX_${LIB}d : ${WX_${LIB}d}")
- IF(WX_${LIB} AND WX_${LIB}d)
+ if(WX_${LIB} AND WX_${LIB}d)
DBG_MSG_V("Found ${LIB} and ${LIB}d")
- LIST(APPEND wxWidgets_LIBRARIES
+ list(APPEND wxWidgets_LIBRARIES
debug ${WX_${LIB}d} optimized ${WX_${LIB}}
)
- ELSE(WX_${LIB} AND WX_${LIB}d)
+ else(WX_${LIB} AND WX_${LIB}d)
DBG_MSG_V("- not found due to missing WX_${LIB}=${WX_${LIB}} or WX_${LIB}d=${WX_${LIB}d}")
- SET(wxWidgets_FOUND FALSE)
- ENDIF(WX_${LIB} AND WX_${LIB}d)
- ENDFOREACH(LIB)
- ELSE(WX_USE_REL_AND_DBG)
- FOREACH(LIB ${${_LIBS}})
+ set(wxWidgets_FOUND FALSE)
+ endif(WX_${LIB} AND WX_${LIB}d)
+ endforeach(LIB)
+ else(WX_USE_REL_AND_DBG)
+ foreach(LIB ${${_LIBS}})
DBG_MSG_V("Searching for ${LIB}${_DBG}")
DBG_MSG_V("WX_${LIB}${_DBG} : ${WX_${LIB}${_DBG}}")
- IF(WX_${LIB}${_DBG})
+ if(WX_${LIB}${_DBG})
DBG_MSG_V("Found ${LIB}${_DBG}")
- LIST(APPEND wxWidgets_LIBRARIES ${WX_${LIB}${_DBG}})
- ELSE(WX_${LIB}${_DBG})
+ list(APPEND wxWidgets_LIBRARIES ${WX_${LIB}${_DBG}})
+ else(WX_${LIB}${_DBG})
DBG_MSG_V(
"- not found due to missing WX_${LIB}${_DBG}=${WX_${LIB}${_DBG}}")
- SET(wxWidgets_FOUND FALSE)
- ENDIF(WX_${LIB}${_DBG})
- ENDFOREACH(LIB)
- ENDIF(WX_USE_REL_AND_DBG)
+ set(wxWidgets_FOUND FALSE)
+ endif(WX_${LIB}${_DBG})
+ endforeach(LIB)
+ endif(WX_USE_REL_AND_DBG)
DBG_MSG_V("OpenGL")
- LIST(FIND ${_LIBS} gl WX_USE_GL)
- IF(NOT WX_USE_GL EQUAL -1)
+ list(FIND ${_LIBS} gl WX_USE_GL)
+ if(NOT WX_USE_GL EQUAL -1)
DBG_MSG_V("- is required.")
- LIST(APPEND wxWidgets_LIBRARIES opengl32 glu32)
- ENDIF(NOT WX_USE_GL EQUAL -1)
+ list(APPEND wxWidgets_LIBRARIES opengl32 glu32)
+ endif(NOT WX_USE_GL EQUAL -1)
- LIST(APPEND wxWidgets_LIBRARIES winmm comctl32 rpcrt4 wsock32)
- ENDMACRO(WX_SET_LIBRARIES)
+ list(APPEND wxWidgets_LIBRARIES winmm comctl32 rpcrt4 wsock32)
+ endmacro(WX_SET_LIBRARIES)
#-------------------------------------------------------------------
# WIN32: Start actual work.
#-------------------------------------------------------------------
# Look for an installation tree.
- FIND_PATH(wxWidgets_ROOT_DIR
+ find_path(wxWidgets_ROOT_DIR
NAMES include/wx/wx.h
PATHS
$ENV{wxWidgets_ROOT_DIR}
@@ -462,24 +462,24 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
)
# If wxWidgets_ROOT_DIR changed, clear lib dir.
- IF(NOT WX_ROOT_DIR STREQUAL wxWidgets_ROOT_DIR)
- SET(WX_ROOT_DIR ${wxWidgets_ROOT_DIR}
+ if(NOT WX_ROOT_DIR STREQUAL wxWidgets_ROOT_DIR)
+ set(WX_ROOT_DIR ${wxWidgets_ROOT_DIR}
CACHE INTERNAL "wxWidgets_ROOT_DIR")
- SET(wxWidgets_LIB_DIR "wxWidgets_LIB_DIR-NOTFOUND"
+ set(wxWidgets_LIB_DIR "wxWidgets_LIB_DIR-NOTFOUND"
CACHE PATH "Cleared." FORCE)
- ENDIF(NOT WX_ROOT_DIR STREQUAL wxWidgets_ROOT_DIR)
+ endif(NOT WX_ROOT_DIR STREQUAL wxWidgets_ROOT_DIR)
- IF(WX_ROOT_DIR)
+ if(WX_ROOT_DIR)
# Select one default tree inside the already determined wx tree.
# Prefer static/shared order usually consistent with build
# settings.
- IF(MINGW)
- SET(WX_LIB_DIR_PREFIX gcc)
- ELSE(MINGW)
- SET(WX_LIB_DIR_PREFIX vc)
- ENDIF(MINGW)
- IF(BUILD_SHARED_LIBS)
- FIND_PATH(wxWidgets_LIB_DIR
+ if(MINGW)
+ set(WX_LIB_DIR_PREFIX gcc)
+ else(MINGW)
+ set(WX_LIB_DIR_PREFIX vc)
+ endif(MINGW)
+ if(BUILD_SHARED_LIBS)
+ find_path(wxWidgets_LIB_DIR
NAMES
msw/wx/setup.h
mswd/wx/setup.h
@@ -495,8 +495,8 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
DOC "Path to wxWidgets libraries?"
NO_DEFAULT_PATH
)
- ELSE(BUILD_SHARED_LIBS)
- FIND_PATH(wxWidgets_LIB_DIR
+ else(BUILD_SHARED_LIBS)
+ find_path(wxWidgets_LIB_DIR
NAMES
msw/wx/setup.h
mswd/wx/setup.h
@@ -512,202 +512,202 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
DOC "Path to wxWidgets libraries?"
NO_DEFAULT_PATH
)
- ENDIF(BUILD_SHARED_LIBS)
+ endif(BUILD_SHARED_LIBS)
# If wxWidgets_LIB_DIR changed, clear all libraries.
- IF(NOT WX_LIB_DIR STREQUAL wxWidgets_LIB_DIR)
- SET(WX_LIB_DIR ${wxWidgets_LIB_DIR} CACHE INTERNAL "wxWidgets_LIB_DIR")
+ if(NOT WX_LIB_DIR STREQUAL wxWidgets_LIB_DIR)
+ set(WX_LIB_DIR ${wxWidgets_LIB_DIR} CACHE INTERNAL "wxWidgets_LIB_DIR")
WX_CLEAR_ALL_DBG_LIBS()
WX_CLEAR_ALL_REL_LIBS()
- ENDIF(NOT WX_LIB_DIR STREQUAL wxWidgets_LIB_DIR)
+ endif(NOT WX_LIB_DIR STREQUAL wxWidgets_LIB_DIR)
- IF(WX_LIB_DIR)
+ if(WX_LIB_DIR)
# If building shared libs, define WXUSINGDLL to use dllimport.
- IF(WX_LIB_DIR MATCHES ".*[dD][lL][lL].*")
- SET(wxWidgets_DEFINITIONS WXUSINGDLL)
+ if(WX_LIB_DIR MATCHES ".*[dD][lL][lL].*")
+ set(wxWidgets_DEFINITIONS WXUSINGDLL)
DBG_MSG_V("detected SHARED/DLL tree WX_LIB_DIR=${WX_LIB_DIR}")
- ENDIF(WX_LIB_DIR MATCHES ".*[dD][lL][lL].*")
+ endif(WX_LIB_DIR MATCHES ".*[dD][lL][lL].*")
# Search for available configuration types.
- FOREACH(CFG mswunivud mswunivd mswud mswd mswunivu mswuniv mswu msw)
- SET(WX_${CFG}_FOUND FALSE)
- IF(EXISTS ${WX_LIB_DIR}/${CFG})
- LIST(APPEND WX_CONFIGURATION_LIST ${CFG})
- SET(WX_${CFG}_FOUND TRUE)
- SET(WX_CONFIGURATION ${CFG})
- ENDIF(EXISTS ${WX_LIB_DIR}/${CFG})
- ENDFOREACH(CFG)
+ foreach(CFG mswunivud mswunivd mswud mswd mswunivu mswuniv mswu msw)
+ set(WX_${CFG}_FOUND FALSE)
+ if(EXISTS ${WX_LIB_DIR}/${CFG})
+ list(APPEND WX_CONFIGURATION_LIST ${CFG})
+ set(WX_${CFG}_FOUND TRUE)
+ set(WX_CONFIGURATION ${CFG})
+ endif(EXISTS ${WX_LIB_DIR}/${CFG})
+ endforeach(CFG)
DBG_MSG_V("WX_CONFIGURATION_LIST=${WX_CONFIGURATION_LIST}")
- IF(WX_CONFIGURATION)
- SET(wxWidgets_FOUND TRUE)
+ if(WX_CONFIGURATION)
+ set(wxWidgets_FOUND TRUE)
# If the selected configuration wasn't found force the default
# one. Otherwise, use it but still force a refresh for
# updating the doc string with the current list of available
# configurations.
- IF(NOT WX_${wxWidgets_CONFIGURATION}_FOUND)
- SET(wxWidgets_CONFIGURATION ${WX_CONFIGURATION} CACHE STRING
+ if(NOT WX_${wxWidgets_CONFIGURATION}_FOUND)
+ set(wxWidgets_CONFIGURATION ${WX_CONFIGURATION} CACHE STRING
"Set wxWidgets configuration (${WX_CONFIGURATION_LIST})" FORCE)
- ELSE(NOT WX_${wxWidgets_CONFIGURATION}_FOUND)
- SET(wxWidgets_CONFIGURATION ${wxWidgets_CONFIGURATION} CACHE STRING
+ else(NOT WX_${wxWidgets_CONFIGURATION}_FOUND)
+ set(wxWidgets_CONFIGURATION ${wxWidgets_CONFIGURATION} CACHE STRING
"Set wxWidgets configuration (${WX_CONFIGURATION_LIST})" FORCE)
- ENDIF(NOT WX_${wxWidgets_CONFIGURATION}_FOUND)
+ endif(NOT WX_${wxWidgets_CONFIGURATION}_FOUND)
# If release config selected, and both release/debug exist.
- IF(WX_${wxWidgets_CONFIGURATION}d_FOUND)
- OPTION(wxWidgets_USE_REL_AND_DBG
+ if(WX_${wxWidgets_CONFIGURATION}d_FOUND)
+ option(wxWidgets_USE_REL_AND_DBG
"Use release and debug configurations?" TRUE)
- SET(WX_USE_REL_AND_DBG ${wxWidgets_USE_REL_AND_DBG})
- ELSE(WX_${wxWidgets_CONFIGURATION}d_FOUND)
+ set(WX_USE_REL_AND_DBG ${wxWidgets_USE_REL_AND_DBG})
+ else(WX_${wxWidgets_CONFIGURATION}d_FOUND)
# If the option exists (already in cache), force it false.
- IF(wxWidgets_USE_REL_AND_DBG)
- SET(wxWidgets_USE_REL_AND_DBG FALSE CACHE BOOL
+ if(wxWidgets_USE_REL_AND_DBG)
+ set(wxWidgets_USE_REL_AND_DBG FALSE CACHE BOOL
"No ${wxWidgets_CONFIGURATION}d found." FORCE)
- ENDIF(wxWidgets_USE_REL_AND_DBG)
- SET(WX_USE_REL_AND_DBG FALSE)
- ENDIF(WX_${wxWidgets_CONFIGURATION}d_FOUND)
+ endif(wxWidgets_USE_REL_AND_DBG)
+ set(WX_USE_REL_AND_DBG FALSE)
+ endif(WX_${wxWidgets_CONFIGURATION}d_FOUND)
# Get configuration parameters from the name.
WX_GET_NAME_COMPONENTS(${wxWidgets_CONFIGURATION} UNV UCD DBG)
# Set wxWidgets lib setup include directory.
- IF(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h)
- SET(wxWidgets_INCLUDE_DIRS
+ if(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h)
+ set(wxWidgets_INCLUDE_DIRS
${WX_LIB_DIR}/${wxWidgets_CONFIGURATION})
- ELSE(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h)
+ else(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h)
DBG_MSG("wxWidgets_FOUND FALSE because ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h does not exists.")
- SET(wxWidgets_FOUND FALSE)
- ENDIF(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h)
+ set(wxWidgets_FOUND FALSE)
+ endif(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h)
# Set wxWidgets main include directory.
- IF(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h)
- LIST(APPEND wxWidgets_INCLUDE_DIRS ${WX_ROOT_DIR}/include)
- ELSE(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h)
+ if(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h)
+ list(APPEND wxWidgets_INCLUDE_DIRS ${WX_ROOT_DIR}/include)
+ else(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h)
DBG_MSG("wxWidgets_FOUND FALSE because WX_ROOT_DIR=${WX_ROOT_DIR} has no ${WX_ROOT_DIR}/include/wx/wx.h")
- SET(wxWidgets_FOUND FALSE)
- ENDIF(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h)
+ set(wxWidgets_FOUND FALSE)
+ endif(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h)
# Find wxWidgets libraries.
WX_FIND_LIBS("${UNV}" "${UCD}" "${DBG}")
- IF(WX_USE_REL_AND_DBG)
+ if(WX_USE_REL_AND_DBG)
WX_FIND_LIBS("${UNV}" "${UCD}" "d")
- ENDIF(WX_USE_REL_AND_DBG)
+ endif(WX_USE_REL_AND_DBG)
# Settings for requested libs (i.e., include dir, libraries, etc.).
WX_SET_LIBRARIES(wxWidgets_FIND_COMPONENTS "${DBG}")
# Add necessary definitions for unicode builds
- IF("${UCD}" STREQUAL "u")
- LIST(APPEND wxWidgets_DEFINITIONS UNICODE _UNICODE)
- ENDIF("${UCD}" STREQUAL "u")
+ if("${UCD}" STREQUAL "u")
+ list(APPEND wxWidgets_DEFINITIONS UNICODE _UNICODE)
+ endif("${UCD}" STREQUAL "u")
# Add necessary definitions for debug builds
- SET(wxWidgets_DEFINITIONS_DEBUG _DEBUG __WXDEBUG__)
+ set(wxWidgets_DEFINITIONS_DEBUG _DEBUG __WXDEBUG__)
- ENDIF(WX_CONFIGURATION)
- ENDIF(WX_LIB_DIR)
- ENDIF(WX_ROOT_DIR)
+ endif(WX_CONFIGURATION)
+ endif(WX_LIB_DIR)
+ endif(WX_ROOT_DIR)
#=====================================================================
# UNIX_FIND_STYLE
#=====================================================================
-ELSE(wxWidgets_FIND_STYLE STREQUAL "win32")
- IF(wxWidgets_FIND_STYLE STREQUAL "unix")
+else(wxWidgets_FIND_STYLE STREQUAL "win32")
+ if(wxWidgets_FIND_STYLE STREQUAL "unix")
#-----------------------------------------------------------------
# UNIX: Helper MACROS
#-----------------------------------------------------------------
#
# Set the default values based on "wx-config --selected-config".
#
- MACRO(WX_CONFIG_SELECT_GET_DEFAULT)
- EXECUTE_PROCESS(
+ macro(WX_CONFIG_SELECT_GET_DEFAULT)
+ execute_process(
COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}"
${wxWidgets_CONFIG_OPTIONS} --selected-config
OUTPUT_VARIABLE _wx_selected_config
RESULT_VARIABLE _wx_result
ERROR_QUIET
)
- IF(_wx_result EQUAL 0)
- FOREACH(_opt_name debug static unicode universal)
- STRING(TOUPPER ${_opt_name} _upper_opt_name)
- IF(_wx_selected_config MATCHES ".*${_opt_name}.*")
- SET(wxWidgets_DEFAULT_${_upper_opt_name} ON)
- ELSE(_wx_selected_config MATCHES ".*${_opt_name}.*")
- SET(wxWidgets_DEFAULT_${_upper_opt_name} OFF)
- ENDIF(_wx_selected_config MATCHES ".*${_opt_name}.*")
- ENDFOREACH(_opt_name)
- ELSE(_wx_result EQUAL 0)
- FOREACH(_upper_opt_name DEBUG STATIC UNICODE UNIVERSAL)
- SET(wxWidgets_DEFAULT_${_upper_opt_name} OFF)
- ENDFOREACH(_upper_opt_name)
- ENDIF(_wx_result EQUAL 0)
- ENDMACRO(WX_CONFIG_SELECT_GET_DEFAULT)
+ if(_wx_result EQUAL 0)
+ foreach(_opt_name debug static unicode universal)
+ string(TOUPPER ${_opt_name} _upper_opt_name)
+ if(_wx_selected_config MATCHES ".*${_opt_name}.*")
+ set(wxWidgets_DEFAULT_${_upper_opt_name} ON)
+ else(_wx_selected_config MATCHES ".*${_opt_name}.*")
+ set(wxWidgets_DEFAULT_${_upper_opt_name} OFF)
+ endif(_wx_selected_config MATCHES ".*${_opt_name}.*")
+ endforeach(_opt_name)
+ else(_wx_result EQUAL 0)
+ foreach(_upper_opt_name DEBUG STATIC UNICODE UNIVERSAL)
+ set(wxWidgets_DEFAULT_${_upper_opt_name} OFF)
+ endforeach(_upper_opt_name)
+ endif(_wx_result EQUAL 0)
+ endmacro(WX_CONFIG_SELECT_GET_DEFAULT)
#
# Query a boolean configuration option to determine if the system
# has both builds available. If so, provide the selection option
# to the user.
#
- MACRO(WX_CONFIG_SELECT_QUERY_BOOL _OPT_NAME _OPT_HELP)
- EXECUTE_PROCESS(
+ macro(WX_CONFIG_SELECT_QUERY_BOOL _OPT_NAME _OPT_HELP)
+ execute_process(
COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}"
${wxWidgets_CONFIG_OPTIONS} --${_OPT_NAME}=yes
RESULT_VARIABLE _wx_result_yes
OUTPUT_QUIET
ERROR_QUIET
)
- EXECUTE_PROCESS(
+ execute_process(
COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}"
${wxWidgets_CONFIG_OPTIONS} --${_OPT_NAME}=no
RESULT_VARIABLE _wx_result_no
OUTPUT_QUIET
ERROR_QUIET
)
- STRING(TOUPPER ${_OPT_NAME} _UPPER_OPT_NAME)
- IF(_wx_result_yes EQUAL 0 AND _wx_result_no EQUAL 0)
- OPTION(wxWidgets_USE_${_UPPER_OPT_NAME}
+ string(TOUPPER ${_OPT_NAME} _UPPER_OPT_NAME)
+ if(_wx_result_yes EQUAL 0 AND _wx_result_no EQUAL 0)
+ option(wxWidgets_USE_${_UPPER_OPT_NAME}
${_OPT_HELP} ${wxWidgets_DEFAULT_${_UPPER_OPT_NAME}})
- ELSE(_wx_result_yes EQUAL 0 AND _wx_result_no EQUAL 0)
+ else(_wx_result_yes EQUAL 0 AND _wx_result_no EQUAL 0)
# If option exists (already in cache), force to available one.
- IF(DEFINED wxWidgets_USE_${_UPPER_OPT_NAME})
- IF(_wx_result_yes EQUAL 0)
- SET(wxWidgets_USE_${_UPPER_OPT_NAME} ON CACHE BOOL ${_OPT_HELP} FORCE)
- ELSE(_wx_result_yes EQUAL 0)
- SET(wxWidgets_USE_${_UPPER_OPT_NAME} OFF CACHE BOOL ${_OPT_HELP} FORCE)
- ENDIF(_wx_result_yes EQUAL 0)
- ENDIF(DEFINED wxWidgets_USE_${_UPPER_OPT_NAME})
- ENDIF(_wx_result_yes EQUAL 0 AND _wx_result_no EQUAL 0)
- ENDMACRO(WX_CONFIG_SELECT_QUERY_BOOL)
+ if(DEFINED wxWidgets_USE_${_UPPER_OPT_NAME})
+ if(_wx_result_yes EQUAL 0)
+ set(wxWidgets_USE_${_UPPER_OPT_NAME} ON CACHE BOOL ${_OPT_HELP} FORCE)
+ else(_wx_result_yes EQUAL 0)
+ set(wxWidgets_USE_${_UPPER_OPT_NAME} OFF CACHE BOOL ${_OPT_HELP} FORCE)
+ endif(_wx_result_yes EQUAL 0)
+ endif(DEFINED wxWidgets_USE_${_UPPER_OPT_NAME})
+ endif(_wx_result_yes EQUAL 0 AND _wx_result_no EQUAL 0)
+ endmacro(WX_CONFIG_SELECT_QUERY_BOOL)
#
# Set wxWidgets_SELECT_OPTIONS to wx-config options for selecting
# among multiple builds.
#
- MACRO(WX_CONFIG_SELECT_SET_OPTIONS)
- SET(wxWidgets_SELECT_OPTIONS ${wxWidgets_CONFIG_OPTIONS})
- FOREACH(_opt_name debug static unicode universal)
- STRING(TOUPPER ${_opt_name} _upper_opt_name)
- IF(DEFINED wxWidgets_USE_${_upper_opt_name})
- IF(wxWidgets_USE_${_upper_opt_name})
- LIST(APPEND wxWidgets_SELECT_OPTIONS --${_opt_name}=yes)
- ELSE(wxWidgets_USE_${_upper_opt_name})
- LIST(APPEND wxWidgets_SELECT_OPTIONS --${_opt_name}=no)
- ENDIF(wxWidgets_USE_${_upper_opt_name})
- ENDIF(DEFINED wxWidgets_USE_${_upper_opt_name})
- ENDFOREACH(_opt_name)
- ENDMACRO(WX_CONFIG_SELECT_SET_OPTIONS)
+ macro(WX_CONFIG_SELECT_SET_OPTIONS)
+ set(wxWidgets_SELECT_OPTIONS ${wxWidgets_CONFIG_OPTIONS})
+ foreach(_opt_name debug static unicode universal)
+ string(TOUPPER ${_opt_name} _upper_opt_name)
+ if(DEFINED wxWidgets_USE_${_upper_opt_name})
+ if(wxWidgets_USE_${_upper_opt_name})
+ list(APPEND wxWidgets_SELECT_OPTIONS --${_opt_name}=yes)
+ else(wxWidgets_USE_${_upper_opt_name})
+ list(APPEND wxWidgets_SELECT_OPTIONS --${_opt_name}=no)
+ endif(wxWidgets_USE_${_upper_opt_name})
+ endif(DEFINED wxWidgets_USE_${_upper_opt_name})
+ endforeach(_opt_name)
+ endmacro(WX_CONFIG_SELECT_SET_OPTIONS)
#-----------------------------------------------------------------
# UNIX: Start actual work.
#-----------------------------------------------------------------
# Support cross-compiling, only search in the target platform.
- FIND_PROGRAM(wxWidgets_CONFIG_EXECUTABLE wx-config
+ find_program(wxWidgets_CONFIG_EXECUTABLE wx-config
ONLY_CMAKE_FIND_ROOT_PATH
)
- IF(wxWidgets_CONFIG_EXECUTABLE)
- SET(wxWidgets_FOUND TRUE)
+ if(wxWidgets_CONFIG_EXECUTABLE)
+ set(wxWidgets_FOUND TRUE)
# get defaults based on "wx-config --selected-config"
WX_CONFIG_SELECT_GET_DEFAULT()
@@ -723,99 +723,99 @@ ELSE(wxWidgets_FIND_STYLE STREQUAL "win32")
DBG_MSG("wxWidgets_SELECT_OPTIONS=${wxWidgets_SELECT_OPTIONS}")
# run the wx-config program to get cxxflags
- EXECUTE_PROCESS(
+ execute_process(
COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}"
${wxWidgets_SELECT_OPTIONS} --cxxflags
OUTPUT_VARIABLE wxWidgets_CXX_FLAGS
RESULT_VARIABLE RET
ERROR_QUIET
)
- IF(RET EQUAL 0)
- STRING(STRIP "${wxWidgets_CXX_FLAGS}" wxWidgets_CXX_FLAGS)
- SEPARATE_ARGUMENTS(wxWidgets_CXX_FLAGS)
+ if(RET EQUAL 0)
+ string(STRIP "${wxWidgets_CXX_FLAGS}" wxWidgets_CXX_FLAGS)
+ separate_arguments(wxWidgets_CXX_FLAGS)
DBG_MSG_V("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}")
# parse definitions from cxxflags;
# drop -D* from CXXFLAGS and the -D prefix
- STRING(REGEX MATCHALL "-D[^;]+"
+ string(REGEX MATCHALL "-D[^;]+"
wxWidgets_DEFINITIONS "${wxWidgets_CXX_FLAGS}")
- STRING(REGEX REPLACE "-D[^;]+(;|$)" ""
+ string(REGEX REPLACE "-D[^;]+(;|$)" ""
wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}")
- STRING(REGEX REPLACE ";$" ""
+ string(REGEX REPLACE ";$" ""
wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}")
- STRING(REPLACE "-D" ""
+ string(REPLACE "-D" ""
wxWidgets_DEFINITIONS "${wxWidgets_DEFINITIONS}")
# parse include dirs from cxxflags; drop -I prefix
- STRING(REGEX MATCHALL "-I[^;]+"
+ string(REGEX MATCHALL "-I[^;]+"
wxWidgets_INCLUDE_DIRS "${wxWidgets_CXX_FLAGS}")
- STRING(REGEX REPLACE "-I[^;]+;" ""
+ string(REGEX REPLACE "-I[^;]+;" ""
wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}")
- STRING(REPLACE "-I" ""
+ string(REPLACE "-I" ""
wxWidgets_INCLUDE_DIRS "${wxWidgets_INCLUDE_DIRS}")
DBG_MSG_V("wxWidgets_DEFINITIONS=${wxWidgets_DEFINITIONS}")
DBG_MSG_V("wxWidgets_INCLUDE_DIRS=${wxWidgets_INCLUDE_DIRS}")
DBG_MSG_V("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}")
- ELSE(RET EQUAL 0)
- SET(wxWidgets_FOUND FALSE)
+ else(RET EQUAL 0)
+ set(wxWidgets_FOUND FALSE)
DBG_MSG_V(
"${wxWidgets_CONFIG_EXECUTABLE} --cxxflags FAILED with RET=${RET}")
- ENDIF(RET EQUAL 0)
+ endif(RET EQUAL 0)
# run the wx-config program to get the libs
# - NOTE: wx-config doesn't verify that the libs requested exist
# it just produces the names. Maybe a TRY_COMPILE would
# be useful here...
- STRING(REPLACE ";" ","
+ string(REPLACE ";" ","
wxWidgets_FIND_COMPONENTS "${wxWidgets_FIND_COMPONENTS}")
- EXECUTE_PROCESS(
+ execute_process(
COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}"
${wxWidgets_SELECT_OPTIONS} --libs ${wxWidgets_FIND_COMPONENTS}
OUTPUT_VARIABLE wxWidgets_LIBRARIES
RESULT_VARIABLE RET
ERROR_QUIET
)
- IF(RET EQUAL 0)
- STRING(STRIP "${wxWidgets_LIBRARIES}" wxWidgets_LIBRARIES)
- SEPARATE_ARGUMENTS(wxWidgets_LIBRARIES)
- STRING(REPLACE "-framework;" "-framework "
+ if(RET EQUAL 0)
+ string(STRIP "${wxWidgets_LIBRARIES}" wxWidgets_LIBRARIES)
+ separate_arguments(wxWidgets_LIBRARIES)
+ string(REPLACE "-framework;" "-framework "
wxWidgets_LIBRARIES "${wxWidgets_LIBRARIES}")
- STRING(REPLACE "-arch;" "-arch "
+ string(REPLACE "-arch;" "-arch "
wxWidgets_LIBRARIES "${wxWidgets_LIBRARIES}")
- STRING(REPLACE "-isysroot;" "-isysroot "
+ string(REPLACE "-isysroot;" "-isysroot "
wxWidgets_LIBRARIES "${wxWidgets_LIBRARIES}")
# extract linkdirs (-L) for rpath (i.e., LINK_DIRECTORIES)
- STRING(REGEX MATCHALL "-L[^;]+"
+ string(REGEX MATCHALL "-L[^;]+"
wxWidgets_LIBRARY_DIRS "${wxWidgets_LIBRARIES}")
- STRING(REPLACE "-L" ""
+ string(REPLACE "-L" ""
wxWidgets_LIBRARY_DIRS "${wxWidgets_LIBRARY_DIRS}")
DBG_MSG_V("wxWidgets_LIBRARIES=${wxWidgets_LIBRARIES}")
DBG_MSG_V("wxWidgets_LIBRARY_DIRS=${wxWidgets_LIBRARY_DIRS}")
- ELSE(RET EQUAL 0)
- SET(wxWidgets_FOUND FALSE)
+ else(RET EQUAL 0)
+ set(wxWidgets_FOUND FALSE)
DBG_MSG("${wxWidgets_CONFIG_EXECUTABLE} --libs ${wxWidgets_FIND_COMPONENTS} FAILED with RET=${RET}")
- ENDIF(RET EQUAL 0)
- ENDIF(wxWidgets_CONFIG_EXECUTABLE)
+ endif(RET EQUAL 0)
+ endif(wxWidgets_CONFIG_EXECUTABLE)
#=====================================================================
# Neither UNIX_FIND_STYLE, nor WIN32_FIND_STYLE
#=====================================================================
- ELSE(wxWidgets_FIND_STYLE STREQUAL "unix")
- IF(NOT wxWidgets_FIND_QUIETLY)
- MESSAGE(STATUS
+ else(wxWidgets_FIND_STYLE STREQUAL "unix")
+ if(NOT wxWidgets_FIND_QUIETLY)
+ message(STATUS
"${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): \n"
" Platform unknown/unsupported. It's neither WIN32 nor UNIX "
"find style."
)
- ENDIF(NOT wxWidgets_FIND_QUIETLY)
- ENDIF(wxWidgets_FIND_STYLE STREQUAL "unix")
-ENDIF(wxWidgets_FIND_STYLE STREQUAL "win32")
+ endif(NOT wxWidgets_FIND_QUIETLY)
+ endif(wxWidgets_FIND_STYLE STREQUAL "unix")
+endif(wxWidgets_FIND_STYLE STREQUAL "win32")
# Debug output:
DBG_MSG("wxWidgets_FOUND : ${wxWidgets_FOUND}")
@@ -827,10 +827,10 @@ DBG_MSG("wxWidgets_USE_FILE : ${wxWidgets_USE_FILE}")
#=====================================================================
#=====================================================================
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(wxWidgets DEFAULT_MSG wxWidgets_FOUND)
# Maintain consistency with all other variables.
-SET(wxWidgets_FOUND ${WXWIDGETS_FOUND})
+set(wxWidgets_FOUND ${WXWIDGETS_FOUND})
#=====================================================================
# Macros for use in wxWidgets apps.
@@ -841,7 +841,7 @@ SET(wxWidgets_FOUND ${WXWIDGETS_FOUND})
#=====================================================================
# Resource file compiler.
-FIND_PROGRAM(wxWidgets_wxrc_EXECUTABLE wxrc
+find_program(wxWidgets_wxrc_EXECUTABLE wxrc
${wxWidgets_ROOT_DIR}/utils/wxrc/vc_msw
)
@@ -852,10 +852,10 @@ FIND_PROGRAM(wxWidgets_wxrc_EXECUTABLE wxrc
# respectively, of <keyword>.
#
# Example usage:
-# FUNCTION(WXWIDGETS_ADD_RESOURCES outfiles)
+# function(WXWIDGETS_ADD_RESOURCES outfiles)
# WX_SPLIT_ARGUMENTS_ON(OPTIONS wxrc_files wxrc_options ${ARGN})
# ...
-# ENDFUNCTION(WXWIDGETS_ADD_RESOURCES)
+# endfunction(WXWIDGETS_ADD_RESOURCES)
#
# WXWIDGETS_ADD_RESOURCES(sources ${xrc_files} OPTIONS -e -o file.C)
#
@@ -866,29 +866,29 @@ FIND_PROGRAM(wxWidgets_wxrc_EXECUTABLE wxrc
# here a bit more generalized. So, there are already two find modules
# using this approach.
#
-FUNCTION(WX_SPLIT_ARGUMENTS_ON _keyword _leftvar _rightvar)
+function(WX_SPLIT_ARGUMENTS_ON _keyword _leftvar _rightvar)
# FIXME: Document that the input variables will be cleared.
- #LIST(APPEND ${_leftvar} "")
- #LIST(APPEND ${_rightvar} "")
- SET(${_leftvar} "")
- SET(${_rightvar} "")
-
- SET(_doing_right FALSE)
- FOREACH(element ${ARGN})
- IF("${element}" STREQUAL "${_keyword}")
- SET(_doing_right TRUE)
- ELSE("${element}" STREQUAL "${_keyword}")
- IF(_doing_right)
- LIST(APPEND ${_rightvar} "${element}")
- ELSE(_doing_right)
- LIST(APPEND ${_leftvar} "${element}")
- ENDIF(_doing_right)
- ENDIF("${element}" STREQUAL "${_keyword}")
- ENDFOREACH(element)
-
- SET(${_leftvar} ${${_leftvar}} PARENT_SCOPE)
- SET(${_rightvar} ${${_rightvar}} PARENT_SCOPE)
-ENDFUNCTION(WX_SPLIT_ARGUMENTS_ON)
+ #list(APPEND ${_leftvar} "")
+ #list(APPEND ${_rightvar} "")
+ set(${_leftvar} "")
+ set(${_rightvar} "")
+
+ set(_doing_right FALSE)
+ foreach(element ${ARGN})
+ if("${element}" STREQUAL "${_keyword}")
+ set(_doing_right TRUE)
+ else("${element}" STREQUAL "${_keyword}")
+ if(_doing_right)
+ list(APPEND ${_rightvar} "${element}")
+ else(_doing_right)
+ list(APPEND ${_leftvar} "${element}")
+ endif(_doing_right)
+ endif("${element}" STREQUAL "${_keyword}")
+ endforeach(element)
+
+ set(${_leftvar} ${${_leftvar}} PARENT_SCOPE)
+ set(${_rightvar} ${${_rightvar}} PARENT_SCOPE)
+endfunction(WX_SPLIT_ARGUMENTS_ON)
#
# WX_GET_DEPENDENCIES_FROM_XML(
@@ -901,7 +901,7 @@ ENDFUNCTION(WX_SPLIT_ARGUMENTS_ON)
#
# FIXME: Add documentation here...
#
-FUNCTION(WX_GET_DEPENDENCIES_FROM_XML
+function(WX_GET_DEPENDENCIES_FROM_XML
_depends
_match_patt
_clean_patt
@@ -909,25 +909,25 @@ FUNCTION(WX_GET_DEPENDENCIES_FROM_XML
_depends_path
)
- STRING(REGEX MATCHALL
+ string(REGEX MATCHALL
${_match_patt}
dep_file_list
"${${_xml_contents}}"
)
- FOREACH(dep_file ${dep_file_list})
- STRING(REGEX REPLACE ${_clean_patt} "" dep_file "${dep_file}")
+ foreach(dep_file ${dep_file_list})
+ string(REGEX REPLACE ${_clean_patt} "" dep_file "${dep_file}")
# make the file have an absolute path
- IF(NOT IS_ABSOLUTE "${dep_file}")
- SET(dep_file "${${_depends_path}}/${dep_file}")
- ENDIF(NOT IS_ABSOLUTE "${dep_file}")
+ if(NOT IS_ABSOLUTE "${dep_file}")
+ set(dep_file "${${_depends_path}}/${dep_file}")
+ endif(NOT IS_ABSOLUTE "${dep_file}")
# append file to dependency list
- LIST(APPEND ${_depends} "${dep_file}")
- ENDFOREACH(dep_file)
+ list(APPEND ${_depends} "${dep_file}")
+ endforeach(dep_file)
- SET(${_depends} ${${_depends}} PARENT_SCOPE)
-ENDFUNCTION(WX_GET_DEPENDENCIES_FROM_XML)
+ set(${_depends} ${${_depends}} PARENT_SCOPE)
+endfunction(WX_GET_DEPENDENCIES_FROM_XML)
#
# WXWIDGETS_ADD_RESOURCES(<sources> <xrc_files>
@@ -940,21 +940,21 @@ ENDFUNCTION(WX_GET_DEPENDENCIES_FROM_XML)
# WXWIDGETS_ADD_RESOURCES(sources xrc/main_frame.xrc)
# WXWIDGETS_ADD_RESOURCES(sources ${xrc_files} OPTIONS -e -o altname.cxx)
#
-FUNCTION(WXWIDGETS_ADD_RESOURCES _outfiles)
+function(WXWIDGETS_ADD_RESOURCES _outfiles)
WX_SPLIT_ARGUMENTS_ON(OPTIONS rc_file_list rc_options ${ARGN})
# Parse files for dependencies.
- SET(rc_file_list_abs "")
- SET(rc_depends "")
- FOREACH(rc_file ${rc_file_list})
- GET_FILENAME_COMPONENT(depends_path ${rc_file} PATH)
+ set(rc_file_list_abs "")
+ set(rc_depends "")
+ foreach(rc_file ${rc_file_list})
+ get_filename_component(depends_path ${rc_file} PATH)
- GET_FILENAME_COMPONENT(rc_file_abs ${rc_file} ABSOLUTE)
- LIST(APPEND rc_file_list_abs "${rc_file_abs}")
+ get_filename_component(rc_file_abs ${rc_file} ABSOLUTE)
+ list(APPEND rc_file_list_abs "${rc_file_abs}")
# All files have absolute paths or paths relative to the location
# of the rc file.
- FILE(READ "${rc_file_abs}" rc_file_contents)
+ file(READ "${rc_file_abs}" rc_file_contents)
# get bitmap/bitmap2 files
WX_GET_DEPENDENCIES_FROM_XML(
@@ -982,63 +982,63 @@ FUNCTION(WXWIDGETS_ADD_RESOURCES _outfiles)
rc_file_contents
depends_path
)
- ENDFOREACH(rc_file)
+ endforeach(rc_file)
#
# Parse options.
#
# If NO_CPP_CODE option specified, then produce .xrs file rather
# than a .cpp file (i.e., don't add the default --cpp-code option).
- LIST(FIND rc_options NO_CPP_CODE index)
- IF(index EQUAL -1)
- LIST(APPEND rc_options --cpp-code)
+ list(FIND rc_options NO_CPP_CODE index)
+ if(index EQUAL -1)
+ list(APPEND rc_options --cpp-code)
# wxrc's default output filename for cpp code.
- SET(outfile resource.cpp)
- ELSE(index EQUAL -1)
- LIST(REMOVE_AT rc_options ${index})
+ set(outfile resource.cpp)
+ else(index EQUAL -1)
+ list(REMOVE_AT rc_options ${index})
# wxrc's default output filename for xrs file.
- SET(outfile resource.xrs)
- ENDIF(index EQUAL -1)
+ set(outfile resource.xrs)
+ endif(index EQUAL -1)
# Get output name for use in ADD_CUSTOM_COMMAND.
# - short option scanning
- LIST(FIND rc_options -o index)
- IF(NOT index EQUAL -1)
- MATH(EXPR filename_index "${index} + 1")
- LIST(GET rc_options ${filename_index} outfile)
- #LIST(REMOVE_AT rc_options ${index} ${filename_index})
- ENDIF(NOT index EQUAL -1)
+ list(FIND rc_options -o index)
+ if(NOT index EQUAL -1)
+ math(EXPR filename_index "${index} + 1")
+ list(GET rc_options ${filename_index} outfile)
+ #list(REMOVE_AT rc_options ${index} ${filename_index})
+ endif(NOT index EQUAL -1)
# - long option scanning
- STRING(REGEX MATCH "--output=[^;]*" outfile_opt "${rc_options}")
- IF(outfile_opt)
- STRING(REPLACE "--output=" "" outfile "${outfile_opt}")
- ENDIF(outfile_opt)
- #STRING(REGEX REPLACE "--output=[^;]*;?" "" rc_options "${rc_options}")
- #STRING(REGEX REPLACE ";$" "" rc_options "${rc_options}")
-
- IF(NOT IS_ABSOLUTE "${outfile}")
- SET(outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}")
- ENDIF(NOT IS_ABSOLUTE "${outfile}")
- ADD_CUSTOM_COMMAND(
+ string(REGEX MATCH "--output=[^;]*" outfile_opt "${rc_options}")
+ if(outfile_opt)
+ string(REPLACE "--output=" "" outfile "${outfile_opt}")
+ endif(outfile_opt)
+ #string(REGEX REPLACE "--output=[^;]*;?" "" rc_options "${rc_options}")
+ #string(REGEX REPLACE ";$" "" rc_options "${rc_options}")
+
+ if(NOT IS_ABSOLUTE "${outfile}")
+ set(outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}")
+ endif(NOT IS_ABSOLUTE "${outfile}")
+ add_custom_command(
OUTPUT "${outfile}"
COMMAND ${wxWidgets_wxrc_EXECUTABLE} ${rc_options} ${rc_file_list_abs}
DEPENDS ${rc_file_list_abs} ${rc_depends}
)
# Add generated header to output file list.
- LIST(FIND rc_options -e short_index)
- LIST(FIND rc_options --extra-cpp-code long_index)
- IF(NOT short_index EQUAL -1 OR NOT long_index EQUAL -1)
- GET_FILENAME_COMPONENT(outfile_ext ${outfile} EXT)
- STRING(REPLACE "${outfile_ext}" ".h" outfile_header "${outfile}")
- LIST(APPEND ${_outfiles} "${outfile_header}")
- SET_SOURCE_FILES_PROPERTIES(
+ list(FIND rc_options -e short_index)
+ list(FIND rc_options --extra-cpp-code long_index)
+ if(NOT short_index EQUAL -1 OR NOT long_index EQUAL -1)
+ get_filename_component(outfile_ext ${outfile} EXT)
+ string(REPLACE "${outfile_ext}" ".h" outfile_header "${outfile}")
+ list(APPEND ${_outfiles} "${outfile_header}")
+ set_source_files_properties(
"${outfile_header}" PROPERTIES GENERATED TRUE
)
- ENDIF(NOT short_index EQUAL -1 OR NOT long_index EQUAL -1)
+ endif(NOT short_index EQUAL -1 OR NOT long_index EQUAL -1)
# Add generated file to output file list.
- LIST(APPEND ${_outfiles} "${outfile}")
+ list(APPEND ${_outfiles} "${outfile}")
- SET(${_outfiles} ${${_outfiles}} PARENT_SCOPE)
-ENDFUNCTION(WXWIDGETS_ADD_RESOURCES)
+ set(${_outfiles} ${${_outfiles}} PARENT_SCOPE)
+endfunction(WXWIDGETS_ADD_RESOURCES)
diff --git a/Modules/FindwxWindows.cmake b/Modules/FindwxWindows.cmake
index dfb28ff903..66373cdcce 100644
--- a/Modules/FindwxWindows.cmake
+++ b/Modules/FindwxWindows.cmake
@@ -20,17 +20,17 @@
#
# OPTIONS
# If you need OpenGL support please
-# SET(WXWINDOWS_USE_GL 1)
+# set(WXWINDOWS_USE_GL 1)
# in your CMakeLists.txt *before* you include this file.
#
# HAVE_ISYSTEM - true required to replace -I by -isystem on g++
#
# For convenience include Use_wxWindows.cmake in your project's
-# CMakeLists.txt using INCLUDE(Use_wxWindows).
+# CMakeLists.txt using include(Use_wxWindows).
#
# USAGE
-# SET(WXWINDOWS_USE_GL 1)
-# FIND_PACKAGE(wxWindows)
+# set(WXWINDOWS_USE_GL 1)
+# find_package(wxWindows)
#
# NOTES
# wxWidgets 2.6.x is supported for monolithic builds
@@ -83,19 +83,19 @@
#
-IF(WIN32)
- SET(WIN32_STYLE_FIND 1)
-ENDIF(WIN32)
-IF(MINGW)
- SET(WIN32_STYLE_FIND 0)
- SET(UNIX_STYLE_FIND 1)
-ENDIF(MINGW)
-IF(UNIX)
- SET(UNIX_STYLE_FIND 1)
-ENDIF(UNIX)
+if(WIN32)
+ set(WIN32_STYLE_FIND 1)
+endif(WIN32)
+if(MINGW)
+ set(WIN32_STYLE_FIND 0)
+ set(UNIX_STYLE_FIND 1)
+endif(MINGW)
+if(UNIX)
+ set(UNIX_STYLE_FIND 1)
+endif(UNIX)
-IF(WIN32_STYLE_FIND)
+if(WIN32_STYLE_FIND)
## ######################################################################
##
@@ -106,7 +106,7 @@ IF(WIN32_STYLE_FIND)
## fix the root dir to avoid mixing of headers/libs from different
## versions/builds:
- SET (WXWINDOWS_POSSIBLE_ROOT_PATHS
+ set (WXWINDOWS_POSSIBLE_ROOT_PATHS
$ENV{WXWIN}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxWidgets_is1;Inno Setup: App Path]" ## WX 2.6.x
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxWindows_is1;Inno Setup: App Path]" ## WX 2.4.x
@@ -121,54 +121,54 @@ IF(WIN32_STYLE_FIND)
## WX supports monolithic and multiple smaller libs (since 2.5.x), we prefer monolithic for now.
## monolithic = WX is built as a single big library
## e.g. compile on WIN32 as "nmake -f makefile.vc MONOLITHIC=1 BUILD=debug SHARED=0 USE_OPENGL=1" (JW)
- OPTION(WXWINDOWS_USE_MONOLITHIC "Use monolithic build of WX??" ON)
- MARK_AS_ADVANCED(WXWINDOWS_USE_MONOLITHIC)
+ option(WXWINDOWS_USE_MONOLITHIC "Use monolithic build of WX??" ON)
+ mark_as_advanced(WXWINDOWS_USE_MONOLITHIC)
## GL libs used?
- OPTION(WXWINDOWS_USE_GL "Use Wx with GL support(glcanvas)?" ON)
- MARK_AS_ADVANCED(WXWINDOWS_USE_GL)
+ option(WXWINDOWS_USE_GL "Use Wx with GL support(glcanvas)?" ON)
+ mark_as_advanced(WXWINDOWS_USE_GL)
## avoid mixing of headers and libs between multiple installed WX versions,
## select just one tree here:
- FIND_PATH(WXWINDOWS_ROOT_DIR include/wx/wx.h
+ find_path(WXWINDOWS_ROOT_DIR include/wx/wx.h
${WXWINDOWS_POSSIBLE_ROOT_PATHS} )
- # MESSAGE("DBG found WXWINDOWS_ROOT_DIR: ${WXWINDOWS_ROOT_DIR}")
+ # message("DBG found WXWINDOWS_ROOT_DIR: ${WXWINDOWS_ROOT_DIR}")
## find libs for combination of static/shared with release/debug
## be careful if you add something here,
## avoid mixing of headers and libs of different wx versions,
## there may be multiple WX versions installed.
- SET (WXWINDOWS_POSSIBLE_LIB_PATHS
+ set (WXWINDOWS_POSSIBLE_LIB_PATHS
"${WXWINDOWS_ROOT_DIR}/lib"
)
## monolithic?
- IF (WXWINDOWS_USE_MONOLITHIC)
+ if (WXWINDOWS_USE_MONOLITHIC)
- FIND_LIBRARY(WXWINDOWS_STATIC_LIBRARY
+ find_library(WXWINDOWS_STATIC_LIBRARY
NAMES wx wxmsw wxmsw26
PATHS
"${WXWINDOWS_ROOT_DIR}/lib/vc_lib"
${WXWINDOWS_POSSIBLE_LIB_PATHS}
DOC "wxWindows static release build library" )
- FIND_LIBRARY(WXWINDOWS_STATIC_DEBUG_LIBRARY
+ find_library(WXWINDOWS_STATIC_DEBUG_LIBRARY
NAMES wxd wxmswd wxmsw26d
PATHS
"${WXWINDOWS_ROOT_DIR}/lib/vc_lib"
${WXWINDOWS_POSSIBLE_LIB_PATHS}
DOC "wxWindows static debug build library" )
- FIND_LIBRARY(WXWINDOWS_SHARED_LIBRARY
+ find_library(WXWINDOWS_SHARED_LIBRARY
NAMES wxmsw26 wxmsw262 wxmsw24 wxmsw242 wxmsw241 wxmsw240 wx23_2 wx22_9
PATHS
"${WXWINDOWS_ROOT_DIR}/lib/vc_dll"
${WXWINDOWS_POSSIBLE_LIB_PATHS}
DOC "wxWindows shared release build library" )
- FIND_LIBRARY(WXWINDOWS_SHARED_DEBUG_LIBRARY
+ find_library(WXWINDOWS_SHARED_DEBUG_LIBRARY
NAMES wxmsw26d wxmsw262d wxmsw24d wxmsw241d wxmsw240d wx23_2d wx22_9d
PATHS
"${WXWINDOWS_ROOT_DIR}/lib/vc_dll"
@@ -180,14 +180,14 @@ IF(WIN32_STYLE_FIND)
## required for WXWINDOWS_USE_GL
## gl lib is always build separate:
##
- FIND_LIBRARY(WXWINDOWS_STATIC_LIBRARY_GL
+ find_library(WXWINDOWS_STATIC_LIBRARY_GL
NAMES wx_gl wxmsw_gl wxmsw26_gl
PATHS
"${WXWINDOWS_ROOT_DIR}/lib/vc_lib"
${WXWINDOWS_POSSIBLE_LIB_PATHS}
DOC "wxWindows static release build GL library" )
- FIND_LIBRARY(WXWINDOWS_STATIC_DEBUG_LIBRARY_GL
+ find_library(WXWINDOWS_STATIC_DEBUG_LIBRARY_GL
NAMES wxd_gl wxmswd_gl wxmsw26d_gl
PATHS
"${WXWINDOWS_ROOT_DIR}/lib/vc_lib"
@@ -195,70 +195,70 @@ IF(WIN32_STYLE_FIND)
DOC "wxWindows static debug build GL library" )
- FIND_LIBRARY(WXWINDOWS_STATIC_DEBUG_LIBRARY_PNG
+ find_library(WXWINDOWS_STATIC_DEBUG_LIBRARY_PNG
NAMES wxpngd
PATHS
"${WXWINDOWS_ROOT_DIR}/lib/vc_lib"
${WXWINDOWS_POSSIBLE_LIB_PATHS}
DOC "wxWindows static debug png library" )
- FIND_LIBRARY(WXWINDOWS_STATIC_LIBRARY_PNG
+ find_library(WXWINDOWS_STATIC_LIBRARY_PNG
NAMES wxpng
PATHS
"${WXWINDOWS_ROOT_DIR}/lib/vc_lib"
${WXWINDOWS_POSSIBLE_LIB_PATHS}
DOC "wxWindows static png library" )
- FIND_LIBRARY(WXWINDOWS_STATIC_DEBUG_LIBRARY_TIFF
+ find_library(WXWINDOWS_STATIC_DEBUG_LIBRARY_TIFF
NAMES wxtiffd
PATHS
"${WXWINDOWS_ROOT_DIR}/lib/vc_lib"
${WXWINDOWS_POSSIBLE_LIB_PATHS}
DOC "wxWindows static debug tiff library" )
- FIND_LIBRARY(WXWINDOWS_STATIC_LIBRARY_TIFF
+ find_library(WXWINDOWS_STATIC_LIBRARY_TIFF
NAMES wxtiff
PATHS
"${WXWINDOWS_ROOT_DIR}/lib/vc_lib"
${WXWINDOWS_POSSIBLE_LIB_PATHS}
DOC "wxWindows static tiff library" )
- FIND_LIBRARY(WXWINDOWS_STATIC_DEBUG_LIBRARY_JPEG
+ find_library(WXWINDOWS_STATIC_DEBUG_LIBRARY_JPEG
NAMES wxjpegd wxjpgd
PATHS
"${WXWINDOWS_ROOT_DIR}/lib/vc_lib"
${WXWINDOWS_POSSIBLE_LIB_PATHS}
DOC "wxWindows static debug jpeg library" )
- FIND_LIBRARY(WXWINDOWS_STATIC_LIBRARY_JPEG
+ find_library(WXWINDOWS_STATIC_LIBRARY_JPEG
NAMES wxjpeg wxjpg
PATHS
"${WXWINDOWS_ROOT_DIR}/lib/vc_lib"
${WXWINDOWS_POSSIBLE_LIB_PATHS}
DOC "wxWindows static jpeg library" )
- FIND_LIBRARY(WXWINDOWS_STATIC_DEBUG_LIBRARY_ZLIB
+ find_library(WXWINDOWS_STATIC_DEBUG_LIBRARY_ZLIB
NAMES wxzlibd
PATHS
"${WXWINDOWS_ROOT_DIR}/lib/vc_lib"
${WXWINDOWS_POSSIBLE_LIB_PATHS}
DOC "wxWindows static debug zlib library" )
- FIND_LIBRARY(WXWINDOWS_STATIC_LIBRARY_ZLIB
+ find_library(WXWINDOWS_STATIC_LIBRARY_ZLIB
NAMES wxzlib
PATHS
"${WXWINDOWS_ROOT_DIR}/lib/vc_lib"
${WXWINDOWS_POSSIBLE_LIB_PATHS}
DOC "wxWindows static zib library" )
- FIND_LIBRARY(WXWINDOWS_STATIC_DEBUG_LIBRARY_REGEX
+ find_library(WXWINDOWS_STATIC_DEBUG_LIBRARY_REGEX
NAMES wxregexd
PATHS
"${WXWINDOWS_ROOT_DIR}/lib/vc_lib"
${WXWINDOWS_POSSIBLE_LIB_PATHS}
DOC "wxWindows static debug regex library" )
- FIND_LIBRARY(WXWINDOWS_STATIC_LIBRARY_REGEX
+ find_library(WXWINDOWS_STATIC_LIBRARY_REGEX
NAMES wxregex
PATHS
"${WXWINDOWS_ROOT_DIR}/lib/vc_lib"
@@ -268,14 +268,14 @@ IF(WIN32_STYLE_FIND)
## untested:
- FIND_LIBRARY(WXWINDOWS_SHARED_LIBRARY_GL
+ find_library(WXWINDOWS_SHARED_LIBRARY_GL
NAMES wx_gl wxmsw_gl wxmsw26_gl
PATHS
"${WXWINDOWS_ROOT_DIR}/lib/vc_dll"
${WXWINDOWS_POSSIBLE_LIB_PATHS}
DOC "wxWindows shared release build GL library" )
- FIND_LIBRARY(WXWINDOWS_SHARED_DEBUG_LIBRARY_GL
+ find_library(WXWINDOWS_SHARED_DEBUG_LIBRARY_GL
NAMES wxd_gl wxmswd_gl wxmsw26d_gl
PATHS
"${WXWINDOWS_ROOT_DIR}/lib/vc_dll"
@@ -283,11 +283,11 @@ IF(WIN32_STYLE_FIND)
DOC "wxWindows shared debug build GL library" )
- ELSE (WXWINDOWS_USE_MONOLITHIC)
+ else (WXWINDOWS_USE_MONOLITHIC)
## WX is built as multiple small pieces libraries instead of monolithic
## DEPECATED (jw) replaced by more general WXWINDOWS_USE_MONOLITHIC ON/OFF
- # OPTION(WXWINDOWS_SEPARATE_LIBS_BUILD "Is wxWindows build with separate libs?" OFF)
+ # option(WXWINDOWS_SEPARATE_LIBS_BUILD "Is wxWindows build with separate libs?" OFF)
## HACK: This is very dirty.
## because the libs of a particular version are explicitly listed
@@ -297,9 +297,9 @@ IF(WIN32_STYLE_FIND)
## --> about 288 combinations
## thus we need a different approach so solve this correctly ...
- MESSAGE(STATUS "Warning: You are trying to use wxWidgets without monolithic build (WXWINDOWS_SEPARATE_LIBS_BUILD). This is a HACK, libraries are not verified! (JW).")
+ message(STATUS "Warning: You are trying to use wxWidgets without monolithic build (WXWINDOWS_SEPARATE_LIBS_BUILD). This is a HACK, libraries are not verified! (JW).")
- SET(WXWINDOWS_STATIC_LIBS ${WXWINDOWS_STATIC_LIBS}
+ set(WXWINDOWS_STATIC_LIBS ${WXWINDOWS_STATIC_LIBS}
wxbase26
wxbase26_net
wxbase26_odbc
@@ -323,7 +323,7 @@ IF(WIN32_STYLE_FIND)
wsock32
)
## HACK: feed in to optimized / debug libaries if both were FOUND.
- SET(WXWINDOWS_STATIC_DEBUG_LIBS ${WXWINDOWS_STATIC_DEBUG_LIBS}
+ set(WXWINDOWS_STATIC_DEBUG_LIBS ${WXWINDOWS_STATIC_DEBUG_LIBS}
wxbase26d
wxbase26d_net
wxbase26d_odbc
@@ -346,7 +346,7 @@ IF(WIN32_STYLE_FIND)
rpcrt4
wsock32
)
- ENDIF (WXWINDOWS_USE_MONOLITHIC)
+ endif (WXWINDOWS_USE_MONOLITHIC)
##
@@ -356,22 +356,22 @@ IF(WIN32_STYLE_FIND)
## if there is at least one shared lib available
## let user choose wether to use shared or static wxwindows libs
- IF(WXWINDOWS_SHARED_LIBRARY OR WXWINDOWS_SHARED_DEBUG_LIBRARY)
+ if(WXWINDOWS_SHARED_LIBRARY OR WXWINDOWS_SHARED_DEBUG_LIBRARY)
## default value OFF because wxWindows MSVS default build is static
- OPTION(WXWINDOWS_USE_SHARED_LIBS
+ option(WXWINDOWS_USE_SHARED_LIBS
"Use shared versions (dll) of wxWindows libraries?" OFF)
- MARK_AS_ADVANCED(WXWINDOWS_USE_SHARED_LIBS)
- ENDIF(WXWINDOWS_SHARED_LIBRARY OR WXWINDOWS_SHARED_DEBUG_LIBRARY)
+ mark_as_advanced(WXWINDOWS_USE_SHARED_LIBS)
+ endif(WXWINDOWS_SHARED_LIBRARY OR WXWINDOWS_SHARED_DEBUG_LIBRARY)
## add system libraries wxwindows always seems to depend on
- SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
+ set(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
comctl32
rpcrt4
wsock32
)
- IF (NOT WXWINDOWS_USE_SHARED_LIBS)
- SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
+ if (NOT WXWINDOWS_USE_SHARED_LIBS)
+ set(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
## these ones dont seem required, in particular ctl3d32 is not neccesary (Jan Woetzel 07/2003)
# ctl3d32
debug ${WXWINDOWS_STATIC_DEBUG_LIBRARY_ZLIB} optimized ${WXWINDOWS_STATIC_LIBRARY_ZLIB}
@@ -380,15 +380,15 @@ IF(WIN32_STYLE_FIND)
debug ${WXWINDOWS_STATIC_DEBUG_LIBRARY_JPEG} optimized ${WXWINDOWS_STATIC_LIBRARY_JPEG}
debug ${WXWINDOWS_STATIC_DEBUG_LIBRARY_TIFF} optimized ${WXWINDOWS_STATIC_LIBRARY_TIFF}
)
- ENDIF (NOT WXWINDOWS_USE_SHARED_LIBS)
+ endif (NOT WXWINDOWS_USE_SHARED_LIBS)
## opengl/glu: TODO/FIXME: better use FindOpenGL.cmake here
## assume release versions of glu an dopengl, here.
- IF (WXWINDOWS_USE_GL)
- SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
+ if (WXWINDOWS_USE_GL)
+ set(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
opengl32
glu32 )
- ENDIF (WXWINDOWS_USE_GL)
+ endif (WXWINDOWS_USE_GL)
##
## select between use of shared or static wxWindows lib then set libs to use
@@ -399,162 +399,162 @@ IF(WIN32_STYLE_FIND)
## then add the build specific include dir for wx/setup.h
##
- IF(WXWINDOWS_USE_SHARED_LIBS)
- ##MESSAGE("DBG wxWindows use shared lib selected.")
+ if(WXWINDOWS_USE_SHARED_LIBS)
+ ##message("DBG wxWindows use shared lib selected.")
## assume that both builds use the same setup(.h) for simplicity
## shared: both wx (debug and release) found?
## assume that both builds use the same setup(.h) for simplicity
- IF(WXWINDOWS_SHARED_DEBUG_LIBRARY AND WXWINDOWS_SHARED_LIBRARY)
- ##MESSAGE("DBG wx shared: debug and optimized found.")
- FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h
+ if(WXWINDOWS_SHARED_DEBUG_LIBRARY AND WXWINDOWS_SHARED_LIBRARY)
+ ##message("DBG wx shared: debug and optimized found.")
+ find_path(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h
${WXWINDOWS_ROOT_DIR}/lib/mswdlld
${WXWINDOWS_ROOT_DIR}/lib/mswdll
${WXWINDOWS_ROOT_DIR}/lib/vc_dll/mswd
${WXWINDOWS_ROOT_DIR}/lib/vc_dll/msw )
- SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
+ set(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
debug ${WXWINDOWS_SHARED_DEBUG_LIBRARY}
optimized ${WXWINDOWS_SHARED_LIBRARY} )
- IF (WXWINDOWS_USE_GL)
- SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
+ if (WXWINDOWS_USE_GL)
+ set(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
debug ${WXWINDOWS_SHARED_DEBUG_LIBRARY_GL}
optimized ${WXWINDOWS_SHARED_LIBRARY_GL} )
- ENDIF (WXWINDOWS_USE_GL)
- ENDIF(WXWINDOWS_SHARED_DEBUG_LIBRARY AND WXWINDOWS_SHARED_LIBRARY)
+ endif (WXWINDOWS_USE_GL)
+ endif(WXWINDOWS_SHARED_DEBUG_LIBRARY AND WXWINDOWS_SHARED_LIBRARY)
## shared: only debug wx lib found?
- IF(WXWINDOWS_SHARED_DEBUG_LIBRARY)
- IF(NOT WXWINDOWS_SHARED_LIBRARY)
- ##MESSAGE("DBG wx shared: debug (but no optimized) found.")
- FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h
+ if(WXWINDOWS_SHARED_DEBUG_LIBRARY)
+ if(NOT WXWINDOWS_SHARED_LIBRARY)
+ ##message("DBG wx shared: debug (but no optimized) found.")
+ find_path(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h
${WXWINDOWS_ROOT_DIR}/lib/mswdlld
${WXWINDOWS_ROOT_DIR}/lib/vc_dll/mswd )
- SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
+ set(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
${WXWINDOWS_SHARED_DEBUG_LIBRARY} )
- IF (WXWINDOWS_USE_GL)
- SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
+ if (WXWINDOWS_USE_GL)
+ set(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
${WXWINDOWS_SHARED_DEBUG_LIBRARY_GL} )
- ENDIF (WXWINDOWS_USE_GL)
- ENDIF(NOT WXWINDOWS_SHARED_LIBRARY)
- ENDIF(WXWINDOWS_SHARED_DEBUG_LIBRARY)
+ endif (WXWINDOWS_USE_GL)
+ endif(NOT WXWINDOWS_SHARED_LIBRARY)
+ endif(WXWINDOWS_SHARED_DEBUG_LIBRARY)
## shared: only release wx lib found?
- IF(NOT WXWINDOWS_SHARED_DEBUG_LIBRARY)
- IF(WXWINDOWS_SHARED_LIBRARY)
- ##MESSAGE("DBG wx shared: optimized (but no debug) found.")
- FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h
+ if(NOT WXWINDOWS_SHARED_DEBUG_LIBRARY)
+ if(WXWINDOWS_SHARED_LIBRARY)
+ ##message("DBG wx shared: optimized (but no debug) found.")
+ find_path(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h
${WXWINDOWS_ROOT_DIR}/lib/mswdll
${WXWINDOWS_ROOT_DIR}/lib/vc_dll/msw )
- SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
+ set(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
${WXWINDOWS_SHARED_DEBUG_LIBRARY} )
- IF (WXWINDOWS_USE_GL)
- SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
+ if (WXWINDOWS_USE_GL)
+ set(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
${WXWINDOWS_SHARED_DEBUG_LIBRARY_GL} )
- ENDIF (WXWINDOWS_USE_GL)
- ENDIF(WXWINDOWS_SHARED_LIBRARY)
- ENDIF(NOT WXWINDOWS_SHARED_DEBUG_LIBRARY)
+ endif (WXWINDOWS_USE_GL)
+ endif(WXWINDOWS_SHARED_LIBRARY)
+ endif(NOT WXWINDOWS_SHARED_DEBUG_LIBRARY)
## shared: none found?
- IF(NOT WXWINDOWS_SHARED_DEBUG_LIBRARY)
- IF(NOT WXWINDOWS_SHARED_LIBRARY)
- MESSAGE(STATUS
+ if(NOT WXWINDOWS_SHARED_DEBUG_LIBRARY)
+ if(NOT WXWINDOWS_SHARED_LIBRARY)
+ message(STATUS
"No shared wxWindows lib found, but WXWINDOWS_USE_SHARED_LIBS=${WXWINDOWS_USE_SHARED_LIBS}.")
- ENDIF(NOT WXWINDOWS_SHARED_LIBRARY)
- ENDIF(NOT WXWINDOWS_SHARED_DEBUG_LIBRARY)
+ endif(NOT WXWINDOWS_SHARED_LIBRARY)
+ endif(NOT WXWINDOWS_SHARED_DEBUG_LIBRARY)
#########################################################################################
- ELSE(WXWINDOWS_USE_SHARED_LIBS)
+ else(WXWINDOWS_USE_SHARED_LIBS)
- ##jw: DEPRECATED IF(NOT WXWINDOWS_SEPARATE_LIBS_BUILD)
+ ##jw: DEPRECATED if(NOT WXWINDOWS_SEPARATE_LIBS_BUILD)
## static: both wx (debug and release) found?
## assume that both builds use the same setup(.h) for simplicity
- IF(WXWINDOWS_STATIC_DEBUG_LIBRARY AND WXWINDOWS_STATIC_LIBRARY)
- ##MESSAGE("DBG wx static: debug and optimized found.")
- FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h
+ if(WXWINDOWS_STATIC_DEBUG_LIBRARY AND WXWINDOWS_STATIC_LIBRARY)
+ ##message("DBG wx static: debug and optimized found.")
+ find_path(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h
${WXWINDOWS_ROOT_DIR}/lib/mswd
${WXWINDOWS_ROOT_DIR}/lib/msw
${WXWINDOWS_ROOT_DIR}/lib/vc_lib/mswd
${WXWINDOWS_ROOT_DIR}/lib/vc_lib/msw )
- SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
+ set(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
debug ${WXWINDOWS_STATIC_DEBUG_LIBRARY}
optimized ${WXWINDOWS_STATIC_LIBRARY} )
- IF (WXWINDOWS_USE_GL)
- SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
+ if (WXWINDOWS_USE_GL)
+ set(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
debug ${WXWINDOWS_STATIC_DEBUG_LIBRARY_GL}
optimized ${WXWINDOWS_STATIC_LIBRARY_GL} )
- ENDIF (WXWINDOWS_USE_GL)
- ENDIF(WXWINDOWS_STATIC_DEBUG_LIBRARY AND WXWINDOWS_STATIC_LIBRARY)
+ endif (WXWINDOWS_USE_GL)
+ endif(WXWINDOWS_STATIC_DEBUG_LIBRARY AND WXWINDOWS_STATIC_LIBRARY)
## static: only debug wx lib found?
- IF(WXWINDOWS_STATIC_DEBUG_LIBRARY)
- IF(NOT WXWINDOWS_STATIC_LIBRARY)
- ##MESSAGE("DBG wx static: debug (but no optimized) found.")
- FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h
+ if(WXWINDOWS_STATIC_DEBUG_LIBRARY)
+ if(NOT WXWINDOWS_STATIC_LIBRARY)
+ ##message("DBG wx static: debug (but no optimized) found.")
+ find_path(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h
${WXWINDOWS_ROOT_DIR}/lib/mswd
${WXWINDOWS_ROOT_DIR}/lib/vc_lib/mswd )
- SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
+ set(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
${WXWINDOWS_STATIC_DEBUG_LIBRARY} )
- IF (WXWINDOWS_USE_GL)
- SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
+ if (WXWINDOWS_USE_GL)
+ set(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
${WXWINDOWS_STATIC_DEBUG_LIBRARY_GL} )
- ENDIF (WXWINDOWS_USE_GL)
- ENDIF(NOT WXWINDOWS_STATIC_LIBRARY)
- ENDIF(WXWINDOWS_STATIC_DEBUG_LIBRARY)
+ endif (WXWINDOWS_USE_GL)
+ endif(NOT WXWINDOWS_STATIC_LIBRARY)
+ endif(WXWINDOWS_STATIC_DEBUG_LIBRARY)
## static: only release wx lib found?
- IF(NOT WXWINDOWS_STATIC_DEBUG_LIBRARY)
- IF(WXWINDOWS_STATIC_LIBRARY)
- ##MESSAGE("DBG wx static: optimized (but no debug) found.")
- FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h
+ if(NOT WXWINDOWS_STATIC_DEBUG_LIBRARY)
+ if(WXWINDOWS_STATIC_LIBRARY)
+ ##message("DBG wx static: optimized (but no debug) found.")
+ find_path(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h
${WXWINDOWS_ROOT_DIR}/lib/msw
${WXWINDOWS_ROOT_DIR}/lib/vc_lib/msw )
- SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
+ set(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
${WXWINDOWS_STATIC_LIBRARY} )
- IF (WXWINDOWS_USE_GL)
- SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
+ if (WXWINDOWS_USE_GL)
+ set(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES}
${WXWINDOWS_STATIC_LIBRARY_GL} )
- ENDIF (WXWINDOWS_USE_GL)
- ENDIF(WXWINDOWS_STATIC_LIBRARY)
- ENDIF(NOT WXWINDOWS_STATIC_DEBUG_LIBRARY)
+ endif (WXWINDOWS_USE_GL)
+ endif(WXWINDOWS_STATIC_LIBRARY)
+ endif(NOT WXWINDOWS_STATIC_DEBUG_LIBRARY)
## static: none found?
- IF(NOT WXWINDOWS_STATIC_DEBUG_LIBRARY AND NOT WXWINDOWS_SEPARATE_LIBS_BUILD)
- IF(NOT WXWINDOWS_STATIC_LIBRARY)
- MESSAGE(STATUS
+ if(NOT WXWINDOWS_STATIC_DEBUG_LIBRARY AND NOT WXWINDOWS_SEPARATE_LIBS_BUILD)
+ if(NOT WXWINDOWS_STATIC_LIBRARY)
+ message(STATUS
"No static wxWindows lib found, but WXWINDOWS_USE_SHARED_LIBS=${WXWINDOWS_USE_SHARED_LIBS}.")
- ENDIF(NOT WXWINDOWS_STATIC_LIBRARY)
- ENDIF(NOT WXWINDOWS_STATIC_DEBUG_LIBRARY AND NOT WXWINDOWS_SEPARATE_LIBS_BUILD)
- ENDIF(WXWINDOWS_USE_SHARED_LIBS)
+ endif(NOT WXWINDOWS_STATIC_LIBRARY)
+ endif(NOT WXWINDOWS_STATIC_DEBUG_LIBRARY AND NOT WXWINDOWS_SEPARATE_LIBS_BUILD)
+ endif(WXWINDOWS_USE_SHARED_LIBS)
## not neccessary in wxWindows 2.4.1 and 2.6.2
## but it may fix a previous bug, see
## http://lists.wxwindows.org/cgi-bin/ezmlm-cgi?8:mss:37574:200305:mpdioeneabobmgjenoap
- OPTION(WXWINDOWS_SET_DEFINITIONS "Set additional defines for wxWindows" OFF)
- MARK_AS_ADVANCED(WXWINDOWS_SET_DEFINITIONS)
- IF (WXWINDOWS_SET_DEFINITIONS)
- SET(WXWINDOWS_DEFINITIONS "-DWINVER=0x400")
- ELSE (WXWINDOWS_SET_DEFINITIONS)
+ option(WXWINDOWS_SET_DEFINITIONS "Set additional defines for wxWindows" OFF)
+ mark_as_advanced(WXWINDOWS_SET_DEFINITIONS)
+ if (WXWINDOWS_SET_DEFINITIONS)
+ set(WXWINDOWS_DEFINITIONS "-DWINVER=0x400")
+ else (WXWINDOWS_SET_DEFINITIONS)
# clear:
- SET(WXWINDOWS_DEFINITIONS "")
- ENDIF (WXWINDOWS_SET_DEFINITIONS)
+ set(WXWINDOWS_DEFINITIONS "")
+ endif (WXWINDOWS_SET_DEFINITIONS)
## Find the include directories for wxwindows
## the first, build specific for wx/setup.h was determined before.
## add inc dir for general for "wx/wx.h"
- FIND_PATH(WXWINDOWS_INCLUDE_DIR wx/wx.h
+ find_path(WXWINDOWS_INCLUDE_DIR wx/wx.h
"${WXWINDOWS_ROOT_DIR}/include" )
## append the build specific include dir for wx/setup.h:
- IF (WXWINDOWS_INCLUDE_DIR_SETUPH)
- SET(WXWINDOWS_INCLUDE_DIR ${WXWINDOWS_INCLUDE_DIR} ${WXWINDOWS_INCLUDE_DIR_SETUPH} )
- ENDIF (WXWINDOWS_INCLUDE_DIR_SETUPH)
+ if (WXWINDOWS_INCLUDE_DIR_SETUPH)
+ set(WXWINDOWS_INCLUDE_DIR ${WXWINDOWS_INCLUDE_DIR} ${WXWINDOWS_INCLUDE_DIR_SETUPH} )
+ endif (WXWINDOWS_INCLUDE_DIR_SETUPH)
- MARK_AS_ADVANCED(
+ mark_as_advanced(
WXWINDOWS_ROOT_DIR
WXWINDOWS_INCLUDE_DIR
WXWINDOWS_INCLUDE_DIR_SETUPH
@@ -579,9 +579,9 @@ IF(WIN32_STYLE_FIND)
)
-ELSE(WIN32_STYLE_FIND)
+else(WIN32_STYLE_FIND)
- IF (UNIX_STYLE_FIND)
+ if (UNIX_STYLE_FIND)
## ######################################################################
##
## UNIX/Linux specific:
@@ -590,85 +590,85 @@ ELSE(WIN32_STYLE_FIND)
## 06/2003 Jan Woetzel
##
- OPTION(WXWINDOWS_USE_SHARED_LIBS "Use shared versions (.so) of wxWindows libraries" ON)
- MARK_AS_ADVANCED(WXWINDOWS_USE_SHARED_LIBS)
+ option(WXWINDOWS_USE_SHARED_LIBS "Use shared versions (.so) of wxWindows libraries" ON)
+ mark_as_advanced(WXWINDOWS_USE_SHARED_LIBS)
# JW removed option and force the develper th SET it.
- # OPTION(WXWINDOWS_USE_GL "use wxWindows with GL support (use additional
+ # option(WXWINDOWS_USE_GL "use wxWindows with GL support (use additional
# --gl-libs for wx-config)?" OFF)
# wx-config should be in your path anyhow, usually no need to set WXWIN or
# search in ../wx or ../../wx
- FIND_PROGRAM(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE wx-config
+ find_program(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE wx-config
$ENV{WXWIN}
$ENV{WXWIN}/bin
../wx/bin
../../wx/bin )
# check wether wx-config was found:
- IF(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE)
+ if(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE)
# use shared/static wx lib?
# remember: always link shared to use systems GL etc. libs (no static
# linking, just link *against* static .a libs)
- IF(WXWINDOWS_USE_SHARED_LIBS)
- SET(WX_CONFIG_ARGS_LIBS "--libs")
- ELSE(WXWINDOWS_USE_SHARED_LIBS)
- SET(WX_CONFIG_ARGS_LIBS "--static --libs")
- ENDIF(WXWINDOWS_USE_SHARED_LIBS)
+ if(WXWINDOWS_USE_SHARED_LIBS)
+ set(WX_CONFIG_ARGS_LIBS "--libs")
+ else(WXWINDOWS_USE_SHARED_LIBS)
+ set(WX_CONFIG_ARGS_LIBS "--static --libs")
+ endif(WXWINDOWS_USE_SHARED_LIBS)
# do we need additionial wx GL stuff like GLCanvas ?
- IF(WXWINDOWS_USE_GL)
- SET(WX_CONFIG_ARGS_LIBS "${WX_CONFIG_ARGS_LIBS} --gl-libs" )
- ENDIF(WXWINDOWS_USE_GL)
- ##MESSAGE("DBG: WX_CONFIG_ARGS_LIBS=${WX_CONFIG_ARGS_LIBS}===")
+ if(WXWINDOWS_USE_GL)
+ set(WX_CONFIG_ARGS_LIBS "${WX_CONFIG_ARGS_LIBS} --gl-libs" )
+ endif(WXWINDOWS_USE_GL)
+ ##message("DBG: WX_CONFIG_ARGS_LIBS=${WX_CONFIG_ARGS_LIBS}===")
# set CXXFLAGS to be fed into CMAKE_CXX_FLAGS by the user:
- IF (HAVE_ISYSTEM) # does the compiler support -isystem ?
- IF (NOT APPLE) # -isystem seem sto be unsuppored on Mac
- IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX )
- IF (CMAKE_CXX_COMPILER MATCHES g\\+\\+)
- SET(CMAKE_WXWINDOWS_CXX_FLAGS "`${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE} --cxxflags|sed -e s/-I/-isystem/g`")
- ELSE(CMAKE_CXX_COMPILER MATCHES g\\+\\+)
- SET(CMAKE_WXWINDOWS_CXX_FLAGS "`${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE} --cxxflags`")
- ENDIF(CMAKE_CXX_COMPILER MATCHES g\\+\\+)
- ENDIF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX )
- ENDIF (NOT APPLE)
- ENDIF (HAVE_ISYSTEM)
- ##MESSAGE("DBG: for compilation:
+ if (HAVE_ISYSTEM) # does the compiler support -isystem ?
+ if (NOT APPLE) # -isystem seem sto be unsuppored on Mac
+ if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX )
+ if (CMAKE_CXX_COMPILER MATCHES g\\+\\+)
+ set(CMAKE_WXWINDOWS_CXX_FLAGS "`${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE} --cxxflags|sed -e s/-I/-isystem/g`")
+ else(CMAKE_CXX_COMPILER MATCHES g\\+\\+)
+ set(CMAKE_WXWINDOWS_CXX_FLAGS "`${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE} --cxxflags`")
+ endif(CMAKE_CXX_COMPILER MATCHES g\\+\\+)
+ endif(CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX )
+ endif (NOT APPLE)
+ endif (HAVE_ISYSTEM)
+ ##message("DBG: for compilation:
##CMAKE_WXWINDOWS_CXX_FLAGS=${CMAKE_WXWINDOWS_CXX_FLAGS}===")
# keep the back-quoted string for clarity
- SET(WXWINDOWS_LIBRARIES "`${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE} ${WX_CONFIG_ARGS_LIBS}`")
- ##MESSAGE("DBG2: for linking:
+ set(WXWINDOWS_LIBRARIES "`${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE} ${WX_CONFIG_ARGS_LIBS}`")
+ ##message("DBG2: for linking:
##WXWINDOWS_LIBRARIES=${WXWINDOWS_LIBRARIES}===")
# evaluate wx-config output to separate linker flags and linkdirs for
# rpath:
- EXEC_PROGRAM(${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE}
+ exec_program(${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE}
ARGS ${WX_CONFIG_ARGS_LIBS}
OUTPUT_VARIABLE WX_CONFIG_LIBS )
## extract linkdirs (-L) for rpath
## use regular expression to match wildcard equivalent "-L*<endchar>"
## with <endchar> is a space or a semicolon
- STRING(REGEX MATCHALL "[-][L]([^ ;])+" WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX "${WX_CONFIG_LIBS}" )
- # MESSAGE("DBG WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX=${WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX}")
+ string(REGEX MATCHALL "[-][L]([^ ;])+" WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX "${WX_CONFIG_LIBS}" )
+ # message("DBG WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX=${WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX}")
## remove prefix -L because we need the pure directory for LINK_DIRECTORIES
## replace -L by ; because the separator seems to be lost otherwise (bug or
## feature?)
- IF(WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX)
- STRING(REGEX REPLACE "[-][L]" ";" WXWINDOWS_LINK_DIRECTORIES ${WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX} )
- # MESSAGE("DBG WXWINDOWS_LINK_DIRECTORIES=${WXWINDOWS_LINK_DIRECTORIES}")
- ENDIF(WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX)
+ if(WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX)
+ string(REGEX REPLACE "[-][L]" ";" WXWINDOWS_LINK_DIRECTORIES ${WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX} )
+ # message("DBG WXWINDOWS_LINK_DIRECTORIES=${WXWINDOWS_LINK_DIRECTORIES}")
+ endif(WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX)
## replace space separated string by semicolon separated vector to make it
## work with LINK_DIRECTORIES
- SEPARATE_ARGUMENTS(WXWINDOWS_LINK_DIRECTORIES)
+ separate_arguments(WXWINDOWS_LINK_DIRECTORIES)
- MARK_AS_ADVANCED(
+ mark_as_advanced(
CMAKE_WXWINDOWS_CXX_FLAGS
WXWINDOWS_INCLUDE_DIR
WXWINDOWS_LIBRARIES
@@ -677,30 +677,30 @@ ELSE(WIN32_STYLE_FIND)
## we really need wx-config...
- ELSE(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE)
- MESSAGE(STATUS "Cannot find wx-config anywhere on the system. Please put the file into your path or specify it in CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE.")
- MARK_AS_ADVANCED(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE)
- ENDIF(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE)
+ else(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE)
+ message(STATUS "Cannot find wx-config anywhere on the system. Please put the file into your path or specify it in CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE.")
+ mark_as_advanced(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE)
+ endif(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE)
- ELSE(UNIX_STYLE_FIND)
- MESSAGE(STATUS "FindwxWindows.cmake: Platform unknown/unsupported by FindwxWindows.cmake. It's neither WIN32 nor UNIX")
- ENDIF(UNIX_STYLE_FIND)
-ENDIF(WIN32_STYLE_FIND)
+ else(UNIX_STYLE_FIND)
+ message(STATUS "FindwxWindows.cmake: Platform unknown/unsupported by FindwxWindows.cmake. It's neither WIN32 nor UNIX")
+ endif(UNIX_STYLE_FIND)
+endif(WIN32_STYLE_FIND)
-IF(WXWINDOWS_LIBRARIES)
- IF(WXWINDOWS_INCLUDE_DIR OR CMAKE_WXWINDOWS_CXX_FLAGS)
+if(WXWINDOWS_LIBRARIES)
+ if(WXWINDOWS_INCLUDE_DIR OR CMAKE_WXWINDOWS_CXX_FLAGS)
## found all we need.
- SET(WXWINDOWS_FOUND 1)
+ set(WXWINDOWS_FOUND 1)
## set deprecated variables for backward compatibility:
- SET(CMAKE_WX_CAN_COMPILE ${WXWINDOWS_FOUND})
- SET(WXWINDOWS_LIBRARY ${WXWINDOWS_LIBRARIES})
- SET(WXWINDOWS_INCLUDE_PATH ${WXWINDOWS_INCLUDE_DIR})
- SET(WXWINDOWS_LINK_DIRECTORIES ${WXWINDOWS_LINK_DIRECTORIES})
- SET(CMAKE_WX_CXX_FLAGS ${CMAKE_WXWINDOWS_CXX_FLAGS})
-
- ENDIF(WXWINDOWS_INCLUDE_DIR OR CMAKE_WXWINDOWS_CXX_FLAGS)
-ENDIF(WXWINDOWS_LIBRARIES)
+ set(CMAKE_WX_CAN_COMPILE ${WXWINDOWS_FOUND})
+ set(WXWINDOWS_LIBRARY ${WXWINDOWS_LIBRARIES})
+ set(WXWINDOWS_INCLUDE_PATH ${WXWINDOWS_INCLUDE_DIR})
+ set(WXWINDOWS_LINK_DIRECTORIES ${WXWINDOWS_LINK_DIRECTORIES})
+ set(CMAKE_WX_CXX_FLAGS ${CMAKE_WXWINDOWS_CXX_FLAGS})
+
+ endif(WXWINDOWS_INCLUDE_DIR OR CMAKE_WXWINDOWS_CXX_FLAGS)
+endif(WXWINDOWS_LIBRARIES)
diff --git a/Modules/ITKCompatibility.cmake b/Modules/ITKCompatibility.cmake
index efd9c284e6..ca2d69bfb3 100644
--- a/Modules/ITKCompatibility.cmake
+++ b/Modules/ITKCompatibility.cmake
@@ -13,5 +13,5 @@
# License text for the above reference.)
# work around an old bug in ITK prior to verison 3.0
-SET(TIFF_RIGHT_VERSION 1)
+set(TIFF_RIGHT_VERSION 1)
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 65d254a4a8..f6b185f142 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -1,6 +1,6 @@
# By including this file, all library files listed in the variable
# CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS will be installed with
-# INSTALL(PROGRAMS ...) into bin for WIN32 and lib
+# install(PROGRAMS ...) into bin for WIN32 and lib
# for non-WIN32. If CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP is set to TRUE
# before including this file, then the INSTALL command is not called.
# The user can use the variable CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS to use a
@@ -36,196 +36,196 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-IF(MSVC)
- FILE(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT)
+if(MSVC)
+ file(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT)
- IF(CMAKE_CL_64)
- IF(MSVC_VERSION GREATER 1599)
+ if(CMAKE_CL_64)
+ if(MSVC_VERSION GREATER 1599)
# VS 10 and later:
- SET(CMAKE_MSVC_ARCH x64)
- ELSE()
+ set(CMAKE_MSVC_ARCH x64)
+ else()
# VS 9 and earlier:
- SET(CMAKE_MSVC_ARCH amd64)
- ENDIF()
- ELSE(CMAKE_CL_64)
- SET(CMAKE_MSVC_ARCH x86)
- ENDIF(CMAKE_CL_64)
+ set(CMAKE_MSVC_ARCH amd64)
+ endif()
+ else(CMAKE_CL_64)
+ set(CMAKE_MSVC_ARCH x86)
+ endif(CMAKE_CL_64)
- GET_FILENAME_COMPONENT(devenv_dir "${CMAKE_MAKE_PROGRAM}" PATH)
- GET_FILENAME_COMPONENT(base_dir "${devenv_dir}/../.." ABSOLUTE)
+ get_filename_component(devenv_dir "${CMAKE_MAKE_PROGRAM}" PATH)
+ get_filename_component(base_dir "${devenv_dir}/../.." ABSOLUTE)
- IF(MSVC70)
- SET(__install__libs
+ if(MSVC70)
+ set(__install__libs
"${SYSTEMROOT}/system32/msvcp70.dll"
"${SYSTEMROOT}/system32/msvcr70.dll"
)
- ENDIF(MSVC70)
+ endif(MSVC70)
- IF(MSVC71)
- SET(__install__libs
+ if(MSVC71)
+ set(__install__libs
"${SYSTEMROOT}/system32/msvcp71.dll"
"${SYSTEMROOT}/system32/msvcr71.dll"
)
- ENDIF(MSVC71)
+ endif(MSVC71)
- IF(MSVC80)
+ if(MSVC80)
# Find the runtime library redistribution directory.
- GET_FILENAME_COMPONENT(msvc_install_dir
+ get_filename_component(msvc_install_dir
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir]" ABSOLUTE)
- FIND_PATH(MSVC80_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest
+ find_path(MSVC80_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest
PATHS
"${msvc_install_dir}/../../VC/redist"
"${base_dir}/VC/redist"
)
- MARK_AS_ADVANCED(MSVC80_REDIST_DIR)
- SET(MSVC80_CRT_DIR "${MSVC80_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT")
+ mark_as_advanced(MSVC80_REDIST_DIR)
+ set(MSVC80_CRT_DIR "${MSVC80_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT")
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
- IF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
- SET(__install__libs
+ if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
+ set(__install__libs
"${MSVC80_CRT_DIR}/Microsoft.VC80.CRT.manifest"
"${MSVC80_CRT_DIR}/msvcm80.dll"
"${MSVC80_CRT_DIR}/msvcp80.dll"
"${MSVC80_CRT_DIR}/msvcr80.dll"
)
- ENDIF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
+ endif(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
- IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
- SET(MSVC80_CRT_DIR
+ if(CMAKE_INSTALL_DEBUG_LIBRARIES)
+ set(MSVC80_CRT_DIR
"${MSVC80_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC80.DebugCRT")
- SET(__install__libs ${__install__libs}
+ set(__install__libs ${__install__libs}
"${MSVC80_CRT_DIR}/Microsoft.VC80.DebugCRT.manifest"
"${MSVC80_CRT_DIR}/msvcm80d.dll"
"${MSVC80_CRT_DIR}/msvcp80d.dll"
"${MSVC80_CRT_DIR}/msvcr80d.dll"
)
- ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
- ENDIF(MSVC80)
+ endif(CMAKE_INSTALL_DEBUG_LIBRARIES)
+ endif(MSVC80)
- IF(MSVC90)
+ if(MSVC90)
# Find the runtime library redistribution directory.
- GET_FILENAME_COMPONENT(msvc_install_dir
+ get_filename_component(msvc_install_dir
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir]" ABSOLUTE)
- GET_FILENAME_COMPONENT(msvc_express_install_dir
+ get_filename_component(msvc_express_install_dir
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir]" ABSOLUTE)
- FIND_PATH(MSVC90_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT/Microsoft.VC90.CRT.manifest
+ find_path(MSVC90_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT/Microsoft.VC90.CRT.manifest
PATHS
"${msvc_install_dir}/../../VC/redist"
"${msvc_express_install_dir}/../../VC/redist"
"${base_dir}/VC/redist"
)
- MARK_AS_ADVANCED(MSVC90_REDIST_DIR)
- SET(MSVC90_CRT_DIR "${MSVC90_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT")
+ mark_as_advanced(MSVC90_REDIST_DIR)
+ set(MSVC90_CRT_DIR "${MSVC90_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT")
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
- IF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
- SET(__install__libs
+ if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
+ set(__install__libs
"${MSVC90_CRT_DIR}/Microsoft.VC90.CRT.manifest"
"${MSVC90_CRT_DIR}/msvcm90.dll"
"${MSVC90_CRT_DIR}/msvcp90.dll"
"${MSVC90_CRT_DIR}/msvcr90.dll"
)
- ENDIF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
+ endif(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
- IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
- SET(MSVC90_CRT_DIR
+ if(CMAKE_INSTALL_DEBUG_LIBRARIES)
+ set(MSVC90_CRT_DIR
"${MSVC90_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugCRT")
- SET(__install__libs ${__install__libs}
+ set(__install__libs ${__install__libs}
"${MSVC90_CRT_DIR}/Microsoft.VC90.DebugCRT.manifest"
"${MSVC90_CRT_DIR}/msvcm90d.dll"
"${MSVC90_CRT_DIR}/msvcp90d.dll"
"${MSVC90_CRT_DIR}/msvcr90d.dll"
)
- ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
- ENDIF(MSVC90)
+ endif(CMAKE_INSTALL_DEBUG_LIBRARIES)
+ endif(MSVC90)
- MACRO(MSVCRT_FILES_FOR_VERSION version)
- SET(v "${version}")
+ macro(MSVCRT_FILES_FOR_VERSION version)
+ set(v "${version}")
# Find the runtime library redistribution directory.
- GET_FILENAME_COMPONENT(msvc_install_dir
+ get_filename_component(msvc_install_dir
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${v}.0;InstallDir]" ABSOLUTE)
- FIND_PATH(MSVC${v}_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.CRT
+ find_path(MSVC${v}_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.CRT
PATHS
"${msvc_install_dir}/../../VC/redist"
"${base_dir}/VC/redist"
"$ENV{ProgramFiles}/Microsoft Visual Studio ${v}.0/VC/redist"
"$ENV{ProgramFiles(x86)}/Microsoft Visual Studio ${v}.0/VC/redist"
)
- MARK_AS_ADVANCED(MSVC${v}_REDIST_DIR)
- SET(MSVC${v}_CRT_DIR "${MSVC${v}_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.CRT")
+ mark_as_advanced(MSVC${v}_REDIST_DIR)
+ set(MSVC${v}_CRT_DIR "${MSVC${v}_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.CRT")
- IF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
- SET(__install__libs
+ if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
+ set(__install__libs
"${MSVC${v}_CRT_DIR}/msvcp${v}0.dll"
"${MSVC${v}_CRT_DIR}/msvcr${v}0.dll"
)
- ENDIF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
+ endif(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
- IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
- SET(MSVC${v}_CRT_DIR
+ if(CMAKE_INSTALL_DEBUG_LIBRARIES)
+ set(MSVC${v}_CRT_DIR
"${MSVC${v}_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.DebugCRT")
- SET(__install__libs ${__install__libs}
+ set(__install__libs ${__install__libs}
"${MSVC${v}_CRT_DIR}/msvcp${v}0d.dll"
"${MSVC${v}_CRT_DIR}/msvcr${v}0d.dll"
)
- ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
- ENDMACRO()
+ endif(CMAKE_INSTALL_DEBUG_LIBRARIES)
+ endmacro()
- IF(MSVC10)
+ if(MSVC10)
MSVCRT_FILES_FOR_VERSION(10)
- ENDIF()
+ endif()
- IF(MSVC11)
+ if(MSVC11)
MSVCRT_FILES_FOR_VERSION(11)
- ENDIF()
+ endif()
- IF(CMAKE_INSTALL_MFC_LIBRARIES)
- IF(MSVC70)
- SET(__install__libs ${__install__libs}
+ if(CMAKE_INSTALL_MFC_LIBRARIES)
+ if(MSVC70)
+ set(__install__libs ${__install__libs}
"${SYSTEMROOT}/system32/mfc70.dll"
)
- ENDIF(MSVC70)
+ endif(MSVC70)
- IF(MSVC71)
- SET(__install__libs ${__install__libs}
+ if(MSVC71)
+ set(__install__libs ${__install__libs}
"${SYSTEMROOT}/system32/mfc71.dll"
)
- ENDIF(MSVC71)
+ endif(MSVC71)
- IF(MSVC80)
- IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
- SET(MSVC80_MFC_DIR
+ if(MSVC80)
+ if(CMAKE_INSTALL_DEBUG_LIBRARIES)
+ set(MSVC80_MFC_DIR
"${MSVC80_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC80.DebugMFC")
- SET(__install__libs ${__install__libs}
+ set(__install__libs ${__install__libs}
"${MSVC80_MFC_DIR}/Microsoft.VC80.DebugMFC.manifest"
"${MSVC80_MFC_DIR}/mfc80d.dll"
"${MSVC80_MFC_DIR}/mfc80ud.dll"
"${MSVC80_MFC_DIR}/mfcm80d.dll"
"${MSVC80_MFC_DIR}/mfcm80ud.dll"
)
- ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
+ endif(CMAKE_INSTALL_DEBUG_LIBRARIES)
- SET(MSVC80_MFC_DIR "${MSVC80_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.MFC")
+ set(MSVC80_MFC_DIR "${MSVC80_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.MFC")
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
- IF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
- SET(__install__libs ${__install__libs}
+ if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
+ set(__install__libs ${__install__libs}
"${MSVC80_MFC_DIR}/Microsoft.VC80.MFC.manifest"
"${MSVC80_MFC_DIR}/mfc80.dll"
"${MSVC80_MFC_DIR}/mfc80u.dll"
"${MSVC80_MFC_DIR}/mfcm80.dll"
"${MSVC80_MFC_DIR}/mfcm80u.dll"
)
- ENDIF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
+ endif(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
# include the language dll's for vs8 as well as the actuall dll's
- SET(MSVC80_MFCLOC_DIR "${MSVC80_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.MFCLOC")
+ set(MSVC80_MFCLOC_DIR "${MSVC80_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.MFCLOC")
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
- SET(__install__libs ${__install__libs}
+ set(__install__libs ${__install__libs}
"${MSVC80_MFCLOC_DIR}/Microsoft.VC80.MFCLOC.manifest"
"${MSVC80_MFCLOC_DIR}/mfc80chs.dll"
"${MSVC80_MFCLOC_DIR}/mfc80cht.dll"
@@ -237,39 +237,39 @@ IF(MSVC)
"${MSVC80_MFCLOC_DIR}/mfc80jpn.dll"
"${MSVC80_MFCLOC_DIR}/mfc80kor.dll"
)
- ENDIF(MSVC80)
+ endif(MSVC80)
- IF(MSVC90)
- IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
- SET(MSVC90_MFC_DIR
+ if(MSVC90)
+ if(CMAKE_INSTALL_DEBUG_LIBRARIES)
+ set(MSVC90_MFC_DIR
"${MSVC90_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugMFC")
- SET(__install__libs ${__install__libs}
+ set(__install__libs ${__install__libs}
"${MSVC90_MFC_DIR}/Microsoft.VC90.DebugMFC.manifest"
"${MSVC90_MFC_DIR}/mfc90d.dll"
"${MSVC90_MFC_DIR}/mfc90ud.dll"
"${MSVC90_MFC_DIR}/mfcm90d.dll"
"${MSVC90_MFC_DIR}/mfcm90ud.dll"
)
- ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
+ endif(CMAKE_INSTALL_DEBUG_LIBRARIES)
- SET(MSVC90_MFC_DIR "${MSVC90_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.MFC")
+ set(MSVC90_MFC_DIR "${MSVC90_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.MFC")
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
- IF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
- SET(__install__libs ${__install__libs}
+ if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
+ set(__install__libs ${__install__libs}
"${MSVC90_MFC_DIR}/Microsoft.VC90.MFC.manifest"
"${MSVC90_MFC_DIR}/mfc90.dll"
"${MSVC90_MFC_DIR}/mfc90u.dll"
"${MSVC90_MFC_DIR}/mfcm90.dll"
"${MSVC90_MFC_DIR}/mfcm90u.dll"
)
- ENDIF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
+ endif(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
# include the language dll's for vs9 as well as the actuall dll's
- SET(MSVC90_MFCLOC_DIR "${MSVC90_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.MFCLOC")
+ set(MSVC90_MFCLOC_DIR "${MSVC90_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.MFCLOC")
# Install the manifest that allows DLLs to be loaded from the
# directory containing the executable.
- SET(__install__libs ${__install__libs}
+ set(__install__libs ${__install__libs}
"${MSVC90_MFCLOC_DIR}/Microsoft.VC90.MFCLOC.manifest"
"${MSVC90_MFCLOC_DIR}/mfc90chs.dll"
"${MSVC90_MFCLOC_DIR}/mfc90cht.dll"
@@ -281,35 +281,35 @@ IF(MSVC)
"${MSVC90_MFCLOC_DIR}/mfc90jpn.dll"
"${MSVC90_MFCLOC_DIR}/mfc90kor.dll"
)
- ENDIF(MSVC90)
+ endif(MSVC90)
- MACRO(MFC_FILES_FOR_VERSION version)
- SET(v "${version}")
+ macro(MFC_FILES_FOR_VERSION version)
+ set(v "${version}")
- IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
- SET(MSVC${v}_MFC_DIR
+ if(CMAKE_INSTALL_DEBUG_LIBRARIES)
+ set(MSVC${v}_MFC_DIR
"${MSVC${v}_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.DebugMFC")
- SET(__install__libs ${__install__libs}
+ set(__install__libs ${__install__libs}
"${MSVC${v}_MFC_DIR}/mfc${v}0d.dll"
"${MSVC${v}_MFC_DIR}/mfc${v}0ud.dll"
"${MSVC${v}_MFC_DIR}/mfcm${v}0d.dll"
"${MSVC${v}_MFC_DIR}/mfcm${v}0ud.dll"
)
- ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
+ endif(CMAKE_INSTALL_DEBUG_LIBRARIES)
- SET(MSVC${v}_MFC_DIR "${MSVC${v}_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.MFC")
- IF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
- SET(__install__libs ${__install__libs}
+ set(MSVC${v}_MFC_DIR "${MSVC${v}_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.MFC")
+ if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
+ set(__install__libs ${__install__libs}
"${MSVC${v}_MFC_DIR}/mfc${v}0.dll"
"${MSVC${v}_MFC_DIR}/mfc${v}0u.dll"
"${MSVC${v}_MFC_DIR}/mfcm${v}0.dll"
"${MSVC${v}_MFC_DIR}/mfcm${v}0u.dll"
)
- ENDIF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
+ endif(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
# include the language dll's as well as the actuall dll's
- SET(MSVC${v}_MFCLOC_DIR "${MSVC${v}_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.MFCLOC")
- SET(__install__libs ${__install__libs}
+ set(MSVC${v}_MFCLOC_DIR "${MSVC${v}_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC${v}0.MFCLOC")
+ set(__install__libs ${__install__libs}
"${MSVC${v}_MFCLOC_DIR}/mfc${v}0chs.dll"
"${MSVC${v}_MFCLOC_DIR}/mfc${v}0cht.dll"
"${MSVC${v}_MFCLOC_DIR}/mfc${v}0enu.dll"
@@ -320,82 +320,82 @@ IF(MSVC)
"${MSVC${v}_MFCLOC_DIR}/mfc${v}0jpn.dll"
"${MSVC${v}_MFCLOC_DIR}/mfc${v}0kor.dll"
)
- ENDMACRO()
+ endmacro()
- IF(MSVC10)
+ if(MSVC10)
MFC_FILES_FOR_VERSION(10)
- ENDIF()
+ endif()
- IF(MSVC11)
+ if(MSVC11)
MFC_FILES_FOR_VERSION(11)
- ENDIF()
- ENDIF(CMAKE_INSTALL_MFC_LIBRARIES)
+ endif()
+ endif(CMAKE_INSTALL_MFC_LIBRARIES)
- FOREACH(lib
+ foreach(lib
${__install__libs}
)
- IF(EXISTS ${lib})
- SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
+ if(EXISTS ${lib})
+ set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
- ELSE(EXISTS ${lib})
- IF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
- MESSAGE(WARNING "system runtime library file does not exist: '${lib}'")
+ else(EXISTS ${lib})
+ if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
+ message(WARNING "system runtime library file does not exist: '${lib}'")
# This warning indicates an incomplete Visual Studio installation
# or a bug somewhere above here in this file.
# If you would like to avoid this warning, fix the real problem, or
# set CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS before including
# this file.
- ENDIF()
- ENDIF(EXISTS ${lib})
- ENDFOREACH(lib)
-ENDIF(MSVC)
-
-IF(WATCOM)
- GET_FILENAME_COMPONENT( CompilerPath ${CMAKE_C_COMPILER} PATH )
- IF(WATCOM17)
- SET( __install__libs ${CompilerPath}/clbr17.dll
+ endif()
+ endif(EXISTS ${lib})
+ endforeach(lib)
+endif(MSVC)
+
+if(WATCOM)
+ get_filename_component( CompilerPath ${CMAKE_C_COMPILER} PATH )
+ if(WATCOM17)
+ set( __install__libs ${CompilerPath}/clbr17.dll
${CompilerPath}/mt7r17.dll ${CompilerPath}/plbr17.dll )
- ENDIF()
- IF(WATCOM18)
- SET( __install__libs ${CompilerPath}/clbr18.dll
+ endif()
+ if(WATCOM18)
+ set( __install__libs ${CompilerPath}/clbr18.dll
${CompilerPath}/mt7r18.dll ${CompilerPath}/plbr18.dll )
- ENDIF()
- IF(WATCOM19)
- SET( __install__libs ${CompilerPath}/clbr19.dll
+ endif()
+ if(WATCOM19)
+ set( __install__libs ${CompilerPath}/clbr19.dll
${CompilerPath}/mt7r19.dll ${CompilerPath}/plbr19.dll )
- ENDIF()
- FOREACH(lib
+ endif()
+ foreach(lib
${__install__libs}
)
- IF(EXISTS ${lib})
- SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
+ if(EXISTS ${lib})
+ set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
- ELSE()
- IF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
- MESSAGE(WARNING "system runtime library file does not exist: '${lib}'")
+ else()
+ if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
+ message(WARNING "system runtime library file does not exist: '${lib}'")
# This warning indicates an incomplete Watcom installation
# or a bug somewhere above here in this file.
# If you would like to avoid this warning, fix the real problem, or
# set CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS before including
# this file.
- ENDIF()
- ENDIF()
- ENDFOREACH()
-ENDIF()
+ endif()
+ endif()
+ endforeach()
+endif()
# Include system runtime libraries in the installation if any are
# specified by CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS.
-IF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
- IF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP)
- IF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION)
- IF(WIN32)
- SET(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION bin)
- ELSE(WIN32)
- SET(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION lib)
- ENDIF(WIN32)
- ENDIF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION)
- INSTALL(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
+if(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
+ if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP)
+ if(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION)
+ if(WIN32)
+ set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION bin)
+ else(WIN32)
+ set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION lib)
+ endif(WIN32)
+ endif(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION)
+ install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
DESTINATION ${CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION})
- ENDIF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP)
-ENDIF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
+ endif(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP)
+endif(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
diff --git a/Modules/KDE3Macros.cmake b/Modules/KDE3Macros.cmake
index 5b76000e8f..858b7d63f2 100644
--- a/Modules/KDE3Macros.cmake
+++ b/Modules/KDE3Macros.cmake
@@ -32,157 +32,157 @@
#neundorf@kde.org
-INCLUDE(AddFileDependencies)
+include(AddFileDependencies)
#create the kidl and skeletion file for dcop stuff
#usage: KDE_ADD_COP_SKELS(foo_SRCS ${dcop_headers})
-MACRO(KDE3_ADD_DCOP_SKELS _sources)
- FOREACH (_current_FILE ${ARGN})
+macro(KDE3_ADD_DCOP_SKELS _sources)
+ foreach (_current_FILE ${ARGN})
- GET_FILENAME_COMPONENT(_tmp_FILE ${_current_FILE} ABSOLUTE)
- GET_FILENAME_COMPONENT(_basename ${_tmp_FILE} NAME_WE)
+ get_filename_component(_tmp_FILE ${_current_FILE} ABSOLUTE)
+ get_filename_component(_basename ${_tmp_FILE} NAME_WE)
- SET(_skel ${CMAKE_CURRENT_BINARY_DIR}/${_basename}_skel.cpp)
- SET(_kidl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.kidl)
+ set(_skel ${CMAKE_CURRENT_BINARY_DIR}/${_basename}_skel.cpp)
+ set(_kidl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.kidl)
- IF (NOT HAVE_${_basename}_KIDL_RULE)
- SET(HAVE_${_basename}_KIDL_RULE ON)
+ if (NOT HAVE_${_basename}_KIDL_RULE)
+ set(HAVE_${_basename}_KIDL_RULE ON)
- ADD_CUSTOM_COMMAND(OUTPUT ${_kidl}
+ add_custom_command(OUTPUT ${_kidl}
COMMAND ${KDE3_DCOPIDL_EXECUTABLE}
ARGS ${_tmp_FILE} > ${_kidl}
DEPENDS ${_tmp_FILE}
)
- ENDIF (NOT HAVE_${_basename}_KIDL_RULE)
+ endif (NOT HAVE_${_basename}_KIDL_RULE)
- IF (NOT HAVE_${_basename}_SKEL_RULE)
- SET(HAVE_${_basename}_SKEL_RULE ON)
+ if (NOT HAVE_${_basename}_SKEL_RULE)
+ set(HAVE_${_basename}_SKEL_RULE ON)
- ADD_CUSTOM_COMMAND(OUTPUT ${_skel}
+ add_custom_command(OUTPUT ${_skel}
COMMAND ${KDE3_DCOPIDL2CPP_EXECUTABLE}
ARGS --c++-suffix cpp --no-signals --no-stub ${_kidl}
DEPENDS ${_kidl}
)
- ENDIF (NOT HAVE_${_basename}_SKEL_RULE)
+ endif (NOT HAVE_${_basename}_SKEL_RULE)
- SET(${_sources} ${${_sources}} ${_skel})
+ set(${_sources} ${${_sources}} ${_skel})
- ENDFOREACH (_current_FILE)
+ endforeach (_current_FILE)
-ENDMACRO(KDE3_ADD_DCOP_SKELS)
+endmacro(KDE3_ADD_DCOP_SKELS)
-MACRO(KDE3_ADD_DCOP_STUBS _sources)
- FOREACH (_current_FILE ${ARGN})
+macro(KDE3_ADD_DCOP_STUBS _sources)
+ foreach (_current_FILE ${ARGN})
- GET_FILENAME_COMPONENT(_tmp_FILE ${_current_FILE} ABSOLUTE)
+ get_filename_component(_tmp_FILE ${_current_FILE} ABSOLUTE)
- GET_FILENAME_COMPONENT(_basename ${_tmp_FILE} NAME_WE)
+ get_filename_component(_basename ${_tmp_FILE} NAME_WE)
- SET(_stub_CPP ${CMAKE_CURRENT_BINARY_DIR}/${_basename}_stub.cpp)
- SET(_kidl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.kidl)
+ set(_stub_CPP ${CMAKE_CURRENT_BINARY_DIR}/${_basename}_stub.cpp)
+ set(_kidl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.kidl)
- IF (NOT HAVE_${_basename}_KIDL_RULE)
- SET(HAVE_${_basename}_KIDL_RULE ON)
+ if (NOT HAVE_${_basename}_KIDL_RULE)
+ set(HAVE_${_basename}_KIDL_RULE ON)
- ADD_CUSTOM_COMMAND(OUTPUT ${_kidl}
+ add_custom_command(OUTPUT ${_kidl}
COMMAND ${KDE3_DCOPIDL_EXECUTABLE}
ARGS ${_tmp_FILE} > ${_kidl}
DEPENDS ${_tmp_FILE}
)
- ENDIF (NOT HAVE_${_basename}_KIDL_RULE)
+ endif (NOT HAVE_${_basename}_KIDL_RULE)
- IF (NOT HAVE_${_basename}_STUB_RULE)
- SET(HAVE_${_basename}_STUB_RULE ON)
+ if (NOT HAVE_${_basename}_STUB_RULE)
+ set(HAVE_${_basename}_STUB_RULE ON)
- ADD_CUSTOM_COMMAND(OUTPUT ${_stub_CPP}
+ add_custom_command(OUTPUT ${_stub_CPP}
COMMAND ${KDE3_DCOPIDL2CPP_EXECUTABLE}
ARGS --c++-suffix cpp --no-signals --no-skel ${_kidl}
DEPENDS ${_kidl}
)
- ENDIF (NOT HAVE_${_basename}_STUB_RULE)
+ endif (NOT HAVE_${_basename}_STUB_RULE)
- SET(${_sources} ${${_sources}} ${_stub_CPP})
+ set(${_sources} ${${_sources}} ${_stub_CPP})
- ENDFOREACH (_current_FILE)
+ endforeach (_current_FILE)
-ENDMACRO(KDE3_ADD_DCOP_STUBS)
+endmacro(KDE3_ADD_DCOP_STUBS)
-MACRO(KDE3_ADD_KCFG_FILES _sources)
- FOREACH (_current_FILE ${ARGN})
+macro(KDE3_ADD_KCFG_FILES _sources)
+ foreach (_current_FILE ${ARGN})
- GET_FILENAME_COMPONENT(_tmp_FILE ${_current_FILE} ABSOLUTE)
+ get_filename_component(_tmp_FILE ${_current_FILE} ABSOLUTE)
- GET_FILENAME_COMPONENT(_basename ${_tmp_FILE} NAME_WE)
+ get_filename_component(_basename ${_tmp_FILE} NAME_WE)
- FILE(READ ${_tmp_FILE} _contents)
- STRING(REGEX REPLACE "^(.*\n)?File=([^\n]+)\n.*$" "\\2" _kcfg_FILE "${_contents}")
+ file(READ ${_tmp_FILE} _contents)
+ string(REGEX REPLACE "^(.*\n)?File=([^\n]+)\n.*$" "\\2" _kcfg_FILE "${_contents}")
- SET(_src_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp)
- SET(_header_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h)
+ set(_src_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp)
+ set(_header_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h)
- ADD_CUSTOM_COMMAND(OUTPUT ${_src_FILE}
+ add_custom_command(OUTPUT ${_src_FILE}
COMMAND ${KDE3_KCFGC_EXECUTABLE}
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${_kcfg_FILE} ${_tmp_FILE}
DEPENDS ${_tmp_FILE} ${CMAKE_CURRENT_SOURCE_DIR}/${_kcfg_FILE} )
- SET(${_sources} ${${_sources}} ${_src_FILE})
+ set(${_sources} ${${_sources}} ${_src_FILE})
- ENDFOREACH (_current_FILE)
+ endforeach (_current_FILE)
-ENDMACRO(KDE3_ADD_KCFG_FILES)
+endmacro(KDE3_ADD_KCFG_FILES)
#create the moc files and add them to the list of sources
#usage: KDE_ADD_MOC_FILES(foo_SRCS ${moc_headers})
-MACRO(KDE3_ADD_MOC_FILES _sources)
- FOREACH (_current_FILE ${ARGN})
+macro(KDE3_ADD_MOC_FILES _sources)
+ foreach (_current_FILE ${ARGN})
- GET_FILENAME_COMPONENT(_tmp_FILE ${_current_FILE} ABSOLUTE)
+ get_filename_component(_tmp_FILE ${_current_FILE} ABSOLUTE)
- GET_FILENAME_COMPONENT(_basename ${_tmp_FILE} NAME_WE)
- SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc.cpp)
+ get_filename_component(_basename ${_tmp_FILE} NAME_WE)
+ set(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc.cpp)
- ADD_CUSTOM_COMMAND(OUTPUT ${_moc}
+ add_custom_command(OUTPUT ${_moc}
COMMAND ${QT_MOC_EXECUTABLE}
ARGS ${_tmp_FILE} -o ${_moc}
DEPENDS ${_tmp_FILE}
)
- SET(${_sources} ${${_sources}} ${_moc})
+ set(${_sources} ${${_sources}} ${_moc})
- ENDFOREACH (_current_FILE)
-ENDMACRO(KDE3_ADD_MOC_FILES)
+ endforeach (_current_FILE)
+endmacro(KDE3_ADD_MOC_FILES)
-GET_FILENAME_COMPONENT( KDE3_MODULE_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
+get_filename_component( KDE3_MODULE_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
#create the implementation files from the ui files and add them to the list of sources
#usage: KDE_ADD_UI_FILES(foo_SRCS ${ui_files})
-MACRO(KDE3_ADD_UI_FILES _sources )
- FOREACH (_current_FILE ${ARGN})
+macro(KDE3_ADD_UI_FILES _sources )
+ foreach (_current_FILE ${ARGN})
- GET_FILENAME_COMPONENT(_tmp_FILE ${_current_FILE} ABSOLUTE)
+ get_filename_component(_tmp_FILE ${_current_FILE} ABSOLUTE)
- GET_FILENAME_COMPONENT(_basename ${_tmp_FILE} NAME_WE)
- SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h)
- SET(_src ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp)
- SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc.cpp)
+ get_filename_component(_basename ${_tmp_FILE} NAME_WE)
+ set(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h)
+ set(_src ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp)
+ set(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc.cpp)
- ADD_CUSTOM_COMMAND(OUTPUT ${_header}
+ add_custom_command(OUTPUT ${_header}
COMMAND ${QT_UIC_EXECUTABLE}
ARGS -L ${KDE3_LIB_DIR}/kde3/plugins/designer -nounload -o ${_header} ${CMAKE_CURRENT_SOURCE_DIR}/${_current_FILE}
DEPENDS ${_tmp_FILE}
)
- ADD_CUSTOM_COMMAND(OUTPUT ${_src}
+ add_custom_command(OUTPUT ${_src}
COMMAND ${CMAKE_COMMAND}
ARGS
-DKDE_UIC_PLUGIN_DIR:FILEPATH=${KDE3_LIB_DIR}/kde3/plugins/designer
@@ -194,23 +194,23 @@ MACRO(KDE3_ADD_UI_FILES _sources )
DEPENDS ${_header}
)
- ADD_CUSTOM_COMMAND(OUTPUT ${_moc}
+ add_custom_command(OUTPUT ${_moc}
COMMAND ${QT_MOC_EXECUTABLE}
ARGS ${_header} -o ${_moc}
DEPENDS ${_header}
)
- SET(${_sources} ${${_sources}} ${_src} ${_moc} )
+ set(${_sources} ${${_sources}} ${_src} ${_moc} )
- ENDFOREACH (_current_FILE)
-ENDMACRO(KDE3_ADD_UI_FILES)
+ endforeach (_current_FILE)
+endmacro(KDE3_ADD_UI_FILES)
-MACRO(KDE3_AUTOMOC)
- SET(_matching_FILES )
- FOREACH (_current_FILE ${ARGN})
+macro(KDE3_AUTOMOC)
+ set(_matching_FILES )
+ foreach (_current_FILE ${ARGN})
- GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE)
+ get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE)
# if "SKIP_AUTOMOC" is set to true, we will not handle this file here.
# here. this is required to make bouic work correctly:
@@ -219,25 +219,25 @@ MACRO(KDE3_AUTOMOC)
# cmake is run for the very first time on them -> however the .cpp files might
# exist at a later run. at that time we need to skip them, so that we don't add two
# different rules for the same moc file
- GET_SOURCE_FILE_PROPERTY(_skip ${_abs_FILE} SKIP_AUTOMOC)
+ get_source_file_property(_skip ${_abs_FILE} SKIP_AUTOMOC)
- IF (EXISTS ${_abs_FILE} AND NOT _skip)
+ if (EXISTS ${_abs_FILE} AND NOT _skip)
- FILE(READ ${_abs_FILE} _contents)
+ file(READ ${_abs_FILE} _contents)
- GET_FILENAME_COMPONENT(_abs_PATH ${_abs_FILE} PATH)
+ get_filename_component(_abs_PATH ${_abs_FILE} PATH)
- STRING(REGEX MATCHALL "#include +[^ ]+\\.moc[\">]" _match "${_contents}")
- IF(_match)
- FOREACH (_current_MOC_INC ${_match})
- STRING(REGEX MATCH "[^ <\"]+\\.moc" _current_MOC "${_current_MOC_INC}")
+ string(REGEX MATCHALL "#include +[^ ]+\\.moc[\">]" _match "${_contents}")
+ if(_match)
+ foreach (_current_MOC_INC ${_match})
+ string(REGEX MATCH "[^ <\"]+\\.moc" _current_MOC "${_current_MOC_INC}")
- GET_FILENAME_COMPONENT(_basename ${_current_MOC} NAME_WE)
-# SET(_header ${CMAKE_CURRENT_SOURCE_DIR}/${_basename}.h)
- SET(_header ${_abs_PATH}/${_basename}.h)
- SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC})
+ get_filename_component(_basename ${_current_MOC} NAME_WE)
+# set(_header ${CMAKE_CURRENT_SOURCE_DIR}/${_basename}.h)
+ set(_header ${_abs_PATH}/${_basename}.h)
+ set(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC})
- ADD_CUSTOM_COMMAND(OUTPUT ${_moc}
+ add_custom_command(OUTPUT ${_moc}
COMMAND ${QT_MOC_EXECUTABLE}
ARGS ${_header} -o ${_moc}
DEPENDS ${_header}
@@ -245,167 +245,167 @@ MACRO(KDE3_AUTOMOC)
ADD_FILE_DEPENDENCIES(${_abs_FILE} ${_moc})
- ENDFOREACH (_current_MOC_INC)
- ENDIF(_match)
+ endforeach (_current_MOC_INC)
+ endif(_match)
- ENDIF (EXISTS ${_abs_FILE} AND NOT _skip)
- ENDFOREACH (_current_FILE)
-ENDMACRO(KDE3_AUTOMOC)
+ endif (EXISTS ${_abs_FILE} AND NOT _skip)
+ endforeach (_current_FILE)
+endmacro(KDE3_AUTOMOC)
# only used internally by KDE3_INSTALL_ICONS
-MACRO (_KDE3_ADD_ICON_INSTALL_RULE _install_SCRIPT _install_PATH _group _orig_NAME _install_NAME)
+macro (_KDE3_ADD_ICON_INSTALL_RULE _install_SCRIPT _install_PATH _group _orig_NAME _install_NAME)
# if the string doesn't match the pattern, the result is the full string, so all three have the same content
- IF (NOT ${_group} STREQUAL ${_install_NAME} )
- SET(_icon_GROUP "actions")
+ if (NOT ${_group} STREQUAL ${_install_NAME} )
+ set(_icon_GROUP "actions")
- IF (${_group} STREQUAL "mime")
- SET(_icon_GROUP "mimetypes")
- ENDIF (${_group} STREQUAL "mime")
+ if (${_group} STREQUAL "mime")
+ set(_icon_GROUP "mimetypes")
+ endif (${_group} STREQUAL "mime")
- IF (${_group} STREQUAL "filesys")
- SET(_icon_GROUP "filesystems")
- ENDIF (${_group} STREQUAL "filesys")
+ if (${_group} STREQUAL "filesys")
+ set(_icon_GROUP "filesystems")
+ endif (${_group} STREQUAL "filesys")
- IF (${_group} STREQUAL "device")
- SET(_icon_GROUP "devices")
- ENDIF (${_group} STREQUAL "device")
+ if (${_group} STREQUAL "device")
+ set(_icon_GROUP "devices")
+ endif (${_group} STREQUAL "device")
- IF (${_group} STREQUAL "app")
- SET(_icon_GROUP "apps")
- ENDIF (${_group} STREQUAL "app")
+ if (${_group} STREQUAL "app")
+ set(_icon_GROUP "apps")
+ endif (${_group} STREQUAL "app")
- IF (${_group} STREQUAL "action")
- SET(_icon_GROUP "actions")
- ENDIF (${_group} STREQUAL "action")
+ if (${_group} STREQUAL "action")
+ set(_icon_GROUP "actions")
+ endif (${_group} STREQUAL "action")
# message(STATUS "icon: ${_current_ICON} size: ${_size} group: ${_group} name: ${_name}" )
- INSTALL(FILES ${_orig_NAME} DESTINATION ${_install_PATH}/${_icon_GROUP}/ RENAME ${_install_NAME} )
- ENDIF (NOT ${_group} STREQUAL ${_install_NAME} )
+ install(FILES ${_orig_NAME} DESTINATION ${_install_PATH}/${_icon_GROUP}/ RENAME ${_install_NAME} )
+ endif (NOT ${_group} STREQUAL ${_install_NAME} )
-ENDMACRO (_KDE3_ADD_ICON_INSTALL_RULE)
+endmacro (_KDE3_ADD_ICON_INSTALL_RULE)
-MACRO (KDE3_INSTALL_ICONS _theme )
- SET(_defaultpath "${CMAKE_INSTALL_PREFIX}/share/icons")
+macro (KDE3_INSTALL_ICONS _theme )
+ set(_defaultpath "${CMAKE_INSTALL_PREFIX}/share/icons")
# first the png icons
- FILE(GLOB _icons *.png)
- FOREACH (_current_ICON ${_icons} )
- STRING(REGEX REPLACE "^.*/[a-zA-Z]+([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\1" _size "${_current_ICON}")
- STRING(REGEX REPLACE "^.*/[a-zA-Z]+([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\2" _group "${_current_ICON}")
- STRING(REGEX REPLACE "^.*/[a-zA-Z]+([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\3" _name "${_current_ICON}")
+ file(GLOB _icons *.png)
+ foreach (_current_ICON ${_icons} )
+ string(REGEX REPLACE "^.*/[a-zA-Z]+([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\1" _size "${_current_ICON}")
+ string(REGEX REPLACE "^.*/[a-zA-Z]+([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\2" _group "${_current_ICON}")
+ string(REGEX REPLACE "^.*/[a-zA-Z]+([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\3" _name "${_current_ICON}")
_KDE3_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake
${_defaultpath}/${_theme}/${_size}x${_size}
${_group} ${_current_ICON} ${_name})
- ENDFOREACH (_current_ICON)
+ endforeach (_current_ICON)
# and now the svg icons
- FILE(GLOB _icons *.svgz)
- FOREACH (_current_ICON ${_icons} )
- STRING(REGEX REPLACE "^.*/crsc\\-([a-z]+)\\-(.+\\.svgz)$" "\\1" _group "${_current_ICON}")
- STRING(REGEX REPLACE "^.*/crsc\\-([a-z]+)\\-(.+\\.svgz)$" "\\2" _name "${_current_ICON}")
+ file(GLOB _icons *.svgz)
+ foreach (_current_ICON ${_icons} )
+ string(REGEX REPLACE "^.*/crsc\\-([a-z]+)\\-(.+\\.svgz)$" "\\1" _group "${_current_ICON}")
+ string(REGEX REPLACE "^.*/crsc\\-([a-z]+)\\-(.+\\.svgz)$" "\\2" _name "${_current_ICON}")
_KDE3_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake
${_defaultpath}/${_theme}/scalable
${_group} ${_current_ICON} ${_name})
- ENDFOREACH (_current_ICON)
+ endforeach (_current_ICON)
-ENDMACRO (KDE3_INSTALL_ICONS)
+endmacro (KDE3_INSTALL_ICONS)
-MACRO(KDE3_INSTALL_LIBTOOL_FILE _target)
- GET_TARGET_PROPERTY(_target_location ${_target} LOCATION)
+macro(KDE3_INSTALL_LIBTOOL_FILE _target)
+ get_target_property(_target_location ${_target} LOCATION)
- GET_FILENAME_COMPONENT(_laname ${_target_location} NAME_WE)
- GET_FILENAME_COMPONENT(_soname ${_target_location} NAME)
- SET(_laname ${CMAKE_CURRENT_BINARY_DIR}/${_laname}.la)
+ get_filename_component(_laname ${_target_location} NAME_WE)
+ get_filename_component(_soname ${_target_location} NAME)
+ set(_laname ${CMAKE_CURRENT_BINARY_DIR}/${_laname}.la)
- FILE(WRITE ${_laname} "# ${_laname} - a libtool library file, generated by cmake \n")
- FILE(APPEND ${_laname} "# The name that we can dlopen(3).\n")
- FILE(APPEND ${_laname} "dlname='${_soname}'\n")
- FILE(APPEND ${_laname} "# Names of this library\n")
- IF(CYGWIN)
- FILE(APPEND ${_laname} "library_names='${_soname}'\n")
- ELSE(CYGWIN)
- FILE(APPEND ${_laname} "library_names='${_soname} ${_soname} ${_soname}'\n")
- ENDIF(CYGWIN)
- FILE(APPEND ${_laname} "# The name of the static archive\n")
- FILE(APPEND ${_laname} "old_library=''\n")
- FILE(APPEND ${_laname} "# Libraries that this one depends upon.\n")
- FILE(APPEND ${_laname} "dependency_libs=''\n")
-# FILE(APPEND ${_laname} "dependency_libs='${${_target}_LIB_DEPENDS}'\n")
- FILE(APPEND ${_laname} "# Version information.\ncurrent=0\nage=0\nrevision=0\n")
- FILE(APPEND ${_laname} "# Is this an already installed library?\ninstalled=yes\n")
- FILE(APPEND ${_laname} "# Should we warn about portability when linking against -modules?\nshouldnotlink=yes\n")
- FILE(APPEND ${_laname} "# Files to dlopen/dlpreopen\ndlopen=''\ndlpreopen=''\n")
- FILE(APPEND ${_laname} "# Directory that this library needs to be installed in:\n")
- FILE(APPEND ${_laname} "libdir='${CMAKE_INSTALL_PREFIX}/lib/kde3'\n")
+ file(WRITE ${_laname} "# ${_laname} - a libtool library file, generated by cmake \n")
+ file(APPEND ${_laname} "# The name that we can dlopen(3).\n")
+ file(APPEND ${_laname} "dlname='${_soname}'\n")
+ file(APPEND ${_laname} "# Names of this library\n")
+ if(CYGWIN)
+ file(APPEND ${_laname} "library_names='${_soname}'\n")
+ else(CYGWIN)
+ file(APPEND ${_laname} "library_names='${_soname} ${_soname} ${_soname}'\n")
+ endif(CYGWIN)
+ file(APPEND ${_laname} "# The name of the static archive\n")
+ file(APPEND ${_laname} "old_library=''\n")
+ file(APPEND ${_laname} "# Libraries that this one depends upon.\n")
+ file(APPEND ${_laname} "dependency_libs=''\n")
+# file(APPEND ${_laname} "dependency_libs='${${_target}_LIB_DEPENDS}'\n")
+ file(APPEND ${_laname} "# Version information.\ncurrent=0\nage=0\nrevision=0\n")
+ file(APPEND ${_laname} "# Is this an already installed library?\ninstalled=yes\n")
+ file(APPEND ${_laname} "# Should we warn about portability when linking against -modules?\nshouldnotlink=yes\n")
+ file(APPEND ${_laname} "# Files to dlopen/dlpreopen\ndlopen=''\ndlpreopen=''\n")
+ file(APPEND ${_laname} "# Directory that this library needs to be installed in:\n")
+ file(APPEND ${_laname} "libdir='${CMAKE_INSTALL_PREFIX}/lib/kde3'\n")
- INSTALL_FILES(${KDE3_LIBTOOL_DIR} FILES ${_laname})
-ENDMACRO(KDE3_INSTALL_LIBTOOL_FILE)
+ install_files(${KDE3_LIBTOOL_DIR} FILES ${_laname})
+endmacro(KDE3_INSTALL_LIBTOOL_FILE)
-MACRO(KDE3_CREATE_FINAL_FILE _filename)
- FILE(WRITE ${_filename} "//autogenerated file\n")
- FOREACH (_current_FILE ${ARGN})
- FILE(APPEND ${_filename} "#include \"${_current_FILE}\"\n")
- ENDFOREACH (_current_FILE)
+macro(KDE3_CREATE_FINAL_FILE _filename)
+ file(WRITE ${_filename} "//autogenerated file\n")
+ foreach (_current_FILE ${ARGN})
+ file(APPEND ${_filename} "#include \"${_current_FILE}\"\n")
+ endforeach (_current_FILE)
-ENDMACRO(KDE3_CREATE_FINAL_FILE)
+endmacro(KDE3_CREATE_FINAL_FILE)
-# OPTION(KDE3_ENABLE_FINAL "Enable final all-in-one compilation")
-OPTION(KDE3_BUILD_TESTS "Build the tests")
+# option(KDE3_ENABLE_FINAL "Enable final all-in-one compilation")
+option(KDE3_BUILD_TESTS "Build the tests")
-MACRO(KDE3_ADD_KPART _target_NAME _with_PREFIX)
+macro(KDE3_ADD_KPART _target_NAME _with_PREFIX)
#is the first argument is "WITH_PREFIX" then keep the standard "lib" prefix, otherwise SET the prefix empty
- IF (${_with_PREFIX} STREQUAL "WITH_PREFIX")
- SET(_first_SRC)
- ELSE (${_with_PREFIX} STREQUAL "WITH_PREFIX")
- SET(_first_SRC ${_with_PREFIX})
- ENDIF (${_with_PREFIX} STREQUAL "WITH_PREFIX")
+ if (${_with_PREFIX} STREQUAL "WITH_PREFIX")
+ set(_first_SRC)
+ else (${_with_PREFIX} STREQUAL "WITH_PREFIX")
+ set(_first_SRC ${_with_PREFIX})
+ endif (${_with_PREFIX} STREQUAL "WITH_PREFIX")
-# IF (KDE3_ENABLE_FINAL)
+# if (KDE3_ENABLE_FINAL)
# KDE3_CREATE_FINAL_FILE(${_target_NAME}_final.cpp ${_first_SRC} ${ARGN})
-# ADD_LIBRARY(${_target_NAME} MODULE ${_target_NAME}_final.cpp)
-# ELSE (KDE3_ENABLE_FINAL)
- ADD_LIBRARY(${_target_NAME} MODULE ${_first_SRC} ${ARGN})
-# ENDIF (KDE3_ENABLE_FINAL)
+# add_library(${_target_NAME} MODULE ${_target_NAME}_final.cpp)
+# else (KDE3_ENABLE_FINAL)
+ add_library(${_target_NAME} MODULE ${_first_SRC} ${ARGN})
+# endif (KDE3_ENABLE_FINAL)
- IF(_first_SRC)
- SET_TARGET_PROPERTIES(${_target_NAME} PROPERTIES PREFIX "")
- ENDIF(_first_SRC)
+ if(_first_SRC)
+ set_target_properties(${_target_NAME} PROPERTIES PREFIX "")
+ endif(_first_SRC)
KDE3_INSTALL_LIBTOOL_FILE(${_target_NAME})
-ENDMACRO(KDE3_ADD_KPART)
+endmacro(KDE3_ADD_KPART)
-MACRO(KDE3_ADD_KDEINIT_EXECUTABLE _target_NAME )
+macro(KDE3_ADD_KDEINIT_EXECUTABLE _target_NAME )
-# IF (KDE3_ENABLE_FINAL)
+# if (KDE3_ENABLE_FINAL)
# KDE3_CREATE_FINAL_FILE(${_target_NAME}_final.cpp ${ARGN})
-# ADD_LIBRARY(kdeinit_${_target_NAME} SHARED ${_target_NAME}_final.cpp)
-# ELSE (KDE3_ENABLE_FINAL)
- ADD_LIBRARY(kdeinit_${_target_NAME} SHARED ${ARGN} )
-# ENDIF (KDE3_ENABLE_FINAL)
+# add_library(kdeinit_${_target_NAME} SHARED ${_target_NAME}_final.cpp)
+# else (KDE3_ENABLE_FINAL)
+ add_library(kdeinit_${_target_NAME} SHARED ${ARGN} )
+# endif (KDE3_ENABLE_FINAL)
- CONFIGURE_FILE(${KDE3_MODULE_DIR}/kde3init_dummy.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_dummy.cpp)
+ configure_file(${KDE3_MODULE_DIR}/kde3init_dummy.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_dummy.cpp)
- ADD_EXECUTABLE( ${_target_NAME} ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_dummy.cpp )
- TARGET_LINK_LIBRARIES( ${_target_NAME} kdeinit_${_target_NAME} )
+ add_executable( ${_target_NAME} ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_dummy.cpp )
+ target_link_libraries( ${_target_NAME} kdeinit_${_target_NAME} )
-ENDMACRO(KDE3_ADD_KDEINIT_EXECUTABLE)
+endmacro(KDE3_ADD_KDEINIT_EXECUTABLE)
-MACRO(KDE3_ADD_EXECUTABLE _target_NAME )
+macro(KDE3_ADD_EXECUTABLE _target_NAME )
-# IF (KDE3_ENABLE_FINAL)
+# if (KDE3_ENABLE_FINAL)
# KDE3_CREATE_FINAL_FILE(${_target_NAME}_final.cpp ${ARGN})
-# ADD_EXECUTABLE(${_target_NAME} ${_target_NAME}_final.cpp)
-# ELSE (KDE3_ENABLE_FINAL)
- ADD_EXECUTABLE(${_target_NAME} ${ARGN} )
-# ENDIF (KDE3_ENABLE_FINAL)
+# add_executable(${_target_NAME} ${_target_NAME}_final.cpp)
+# else (KDE3_ENABLE_FINAL)
+ add_executable(${_target_NAME} ${ARGN} )
+# endif (KDE3_ENABLE_FINAL)
-ENDMACRO(KDE3_ADD_EXECUTABLE)
+endmacro(KDE3_ADD_EXECUTABLE)
diff --git a/Modules/MacroAddFileDependencies.cmake b/Modules/MacroAddFileDependencies.cmake
index 36a217a2b5..5ed5b8d909 100644
--- a/Modules/MacroAddFileDependencies.cmake
+++ b/Modules/MacroAddFileDependencies.cmake
@@ -4,7 +4,7 @@
#
# MACRO_ADD_FILE_DEPENDENCIES(<_file> depend_files...) is just a convenience
# wrapper around the OBJECT_DEPENDS source file property. You can just
-# use SET_PROPERTY(SOURCE <file> APPEND PROPERTY OBJECT_DEPENDS depend_files) instead.
+# use set_property(SOURCE <file> APPEND PROPERTY OBJECT_DEPENDS depend_files) instead.
#=============================================================================
# Copyright 2006-2009 Kitware, Inc.
@@ -19,15 +19,15 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-MACRO (MACRO_ADD_FILE_DEPENDENCIES _file)
+macro (MACRO_ADD_FILE_DEPENDENCIES _file)
- GET_SOURCE_FILE_PROPERTY(_deps ${_file} OBJECT_DEPENDS)
- IF (_deps)
- SET(_deps ${_deps} ${ARGN})
- ELSE (_deps)
- SET(_deps ${ARGN})
- ENDIF (_deps)
+ get_source_file_property(_deps ${_file} OBJECT_DEPENDS)
+ if (_deps)
+ set(_deps ${_deps} ${ARGN})
+ else (_deps)
+ set(_deps ${ARGN})
+ endif (_deps)
- SET_SOURCE_FILES_PROPERTIES(${_file} PROPERTIES OBJECT_DEPENDS "${_deps}")
+ set_source_files_properties(${_file} PROPERTIES OBJECT_DEPENDS "${_deps}")
-ENDMACRO (MACRO_ADD_FILE_DEPENDENCIES)
+endmacro (MACRO_ADD_FILE_DEPENDENCIES)
diff --git a/Modules/Platform/AIX.cmake b/Modules/Platform/AIX.cmake
index a9f773ed1d..78221b04f7 100644
--- a/Modules/Platform/AIX.cmake
+++ b/Modules/Platform/AIX.cmake
@@ -1,6 +1,6 @@
-SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
-SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so") # .so
-SET(CMAKE_DL_LIBS "-lld")
+set(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
+set(CMAKE_SHARED_LIBRARY_SUFFIX ".so") # .so
+set(CMAKE_DL_LIBS "-lld")
# RPATH support on AIX is called libpath. By default the runtime
# libpath is paths specified by -L followed by /usr/lib and /lib. In
@@ -8,10 +8,10 @@ SET(CMAKE_DL_LIBS "-lld")
# -Wl,-blibpath:/usr/lib:/lib whether RPATH support is on or not.
# When our own RPATH is to be added it may be inserted before the
# "always" paths.
-SET(CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH /usr/lib /lib)
+set(CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH /usr/lib /lib)
# Files named "libfoo.a" may actually be shared libraries.
-SET_PROPERTY(GLOBAL PROPERTY TARGET_ARCHIVES_MAY_BE_SHARED_LIBS 1)
+set_property(GLOBAL PROPERTY TARGET_ARCHIVES_MAY_BE_SHARED_LIBS 1)
# since .a can be a static or shared library on AIX, we can not do this.
# at some point if we wanted it, we would have to figure out if a .a is
@@ -21,9 +21,9 @@ SET_PROPERTY(GLOBAL PROPERTY TARGET_ARCHIVES_MAY_BE_SHARED_LIBS 1)
# building a shared library, shared module, or executable that links
# to other libraries to select whether to use the static or shared
# versions of the libraries.
-#FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
-# SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-bstatic")
-# SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-bdynamic")
-#ENDFOREACH(type)
+#foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
+# set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-bstatic")
+# set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-bdynamic")
+#endforeach(type)
-INCLUDE(Platform/UnixPaths)
+include(Platform/UnixPaths)
diff --git a/Modules/Platform/BSDOS.cmake b/Modules/Platform/BSDOS.cmake
index cf9d17bfda..47852f8e13 100644
--- a/Modules/Platform/BSDOS.cmake
+++ b/Modules/Platform/BSDOS.cmake
@@ -1,2 +1,2 @@
-INCLUDE(Platform/UnixPaths)
+include(Platform/UnixPaths)
diff --git a/Modules/Platform/BeOS.cmake b/Modules/Platform/BeOS.cmake
index 3ffb67cb86..ef811bd9c3 100644
--- a/Modules/Platform/BeOS.cmake
+++ b/Modules/Platform/BeOS.cmake
@@ -1,12 +1,12 @@
-SET(BEOS 1)
+set(BEOS 1)
-SET(CMAKE_DL_LIBS root be)
-SET(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC")
-SET(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE")
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-nostart")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
-SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
+set(CMAKE_DL_LIBS root be)
+set(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC")
+set(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE")
+set(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-nostart")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
+set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
-INCLUDE(Platform/UnixPaths)
+include(Platform/UnixPaths)
diff --git a/Modules/Platform/BlueGeneL.cmake b/Modules/Platform/BlueGeneL.cmake
index 4021147e75..b2158f5d76 100644
--- a/Modules/Platform/BlueGeneL.cmake
+++ b/Modules/Platform/BlueGeneL.cmake
@@ -1,40 +1,40 @@
#the compute nodes on BlueGene/L don't support shared libs
-SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
+set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "") # -shared
-SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
+set(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "") # -shared
+set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
-SET(CMAKE_LINK_LIBRARY_SUFFIX "")
-SET(CMAKE_STATIC_LIBRARY_PREFIX "lib")
-SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
-SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
-SET(CMAKE_SHARED_LIBRARY_SUFFIX ".a") # .a
-SET(CMAKE_EXECUTABLE_SUFFIX "") # .exe
-SET(CMAKE_DL_LIBS "" )
+set(CMAKE_LINK_LIBRARY_SUFFIX "")
+set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
+set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
+set(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
+set(CMAKE_SHARED_LIBRARY_SUFFIX ".a") # .a
+set(CMAKE_EXECUTABLE_SUFFIX "") # .exe
+set(CMAKE_DL_LIBS "" )
-SET(CMAKE_FIND_LIBRARY_PREFIXES "lib")
-SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+set(CMAKE_FIND_LIBRARY_PREFIXES "lib")
+set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
-INCLUDE(Platform/UnixPaths)
+include(Platform/UnixPaths)
-IF(CMAKE_COMPILER_IS_GNUCC)
- SET(CMAKE_C_LINK_EXECUTABLE
+if(CMAKE_COMPILER_IS_GNUCC)
+ set(CMAKE_C_LINK_EXECUTABLE
"<CMAKE_C_COMPILER> -Wl,-relax <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -Wl,-lgcc,-lc -lnss_files -lnss_dns -lresolv")
-ELSE(CMAKE_COMPILER_IS_GNUCC)
+else(CMAKE_COMPILER_IS_GNUCC)
# when using IBM xlc we probably don't want to link to -lgcc
- SET(CMAKE_C_LINK_EXECUTABLE
+ set(CMAKE_C_LINK_EXECUTABLE
"<CMAKE_C_COMPILER> -Wl,-relax <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -Wl,-lc -lnss_files -lnss_dns -lresolv")
-ENDIF(CMAKE_COMPILER_IS_GNUCC)
+endif(CMAKE_COMPILER_IS_GNUCC)
-IF(CMAKE_COMPILER_IS_GNUCXX)
- SET(CMAKE_CXX_LINK_EXECUTABLE
+if(CMAKE_COMPILER_IS_GNUCXX)
+ set(CMAKE_CXX_LINK_EXECUTABLE
"<CMAKE_CXX_COMPILER> -Wl,-relax <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -Wl,-lstdc++,-lgcc,-lc -lnss_files -lnss_dns -lresolv")
-ELSE(CMAKE_COMPILER_IS_GNUCXX)
+else(CMAKE_COMPILER_IS_GNUCXX)
# when using the IBM xlC we probably don't want to link to -lgcc
- SET(CMAKE_CXX_LINK_EXECUTABLE
+ set(CMAKE_CXX_LINK_EXECUTABLE
"<CMAKE_CXX_COMPILER> -Wl,-relax <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -Wl,-lstdc++,-lc -lnss_files -lnss_dns -lresolv")
-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+endif(CMAKE_COMPILER_IS_GNUCXX)
diff --git a/Modules/Platform/CYGWIN-GNU.cmake b/Modules/Platform/CYGWIN-GNU.cmake
index eae313a50b..2ec22191d5 100644
--- a/Modules/Platform/CYGWIN-GNU.cmake
+++ b/Modules/Platform/CYGWIN-GNU.cmake
@@ -44,10 +44,10 @@ macro(__cygwin_compiler_gnu lang)
# building a shared library, shared module, or executable that links
# to other libraries to select whether to use the static or shared
# versions of the libraries.
- FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
- SET(CMAKE_${type}_LINK_STATIC_${lang}_FLAGS "-Wl,-Bstatic")
- SET(CMAKE_${type}_LINK_DYNAMIC_${lang}_FLAGS "-Wl,-Bdynamic")
- ENDFOREACH(type)
+ foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
+ set(CMAKE_${type}_LINK_STATIC_${lang}_FLAGS "-Wl,-Bstatic")
+ set(CMAKE_${type}_LINK_DYNAMIC_${lang}_FLAGS "-Wl,-Bdynamic")
+ endforeach(type)
set(CMAKE_EXE_EXPORTS_${lang}_FLAG "-Wl,--export-all-symbols")
# TODO: Is -Wl,--enable-auto-import now always default?
diff --git a/Modules/Platform/CYGWIN-windres.cmake b/Modules/Platform/CYGWIN-windres.cmake
index 8bc1b15e9f..01d6be3dfd 100644
--- a/Modules/Platform/CYGWIN-windres.cmake
+++ b/Modules/Platform/CYGWIN-windres.cmake
@@ -1 +1 @@
-SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <FLAGS> <DEFINES> <SOURCE> <OBJECT>")
+set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <FLAGS> <DEFINES> <SOURCE> <OBJECT>")
diff --git a/Modules/Platform/CYGWIN.cmake b/Modules/Platform/CYGWIN.cmake
index b7ad2cee14..22816e77aa 100644
--- a/Modules/Platform/CYGWIN.cmake
+++ b/Modules/Platform/CYGWIN.cmake
@@ -43,22 +43,22 @@ if(DEFINED __USE_CMAKE_LEGACY_CYGWIN_WIN32)
unset(__USE_CMAKE_LEGACY_CYGWIN_WIN32)
endif()
-SET(CYGWIN 1)
+set(CYGWIN 1)
-SET(CMAKE_SHARED_LIBRARY_PREFIX "cyg")
-SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll")
-SET(CMAKE_SHARED_MODULE_PREFIX "cyg")
-SET(CMAKE_SHARED_MODULE_SUFFIX ".dll")
-SET(CMAKE_IMPORT_LIBRARY_PREFIX "lib")
-SET(CMAKE_IMPORT_LIBRARY_SUFFIX ".dll.a")
-SET(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe
+set(CMAKE_SHARED_LIBRARY_PREFIX "cyg")
+set(CMAKE_SHARED_LIBRARY_SUFFIX ".dll")
+set(CMAKE_SHARED_MODULE_PREFIX "cyg")
+set(CMAKE_SHARED_MODULE_SUFFIX ".dll")
+set(CMAKE_IMPORT_LIBRARY_PREFIX "lib")
+set(CMAKE_IMPORT_LIBRARY_SUFFIX ".dll.a")
+set(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe
# Modules have a different default prefix that shared libs.
-SET(CMAKE_MODULE_EXISTS 1)
+set(CMAKE_MODULE_EXISTS 1)
-SET(CMAKE_FIND_LIBRARY_PREFIXES "lib")
-SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a")
+set(CMAKE_FIND_LIBRARY_PREFIXES "lib")
+set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a")
# Shared libraries on cygwin can be named with their version number.
-SET(CMAKE_SHARED_LIBRARY_NAME_WITH_VERSION 1)
+set(CMAKE_SHARED_LIBRARY_NAME_WITH_VERSION 1)
-INCLUDE(Platform/UnixPaths)
+include(Platform/UnixPaths)
diff --git a/Modules/Platform/Catamount.cmake b/Modules/Platform/Catamount.cmake
index cf672c9ceb..7e9e02171c 100644
--- a/Modules/Platform/Catamount.cmake
+++ b/Modules/Platform/Catamount.cmake
@@ -1,26 +1,26 @@
#Catamount, which runs on the compute nodes of Cray machines, e.g. RedStorm, doesn't support shared libs
-SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
+set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "") # -shared
-SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
+set(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "") # -shared
+set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
-SET(CMAKE_LINK_LIBRARY_SUFFIX "")
-SET(CMAKE_STATIC_LIBRARY_PREFIX "lib")
-SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
-SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
-SET(CMAKE_SHARED_LIBRARY_SUFFIX ".a") # .a
-SET(CMAKE_EXECUTABLE_SUFFIX "") # .exe
-SET(CMAKE_DL_LIBS "" )
+set(CMAKE_LINK_LIBRARY_SUFFIX "")
+set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
+set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
+set(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
+set(CMAKE_SHARED_LIBRARY_SUFFIX ".a") # .a
+set(CMAKE_EXECUTABLE_SUFFIX "") # .exe
+set(CMAKE_DL_LIBS "" )
-SET(CMAKE_FIND_LIBRARY_PREFIXES "lib")
-SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+set(CMAKE_FIND_LIBRARY_PREFIXES "lib")
+set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
-INCLUDE(Platform/UnixPaths)
+include(Platform/UnixPaths)
-SET(CMAKE_CXX_LINK_SHARED_LIBRARY)
-SET(CMAKE_CXX_LINK_MODULE_LIBRARY)
-SET(CMAKE_C_LINK_SHARED_LIBRARY)
-SET(CMAKE_C_LINK_MODULE_LIBRARY)
+set(CMAKE_CXX_LINK_SHARED_LIBRARY)
+set(CMAKE_CXX_LINK_MODULE_LIBRARY)
+set(CMAKE_C_LINK_SHARED_LIBRARY)
+set(CMAKE_C_LINK_MODULE_LIBRARY)
diff --git a/Modules/Platform/Darwin-GNU.cmake b/Modules/Platform/Darwin-GNU.cmake
index 8a50a6ab90..5e9f8f0968 100644
--- a/Modules/Platform/Darwin-GNU.cmake
+++ b/Modules/Platform/Darwin-GNU.cmake
@@ -59,6 +59,6 @@ macro(cmake_gnu_set_osx_deployment_target_flag lang)
message(STATUS "Checking whether ${_doc} - no")
set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG "")
endif()
- set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG_CODE "SET(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG \"${CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG}\")")
+ set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG_CODE "set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG \"${CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG}\")")
endif()
endmacro()
diff --git a/Modules/Platform/Darwin-XL-C.cmake b/Modules/Platform/Darwin-XL-C.cmake
index 934ebcc8cd..42e94a9d6b 100644
--- a/Modules/Platform/Darwin-XL-C.cmake
+++ b/Modules/Platform/Darwin-XL-C.cmake
@@ -1,5 +1,5 @@
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-qmkshrobj")
-SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle")
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-qmkshrobj")
+set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle")
# Enable shared library versioning.
-SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-install_name")
+set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-install_name")
diff --git a/Modules/Platform/Darwin-XL-CXX.cmake b/Modules/Platform/Darwin-XL-CXX.cmake
index 22ae0183a8..65c76f8b72 100644
--- a/Modules/Platform/Darwin-XL-CXX.cmake
+++ b/Modules/Platform/Darwin-XL-CXX.cmake
@@ -1,5 +1,5 @@
-SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-qmkshrobj")
-SET(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS "-bundle")
+set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-qmkshrobj")
+set(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS "-bundle")
# Enable shared library versioning.
-SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-install_name")
+set(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-install_name")
diff --git a/Modules/Platform/Darwin-icc.cmake b/Modules/Platform/Darwin-icc.cmake
index 621905c410..b8e1bdfbae 100644
--- a/Modules/Platform/Darwin-icc.cmake
+++ b/Modules/Platform/Darwin-icc.cmake
@@ -1,102 +1,102 @@
-SET(CMAKE_C_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS "" )
-SET(CMAKE_CXX_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS "")
+set(CMAKE_C_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS "" )
+set(CMAKE_CXX_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS "")
# Setup for Leopard Compatibility
-EXEC_PROGRAM(sw_vers ARGS -productVersion OUTPUT_VARIABLE _OSX_VERSION)
-# MESSAGE (STATUS "_OSX_VERSION: ${_OSX_VERSION}")
-IF ( _OSX_VERSION MATCHES "^10.4" )
- #IF(CMAKE_COMPILER_IS_GNUCC)
- SET (CMAKE_C_FLAGS_INIT "")
- SET (CMAKE_C_FLAGS_DEBUG_INIT "-gdwarf-2")
- SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
- SET (CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
- SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -gdwarf-2")
- SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
- SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
- # ENDIF(CMAKE_COMPILER_IS_GNUCC)
-
-# IF(CMAKE_COMPILER_IS_GNUCXX)
- SET (CMAKE_CXX_FLAGS_INIT "")
- SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-gdwarf-2")
- SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
- SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
- SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -gdwarf-2")
- SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
- SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
-# ENDIF(CMAKE_COMPILER_IS_GNUCXX)
-ENDIF ( _OSX_VERSION MATCHES "^10.4" )
-
-
-SET(CMAKE_SHARED_LIBRARY_PREFIX "lib")
-SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib")
-SET(CMAKE_SHARED_MODULE_PREFIX "lib")
-SET(CMAKE_SHARED_MODULE_SUFFIX ".so")
-SET(CMAKE_MODULE_EXISTS 1)
-SET(CMAKE_DL_LIBS "")
-SET(CMAKE_C_LINK_FLAGS "-Wl,-headerpad_max_install_names")
-SET(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names")
-SET(CMAKE_PLATFORM_HAS_INSTALLNAME 1)
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
-SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -Wl,-headerpad_max_install_names")
-SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")
+exec_program(sw_vers ARGS -productVersion OUTPUT_VARIABLE _OSX_VERSION)
+# message (STATUS "_OSX_VERSION: ${_OSX_VERSION}")
+if ( _OSX_VERSION MATCHES "^10.4" )
+ #if(CMAKE_COMPILER_IS_GNUCC)
+ set (CMAKE_C_FLAGS_INIT "")
+ set (CMAKE_C_FLAGS_DEBUG_INIT "-gdwarf-2")
+ set (CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
+ set (CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
+ set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -gdwarf-2")
+ set (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
+ set (CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
+ # endif(CMAKE_COMPILER_IS_GNUCC)
+
+# if(CMAKE_COMPILER_IS_GNUCXX)
+ set (CMAKE_CXX_FLAGS_INIT "")
+ set (CMAKE_CXX_FLAGS_DEBUG_INIT "-gdwarf-2")
+ set (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
+ set (CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
+ set (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -gdwarf-2")
+ set (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
+ set (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
+# endif(CMAKE_COMPILER_IS_GNUCXX)
+endif ( _OSX_VERSION MATCHES "^10.4" )
+
+
+set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
+set(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib")
+set(CMAKE_SHARED_MODULE_PREFIX "lib")
+set(CMAKE_SHARED_MODULE_SUFFIX ".so")
+set(CMAKE_MODULE_EXISTS 1)
+set(CMAKE_DL_LIBS "")
+set(CMAKE_C_LINK_FLAGS "-Wl,-headerpad_max_install_names")
+set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names")
+set(CMAKE_PLATFORM_HAS_INSTALLNAME 1)
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
+set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -Wl,-headerpad_max_install_names")
+set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")
# setup for universal binaries if sysroot exists
-IF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk)
+if(EXISTS /Developer/SDKs/MacOSX10.4u.sdk)
# set the sysroot to be used if CMAKE_OSX_ARCHITECTURES
# has more than one value
- SET(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.4u.sdk CACHE STRING
+ set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.4u.sdk CACHE STRING
"isysroot used for universal binary support")
# set _CMAKE_OSX_MACHINE to umame -m
- EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE _CMAKE_OSX_MACHINE)
+ exec_program(uname ARGS -m OUTPUT_VARIABLE _CMAKE_OSX_MACHINE)
# check for environment variable CMAKE_OSX_ARCHITECTURES
# if it is set.
- IF(NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" STREQUAL "")
- SET(_CMAKE_OSX_MACHINE "$ENV{CMAKE_OSX_ARCHITECTURES}")
- ENDIF(NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" STREQUAL "")
+ if(NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" STREQUAL "")
+ set(_CMAKE_OSX_MACHINE "$ENV{CMAKE_OSX_ARCHITECTURES}")
+ endif(NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" STREQUAL "")
# now put _CMAKE_OSX_MACHINE into the cache
- SET(CMAKE_OSX_ARCHITECTURES ${_CMAKE_OSX_MACHINE}
+ set(CMAKE_OSX_ARCHITECTURES ${_CMAKE_OSX_MACHINE}
CACHE STRING "Build architectures for OSX")
-ENDIF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk)
+endif(EXISTS /Developer/SDKs/MacOSX10.4u.sdk)
-IF("${CMAKE_BACKWARDS_COMPATIBILITY}" MATCHES "^1\\.[0-6]$")
- SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS
+if("${CMAKE_BACKWARDS_COMPATIBILITY}" MATCHES "^1\\.[0-6]$")
+ set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS
"${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -flat_namespace -undefined suppress")
-ENDIF("${CMAKE_BACKWARDS_COMPATIBILITY}" MATCHES "^1\\.[0-6]$")
+endif("${CMAKE_BACKWARDS_COMPATIBILITY}" MATCHES "^1\\.[0-6]$")
-IF(NOT XCODE)
+if(NOT XCODE)
# Enable shared library versioning. This flag is not actually referenced
# but the fact that the setting exists will cause the generators to support
# soname computation.
- SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-install_name")
- SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-install_name")
- SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-install_name")
-ENDIF(NOT XCODE)
+ set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-install_name")
+ set(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-install_name")
+ set(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-install_name")
+endif(NOT XCODE)
# Xcode does not support -isystem yet.
-IF(XCODE)
- SET(CMAKE_INCLUDE_SYSTEM_FLAG_C)
- SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX)
-ENDIF(XCODE)
+if(XCODE)
+ set(CMAKE_INCLUDE_SYSTEM_FLAG_C)
+ set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX)
+endif(XCODE)
-SET(CMAKE_MacOSX_Content_COMPILE_OBJECT "\"${CMAKE_COMMAND}\" -E copy_if_different <SOURCE> <OBJECT>")
+set(CMAKE_MacOSX_Content_COMPILE_OBJECT "\"${CMAKE_COMMAND}\" -E copy_if_different <SOURCE> <OBJECT>")
-SET(CMAKE_C_CREATE_SHARED_LIBRARY
+set(CMAKE_C_CREATE_SHARED_LIBRARY
"<CMAKE_C_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
-SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
+set(CMAKE_CXX_CREATE_SHARED_LIBRARY
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
-SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
+set(CMAKE_Fortran_CREATE_SHARED_LIBRARY
"<CMAKE_Fortran_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
-SET(CMAKE_CXX_CREATE_SHARED_MODULE
+set(CMAKE_CXX_CREATE_SHARED_MODULE
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
-SET(CMAKE_C_CREATE_SHARED_MODULE
+set(CMAKE_C_CREATE_SHARED_MODULE
"<CMAKE_C_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_MODULE_CREATE_C_FLAGS> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
-SET(CMAKE_Fortran_CREATE_SHARED_MODULE
+set(CMAKE_Fortran_CREATE_SHARED_MODULE
"<CMAKE_Fortran_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
@@ -106,26 +106,26 @@ SET(CMAKE_Fortran_CREATE_SHARED_MODULE
# default to searching for frameworks first
-IF(NOT DEFINED CMAKE_FIND_FRAMEWORK)
- SET(CMAKE_FIND_FRAMEWORK FIRST)
-ENDIF()
+if(NOT DEFINED CMAKE_FIND_FRAMEWORK)
+ set(CMAKE_FIND_FRAMEWORK FIRST)
+endif()
# set up the default search directories for frameworks
-SET(CMAKE_SYSTEM_FRAMEWORK_PATH
+set(CMAKE_SYSTEM_FRAMEWORK_PATH
~/Library/Frameworks
/Library/Frameworks
/Network/Library/Frameworks
/System/Library/Frameworks)
# default to searching for application bundles first
-IF(NOT DEFINED CMAKE_FIND_APPBUNDLE)
- SET(CMAKE_FIND_APPBUNDLE FIRST)
-ENDIF()
+if(NOT DEFINED CMAKE_FIND_APPBUNDLE)
+ set(CMAKE_FIND_APPBUNDLE FIRST)
+endif()
# set up the default search directories for application bundles
-SET(CMAKE_SYSTEM_APPBUNDLE_PATH
+set(CMAKE_SYSTEM_APPBUNDLE_PATH
~/Applications
/Applications
/Developer/Applications)
-INCLUDE(Platform/UnixPaths)
-SET(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH} /sw/include)
-SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH} /sw/lib)
+include(Platform/UnixPaths)
+set(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH} /sw/include)
+set(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH} /sw/lib)
diff --git a/Modules/Platform/Darwin-icpc.cmake b/Modules/Platform/Darwin-icpc.cmake
index e247bae280..549feb7f55 100644
--- a/Modules/Platform/Darwin-icpc.cmake
+++ b/Modules/Platform/Darwin-icpc.cmake
@@ -1,3 +1,3 @@
-GET_FILENAME_COMPONENT(CURRENT_SOURCE_PARENT ${CMAKE_CURRENT_LIST_FILE} PATH)
-#MESSAGE (STATUS "CURRENT_SOURCE_PARENT: ${CURRENT_SOURCE_PARENT}")
-INCLUDE ( ${CURRENT_SOURCE_PARENT}/Darwin-icc.cmake)
+get_filename_component(CURRENT_SOURCE_PARENT ${CMAKE_CURRENT_LIST_FILE} PATH)
+#message (STATUS "CURRENT_SOURCE_PARENT: ${CURRENT_SOURCE_PARENT}")
+include ( ${CURRENT_SOURCE_PARENT}/Darwin-icc.cmake)
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index eff07b2958..8e665d1cdf 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -1,4 +1,4 @@
-SET(APPLE 1)
+set(APPLE 1)
# Darwin versions:
# 6.x == Mac OSX 10.2 (Jaguar)
@@ -8,131 +8,131 @@ SET(APPLE 1)
# 10.x == Mac OSX 10.6 (Snow Leopard)
# 11.x == Mac OSX 10.7 (Lion)
# 12.x == Mac OSX 10.8 (Mountain Lion)
-STRING(REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1" DARWIN_MAJOR_VERSION "${CMAKE_SYSTEM_VERSION}")
-STRING(REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\2" DARWIN_MINOR_VERSION "${CMAKE_SYSTEM_VERSION}")
+string(REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1" DARWIN_MAJOR_VERSION "${CMAKE_SYSTEM_VERSION}")
+string(REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\2" DARWIN_MINOR_VERSION "${CMAKE_SYSTEM_VERSION}")
# Do not use the "-Wl,-search_paths_first" flag with the OSX 10.2 compiler.
# Done this way because it is too early to do a TRY_COMPILE.
-IF(NOT DEFINED HAVE_FLAG_SEARCH_PATHS_FIRST)
- SET(HAVE_FLAG_SEARCH_PATHS_FIRST 0)
- IF("${DARWIN_MAJOR_VERSION}" GREATER 6)
- SET(HAVE_FLAG_SEARCH_PATHS_FIRST 1)
- ENDIF("${DARWIN_MAJOR_VERSION}" GREATER 6)
-ENDIF(NOT DEFINED HAVE_FLAG_SEARCH_PATHS_FIRST)
+if(NOT DEFINED HAVE_FLAG_SEARCH_PATHS_FIRST)
+ set(HAVE_FLAG_SEARCH_PATHS_FIRST 0)
+ if("${DARWIN_MAJOR_VERSION}" GREATER 6)
+ set(HAVE_FLAG_SEARCH_PATHS_FIRST 1)
+ endif("${DARWIN_MAJOR_VERSION}" GREATER 6)
+endif(NOT DEFINED HAVE_FLAG_SEARCH_PATHS_FIRST)
# More desirable, but does not work:
- #INCLUDE(CheckCXXCompilerFlag)
+ #include(CheckCXXCompilerFlag)
#CHECK_CXX_COMPILER_FLAG("-Wl,-search_paths_first" HAVE_FLAG_SEARCH_PATHS_FIRST)
-SET(CMAKE_SHARED_LIBRARY_PREFIX "lib")
-SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib")
-SET(CMAKE_SHARED_MODULE_PREFIX "lib")
-SET(CMAKE_SHARED_MODULE_SUFFIX ".so")
-SET(CMAKE_MODULE_EXISTS 1)
-SET(CMAKE_DL_LIBS "")
-
-SET(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ")
-SET(CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ")
-SET(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
-SET(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")
-
-SET(CMAKE_C_LINK_FLAGS "-Wl,-headerpad_max_install_names")
-SET(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names")
-
-IF(HAVE_FLAG_SEARCH_PATHS_FIRST)
- SET(CMAKE_C_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
- SET(CMAKE_CXX_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}")
-ENDIF(HAVE_FLAG_SEARCH_PATHS_FIRST)
-
-SET(CMAKE_PLATFORM_HAS_INSTALLNAME 1)
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
-SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -Wl,-headerpad_max_install_names")
-SET(CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,")
-SET(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,")
-SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")
+set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
+set(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib")
+set(CMAKE_SHARED_MODULE_PREFIX "lib")
+set(CMAKE_SHARED_MODULE_SUFFIX ".so")
+set(CMAKE_MODULE_EXISTS 1)
+set(CMAKE_DL_LIBS "")
+
+set(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ")
+set(CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ")
+set(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
+set(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")
+
+set(CMAKE_C_LINK_FLAGS "-Wl,-headerpad_max_install_names")
+set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names")
+
+if(HAVE_FLAG_SEARCH_PATHS_FIRST)
+ set(CMAKE_C_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
+ set(CMAKE_CXX_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}")
+endif(HAVE_FLAG_SEARCH_PATHS_FIRST)
+
+set(CMAKE_PLATFORM_HAS_INSTALLNAME 1)
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
+set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -Wl,-headerpad_max_install_names")
+set(CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,")
+set(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,")
+set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")
# hack: if a new cmake (which uses CMAKE_INSTALL_NAME_TOOL) runs on an old build tree
# (where install_name_tool was hardcoded) and where CMAKE_INSTALL_NAME_TOOL isn't in the cache
# and still cmake didn't fail in CMakeFindBinUtils.cmake (because it isn't rerun)
# hardcode CMAKE_INSTALL_NAME_TOOL here to install_name_tool, so it behaves as it did before, Alex
-IF(NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
- FIND_PROGRAM(CMAKE_INSTALL_NAME_TOOL install_name_tool)
- MARK_AS_ADVANCED(CMAKE_INSTALL_NAME_TOOL)
-ENDIF(NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
+if(NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
+ find_program(CMAKE_INSTALL_NAME_TOOL install_name_tool)
+ mark_as_advanced(CMAKE_INSTALL_NAME_TOOL)
+endif(NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
# Set the assumed (Pre 10.5 or Default) location of the developer tools
-SET(OSX_DEVELOPER_ROOT "/Developer")
+set(OSX_DEVELOPER_ROOT "/Developer")
# Use the xcode-select tool if it's available (Xcode >= 3.0 installations)
-FIND_PROGRAM(CMAKE_XCODE_SELECT xcode-select)
-MARK_AS_ADVANCED(CMAKE_XCODE_SELECT)
-IF(CMAKE_XCODE_SELECT)
- EXECUTE_PROCESS(COMMAND ${CMAKE_XCODE_SELECT} "-print-path"
+find_program(CMAKE_XCODE_SELECT xcode-select)
+mark_as_advanced(CMAKE_XCODE_SELECT)
+if(CMAKE_XCODE_SELECT)
+ execute_process(COMMAND ${CMAKE_XCODE_SELECT} "-print-path"
OUTPUT_VARIABLE OSX_DEVELOPER_ROOT
OUTPUT_STRIP_TRAILING_WHITESPACE)
-ENDIF(CMAKE_XCODE_SELECT)
+endif(CMAKE_XCODE_SELECT)
# Find installed SDKs
# Start with Xcode-4.3+ default SDKs directory
-SET(_CMAKE_OSX_SDKS_DIR
+set(_CMAKE_OSX_SDKS_DIR
"${OSX_DEVELOPER_ROOT}/Platforms/MacOSX.platform/Developer/SDKs")
-FILE(GLOB _CMAKE_OSX_SDKS "${_CMAKE_OSX_SDKS_DIR}/*")
+file(GLOB _CMAKE_OSX_SDKS "${_CMAKE_OSX_SDKS_DIR}/*")
# If not present, try pre-4.3 SDKs directory
-IF(NOT _CMAKE_OSX_SDKS)
-SET(_CMAKE_OSX_SDKS_DIR "${OSX_DEVELOPER_ROOT}/SDKs")
- FILE(GLOB _CMAKE_OSX_SDKS "${_CMAKE_OSX_SDKS_DIR}/*")
-ENDIF(NOT _CMAKE_OSX_SDKS)
+if(NOT _CMAKE_OSX_SDKS)
+set(_CMAKE_OSX_SDKS_DIR "${OSX_DEVELOPER_ROOT}/SDKs")
+ file(GLOB _CMAKE_OSX_SDKS "${_CMAKE_OSX_SDKS_DIR}/*")
+endif(NOT _CMAKE_OSX_SDKS)
-EXECUTE_PROCESS(COMMAND sw_vers -productVersion
+execute_process(COMMAND sw_vers -productVersion
OUTPUT_VARIABLE CURRENT_OSX_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
#----------------------------------------------------------------------------
# _CURRENT_OSX_VERSION - as a two-component string: 10.5, 10.6, ...
#
-STRING(REGEX REPLACE "^([0-9]+\\.[0-9]+).*$" "\\1"
+string(REGEX REPLACE "^([0-9]+\\.[0-9]+).*$" "\\1"
_CURRENT_OSX_VERSION "${CURRENT_OSX_VERSION}")
#----------------------------------------------------------------------------
# CMAKE_OSX_DEPLOYMENT_TARGET
# Set cache variable - end user may change this during ccmake or cmake-gui configure.
-IF(_CURRENT_OSX_VERSION VERSION_GREATER 10.3)
- SET(CMAKE_OSX_DEPLOYMENT_TARGET "$ENV{MACOSX_DEPLOYMENT_TARGET}" CACHE STRING
+if(_CURRENT_OSX_VERSION VERSION_GREATER 10.3)
+ set(CMAKE_OSX_DEPLOYMENT_TARGET "$ENV{MACOSX_DEPLOYMENT_TARGET}" CACHE STRING
"Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value.")
-ENDIF(_CURRENT_OSX_VERSION VERSION_GREATER 10.3)
+endif(_CURRENT_OSX_VERSION VERSION_GREATER 10.3)
#----------------------------------------------------------------------------
# CMAKE_OSX_SYSROOT
# Environment variable set by the user overrides our default.
# Use the same environment variable that Xcode uses.
-SET(ENV_SDKROOT "$ENV{SDKROOT}")
+set(ENV_SDKROOT "$ENV{SDKROOT}")
# Set CMAKE_OSX_SYSROOT_DEFAULT based on _CURRENT_OSX_VERSION,
# accounting for the known specially named SDKs.
-SET(CMAKE_OSX_SYSROOT_DEFAULT
+set(CMAKE_OSX_SYSROOT_DEFAULT
"${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CURRENT_OSX_VERSION}.sdk")
-IF(_CURRENT_OSX_VERSION STREQUAL "10.4")
- SET(CMAKE_OSX_SYSROOT_DEFAULT
+if(_CURRENT_OSX_VERSION STREQUAL "10.4")
+ set(CMAKE_OSX_SYSROOT_DEFAULT
"${_CMAKE_OSX_SDKS_DIR}/MacOSX10.4u.sdk")
-ENDIF(_CURRENT_OSX_VERSION STREQUAL "10.4")
+endif(_CURRENT_OSX_VERSION STREQUAL "10.4")
-IF(_CURRENT_OSX_VERSION STREQUAL "10.3")
- SET(CMAKE_OSX_SYSROOT_DEFAULT
+if(_CURRENT_OSX_VERSION STREQUAL "10.3")
+ set(CMAKE_OSX_SYSROOT_DEFAULT
"${_CMAKE_OSX_SDKS_DIR}/MacOSX10.3.9.sdk")
-ENDIF(_CURRENT_OSX_VERSION STREQUAL "10.3")
+endif(_CURRENT_OSX_VERSION STREQUAL "10.3")
# Use environment or default as initial cache value:
-IF(NOT ENV_SDKROOT STREQUAL "")
- SET(CMAKE_OSX_SYSROOT_VALUE ${ENV_SDKROOT})
-ELSE(NOT ENV_SDKROOT STREQUAL "")
- SET(CMAKE_OSX_SYSROOT_VALUE ${CMAKE_OSX_SYSROOT_DEFAULT})
-ENDIF(NOT ENV_SDKROOT STREQUAL "")
+if(NOT ENV_SDKROOT STREQUAL "")
+ set(CMAKE_OSX_SYSROOT_VALUE ${ENV_SDKROOT})
+else(NOT ENV_SDKROOT STREQUAL "")
+ set(CMAKE_OSX_SYSROOT_VALUE ${CMAKE_OSX_SYSROOT_DEFAULT})
+endif(NOT ENV_SDKROOT STREQUAL "")
# Set cache variable - end user may change this during ccmake or cmake-gui configure.
-SET(CMAKE_OSX_SYSROOT ${CMAKE_OSX_SYSROOT_VALUE} CACHE PATH
+set(CMAKE_OSX_SYSROOT ${CMAKE_OSX_SYSROOT_VALUE} CACHE PATH
"The product will be built against the headers and libraries located inside the indicated SDK.")
#----------------------------------------------------------------------------
@@ -156,113 +156,113 @@ endfunction(SanityCheckSDKAndDeployTarget)
SanityCheckSDKAndDeployTarget("${CMAKE_OSX_SYSROOT}" "${CMAKE_OSX_DEPLOYMENT_TARGET}")
# set _CMAKE_OSX_MACHINE to uname -m
-EXECUTE_PROCESS(COMMAND uname -m
+execute_process(COMMAND uname -m
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE _CMAKE_OSX_MACHINE)
# check for Power PC and change to ppc
-IF(_CMAKE_OSX_MACHINE MATCHES "Power")
- SET(_CMAKE_OSX_MACHINE ppc)
-ENDIF(_CMAKE_OSX_MACHINE MATCHES "Power")
+if(_CMAKE_OSX_MACHINE MATCHES "Power")
+ set(_CMAKE_OSX_MACHINE ppc)
+endif(_CMAKE_OSX_MACHINE MATCHES "Power")
# check for environment variable CMAKE_OSX_ARCHITECTURES
# if it is set.
-IF(NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" STREQUAL "")
- SET(CMAKE_OSX_ARCHITECTURES_VALUE "$ENV{CMAKE_OSX_ARCHITECTURES}")
-ELSE(NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" STREQUAL "")
- SET(CMAKE_OSX_ARCHITECTURES_VALUE "")
-ENDIF(NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" STREQUAL "")
+if(NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" STREQUAL "")
+ set(CMAKE_OSX_ARCHITECTURES_VALUE "$ENV{CMAKE_OSX_ARCHITECTURES}")
+else(NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" STREQUAL "")
+ set(CMAKE_OSX_ARCHITECTURES_VALUE "")
+endif(NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" STREQUAL "")
# now put _CMAKE_OSX_MACHINE into the cache
-SET(CMAKE_OSX_ARCHITECTURES ${CMAKE_OSX_ARCHITECTURES_VALUE} CACHE STRING
+set(CMAKE_OSX_ARCHITECTURES ${CMAKE_OSX_ARCHITECTURES_VALUE} CACHE STRING
"Build architectures for OSX")
-IF("${CMAKE_BACKWARDS_COMPATIBILITY}" MATCHES "^1\\.[0-6]$")
- SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS
+if("${CMAKE_BACKWARDS_COMPATIBILITY}" MATCHES "^1\\.[0-6]$")
+ set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS
"${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -flat_namespace -undefined suppress")
-ENDIF("${CMAKE_BACKWARDS_COMPATIBILITY}" MATCHES "^1\\.[0-6]$")
+endif("${CMAKE_BACKWARDS_COMPATIBILITY}" MATCHES "^1\\.[0-6]$")
-IF(NOT XCODE)
+if(NOT XCODE)
# Enable shared library versioning. This flag is not actually referenced
# but the fact that the setting exists will cause the generators to support
# soname computation.
- SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-install_name")
-ENDIF(NOT XCODE)
+ set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-install_name")
+endif(NOT XCODE)
# Xcode does not support -isystem yet.
-IF(XCODE)
- SET(CMAKE_INCLUDE_SYSTEM_FLAG_C)
- SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX)
-ENDIF(XCODE)
+if(XCODE)
+ set(CMAKE_INCLUDE_SYSTEM_FLAG_C)
+ set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX)
+endif(XCODE)
-IF("${_CURRENT_OSX_VERSION}" VERSION_LESS "10.5")
+if("${_CURRENT_OSX_VERSION}" VERSION_LESS "10.5")
# Need to list dependent shared libraries on link line. When building
# with -isysroot (for universal binaries), the linker always looks for
# dependent libraries under the sysroot. Listing them on the link
# line works around the problem.
- SET(CMAKE_LINK_DEPENDENT_LIBRARY_FILES 1)
-ENDIF()
+ set(CMAKE_LINK_DEPENDENT_LIBRARY_FILES 1)
+endif()
-SET(CMAKE_C_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w)
-SET(CMAKE_CXX_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w)
-SET(CMAKE_C_CREATE_SHARED_LIBRARY
+set(CMAKE_C_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w)
+set(CMAKE_CXX_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w)
+set(CMAKE_C_CREATE_SHARED_LIBRARY
"<CMAKE_C_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
-SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
+set(CMAKE_CXX_CREATE_SHARED_LIBRARY
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
-SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
+set(CMAKE_Fortran_CREATE_SHARED_LIBRARY
"<CMAKE_Fortran_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
-SET(CMAKE_CXX_CREATE_SHARED_MODULE
+set(CMAKE_CXX_CREATE_SHARED_MODULE
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
-SET(CMAKE_C_CREATE_SHARED_MODULE
+set(CMAKE_C_CREATE_SHARED_MODULE
"<CMAKE_C_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_MODULE_CREATE_C_FLAGS> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
-SET(CMAKE_Fortran_CREATE_SHARED_MODULE
+set(CMAKE_Fortran_CREATE_SHARED_MODULE
"<CMAKE_Fortran_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
-SET(CMAKE_C_CREATE_MACOSX_FRAMEWORK
+set(CMAKE_C_CREATE_MACOSX_FRAMEWORK
"<CMAKE_C_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
-SET(CMAKE_CXX_CREATE_MACOSX_FRAMEWORK
+set(CMAKE_CXX_CREATE_MACOSX_FRAMEWORK
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
# default to searching for frameworks first
-IF(NOT DEFINED CMAKE_FIND_FRAMEWORK)
- SET(CMAKE_FIND_FRAMEWORK FIRST)
-ENDIF()
+if(NOT DEFINED CMAKE_FIND_FRAMEWORK)
+ set(CMAKE_FIND_FRAMEWORK FIRST)
+endif()
# set up the default search directories for frameworks
-SET(CMAKE_SYSTEM_FRAMEWORK_PATH
+set(CMAKE_SYSTEM_FRAMEWORK_PATH
~/Library/Frameworks
/Library/Frameworks
/Network/Library/Frameworks
/System/Library/Frameworks)
# default to searching for application bundles first
-IF(NOT DEFINED CMAKE_FIND_APPBUNDLE)
- SET(CMAKE_FIND_APPBUNDLE FIRST)
-ENDIF()
+if(NOT DEFINED CMAKE_FIND_APPBUNDLE)
+ set(CMAKE_FIND_APPBUNDLE FIRST)
+endif()
# set up the default search directories for application bundles
-SET(_apps_paths)
-FOREACH(_path
+set(_apps_paths)
+foreach(_path
"~/Applications"
"/Applications"
"${OSX_DEVELOPER_ROOT}/../Applications" # Xcode 4.3+
"${OSX_DEVELOPER_ROOT}/Applications" # pre-4.3
)
- GET_FILENAME_COMPONENT(_apps "${_path}" ABSOLUTE)
- IF(EXISTS "${_apps}")
- LIST(APPEND _apps_paths "${_apps}")
- ENDIF()
-ENDFOREACH()
-LIST(REMOVE_DUPLICATES _apps_paths)
-SET(CMAKE_SYSTEM_APPBUNDLE_PATH
+ get_filename_component(_apps "${_path}" ABSOLUTE)
+ if(EXISTS "${_apps}")
+ list(APPEND _apps_paths "${_apps}")
+ endif()
+endforeach()
+list(REMOVE_DUPLICATES _apps_paths)
+set(CMAKE_SYSTEM_APPBUNDLE_PATH
${_apps_paths})
-UNSET(_apps_paths)
+unset(_apps_paths)
-INCLUDE(Platform/UnixPaths)
-LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH
+include(Platform/UnixPaths)
+list(APPEND CMAKE_SYSTEM_PREFIX_PATH
/sw # Fink
/opt/local # MacPorts
)
diff --git a/Modules/Platform/DragonFly.cmake b/Modules/Platform/DragonFly.cmake
index f6e0f810f7..c22677b9d4 100644
--- a/Modules/Platform/DragonFly.cmake
+++ b/Modules/Platform/DragonFly.cmake
@@ -2,4 +2,4 @@
# http://www.dragonflybsd.org
# see http://archive.netbsd.se/?ml=dfbsd-users&a=2007-07&m=4678361
-INCLUDE(Platform/FreeBSD)
+include(Platform/FreeBSD)
diff --git a/Modules/Platform/FreeBSD.cmake b/Modules/Platform/FreeBSD.cmake
index 82fe961fbf..b5779023f9 100644
--- a/Modules/Platform/FreeBSD.cmake
+++ b/Modules/Platform/FreeBSD.cmake
@@ -1,28 +1,28 @@
-IF(EXISTS /usr/include/dlfcn.h)
- SET(CMAKE_DL_LIBS "")
- SET(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC")
- SET(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE")
- SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
- SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
- SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
- SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath
- SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty
- SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
- SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
- SET(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
-ENDIF(EXISTS /usr/include/dlfcn.h)
+if(EXISTS /usr/include/dlfcn.h)
+ set(CMAKE_DL_LIBS "")
+ set(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC")
+ set(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE")
+ set(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
+ set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
+ set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty
+ set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
+ set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
+ set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
+endif(EXISTS /usr/include/dlfcn.h)
# Shared libraries with no builtin soname may not be linked safely by
# specifying the file path.
-SET(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1)
+set(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1)
# Initialize C link type selection flags. These flags are used when
# building a shared library, shared module, or executable that links
# to other libraries to select whether to use the static or shared
# versions of the libraries.
-FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
- SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic")
- SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
-ENDFOREACH(type)
+foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
+ set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic")
+ set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
+endforeach(type)
-INCLUDE(Platform/UnixPaths)
+include(Platform/UnixPaths)
diff --git a/Modules/Platform/GNU.cmake b/Modules/Platform/GNU.cmake
index 4bcfd51ce0..e8c3b657b6 100644
--- a/Modules/Platform/GNU.cmake
+++ b/Modules/Platform/GNU.cmake
@@ -1,13 +1,13 @@
# GCC is the default compiler on GNU/Hurd.
-SET(CMAKE_DL_LIBS "dl")
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
-SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
-SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
-SET(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
+set(CMAKE_DL_LIBS "dl")
+set(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
+set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
+set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
+set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
-SET(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-gnu[a-z0-9_]*")
+set(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-gnu[a-z0-9_]*")
-INCLUDE(Platform/UnixPaths)
+include(Platform/UnixPaths)
diff --git a/Modules/Platform/Generic-ADSP-ASM.cmake b/Modules/Platform/Generic-ADSP-ASM.cmake
index cec4c2f686..63a1388ce1 100644
--- a/Modules/Platform/Generic-ADSP-ASM.cmake
+++ b/Modules/Platform/Generic-ADSP-ASM.cmake
@@ -1,7 +1,7 @@
-INCLUDE(Platform/Generic-ADSP-Common)
+include(Platform/Generic-ADSP-Common)
-SET(CMAKE_ASM_SOURCE_FILE_EXTENSIONS asm)
-SET(CMAKE_ASM_OUTPUT_EXTENSION ".doj" )
-SET(CMAKE_ASM_COMPILE_OBJECT
+set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS asm)
+set(CMAKE_ASM_OUTPUT_EXTENSION ".doj" )
+set(CMAKE_ASM_COMPILE_OBJECT
"<CMAKE_ASM_COMPILER> <FLAGS> -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -o <OBJECT> <SOURCE>")
diff --git a/Modules/Platform/Generic-ADSP-C.cmake b/Modules/Platform/Generic-ADSP-C.cmake
index d35307bc7f..4b9ed9d073 100644
--- a/Modules/Platform/Generic-ADSP-C.cmake
+++ b/Modules/Platform/Generic-ADSP-C.cmake
@@ -1,20 +1,20 @@
-INCLUDE(Platform/Generic-ADSP-Common)
+include(Platform/Generic-ADSP-Common)
-SET(CMAKE_C_OUTPUT_EXTENSION ".doj")
+set(CMAKE_C_OUTPUT_EXTENSION ".doj")
-SET(CMAKE_C_FLAGS_DEBUG_INIT "-g")
-SET(CMAKE_C_FLAGS_MINSIZEREL_INIT "")
-SET(CMAKE_C_FLAGS_RELEASE_INIT "")
-SET(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "")
+set(CMAKE_C_FLAGS_DEBUG_INIT "-g")
+set(CMAKE_C_FLAGS_MINSIZEREL_INIT "")
+set(CMAKE_C_FLAGS_RELEASE_INIT "")
+set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "")
-SET(CMAKE_C_CREATE_STATIC_LIBRARY
+set(CMAKE_C_CREATE_STATIC_LIBRARY
"<CMAKE_C_COMPILER> -build-lib -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -o <TARGET> <CMAKE_C_LINK_FLAGS> <OBJECTS>")
-SET(CMAKE_C_LINK_EXECUTABLE
+set(CMAKE_C_LINK_EXECUTABLE
"<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
-SET(CMAKE_C_CREATE_SHARED_LIBRARY)
-SET(CMAKE_C_CREATE_MODULE_LIBRARY)
+set(CMAKE_C_CREATE_SHARED_LIBRARY)
+set(CMAKE_C_CREATE_MODULE_LIBRARY)
diff --git a/Modules/Platform/Generic-ADSP-CXX.cmake b/Modules/Platform/Generic-ADSP-CXX.cmake
index 42d3d56aca..9673aef408 100644
--- a/Modules/Platform/Generic-ADSP-CXX.cmake
+++ b/Modules/Platform/Generic-ADSP-CXX.cmake
@@ -1,18 +1,18 @@
-INCLUDE(Platform/Generic-ADSP-Common)
+include(Platform/Generic-ADSP-Common)
-SET(CMAKE_CXX_OUTPUT_EXTENSION ".doj")
+set(CMAKE_CXX_OUTPUT_EXTENSION ".doj")
-SET(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
-SET(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "")
-SET(CMAKE_CXX_FLAGS_RELEASE_INIT "")
-SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "")
+set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
+set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "")
+set(CMAKE_CXX_FLAGS_RELEASE_INIT "")
+set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "")
-SET(CMAKE_CXX_CREATE_STATIC_LIBRARY
+set(CMAKE_CXX_CREATE_STATIC_LIBRARY
"<CMAKE_CXX_COMPILER> -build-lib -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -o <TARGET> <CMAKE_CXX_LINK_FLAGS> <OBJECTS>")
-SET(CMAKE_CXX_LINK_EXECUTABLE
+set(CMAKE_CXX_LINK_EXECUTABLE
"<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
-SET(CMAKE_CXX_CREATE_SHARED_LIBRARY)
-SET(CMAKE_CXX_CREATE_MODULE_LIBRARY)
+set(CMAKE_CXX_CREATE_SHARED_LIBRARY)
+set(CMAKE_CXX_CREATE_MODULE_LIBRARY)
diff --git a/Modules/Platform/Generic-ADSP-Common.cmake b/Modules/Platform/Generic-ADSP-Common.cmake
index 14b92e95ad..9120eed111 100644
--- a/Modules/Platform/Generic-ADSP-Common.cmake
+++ b/Modules/Platform/Generic-ADSP-Common.cmake
@@ -6,115 +6,115 @@
# TS (TigerShark)
# 21k (Sharc 21xxx)
-IF(NOT ADSP)
+if(NOT ADSP)
- SET(ADSP TRUE)
+ set(ADSP TRUE)
- SET(CMAKE_STATIC_LIBRARY_SUFFIX ".dlb")
- SET(CMAKE_SHARED_LIBRARY_SUFFIX "")
- SET(CMAKE_EXECUTABLE_SUFFIX ".dxe")
+ set(CMAKE_STATIC_LIBRARY_SUFFIX ".dlb")
+ set(CMAKE_SHARED_LIBRARY_SUFFIX "")
+ set(CMAKE_EXECUTABLE_SUFFIX ".dxe")
# if ADSP_PROCESSOR has not been set, but CMAKE_SYSTEM_PROCESSOR has,
# assume that this is the processor name to use for the compiler
- IF(CMAKE_SYSTEM_PROCESSOR AND NOT ADSP_PROCESSOR)
- SET(ADSP_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR})
- ENDIF(CMAKE_SYSTEM_PROCESSOR AND NOT ADSP_PROCESSOR)
+ if(CMAKE_SYSTEM_PROCESSOR AND NOT ADSP_PROCESSOR)
+ set(ADSP_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR})
+ endif(CMAKE_SYSTEM_PROCESSOR AND NOT ADSP_PROCESSOR)
# if ADSP_PROCESSOR_SILICIUM_REVISION has not been set, use "none"
- IF(NOT ADSP_PROCESSOR_SILICIUM_REVISION)
- SET(ADSP_PROCESSOR_SILICIUM_REVISION "none")
- ENDIF(NOT ADSP_PROCESSOR_SILICIUM_REVISION)
+ if(NOT ADSP_PROCESSOR_SILICIUM_REVISION)
+ set(ADSP_PROCESSOR_SILICIUM_REVISION "none")
+ endif(NOT ADSP_PROCESSOR_SILICIUM_REVISION)
# this file is included from the C and CXX files, so handle both here
- GET_FILENAME_COMPONENT(_ADSP_DIR "${CMAKE_C_COMPILER}" PATH)
- IF(NOT _ADSP_DIR)
- GET_FILENAME_COMPONENT(_ADSP_DIR "${CMAKE_CXX_COMPILER}" PATH)
- ENDIF(NOT _ADSP_DIR)
- IF(NOT _ADSP_DIR)
- GET_FILENAME_COMPONENT(_ADSP_DIR "${CMAKE_ASM_COMPILER}" PATH)
- ENDIF(NOT _ADSP_DIR)
+ get_filename_component(_ADSP_DIR "${CMAKE_C_COMPILER}" PATH)
+ if(NOT _ADSP_DIR)
+ get_filename_component(_ADSP_DIR "${CMAKE_CXX_COMPILER}" PATH)
+ endif(NOT _ADSP_DIR)
+ if(NOT _ADSP_DIR)
+ get_filename_component(_ADSP_DIR "${CMAKE_ASM_COMPILER}" PATH)
+ endif(NOT _ADSP_DIR)
# detect architecture
- IF(CMAKE_C_COMPILER MATCHES ccblkfn OR CMAKE_CXX_COMPILER MATCHES ccblkfn OR CMAKE_ASM_COMPILER MATCHES easmBLKFN)
- IF(NOT ADSP_PROCESSOR)
- SET(ADSP_PROCESSOR "ADSP-BF561")
- ENDIF(NOT ADSP_PROCESSOR)
- SET(ADSP_BLACKFIN TRUE)
- SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/Blackfin")
- ENDIF(CMAKE_C_COMPILER MATCHES ccblkfn OR CMAKE_CXX_COMPILER MATCHES ccblkfn OR CMAKE_ASM_COMPILER MATCHES easmBLKFN)
+ if(CMAKE_C_COMPILER MATCHES ccblkfn OR CMAKE_CXX_COMPILER MATCHES ccblkfn OR CMAKE_ASM_COMPILER MATCHES easmBLKFN)
+ if(NOT ADSP_PROCESSOR)
+ set(ADSP_PROCESSOR "ADSP-BF561")
+ endif(NOT ADSP_PROCESSOR)
+ set(ADSP_BLACKFIN TRUE)
+ set(_ADSP_FAMILY_DIR "${_ADSP_DIR}/Blackfin")
+ endif(CMAKE_C_COMPILER MATCHES ccblkfn OR CMAKE_CXX_COMPILER MATCHES ccblkfn OR CMAKE_ASM_COMPILER MATCHES easmBLKFN)
- IF(CMAKE_C_COMPILER MATCHES ccts OR CMAKE_CXX_COMPILER MATCHES ccts OR CMAKE_ASM_COMPILER MATCHES easmTS)
- IF(NOT ADSP_PROCESSOR)
- SET(ADSP_PROCESSOR "ADSP-TS101")
- ENDIF(NOT ADSP_PROCESSOR)
- SET(ADSP_TS TRUE)
- SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/TS")
- ENDIF(CMAKE_C_COMPILER MATCHES ccts OR CMAKE_CXX_COMPILER MATCHES ccts OR CMAKE_ASM_COMPILER MATCHES easmTS)
+ if(CMAKE_C_COMPILER MATCHES ccts OR CMAKE_CXX_COMPILER MATCHES ccts OR CMAKE_ASM_COMPILER MATCHES easmTS)
+ if(NOT ADSP_PROCESSOR)
+ set(ADSP_PROCESSOR "ADSP-TS101")
+ endif(NOT ADSP_PROCESSOR)
+ set(ADSP_TS TRUE)
+ set(_ADSP_FAMILY_DIR "${_ADSP_DIR}/TS")
+ endif(CMAKE_C_COMPILER MATCHES ccts OR CMAKE_CXX_COMPILER MATCHES ccts OR CMAKE_ASM_COMPILER MATCHES easmTS)
- IF(CMAKE_C_COMPILER MATCHES cc21k OR CMAKE_CXX_COMPILER MATCHES cc21k OR CMAKE_ASM_COMPILER MATCHES easm21k)
- IF(NOT ADSP_PROCESSOR)
- SET(ADSP_PROCESSOR "ADSP-21060")
- ENDIF(NOT ADSP_PROCESSOR)
- SET(ADSP_21K TRUE)
+ if(CMAKE_C_COMPILER MATCHES cc21k OR CMAKE_CXX_COMPILER MATCHES cc21k OR CMAKE_ASM_COMPILER MATCHES easm21k)
+ if(NOT ADSP_PROCESSOR)
+ set(ADSP_PROCESSOR "ADSP-21060")
+ endif(NOT ADSP_PROCESSOR)
+ set(ADSP_21K TRUE)
- SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/21k") # default if nothing matches
- IF (ADSP_PROCESSOR MATCHES "210..$")
- SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/21k")
- ENDIF(ADSP_PROCESSOR MATCHES "210..$")
+ set(_ADSP_FAMILY_DIR "${_ADSP_DIR}/21k") # default if nothing matches
+ if (ADSP_PROCESSOR MATCHES "210..$")
+ set(_ADSP_FAMILY_DIR "${_ADSP_DIR}/21k")
+ endif(ADSP_PROCESSOR MATCHES "210..$")
- IF (ADSP_PROCESSOR MATCHES "211..$")
- SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/211k")
- ENDIF(ADSP_PROCESSOR MATCHES "211..$")
+ if (ADSP_PROCESSOR MATCHES "211..$")
+ set(_ADSP_FAMILY_DIR "${_ADSP_DIR}/211k")
+ endif(ADSP_PROCESSOR MATCHES "211..$")
- IF (ADSP_PROCESSOR MATCHES "212..$")
- SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/212k")
- ENDIF(ADSP_PROCESSOR MATCHES "212..$")
+ if (ADSP_PROCESSOR MATCHES "212..$")
+ set(_ADSP_FAMILY_DIR "${_ADSP_DIR}/212k")
+ endif(ADSP_PROCESSOR MATCHES "212..$")
- IF (ADSP_PROCESSOR MATCHES "213..$")
- SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/213k")
- ENDIF(ADSP_PROCESSOR MATCHES "213..$")
+ if (ADSP_PROCESSOR MATCHES "213..$")
+ set(_ADSP_FAMILY_DIR "${_ADSP_DIR}/213k")
+ endif(ADSP_PROCESSOR MATCHES "213..$")
- SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/21k")
- ENDIF(CMAKE_C_COMPILER MATCHES cc21k OR CMAKE_CXX_COMPILER MATCHES cc21k OR CMAKE_ASM_COMPILER MATCHES easm21k)
+ set(_ADSP_FAMILY_DIR "${_ADSP_DIR}/21k")
+ endif(CMAKE_C_COMPILER MATCHES cc21k OR CMAKE_CXX_COMPILER MATCHES cc21k OR CMAKE_ASM_COMPILER MATCHES easm21k)
- LINK_DIRECTORIES("${_ADSP_FAMILY_DIR}/lib")
+ link_directories("${_ADSP_FAMILY_DIR}/lib")
# vdk support
- FIND_PROGRAM( ADSP_VDKGEN_EXECUTABLE vdkgen "${_ADSP_FAMILY_DIR}/vdk" )
+ find_program( ADSP_VDKGEN_EXECUTABLE vdkgen "${_ADSP_FAMILY_DIR}/vdk" )
- MACRO(ADSP_GENERATE_VDK VDK_GENERATED_HEADER VDK_GENERATED_SOURCE VDK_KERNEL_SUPPORT_FILE)
- ADD_CUSTOM_COMMAND(
+ macro(ADSP_GENERATE_VDK VDK_GENERATED_HEADER VDK_GENERATED_SOURCE VDK_KERNEL_SUPPORT_FILE)
+ add_custom_command(
OUTPUT ${VDK_GENERATED_HEADER} ${VDK_GENERATED_SOURCE}
COMMAND ${ADSP_VDKGEN_EXECUTABLE} ${VDK_KERNEL_SUPPORT_FILE} -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -MM
DEPENDS ${VDK_KERNEL_SUPPORT_FILE}
)
- ENDMACRO(ADSP_GENERATE_VDK VDK_GENERATED_HEADER VDK_GENERATED_SOURCE VDK_KERNEL_SUPPORT_FILE)
+ endmacro(ADSP_GENERATE_VDK VDK_GENERATED_HEADER VDK_GENERATED_SOURCE VDK_KERNEL_SUPPORT_FILE)
# loader support
- FIND_PROGRAM( ADSP_ELFLOADER_EXECUTABLE elfloader "${_ADSP_FAMILY_DIR}" )
+ find_program( ADSP_ELFLOADER_EXECUTABLE elfloader "${_ADSP_FAMILY_DIR}" )
# BOOT_MODE: prom, flash, spi, spislave, UART, TWI, FIFO
# FORMAT: hex, ASCII, binary, include
# WIDTH: 8, 16
- MACRO(ADSP_CREATE_LOADER_FILE TARGET_NAME BOOT_MODE FORMAT WIDTH)
- ADD_CUSTOM_COMMAND(
+ macro(ADSP_CREATE_LOADER_FILE TARGET_NAME BOOT_MODE FORMAT WIDTH)
+ add_custom_command(
TARGET ${TARGET_NAME}
POST_BUILD
COMMAND ${ADSP_ELFLOADER_EXECUTABLE} ${EXECUTABLE_OUTPUT_PATH}/${TARGET_NAME}.dxe -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -b ${BOOT_MODE} -f ${FORMAT} -width ${WIDTH} -o ${EXECUTABLE_OUTPUT_PATH}/${TARGET_NAME}.ldr
COMMENT "Building the loader file"
)
- ENDMACRO(ADSP_CREATE_LOADER_FILE TARGET_NAME BOOT_MODE FORMAT WIDTH)
+ endmacro(ADSP_CREATE_LOADER_FILE TARGET_NAME BOOT_MODE FORMAT WIDTH)
- MACRO(ADSP_CREATE_LOADER_FILE_INIT TARGET_NAME BOOT_MODE FORMAT WIDTH INITIALIZATION_FILE)
- ADD_CUSTOM_COMMAND(
+ macro(ADSP_CREATE_LOADER_FILE_INIT TARGET_NAME BOOT_MODE FORMAT WIDTH INITIALIZATION_FILE)
+ add_custom_command(
TARGET ${TARGET_NAME}
POST_BUILD
COMMAND ${ADSP_ELFLOADER_EXECUTABLE} ${EXECUTABLE_OUTPUT_PATH}/${TARGET_NAME}.dxe -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -b ${BOOT_MODE} -f ${FORMAT} -width ${WIDTH} -o ${EXECUTABLE_OUTPUT_PATH}/${TARGET_NAME}.ldr -init ${INITIALIZATION_FILE}
COMMENT "Building the loader file"
)
- ENDMACRO(ADSP_CREATE_LOADER_FILE_INIT TARGET_NAME BOOT_MODE FORMAT WIDTH INITIALIZATION_FILE)
+ endmacro(ADSP_CREATE_LOADER_FILE_INIT TARGET_NAME BOOT_MODE FORMAT WIDTH INITIALIZATION_FILE)
-ENDIF(NOT ADSP)
+endif(NOT ADSP)
diff --git a/Modules/Platform/Generic-SDCC-C.cmake b/Modules/Platform/Generic-SDCC-C.cmake
index 6c36445d75..fc7eb42b83 100644
--- a/Modules/Platform/Generic-SDCC-C.cmake
+++ b/Modules/Platform/Generic-SDCC-C.cmake
@@ -4,51 +4,51 @@
# To use it either a toolchain file is required or cmake has to be run like this:
# cmake -DCMAKE_C_COMPILER=sdcc -DCMAKE_SYSTEM_NAME=Generic <dir...>
# Since sdcc doesn't support C++, C++ support should be disabled in the
-# CMakeLists.txt using the PROJECT() command:
-# PROJECT(my_project C)
+# CMakeLists.txt using the project() command:
+# project(my_project C)
-SET(CMAKE_STATIC_LIBRARY_PREFIX "")
-SET(CMAKE_STATIC_LIBRARY_SUFFIX ".lib")
-SET(CMAKE_SHARED_LIBRARY_PREFIX "") # lib
-SET(CMAKE_SHARED_LIBRARY_SUFFIX ".lib") # .so
-SET(CMAKE_IMPORT_LIBRARY_PREFIX )
-SET(CMAKE_IMPORT_LIBRARY_SUFFIX )
-SET(CMAKE_EXECUTABLE_SUFFIX ".ihx") # intel hex file
-SET(CMAKE_LINK_LIBRARY_SUFFIX ".lib")
-SET(CMAKE_DL_LIBS "")
+set(CMAKE_STATIC_LIBRARY_PREFIX "")
+set(CMAKE_STATIC_LIBRARY_SUFFIX ".lib")
+set(CMAKE_SHARED_LIBRARY_PREFIX "") # lib
+set(CMAKE_SHARED_LIBRARY_SUFFIX ".lib") # .so
+set(CMAKE_IMPORT_LIBRARY_PREFIX )
+set(CMAKE_IMPORT_LIBRARY_SUFFIX )
+set(CMAKE_EXECUTABLE_SUFFIX ".ihx") # intel hex file
+set(CMAKE_LINK_LIBRARY_SUFFIX ".lib")
+set(CMAKE_DL_LIBS "")
-SET(CMAKE_C_OUTPUT_EXTENSION ".rel")
+set(CMAKE_C_OUTPUT_EXTENSION ".rel")
# find sdcclib as CMAKE_AR
# since cmake may already have searched for "ar", sdcclib has to
# be searched with a different variable name (SDCCLIB_EXECUTABLE)
# and must then be forced into the cache
-GET_FILENAME_COMPONENT(SDCC_LOCATION "${CMAKE_C_COMPILER}" PATH)
-FIND_PROGRAM(SDCCLIB_EXECUTABLE sdcclib PATHS "${SDCC_LOCATION}" NO_DEFAULT_PATH)
-FIND_PROGRAM(SDCCLIB_EXECUTABLE sdcclib)
-SET(CMAKE_AR "${SDCCLIB_EXECUTABLE}" CACHE FILEPATH "The sdcc librarian" FORCE)
+get_filename_component(SDCC_LOCATION "${CMAKE_C_COMPILER}" PATH)
+find_program(SDCCLIB_EXECUTABLE sdcclib PATHS "${SDCC_LOCATION}" NO_DEFAULT_PATH)
+find_program(SDCCLIB_EXECUTABLE sdcclib)
+set(CMAKE_AR "${SDCCLIB_EXECUTABLE}" CACHE FILEPATH "The sdcc librarian" FORCE)
# CMAKE_C_FLAGS_INIT and CMAKE_EXE_LINKER_FLAGS_INIT should be set in a CMAKE_SYSTEM_PROCESSOR file
-IF(NOT DEFINED CMAKE_C_FLAGS_INIT)
- SET(CMAKE_C_FLAGS_INIT "-mmcs51 --model-small")
-ENDIF(NOT DEFINED CMAKE_C_FLAGS_INIT)
+if(NOT DEFINED CMAKE_C_FLAGS_INIT)
+ set(CMAKE_C_FLAGS_INIT "-mmcs51 --model-small")
+endif(NOT DEFINED CMAKE_C_FLAGS_INIT)
-IF(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_INIT)
- SET (CMAKE_EXE_LINKER_FLAGS_INIT --model-small)
-ENDIF(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_INIT)
+if(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_INIT)
+ set (CMAKE_EXE_LINKER_FLAGS_INIT --model-small)
+endif(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_INIT)
# compile a C file into an object file
-SET(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
+set(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
# link object files to an executable
-SET(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS> <OBJECTS> --out-fmt-ihx -o <TARGET> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>")
+set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS> <OBJECTS> --out-fmt-ihx -o <TARGET> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>")
# needs sdcc 2.7.0 + sddclib from cvs
-SET(CMAKE_C_CREATE_STATIC_LIBRARY
+set(CMAKE_C_CREATE_STATIC_LIBRARY
"\"${CMAKE_COMMAND}\" -E remove <TARGET>"
"<CMAKE_AR> -a <TARGET> <LINK_FLAGS> <OBJECTS> ")
# not supported by sdcc
-SET(CMAKE_C_CREATE_SHARED_LIBRARY "")
-SET(CMAKE_C_CREATE_MODULE_LIBRARY "")
+set(CMAKE_C_CREATE_SHARED_LIBRARY "")
+set(CMAKE_C_CREATE_MODULE_LIBRARY "")
diff --git a/Modules/Platform/Generic.cmake b/Modules/Platform/Generic.cmake
index e6f8b2b1ea..fcb2699d63 100644
--- a/Modules/Platform/Generic.cmake
+++ b/Modules/Platform/Generic.cmake
@@ -8,10 +8,10 @@
# and/or ${CMAKE_SYSTEM_NAME}-<compiler_basename>-${CMAKE_SYSTEM_PROCESSOR}.cmake
# (embedded) targets without operating system usually don't support shared libraries
-SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
+set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
# To help the find_xxx() commands, set at least the following so CMAKE_FIND_ROOT_PATH
# works at least for some simple cases:
-SET(CMAKE_SYSTEM_INCLUDE_PATH /include )
-SET(CMAKE_SYSTEM_LIBRARY_PATH /lib )
-SET(CMAKE_SYSTEM_PROGRAM_PATH /bin )
+set(CMAKE_SYSTEM_INCLUDE_PATH /include )
+set(CMAKE_SYSTEM_LIBRARY_PATH /lib )
+set(CMAKE_SYSTEM_PROGRAM_PATH /bin )
diff --git a/Modules/Platform/HP-UX.cmake b/Modules/Platform/HP-UX.cmake
index ab3dc22669..33257f973a 100644
--- a/Modules/Platform/HP-UX.cmake
+++ b/Modules/Platform/HP-UX.cmake
@@ -1,22 +1,22 @@
-SET(CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH /usr/lib)
+set(CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH /usr/lib)
-SET(CMAKE_SHARED_LIBRARY_SUFFIX ".sl") # .so
-SET(CMAKE_DL_LIBS "dld")
-SET(CMAKE_FIND_LIBRARY_SUFFIXES ".sl" ".so" ".a")
-SET(CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES ".so")
+set(CMAKE_SHARED_LIBRARY_SUFFIX ".sl") # .so
+set(CMAKE_DL_LIBS "dld")
+set(CMAKE_FIND_LIBRARY_SUFFIXES ".sl" ".so" ".a")
+set(CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES ".so")
# The HP linker needs to find transitive shared library dependencies
# in the -L path. Therefore the runtime path must be added to the
# link line with -L flags.
-SET(CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH 1)
-SET(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1)
+set(CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH 1)
+set(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1)
# Shared libraries with no builtin soname may not be linked safely by
# specifying the file path.
-SET(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1)
+set(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1)
# set flags for gcc support
-INCLUDE(Platform/UnixPaths)
+include(Platform/UnixPaths)
# Look in both 32-bit and 64-bit implict link directories, but tell
# CMake not to pass the paths to the linker. The linker will find the
@@ -25,9 +25,9 @@ INCLUDE(Platform/UnixPaths)
# CMAKE_SIZEOF_VOID_P is not set until after this file executes, we
# would need to append to CMAKE_SYSTEM_LIBRARY_PATH at a later point
# (after CMakeTest(LANG)Compiler.cmake runs for at least one language).
-LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH /usr/lib/hpux32)
-LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH /usr/lib/hpux64)
-LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
+list(APPEND CMAKE_SYSTEM_LIBRARY_PATH /usr/lib/hpux32)
+list(APPEND CMAKE_SYSTEM_LIBRARY_PATH /usr/lib/hpux64)
+list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
/usr/lib/hpux32 /usr/lib/hpux64)
# Initialize C and CXX link type selection flags. These flags are
@@ -35,16 +35,16 @@ LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
# that links to other libraries to select whether to use the static or
# shared versions of the libraries. Note that C modules and shared
# libs are built using ld directly so we leave off the "-Wl," portion.
-FOREACH(type SHARED_LIBRARY SHARED_MODULE)
- SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-a archive")
- SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-a default")
-ENDFOREACH(type)
-FOREACH(type EXE)
- SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-a,archive")
- SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-a,default")
-ENDFOREACH(type)
-FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
- SET(CMAKE_${type}_LINK_STATIC_CXX_FLAGS "-Wl,-a,archive")
- SET(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS "-Wl,-a,default")
-ENDFOREACH(type)
+foreach(type SHARED_LIBRARY SHARED_MODULE)
+ set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-a archive")
+ set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-a default")
+endforeach(type)
+foreach(type EXE)
+ set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-a,archive")
+ set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-a,default")
+endforeach(type)
+foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
+ set(CMAKE_${type}_LINK_STATIC_CXX_FLAGS "-Wl,-a,archive")
+ set(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS "-Wl,-a,default")
+endforeach(type)
diff --git a/Modules/Platform/Haiku.cmake b/Modules/Platform/Haiku.cmake
index 9dda3c528b..ec0b8fafb8 100644
--- a/Modules/Platform/Haiku.cmake
+++ b/Modules/Platform/Haiku.cmake
@@ -1,24 +1,24 @@
-SET(BEOS 1)
+set(BEOS 1)
-SET(CMAKE_DL_LIBS root be)
-SET(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC")
-SET(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE")
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-nostart")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
-SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
+set(CMAKE_DL_LIBS root be)
+set(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC")
+set(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE")
+set(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-nostart")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
+set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
-INCLUDE(Platform/UnixPaths)
-LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH /boot/common)
-LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH /boot/common/include)
-LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH /boot/common/lib)
-LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH /boot/common/bin)
-LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES /boot/common/lib)
-LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH /boot/develop/headers/3rdparty)
-LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH /boot/develop/lib/x86)
+include(Platform/UnixPaths)
+list(APPEND CMAKE_SYSTEM_PREFIX_PATH /boot/common)
+list(APPEND CMAKE_SYSTEM_INCLUDE_PATH /boot/common/include)
+list(APPEND CMAKE_SYSTEM_LIBRARY_PATH /boot/common/lib)
+list(APPEND CMAKE_SYSTEM_PROGRAM_PATH /boot/common/bin)
+list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES /boot/common/lib)
+list(APPEND CMAKE_SYSTEM_INCLUDE_PATH /boot/develop/headers/3rdparty)
+list(APPEND CMAKE_SYSTEM_LIBRARY_PATH /boot/develop/lib/x86)
-IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
- SET(CMAKE_INSTALL_PREFIX "/boot/common" CACHE PATH
+if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+ set(CMAKE_INSTALL_PREFIX "/boot/common" CACHE PATH
"Install path prefix, prepended onto install directories." FORCE)
-ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
diff --git a/Modules/Platform/IRIX.cmake b/Modules/Platform/IRIX.cmake
index fac941f3b4..221a61df6f 100644
--- a/Modules/Platform/IRIX.cmake
+++ b/Modules/Platform/IRIX.cmake
@@ -1,45 +1,45 @@
-SET(CMAKE_DL_LIBS "")
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -rdata_shared")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
-IF(NOT CMAKE_COMPILER_IS_GNUCXX)
- SET(CMAKE_CXX_CREATE_STATIC_LIBRARY
+set(CMAKE_DL_LIBS "")
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -rdata_shared")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
+if(NOT CMAKE_COMPILER_IS_GNUCXX)
+ set(CMAKE_CXX_CREATE_STATIC_LIBRARY
"<CMAKE_CXX_COMPILER> -ar -o <TARGET> <OBJECTS>")
- SET (CMAKE_CXX_FLAGS_INIT "")
- SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
- SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O3 -DNDEBUG")
- SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
- SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2")
- SET (CMAKE_C_FLAGS_INIT "")
-ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
+ set (CMAKE_CXX_FLAGS_INIT "")
+ set (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
+ set (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O3 -DNDEBUG")
+ set (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
+ set (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2")
+ set (CMAKE_C_FLAGS_INIT "")
+endif(NOT CMAKE_COMPILER_IS_GNUCXX)
# set flags for gcc support
-INCLUDE(Platform/UnixPaths)
+include(Platform/UnixPaths)
-IF(NOT CMAKE_COMPILER_IS_GNUCC)
- SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
- SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE
+if(NOT CMAKE_COMPILER_IS_GNUCC)
+ set (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
+ set (CMAKE_C_CREATE_ASSEMBLY_SOURCE
"<CMAKE_C_COMPILER> <FLAGS> -S <SOURCE>"
"mv `basename \"<SOURCE>\" | sed 's/\\.[^./]*$$//'`.s <ASSEMBLY_SOURCE>"
)
-ENDIF(NOT CMAKE_COMPILER_IS_GNUCC)
+endif(NOT CMAKE_COMPILER_IS_GNUCC)
-IF(NOT CMAKE_COMPILER_IS_GNUCXX)
- SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
- SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE
+if(NOT CMAKE_COMPILER_IS_GNUCXX)
+ set (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
+ set (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE
"<CMAKE_CXX_COMPILER> <FLAGS> -S <SOURCE>"
"mv `basename \"<SOURCE>\" | sed 's/\\.[^./]*$$//'`.s <ASSEMBLY_SOURCE>"
)
-ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
+endif(NOT CMAKE_COMPILER_IS_GNUCXX)
# Initialize C link type selection flags. These flags are used when
# building a shared library, shared module, or executable that links
# to other libraries to select whether to use the static or shared
# versions of the libraries.
-FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
- SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic")
- SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
-ENDFOREACH(type)
+foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
+ set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic")
+ set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
+endforeach(type)
# The IRIX linker needs to find transitive shared library dependencies
# in the -L path.
-SET(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1)
+set(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1)
diff --git a/Modules/Platform/IRIX64.cmake b/Modules/Platform/IRIX64.cmake
index 09fa99884e..191dfcc207 100644
--- a/Modules/Platform/IRIX64.cmake
+++ b/Modules/Platform/IRIX64.cmake
@@ -1,73 +1,73 @@
-SET(CMAKE_DL_LIBS "")
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -rdata_shared")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
-SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
-IF(NOT CMAKE_COMPILER_IS_GNUCC)
+set(CMAKE_DL_LIBS "")
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -rdata_shared")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
+set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
+if(NOT CMAKE_COMPILER_IS_GNUCC)
# Set default flags init.
- SET(CMAKE_C_FLAGS_INIT "")
- SET(CMAKE_CXX_FLAGS_INIT "")
- SET(CMAKE_Fortran_FLAGS_INIT "")
- SET(CMAKE_EXE_LINKER_FLAGS_INIT "")
- SET(CMAKE_SHARED_LINKER_FLAGS_INIT "")
- SET(CMAKE_MODULE_LINKER_FLAGS_INIT "")
+ set(CMAKE_C_FLAGS_INIT "")
+ set(CMAKE_CXX_FLAGS_INIT "")
+ set(CMAKE_Fortran_FLAGS_INIT "")
+ set(CMAKE_EXE_LINKER_FLAGS_INIT "")
+ set(CMAKE_SHARED_LINKER_FLAGS_INIT "")
+ set(CMAKE_MODULE_LINKER_FLAGS_INIT "")
# If no -o32, -n32, or -64 flag is given, set a reasonable default.
- IF("$ENV{CFLAGS} $ENV{CXXFLAGS} $ENV{LDFLAGS}" MATCHES "-([no]32|64)")
- ELSE("$ENV{CFLAGS} $ENV{CXXFLAGS} $ENV{LDFLAGS}" MATCHES "-([no]32|64)")
+ if("$ENV{CFLAGS} $ENV{CXXFLAGS} $ENV{LDFLAGS}" MATCHES "-([no]32|64)")
+ else("$ENV{CFLAGS} $ENV{CXXFLAGS} $ENV{LDFLAGS}" MATCHES "-([no]32|64)")
# Check if this is a 64-bit CMake.
- IF(CMAKE_FILE_SELF MATCHES "^CMAKE_FILE_SELF$")
- EXEC_PROGRAM(file ARGS ${CMAKE_COMMAND} OUTPUT_VARIABLE CMAKE_FILE_SELF)
- SET(CMAKE_FILE_SELF "${CMAKE_FILE_SELF}" CACHE INTERNAL
+ if(CMAKE_FILE_SELF MATCHES "^CMAKE_FILE_SELF$")
+ exec_program(file ARGS ${CMAKE_COMMAND} OUTPUT_VARIABLE CMAKE_FILE_SELF)
+ set(CMAKE_FILE_SELF "${CMAKE_FILE_SELF}" CACHE INTERNAL
"Output of file command on ${CMAKE_COMMAND}.")
- ENDIF(CMAKE_FILE_SELF MATCHES "^CMAKE_FILE_SELF$")
+ endif(CMAKE_FILE_SELF MATCHES "^CMAKE_FILE_SELF$")
# Set initial flags to match cmake executable.
- IF(CMAKE_FILE_SELF MATCHES " 64-bit ")
- SET(CMAKE_C_FLAGS_INIT "-64")
- SET(CMAKE_CXX_FLAGS_INIT "-64")
- SET(CMAKE_Fortran_FLAGS_INIT "-64")
- SET(CMAKE_EXE_LINKER_FLAGS_INIT "-64")
- SET(CMAKE_SHARED_LINKER_FLAGS_INIT "-64")
- SET(CMAKE_MODULE_LINKER_FLAGS_INIT "-64")
- ENDIF(CMAKE_FILE_SELF MATCHES " 64-bit ")
- ENDIF("$ENV{CFLAGS} $ENV{CXXFLAGS} $ENV{LDFLAGS}" MATCHES "-([no]32|64)")
+ if(CMAKE_FILE_SELF MATCHES " 64-bit ")
+ set(CMAKE_C_FLAGS_INIT "-64")
+ set(CMAKE_CXX_FLAGS_INIT "-64")
+ set(CMAKE_Fortran_FLAGS_INIT "-64")
+ set(CMAKE_EXE_LINKER_FLAGS_INIT "-64")
+ set(CMAKE_SHARED_LINKER_FLAGS_INIT "-64")
+ set(CMAKE_MODULE_LINKER_FLAGS_INIT "-64")
+ endif(CMAKE_FILE_SELF MATCHES " 64-bit ")
+ endif("$ENV{CFLAGS} $ENV{CXXFLAGS} $ENV{LDFLAGS}" MATCHES "-([no]32|64)")
# Set remaining defaults.
- SET(CMAKE_CXX_CREATE_STATIC_LIBRARY
+ set(CMAKE_CXX_CREATE_STATIC_LIBRARY
"<CMAKE_CXX_COMPILER> -ar -o <TARGET> <OBJECTS>")
- SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
- SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O3 -DNDEBUG")
- SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
- SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2")
-ENDIF(NOT CMAKE_COMPILER_IS_GNUCC)
-INCLUDE(Platform/UnixPaths)
+ set (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
+ set (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O3 -DNDEBUG")
+ set (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
+ set (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2")
+endif(NOT CMAKE_COMPILER_IS_GNUCC)
+include(Platform/UnixPaths)
-IF(NOT CMAKE_COMPILER_IS_GNUCC)
- SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
- SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE
+if(NOT CMAKE_COMPILER_IS_GNUCC)
+ set (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
+ set (CMAKE_C_CREATE_ASSEMBLY_SOURCE
"<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE>"
"mv `basename \"<SOURCE>\" | sed 's/\\.[^./]*$$//'`.s <ASSEMBLY_SOURCE>"
)
-ENDIF(NOT CMAKE_COMPILER_IS_GNUCC)
+endif(NOT CMAKE_COMPILER_IS_GNUCC)
-IF(NOT CMAKE_COMPILER_IS_GNUCXX)
- SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
- SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE
+if(NOT CMAKE_COMPILER_IS_GNUCXX)
+ set (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
+ set (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE
"<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE>"
"mv `basename \"<SOURCE>\" | sed 's/\\.[^./]*$$//'`.s <ASSEMBLY_SOURCE>"
)
-ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
+endif(NOT CMAKE_COMPILER_IS_GNUCXX)
# Initialize C link type selection flags. These flags are used when
# building a shared library, shared module, or executable that links
# to other libraries to select whether to use the static or shared
# versions of the libraries.
-FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
- SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic")
- SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
-ENDFOREACH(type)
+foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
+ set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic")
+ set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
+endforeach(type)
# The IRIX linker needs to find transitive shared library dependencies
# in the -L path.
-SET(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1)
+set(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1)
diff --git a/Modules/Platform/Linux-Clang-C.cmake b/Modules/Platform/Linux-Clang-C.cmake
index dbf89564a5..2a77d27104 100644
--- a/Modules/Platform/Linux-Clang-C.cmake
+++ b/Modules/Platform/Linux-Clang-C.cmake
@@ -1 +1 @@
-INCLUDE(Platform/Linux-GNU-C)
+include(Platform/Linux-GNU-C)
diff --git a/Modules/Platform/Linux-Clang-CXX.cmake b/Modules/Platform/Linux-Clang-CXX.cmake
index 8fe251c4db..9d9a4df66b 100644
--- a/Modules/Platform/Linux-Clang-CXX.cmake
+++ b/Modules/Platform/Linux-Clang-CXX.cmake
@@ -1 +1 @@
-INCLUDE(Platform/Linux-GNU-CXX)
+include(Platform/Linux-GNU-CXX)
diff --git a/Modules/Platform/Linux-GNU-C.cmake b/Modules/Platform/Linux-GNU-C.cmake
index 3ab142f138..84dd492691 100644
--- a/Modules/Platform/Linux-GNU-C.cmake
+++ b/Modules/Platform/Linux-GNU-C.cmake
@@ -1,2 +1,2 @@
-INCLUDE(Platform/Linux-GNU)
+include(Platform/Linux-GNU)
__linux_compiler_gnu(C)
diff --git a/Modules/Platform/Linux-GNU-CXX.cmake b/Modules/Platform/Linux-GNU-CXX.cmake
index 9e4f904f22..4162335311 100644
--- a/Modules/Platform/Linux-GNU-CXX.cmake
+++ b/Modules/Platform/Linux-GNU-CXX.cmake
@@ -1,2 +1,2 @@
-INCLUDE(Platform/Linux-GNU)
+include(Platform/Linux-GNU)
__linux_compiler_gnu(CXX)
diff --git a/Modules/Platform/Linux-GNU-Fortran.cmake b/Modules/Platform/Linux-GNU-Fortran.cmake
index e364c872a5..68e95404b8 100644
--- a/Modules/Platform/Linux-GNU-Fortran.cmake
+++ b/Modules/Platform/Linux-GNU-Fortran.cmake
@@ -1,2 +1,2 @@
-INCLUDE(Platform/Linux-GNU)
+include(Platform/Linux-GNU)
__linux_compiler_gnu(Fortran)
diff --git a/Modules/Platform/Linux-Intel-C.cmake b/Modules/Platform/Linux-Intel-C.cmake
index c909e68fc9..d1694d64a0 100644
--- a/Modules/Platform/Linux-Intel-C.cmake
+++ b/Modules/Platform/Linux-Intel-C.cmake
@@ -1,2 +1,2 @@
-INCLUDE(Platform/Linux-Intel)
+include(Platform/Linux-Intel)
__linux_compiler_intel(C)
diff --git a/Modules/Platform/Linux-Intel-CXX.cmake b/Modules/Platform/Linux-Intel-CXX.cmake
index 0b7daf4753..66df3ac2ae 100644
--- a/Modules/Platform/Linux-Intel-CXX.cmake
+++ b/Modules/Platform/Linux-Intel-CXX.cmake
@@ -1,2 +1,2 @@
-INCLUDE(Platform/Linux-Intel)
+include(Platform/Linux-Intel)
__linux_compiler_intel(CXX)
diff --git a/Modules/Platform/Linux-Intel-Fortran.cmake b/Modules/Platform/Linux-Intel-Fortran.cmake
index 342b5c2faf..bb671eeb29 100644
--- a/Modules/Platform/Linux-Intel-Fortran.cmake
+++ b/Modules/Platform/Linux-Intel-Fortran.cmake
@@ -1,4 +1,4 @@
-INCLUDE(Platform/Linux-Intel)
+include(Platform/Linux-Intel)
__linux_compiler_intel(Fortran)
set(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS} -i_dynamic -nofor_main")
set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-i_dynamic")
diff --git a/Modules/Platform/Linux-SunPro-CXX.cmake b/Modules/Platform/Linux-SunPro-CXX.cmake
index 8ee96586df..a07f1ec84b 100644
--- a/Modules/Platform/Linux-SunPro-CXX.cmake
+++ b/Modules/Platform/Linux-SunPro-CXX.cmake
@@ -6,4 +6,4 @@ if("${_cxx_flags}" MATCHES "\n-W[^\n]*component")
else()
set(CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG "-rpath-link ")
endif()
-SET(CMAKE_EXE_EXPORTS_CXX_FLAG "--export-dynamic")
+set(CMAKE_EXE_EXPORTS_CXX_FLAG "--export-dynamic")
diff --git a/Modules/Platform/Linux-TinyCC-C.cmake b/Modules/Platform/Linux-TinyCC-C.cmake
index b753268ea1..f78e708f97 100644
--- a/Modules/Platform/Linux-TinyCC-C.cmake
+++ b/Modules/Platform/Linux-TinyCC-C.cmake
@@ -1,4 +1,4 @@
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "")
-SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "")
-SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-soname ")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "")
+set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "")
+set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-soname ")
diff --git a/Modules/Platform/Linux-XL-C.cmake b/Modules/Platform/Linux-XL-C.cmake
index b1b07f617a..f1c584ce51 100644
--- a/Modules/Platform/Linux-XL-C.cmake
+++ b/Modules/Platform/Linux-XL-C.cmake
@@ -1 +1 @@
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-qmkshrobj")
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-qmkshrobj")
diff --git a/Modules/Platform/Linux-XL-CXX.cmake b/Modules/Platform/Linux-XL-CXX.cmake
index 071a975ed3..abd3fa497e 100644
--- a/Modules/Platform/Linux-XL-CXX.cmake
+++ b/Modules/Platform/Linux-XL-CXX.cmake
@@ -1 +1 @@
-SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-qmkshrobj")
+set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-qmkshrobj")
diff --git a/Modules/Platform/Linux-XL-Fortran.cmake b/Modules/Platform/Linux-XL-Fortran.cmake
index 5da574e2e7..cdd1f702b0 100644
--- a/Modules/Platform/Linux-XL-Fortran.cmake
+++ b/Modules/Platform/Linux-XL-Fortran.cmake
@@ -1 +1 @@
-SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-qmkshrobj")
+set(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-qmkshrobj")
diff --git a/Modules/Platform/Linux-como.cmake b/Modules/Platform/Linux-como.cmake
index 7ea7320821..d1550d201c 100644
--- a/Modules/Platform/Linux-como.cmake
+++ b/Modules/Platform/Linux-como.cmake
@@ -1,17 +1,17 @@
# create a shared C++ library
-SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
+set(CMAKE_CXX_CREATE_SHARED_LIBRARY
"<CMAKE_CXX_COMPILER> --prelink_objects <OBJECTS>"
"<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
# create a C++ static library
-SET(CMAKE_CXX_CREATE_STATIC_LIBRARY
+set(CMAKE_CXX_CREATE_STATIC_LIBRARY
"<CMAKE_CXX_COMPILER> --prelink_objects <OBJECTS>"
"<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> "
"<CMAKE_RANLIB> <TARGET> ")
-SET(CMAKE_CXX_LINK_EXECUTABLE
+set(CMAKE_CXX_LINK_EXECUTABLE
"<CMAKE_CXX_COMPILER> --prelink_objects <OBJECTS>"
"<CMAKE_CXX_COMPILER> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "")
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "")
+set(CMAKE_SHARED_LIBRARY_C_FLAGS "")
diff --git a/Modules/Platform/Linux.cmake b/Modules/Platform/Linux.cmake
index 38f469b336..c1dc6420b6 100644
--- a/Modules/Platform/Linux.cmake
+++ b/Modules/Platform/Linux.cmake
@@ -1,22 +1,22 @@
-SET(CMAKE_DL_LIBS "dl")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
-SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
-SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
-SET(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
+set(CMAKE_DL_LIBS "dl")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
+set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
+set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
+set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
# Shared libraries with no builtin soname may not be linked safely by
# specifying the file path.
-SET(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1)
+set(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1)
# Initialize C link type selection flags. These flags are used when
# building a shared library, shared module, or executable that links
# to other libraries to select whether to use the static or shared
# versions of the libraries.
-FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
- SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic")
- SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
-ENDFOREACH(type)
+foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
+ set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic")
+ set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
+endforeach(type)
# Debian policy requires that shared libraries be installed without
# executable permission. Fedora policy requires that shared libraries
@@ -26,32 +26,32 @@ ENDFOREACH(type)
# default. In order to support debian packages we provide an option
# here. The option default is based on the current distribution, but
# packagers can set it explicitly on the command line.
-IF(DEFINED CMAKE_INSTALL_SO_NO_EXE)
+if(DEFINED CMAKE_INSTALL_SO_NO_EXE)
# Store the decision variable in the cache. This preserves any
# setting the user provides on the command line.
- SET(CMAKE_INSTALL_SO_NO_EXE "${CMAKE_INSTALL_SO_NO_EXE}" CACHE INTERNAL
+ set(CMAKE_INSTALL_SO_NO_EXE "${CMAKE_INSTALL_SO_NO_EXE}" CACHE INTERNAL
"Install .so files without execute permission.")
-ELSE(DEFINED CMAKE_INSTALL_SO_NO_EXE)
+else(DEFINED CMAKE_INSTALL_SO_NO_EXE)
# Store the decision variable as an internal cache entry to avoid
# checking the platform every time. This option is advanced enough
# that only package maintainers should need to adjust it. They are
# capable of providing a setting on the command line.
- IF(EXISTS "/etc/debian_version")
- SET(CMAKE_INSTALL_SO_NO_EXE 1 CACHE INTERNAL
+ if(EXISTS "/etc/debian_version")
+ set(CMAKE_INSTALL_SO_NO_EXE 1 CACHE INTERNAL
"Install .so files without execute permission.")
- ELSE(EXISTS "/etc/debian_version")
- SET(CMAKE_INSTALL_SO_NO_EXE 0 CACHE INTERNAL
+ else(EXISTS "/etc/debian_version")
+ set(CMAKE_INSTALL_SO_NO_EXE 0 CACHE INTERNAL
"Install .so files without execute permission.")
- ENDIF(EXISTS "/etc/debian_version")
-ENDIF(DEFINED CMAKE_INSTALL_SO_NO_EXE)
+ endif(EXISTS "/etc/debian_version")
+endif(DEFINED CMAKE_INSTALL_SO_NO_EXE)
# Match multiarch library directory names.
-SET(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-linux-gnu[a-z0-9_]*")
+set(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-linux-gnu[a-z0-9_]*")
-INCLUDE(Platform/UnixPaths)
+include(Platform/UnixPaths)
# Debian has lib64 paths only for compatibility so they should not be
# searched.
-IF(EXISTS "/etc/debian_version")
- SET_PROPERTY(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE)
-ENDIF(EXISTS "/etc/debian_version")
+if(EXISTS "/etc/debian_version")
+ set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE)
+endif(EXISTS "/etc/debian_version")
diff --git a/Modules/Platform/MP-RAS.cmake b/Modules/Platform/MP-RAS.cmake
index ff22a4fda0..ae5fa612e0 100644
--- a/Modules/Platform/MP-RAS.cmake
+++ b/Modules/Platform/MP-RAS.cmake
@@ -1,14 +1,14 @@
-IF(CMAKE_SYSTEM MATCHES "MP-RAS-02*.")
- SET(CMAKE_C_COMPILE_OPTIONS_PIC -K PIC)
- SET(CMAKE_C_COMPILE_OPTIONS_PIE -K PIE)
- SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
-ELSE(CMAKE_SYSTEM MATCHES "MP-RAS-02*.")
- SET(CMAKE_C_COMPILE_OPTIONS_PIC -K PIC)
- SET(CMAKE_C_COMPILE_OPTIONS_PIE -K PIE)
- SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
- SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-Bexport")
-ENDIF(CMAKE_SYSTEM MATCHES "MP-RAS-02*.")
+if(CMAKE_SYSTEM MATCHES "MP-RAS-02*.")
+ set(CMAKE_C_COMPILE_OPTIONS_PIC -K PIC)
+ set(CMAKE_C_COMPILE_OPTIONS_PIE -K PIE)
+ set(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
+else(CMAKE_SYSTEM MATCHES "MP-RAS-02*.")
+ set(CMAKE_C_COMPILE_OPTIONS_PIC -K PIC)
+ set(CMAKE_C_COMPILE_OPTIONS_PIE -K PIE)
+ set(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
+ set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-Bexport")
+endif(CMAKE_SYSTEM MATCHES "MP-RAS-02*.")
-INCLUDE(Platform/UnixPaths)
+include(Platform/UnixPaths)
diff --git a/Modules/Platform/NetBSD.cmake b/Modules/Platform/NetBSD.cmake
index e1b66b84c7..24dd15c7ad 100644
--- a/Modules/Platform/NetBSD.cmake
+++ b/Modules/Platform/NetBSD.cmake
@@ -1,15 +1,15 @@
-IF(EXISTS /usr/include/dlfcn.h)
- SET(CMAKE_DL_LIBS "")
- SET(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC")
- SET(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE")
- SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
- SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
- SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
- SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath
- SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty
- SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
- SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
- SET(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
-ENDIF(EXISTS /usr/include/dlfcn.h)
+if(EXISTS /usr/include/dlfcn.h)
+ set(CMAKE_DL_LIBS "")
+ set(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC")
+ set(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE")
+ set(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
+ set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
+ set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty
+ set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
+ set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
+ set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
+endif(EXISTS /usr/include/dlfcn.h)
-INCLUDE(Platform/UnixPaths)
+include(Platform/UnixPaths)
diff --git a/Modules/Platform/OSF1.cmake b/Modules/Platform/OSF1.cmake
index 3017a07c8c..e720e40610 100644
--- a/Modules/Platform/OSF1.cmake
+++ b/Modules/Platform/OSF1.cmake
@@ -1,47 +1,47 @@
-SET(CMAKE_DL_LIBS "")
+set(CMAKE_DL_LIBS "")
-IF(CMAKE_SYSTEM MATCHES "OSF1-1.[012]")
-ENDIF(CMAKE_SYSTEM MATCHES "OSF1-1.[012]")
-IF(CMAKE_SYSTEM MATCHES "OSF1-1.*")
+if(CMAKE_SYSTEM MATCHES "OSF1-1.[012]")
+endif(CMAKE_SYSTEM MATCHES "OSF1-1.[012]")
+if(CMAKE_SYSTEM MATCHES "OSF1-1.*")
# OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
- SET(CMAKE_C_COMPILE_OPTIONS_PIC "-fpic")
- SET(CMAKE_C_COMPILE_OPTIONS_PIE "-fpie")
- SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fpic") # -pic
- SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fpic") # -pic
-ENDIF(CMAKE_SYSTEM MATCHES "OSF1-1.*")
+ set(CMAKE_C_COMPILE_OPTIONS_PIC "-fpic")
+ set(CMAKE_C_COMPILE_OPTIONS_PIE "-fpie")
+ set(CMAKE_SHARED_LIBRARY_C_FLAGS "-fpic") # -pic
+ set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fpic") # -pic
+endif(CMAKE_SYSTEM MATCHES "OSF1-1.*")
-IF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
- SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-expect_unresolved,\\*") # -shared
- IF(CMAKE_COMPILER_IS_GNUCXX)
- SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,-rpath,")
- ELSE(CMAKE_COMPILER_IS_GNUCXX)
- SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-rpath ")
- ENDIF(CMAKE_COMPILER_IS_GNUCXX)
- IF(CMAKE_COMPILER_IS_GNUCC)
- SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
- ELSE(CMAKE_COMPILER_IS_GNUCC)
- SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-rpath ")
- ENDIF(CMAKE_COMPILER_IS_GNUCC)
- SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
-ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
+if(CMAKE_SYSTEM MATCHES "OSF1-V.*")
+ set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-expect_unresolved,\\*") # -shared
+ if(CMAKE_COMPILER_IS_GNUCXX)
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,-rpath,")
+ else(CMAKE_COMPILER_IS_GNUCXX)
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-rpath ")
+ endif(CMAKE_COMPILER_IS_GNUCXX)
+ if(CMAKE_COMPILER_IS_GNUCC)
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
+ else(CMAKE_COMPILER_IS_GNUCC)
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-rpath ")
+ endif(CMAKE_COMPILER_IS_GNUCC)
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
+endif(CMAKE_SYSTEM MATCHES "OSF1-V.*")
-SET(CMAKE_MAKE_INCLUDE_FROM_ROOT 1) # include $(CMAKE_BINARY_DIR)/...
+set(CMAKE_MAKE_INCLUDE_FROM_ROOT 1) # include $(CMAKE_BINARY_DIR)/...
-IF(CMAKE_COMPILER_IS_GNUCXX)
+if(CMAKE_COMPILER_IS_GNUCXX)
# include the gcc flags
-ELSE (CMAKE_COMPILER_IS_GNUCXX)
+else (CMAKE_COMPILER_IS_GNUCXX)
# use default OSF compiler flags
- SET (CMAKE_C_FLAGS_INIT "")
- SET (CMAKE_C_FLAGS_DEBUG_INIT "-g")
- SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-O2 -DNDEBUG")
- SET (CMAKE_C_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
- SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2")
- SET (CMAKE_CXX_FLAGS_INIT "")
- SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
- SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O2 -DNDEBUG")
- SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
- SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2")
-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
-INCLUDE(Platform/UnixPaths)
+ set (CMAKE_C_FLAGS_INIT "")
+ set (CMAKE_C_FLAGS_DEBUG_INIT "-g")
+ set (CMAKE_C_FLAGS_MINSIZEREL_INIT "-O2 -DNDEBUG")
+ set (CMAKE_C_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
+ set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2")
+ set (CMAKE_CXX_FLAGS_INIT "")
+ set (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
+ set (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O2 -DNDEBUG")
+ set (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
+ set (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2")
+endif(CMAKE_COMPILER_IS_GNUCXX)
+include(Platform/UnixPaths)
diff --git a/Modules/Platform/OpenBSD.cmake b/Modules/Platform/OpenBSD.cmake
index b4ed66fb00..df240e01be 100644
--- a/Modules/Platform/OpenBSD.cmake
+++ b/Modules/Platform/OpenBSD.cmake
@@ -1,18 +1,18 @@
-INCLUDE(Platform/NetBSD)
+include(Platform/NetBSD)
# On OpenBSD, the compile time linker does not share it's configuration with
# the runtime linker. This will extract the library search paths from the
# system's ld.so.hints file which will allow CMake to set the appropriate
# -rpath-link flags
-IF(NOT CMAKE_PLATFORM_RUNTIME_PATH)
- EXECUTE_PROCESS(COMMAND /sbin/ldconfig -r
+if(NOT CMAKE_PLATFORM_RUNTIME_PATH)
+ execute_process(COMMAND /sbin/ldconfig -r
OUTPUT_VARIABLE LDCONFIG_HINTS
ERROR_QUIET)
- STRING(REGEX REPLACE ".*search\\ directories:\\ ([^\n]*).*" "\\1"
+ string(REGEX REPLACE ".*search\\ directories:\\ ([^\n]*).*" "\\1"
LDCONFIG_HINTS "${LDCONFIG_HINTS}")
- STRING(REGEX REPLACE ":" ";"
+ string(REGEX REPLACE ":" ";"
CMAKE_PLATFORM_RUNTIME_PATH
"${LDCONFIG_HINTS}")
-ENDIF()
+endif()
-SET_PROPERTY(GLOBAL PROPERTY FIND_LIBRARY_USE_OPENBSD_VERSIONING 1)
+set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_OPENBSD_VERSIONING 1)
diff --git a/Modules/Platform/OpenVMS.cmake b/Modules/Platform/OpenVMS.cmake
index c52effab64..b10da23884 100644
--- a/Modules/Platform/OpenVMS.cmake
+++ b/Modules/Platform/OpenVMS.cmake
@@ -1,8 +1,8 @@
-INCLUDE(Platform/UnixPaths)
+include(Platform/UnixPaths)
-SET(CMAKE_C_CREATE_STATIC_LIBRARY
+set(CMAKE_C_CREATE_STATIC_LIBRARY
"<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>"
"<CMAKE_RANLIB> <TARGET>"
)
-SET(CMAKE_CXX_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
-SET(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe
+set(CMAKE_CXX_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
+set(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe
diff --git a/Modules/Platform/QNX.cmake b/Modules/Platform/QNX.cmake
index 8cdbe02c12..fedc0b41b3 100644
--- a/Modules/Platform/QNX.cmake
+++ b/Modules/Platform/QNX.cmake
@@ -1,33 +1,33 @@
-SET(QNXNTO 1)
+set(QNXNTO 1)
# The QNX GCC does not seem to have -isystem so remove the flag.
-SET(CMAKE_INCLUDE_SYSTEM_FLAG_C)
-SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX)
+set(CMAKE_INCLUDE_SYSTEM_FLAG_C)
+set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX)
-SET(CMAKE_DL_LIBS "")
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "")
-SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
-SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
-SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
-SET(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
+set(CMAKE_DL_LIBS "")
+set(CMAKE_SHARED_LIBRARY_C_FLAGS "")
+set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
+set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
+set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
+set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
# Shared libraries with no builtin soname may not be linked safely by
# specifying the file path.
-SET(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1)
+set(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1)
# Initialize C link type selection flags. These flags are used when
# building a shared library, shared module, or executable that links
# to other libraries to select whether to use the static or shared
# versions of the libraries.
-FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
- SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic")
- SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
-ENDFOREACH(type)
+foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
+ set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic")
+ set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
+endforeach(type)
# force the language to be c++ since qnx only has gcc and not g++ and c++?
-SET(CMAKE_CXX_COMPILE_OBJECT
+set(CMAKE_CXX_COMPILE_OBJECT
"<CMAKE_CXX_COMPILER> -x c++ <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
-INCLUDE(Platform/UnixPaths)
+include(Platform/UnixPaths)
diff --git a/Modules/Platform/RISCos.cmake b/Modules/Platform/RISCos.cmake
index 3b2a092bfb..570cd7b5b6 100644
--- a/Modules/Platform/RISCos.cmake
+++ b/Modules/Platform/RISCos.cmake
@@ -1,6 +1,6 @@
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-G 0")
-SET(CMAKE_SHARED_LIBRARY_SUFFIX "..o")
-SET(CMAKE_DL_LIBS "")
-SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-D,08000000")
+set(CMAKE_SHARED_LIBRARY_C_FLAGS "-G 0")
+set(CMAKE_SHARED_LIBRARY_SUFFIX "..o")
+set(CMAKE_DL_LIBS "")
+set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-D,08000000")
-INCLUDE(Platform/UnixPaths)
+include(Platform/UnixPaths)
diff --git a/Modules/Platform/SCO_SV.cmake b/Modules/Platform/SCO_SV.cmake
index cbdcb7dae8..ddd960083d 100644
--- a/Modules/Platform/SCO_SV.cmake
+++ b/Modules/Platform/SCO_SV.cmake
@@ -1,2 +1,2 @@
-SET(CMAKE_DL_LIBS "")
-INCLUDE(Platform/UnixPaths)
+set(CMAKE_DL_LIBS "")
+include(Platform/UnixPaths)
diff --git a/Modules/Platform/SINIX.cmake b/Modules/Platform/SINIX.cmake
index e0809f8e30..c37a113d38 100644
--- a/Modules/Platform/SINIX.cmake
+++ b/Modules/Platform/SINIX.cmake
@@ -1,4 +1,4 @@
-SET(CMAKE_C_COMPILE_OPTIONS_PIC -K PIC)
-SET(CMAKE_C_COMPILE_OPTIONS_PIE "")
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
-INCLUDE(Platform/UnixPaths)
+set(CMAKE_C_COMPILE_OPTIONS_PIC -K PIC)
+set(CMAKE_C_COMPILE_OPTIONS_PIE "")
+set(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
+include(Platform/UnixPaths)
diff --git a/Modules/Platform/SunOS.cmake b/Modules/Platform/SunOS.cmake
index 39cb48cd7d..a1fc72f209 100644
--- a/Modules/Platform/SunOS.cmake
+++ b/Modules/Platform/SunOS.cmake
@@ -1,32 +1,32 @@
-IF(CMAKE_SYSTEM MATCHES "SunOS-4.*")
- SET(CMAKE_C_COMPILE_OPTIONS_PIC "-PIC")
- SET(CMAKE_C_COMPILE_OPTIONS_PIE "-PIE")
- SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-PIC")
- SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-r")
- SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-R")
- SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
-ENDIF(CMAKE_SYSTEM MATCHES "SunOS-4.*")
+if(CMAKE_SYSTEM MATCHES "SunOS-4.*")
+ set(CMAKE_C_COMPILE_OPTIONS_PIC "-PIC")
+ set(CMAKE_C_COMPILE_OPTIONS_PIE "-PIE")
+ set(CMAKE_SHARED_LIBRARY_C_FLAGS "-PIC")
+ set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-r")
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-R")
+ set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
+endif(CMAKE_SYSTEM MATCHES "SunOS-4.*")
-IF(CMAKE_COMPILER_IS_GNUCXX)
- IF(CMAKE_COMPILER_IS_GNUCC)
- SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
+if(CMAKE_COMPILER_IS_GNUCXX)
+ if(CMAKE_COMPILER_IS_GNUCC)
+ set(CMAKE_CXX_CREATE_SHARED_LIBRARY
"<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
- ELSE(CMAKE_COMPILER_IS_GNUCC)
+ else(CMAKE_COMPILER_IS_GNUCC)
# Take default rule from CMakeDefaultMakeRuleVariables.cmake.
- ENDIF(CMAKE_COMPILER_IS_GNUCC)
-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
-INCLUDE(Platform/UnixPaths)
+ endif(CMAKE_COMPILER_IS_GNUCC)
+endif(CMAKE_COMPILER_IS_GNUCXX)
+include(Platform/UnixPaths)
# Add the compiler's implicit link directories.
-IF("${CMAKE_C_COMPILER_ID} ${CMAKE_CXX_COMPILER_ID}" MATCHES SunPro)
- LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
+if("${CMAKE_C_COMPILER_ID} ${CMAKE_CXX_COMPILER_ID}" MATCHES SunPro)
+ list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
/opt/SUNWspro/lib /opt/SUNWspro/prod/lib /usr/ccs/lib)
-ENDIF("${CMAKE_C_COMPILER_ID} ${CMAKE_CXX_COMPILER_ID}" MATCHES SunPro)
+endif("${CMAKE_C_COMPILER_ID} ${CMAKE_CXX_COMPILER_ID}" MATCHES SunPro)
# The Sun linker needs to find transitive shared library dependencies
# in the -L path.
-SET(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1)
+set(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1)
# Shared libraries with no builtin soname may not be linked safely by
# specifying the file path.
-SET(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1)
+set(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1)
diff --git a/Modules/Platform/Tru64.cmake b/Modules/Platform/Tru64.cmake
index cf9d17bfda..47852f8e13 100644
--- a/Modules/Platform/Tru64.cmake
+++ b/Modules/Platform/Tru64.cmake
@@ -1,2 +1,2 @@
-INCLUDE(Platform/UnixPaths)
+include(Platform/UnixPaths)
diff --git a/Modules/Platform/ULTRIX.cmake b/Modules/Platform/ULTRIX.cmake
index 154d7e6ac4..9db4c7c20f 100644
--- a/Modules/Platform/ULTRIX.cmake
+++ b/Modules/Platform/ULTRIX.cmake
@@ -1,5 +1,5 @@
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-G 0")
-SET(CMAKE_SHARED_LIBRARY_SUFFIX "..o")
-SET(CMAKE_DL_LIBS "")
-SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-D,08000000")
-INCLUDE(Platform/UnixPaths)
+set(CMAKE_SHARED_LIBRARY_C_FLAGS "-G 0")
+set(CMAKE_SHARED_LIBRARY_SUFFIX "..o")
+set(CMAKE_DL_LIBS "")
+set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-D,08000000")
+include(Platform/UnixPaths)
diff --git a/Modules/Platform/UNIX_SV.cmake b/Modules/Platform/UNIX_SV.cmake
index 869b3a6a02..1ec96aea26 100644
--- a/Modules/Platform/UNIX_SV.cmake
+++ b/Modules/Platform/UNIX_SV.cmake
@@ -1,5 +1,5 @@
-SET(CMAKE_C_COMPILE_OPTIONS_PIC -K PIC)
-SET(CMAKE_C_COMPILE_OPTIONS_PIE "")
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
-SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-Bexport")
-INCLUDE(Platform/UnixPaths)
+set(CMAKE_C_COMPILE_OPTIONS_PIC -K PIC)
+set(CMAKE_C_COMPILE_OPTIONS_PIE "")
+set(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
+set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-Bexport")
+include(Platform/UnixPaths)
diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake
index 6aef111803..ccb266330a 100644
--- a/Modules/Platform/UnixPaths.cmake
+++ b/Modules/Platform/UnixPaths.cmake
@@ -17,21 +17,21 @@
# "CMakeSystemSpecificInformation.cmake" already included it.
# The extra inclusion is a work-around documented next to the include()
# call, so this can be removed when the work-around is removed.
-IF(__UNIX_PATHS_INCLUDED)
- RETURN()
-ENDIF()
-SET(__UNIX_PATHS_INCLUDED 1)
+if(__UNIX_PATHS_INCLUDED)
+ return()
+endif()
+set(__UNIX_PATHS_INCLUDED 1)
-SET(UNIX 1)
+set(UNIX 1)
# also add the install directory of the running cmake to the search directories
# CMAKE_ROOT is CMAKE_INSTALL_PREFIX/share/cmake, so we need to go two levels up
-GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH)
-GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
+get_filename_component(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH)
+get_filename_component(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
# List common installation prefixes. These will be used for all
# search types.
-LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH
+list(APPEND CMAKE_SYSTEM_PREFIX_PATH
# Standard
/usr/local /usr /
@@ -43,7 +43,7 @@ LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH
)
# List common include file locations not under the common prefixes.
-LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH
+list(APPEND CMAKE_SYSTEM_INCLUDE_PATH
# Windows API on Cygwin
/usr/include/w32api
@@ -56,7 +56,7 @@ LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH
/usr/openwin/include
)
-LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH
+list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
# Windows API on Cygwin
/usr/lib/w32api
@@ -69,20 +69,20 @@ LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH
/usr/openwin/lib
)
-LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH
+list(APPEND CMAKE_SYSTEM_PROGRAM_PATH
/usr/pkg/bin
)
-LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
+list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
/lib /usr/lib /usr/lib32 /usr/lib64
)
-LIST(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
+list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
/usr/include
)
-LIST(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
+list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
/usr/include
)
# Enable use of lib64 search path variants by default.
-SET_PROPERTY(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)
+set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)
diff --git a/Modules/Platform/UnixWare.cmake b/Modules/Platform/UnixWare.cmake
index 3112ee1ef7..e649bd2a48 100644
--- a/Modules/Platform/UnixWare.cmake
+++ b/Modules/Platform/UnixWare.cmake
@@ -1,5 +1,5 @@
-SET(CMAKE_C_COMPILE_OPTIONS_PIC -K PIC)
-SET(CMAKE_C_COMPILE_OPTIONS_PIE "")
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-Wl,-Bexport")
-INCLUDE(Platform/UnixPaths)
+set(CMAKE_C_COMPILE_OPTIONS_PIC -K PIC)
+set(CMAKE_C_COMPILE_OPTIONS_PIE "")
+set(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC")
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-Wl,-Bexport")
+include(Platform/UnixPaths)
diff --git a/Modules/Platform/Windows-Embarcadero.cmake b/Modules/Platform/Windows-Embarcadero.cmake
index 62e8eb7040..1662ac9694 100644
--- a/Modules/Platform/Windows-Embarcadero.cmake
+++ b/Modules/Platform/Windows-Embarcadero.cmake
@@ -18,7 +18,7 @@ if(__WINDOWS_EMBARCADERO)
endif()
set(__WINDOWS_EMBARCADERO 1)
-SET(BORLAND 1)
+set(BORLAND 1)
if("${CMAKE_${_lang}_COMPILER_VERSION}" VERSION_LESS 6.30)
# Borland target type flags (bcc32 -h -t):
@@ -43,36 +43,36 @@ endif()
set(_COMPILE_C "-c")
set(_COMPILE_CXX "-P -c")
-SET(CMAKE_LIBRARY_PATH_FLAG "-L")
-SET(CMAKE_LINK_LIBRARY_FLAG "")
+set(CMAKE_LIBRARY_PATH_FLAG "-L")
+set(CMAKE_LINK_LIBRARY_FLAG "")
-SET(CMAKE_FIND_LIBRARY_SUFFIXES "-bcc.lib" ".lib")
+set(CMAKE_FIND_LIBRARY_SUFFIXES "-bcc.lib" ".lib")
# uncomment these out to debug makefiles
-#SET(CMAKE_START_TEMP_FILE "")
-#SET(CMAKE_END_TEMP_FILE "")
-#SET(CMAKE_VERBOSE_MAKEFILE 1)
+#set(CMAKE_START_TEMP_FILE "")
+#set(CMAKE_END_TEMP_FILE "")
+#set(CMAKE_VERBOSE_MAKEFILE 1)
# Borland cannot handle + in the file name, so mangle object file name
-SET (CMAKE_MANGLE_OBJECT_FILE_NAMES "ON")
+set (CMAKE_MANGLE_OBJECT_FILE_NAMES "ON")
# extra flags for a win32 exe
-SET(CMAKE_CREATE_WIN32_EXE "${_tW}" )
+set(CMAKE_CREATE_WIN32_EXE "${_tW}" )
# extra flags for a console app
-SET(CMAKE_CREATE_CONSOLE_EXE "${_tC}" )
+set(CMAKE_CREATE_CONSOLE_EXE "${_tC}" )
-SET (CMAKE_BUILD_TYPE Debug CACHE STRING
+set (CMAKE_BUILD_TYPE Debug CACHE STRING
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel.")
-SET (CMAKE_EXE_LINKER_FLAGS_INIT "${_tM} -lS:10000000 -lSc:10000000 ")
-SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "-v")
-SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "-v")
-SET (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT})
-SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
-SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT})
-SET (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT})
-SET (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT})
-SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT})
+set (CMAKE_EXE_LINKER_FLAGS_INIT "${_tM} -lS:10000000 -lSc:10000000 ")
+set (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "-v")
+set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "-v")
+set (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT})
+set (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
+set (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT})
+set (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT})
+set (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT})
+set (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT})
macro(__embarcadero_language lang)
diff --git a/Modules/Platform/Windows-Intel-Fortran.cmake b/Modules/Platform/Windows-Intel-Fortran.cmake
index 5c016a8fd3..40523ffe56 100644
--- a/Modules/Platform/Windows-Intel-Fortran.cmake
+++ b/Modules/Platform/Windows-Intel-Fortran.cmake
@@ -4,8 +4,8 @@ set(_COMPILE_Fortran " /fpp")
set(CMAKE_Fortran_MODDIR_FLAG "-module:")
set(CMAKE_Fortran_STANDARD_LIBRARIES_INIT "user32.lib")
__windows_compiler_intel(Fortran)
-SET (CMAKE_Fortran_FLAGS_INIT "/W1 /nologo /fpp /libs:dll /threads")
-SET (CMAKE_Fortran_FLAGS_DEBUG_INIT "/debug:full /dbglibs")
-SET (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "/O1 /D NDEBUG")
-SET (CMAKE_Fortran_FLAGS_RELEASE_INIT "/O2 /D NDEBUG")
-SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "/O2 /debug:full /D NDEBUG")
+set (CMAKE_Fortran_FLAGS_INIT "/W1 /nologo /fpp /libs:dll /threads")
+set (CMAKE_Fortran_FLAGS_DEBUG_INIT "/debug:full /dbglibs")
+set (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "/O1 /D NDEBUG")
+set (CMAKE_Fortran_FLAGS_RELEASE_INIT "/O2 /D NDEBUG")
+set (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "/O2 /debug:full /D NDEBUG")
diff --git a/Modules/Platform/Windows-Intel.cmake b/Modules/Platform/Windows-Intel.cmake
index 16b3c814b6..ec78886e1d 100644
--- a/Modules/Platform/Windows-Intel.cmake
+++ b/Modules/Platform/Windows-Intel.cmake
@@ -19,65 +19,65 @@ endif()
set(__WINDOWS_INTEL 1)
# make sure to enable languages after setting configuration types
-ENABLE_LANGUAGE(RC)
-SET(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
+enable_language(RC)
+set(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
-SET(CMAKE_LIBRARY_PATH_FLAG "-LIBPATH:")
-SET(CMAKE_LINK_LIBRARY_FLAG "")
-SET(WIN32 1)
-IF(CMAKE_VERBOSE_MAKEFILE)
- SET(CMAKE_CL_NOLOGO)
-ELSE(CMAKE_VERBOSE_MAKEFILE)
- SET(CMAKE_CL_NOLOGO "/nologo")
-ENDIF(CMAKE_VERBOSE_MAKEFILE)
-SET(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
-SET(CMAKE_CREATE_WIN32_EXE /subsystem:windows)
-SET(CMAKE_CREATE_CONSOLE_EXE /subsystem:console)
+set(CMAKE_LIBRARY_PATH_FLAG "-LIBPATH:")
+set(CMAKE_LINK_LIBRARY_FLAG "")
+set(WIN32 1)
+if(CMAKE_VERBOSE_MAKEFILE)
+ set(CMAKE_CL_NOLOGO)
+else(CMAKE_VERBOSE_MAKEFILE)
+ set(CMAKE_CL_NOLOGO "/nologo")
+endif(CMAKE_VERBOSE_MAKEFILE)
+set(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
+set(CMAKE_CREATE_WIN32_EXE /subsystem:windows)
+set(CMAKE_CREATE_CONSOLE_EXE /subsystem:console)
# default to Debug builds
-#SET(CMAKE_BUILD_TYPE_INIT Debug)
-SET(CMAKE_BUILD_TYPE_INIT Release)
+#set(CMAKE_BUILD_TYPE_INIT Debug)
+set(CMAKE_BUILD_TYPE_INIT Release)
-SET(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib")
-SET(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
+set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib")
+set(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
# executable linker flags
-SET (CMAKE_LINK_DEF_FILE_FLAG "/DEF:")
-IF(MSVC_C_ARCHITECTURE_ID)
- SET(_MACHINE_ARCH_FLAG "/machine:${MSVC_C_ARCHITECTURE_ID}")
-ELSEIF(MSVC_CXX_ARCHITECTURE_ID)
- SET(_MACHINE_ARCH_FLAG "/machine:${MSVC_CXX_ARCHITECTURE_ID}")
-ELSEIF(MSVC_Fortran_ARCHITECTURE_ID)
- SET(_MACHINE_ARCH_FLAG "/machine:${MSVC_Fortran_ARCHITECTURE_ID}")
-ENDIF()
-SET (CMAKE_EXE_LINKER_FLAGS_INIT "/STACK:10000000 /INCREMENTAL:YES ${_MACHINE_ARCH_FLAG}")
-SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug")
-SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug")
+set (CMAKE_LINK_DEF_FILE_FLAG "/DEF:")
+if(MSVC_C_ARCHITECTURE_ID)
+ set(_MACHINE_ARCH_FLAG "/machine:${MSVC_C_ARCHITECTURE_ID}")
+elseif(MSVC_CXX_ARCHITECTURE_ID)
+ set(_MACHINE_ARCH_FLAG "/machine:${MSVC_CXX_ARCHITECTURE_ID}")
+elseif(MSVC_Fortran_ARCHITECTURE_ID)
+ set(_MACHINE_ARCH_FLAG "/machine:${MSVC_Fortran_ARCHITECTURE_ID}")
+endif()
+set (CMAKE_EXE_LINKER_FLAGS_INIT "/STACK:10000000 /INCREMENTAL:YES ${_MACHINE_ARCH_FLAG}")
+set (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug")
+set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug")
-SET (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT})
-SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
-SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
-SET (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT})
-SET (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT})
-SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT})
+set (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT})
+set (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
+set (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
+set (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT})
+set (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT})
+set (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT})
-INCLUDE("${CMAKE_PLATFORM_ROOT_BIN}/CMakeIntelInformation.cmake" OPTIONAL)
+include("${CMAKE_PLATFORM_ROOT_BIN}/CMakeIntelInformation.cmake" OPTIONAL)
-IF(NOT _INTEL_XILINK_TEST_RUN)
- EXECUTE_PROCESS(COMMAND xilink /?
+if(NOT _INTEL_XILINK_TEST_RUN)
+ execute_process(COMMAND xilink /?
ERROR_VARIABLE _XILINK_ERR
OUTPUT_VARIABLE _XILINK_HELP)
- IF(_XILINK_HELP MATCHES MANIFEST)
- SET(_INTEL_COMPILER_SUPPORTS_MANIFEST 1)
- ENDIF(_XILINK_HELP MATCHES MANIFEST)
- IF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeIntelInformation.cmake")
- FILE(WRITE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeIntelInformation.cmake
+ if(_XILINK_HELP MATCHES MANIFEST)
+ set(_INTEL_COMPILER_SUPPORTS_MANIFEST 1)
+ endif(_XILINK_HELP MATCHES MANIFEST)
+ if(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeIntelInformation.cmake")
+ file(WRITE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeIntelInformation.cmake
"
-SET(_INTEL_XILINK_TEST_RUN 1)
-SET(_INTEL_COMPILER_SUPPORTS_MANIFEST ${_INTEL_COMPILER_SUPPORTS_MANIFEST})
+set(_INTEL_XILINK_TEST_RUN 1)
+set(_INTEL_COMPILER_SUPPORTS_MANIFEST ${_INTEL_COMPILER_SUPPORTS_MANIFEST})
")
- ENDIF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeIntelInformation.cmake")
-ENDIF(NOT _INTEL_XILINK_TEST_RUN)
+ endif(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeIntelInformation.cmake")
+endif(NOT _INTEL_XILINK_TEST_RUN)
macro(__windows_compiler_intel lang)
set(CMAKE_${lang}_COMPILE_OBJECT
@@ -98,11 +98,11 @@ macro(__windows_compiler_intel lang)
set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/DNDEBUG /MD /Zi /O2")
if(_INTEL_COMPILER_SUPPORTS_MANIFEST)
- SET(CMAKE_${lang}_LINK_EXECUTABLE
+ set(CMAKE_${lang}_LINK_EXECUTABLE
"<CMAKE_COMMAND> -E vs_link_exe ${CMAKE_${lang}_LINK_EXECUTABLE}")
- SET(CMAKE_${lang}_CREATE_SHARED_LIBRARY
+ set(CMAKE_${lang}_CREATE_SHARED_LIBRARY
"<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_${lang}_CREATE_SHARED_LIBRARY}")
- SET(CMAKE_${lang}_CREATE_SHARED_MODULE
+ set(CMAKE_${lang}_CREATE_SHARED_MODULE
"<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_${lang}_CREATE_SHARED_MODULE}")
endif()
endmacro()
diff --git a/Modules/Platform/Windows-cl.cmake b/Modules/Platform/Windows-cl.cmake
index 34b11253e6..216419f781 100644
--- a/Modules/Platform/Windows-cl.cmake
+++ b/Modules/Platform/Windows-cl.cmake
@@ -1,32 +1,32 @@
# try to load any previously computed information for C on this platform
-INCLUDE( ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake OPTIONAL)
+include( ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake OPTIONAL)
# try to load any previously computed information for CXX on this platform
-INCLUDE( ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake OPTIONAL)
+include( ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake OPTIONAL)
-SET(WIN32 1)
+set(WIN32 1)
-INCLUDE(Platform/cl)
+include(Platform/cl)
-SET(CMAKE_CREATE_WIN32_EXE /subsystem:windows)
-SET(CMAKE_CREATE_CONSOLE_EXE /subsystem:console)
+set(CMAKE_CREATE_WIN32_EXE /subsystem:windows)
+set(CMAKE_CREATE_CONSOLE_EXE /subsystem:console)
-IF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
- SET (CMAKE_NO_BUILD_TYPE 1)
-ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
-IF(NOT CMAKE_NO_BUILD_TYPE AND CMAKE_GENERATOR MATCHES "Visual Studio")
- SET (CMAKE_NO_BUILD_TYPE 1)
- SET (CMAKE_CONFIGURATION_TYPES "Debug;Release;MinSizeRel;RelWithDebInfo" CACHE STRING
+if(CMAKE_GENERATOR MATCHES "Visual Studio 6")
+ set (CMAKE_NO_BUILD_TYPE 1)
+endif(CMAKE_GENERATOR MATCHES "Visual Studio 6")
+if(NOT CMAKE_NO_BUILD_TYPE AND CMAKE_GENERATOR MATCHES "Visual Studio")
+ set (CMAKE_NO_BUILD_TYPE 1)
+ set (CMAKE_CONFIGURATION_TYPES "Debug;Release;MinSizeRel;RelWithDebInfo" CACHE STRING
"Semicolon separated list of supported configuration types, only supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything else will be ignored.")
- MARK_AS_ADVANCED(CMAKE_CONFIGURATION_TYPES)
-ENDIF(NOT CMAKE_NO_BUILD_TYPE AND CMAKE_GENERATOR MATCHES "Visual Studio")
+ mark_as_advanced(CMAKE_CONFIGURATION_TYPES)
+endif(NOT CMAKE_NO_BUILD_TYPE AND CMAKE_GENERATOR MATCHES "Visual Studio")
# does the compiler support pdbtype and is it the newer compiler
-IF(CMAKE_GENERATOR MATCHES "Visual Studio 8")
- SET(CMAKE_COMPILER_2005 1)
-ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 8")
+if(CMAKE_GENERATOR MATCHES "Visual Studio 8")
+ set(CMAKE_COMPILER_2005 1)
+endif(CMAKE_GENERATOR MATCHES "Visual Studio 8")
# make sure to enable languages after setting configuration types
-ENABLE_LANGUAGE(RC)
-SET(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
+enable_language(RC)
+set(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
# for nmake we need to compute some information about the compiler
# that is being used.
@@ -36,218 +36,218 @@ SET(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
# test results are saved in CMakeCPlatform.cmake, a file
# that is automatically copied into try_compile directories
# by the global generator.
-SET(MSVC_IDE 1)
-IF(CMAKE_GENERATOR MATCHES "Makefiles" OR CMAKE_GENERATOR MATCHES "Ninja")
- SET(MSVC_IDE 0)
- IF(NOT CMAKE_VC_COMPILER_TESTS_RUN)
- SET(CMAKE_VC_COMPILER_TESTS 1)
- SET(testNmakeCLVersionFile
+set(MSVC_IDE 1)
+if(CMAKE_GENERATOR MATCHES "Makefiles" OR CMAKE_GENERATOR MATCHES "Ninja")
+ set(MSVC_IDE 0)
+ if(NOT CMAKE_VC_COMPILER_TESTS_RUN)
+ set(CMAKE_VC_COMPILER_TESTS 1)
+ set(testNmakeCLVersionFile
"${CMAKE_ROOT}/Modules/CMakeTestNMakeCLVersion.c")
- STRING(REGEX REPLACE "/" "\\\\" testNmakeCLVersionFile "${testNmakeCLVersionFile}")
- MESSAGE(STATUS "Check for CL compiler version")
- SET(CMAKE_TEST_COMPILER ${CMAKE_C_COMPILER})
- IF (NOT CMAKE_C_COMPILER)
- SET(CMAKE_TEST_COMPILER ${CMAKE_CXX_COMPILER})
- ENDIF(NOT CMAKE_C_COMPILER)
- EXEC_PROGRAM(${CMAKE_TEST_COMPILER}
+ string(REGEX REPLACE "/" "\\\\" testNmakeCLVersionFile "${testNmakeCLVersionFile}")
+ message(STATUS "Check for CL compiler version")
+ set(CMAKE_TEST_COMPILER ${CMAKE_C_COMPILER})
+ if (NOT CMAKE_C_COMPILER)
+ set(CMAKE_TEST_COMPILER ${CMAKE_CXX_COMPILER})
+ endif(NOT CMAKE_C_COMPILER)
+ exec_program(${CMAKE_TEST_COMPILER}
ARGS /nologo -EP \"${testNmakeCLVersionFile}\"
OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT
RETURN_VALUE CMAKE_COMPILER_RETURN
)
- IF(NOT CMAKE_COMPILER_RETURN)
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ if(NOT CMAKE_COMPILER_RETURN)
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining the version of compiler passed with the following output:\n"
"${CMAKE_COMPILER_OUTPUT}\n\n")
- STRING(REGEX REPLACE "\n" " " compilerVersion "${CMAKE_COMPILER_OUTPUT}")
- STRING(REGEX REPLACE ".*VERSION=(.*)" "\\1"
+ string(REGEX REPLACE "\n" " " compilerVersion "${CMAKE_COMPILER_OUTPUT}")
+ string(REGEX REPLACE ".*VERSION=(.*)" "\\1"
compilerVersion "${compilerVersion}")
- MESSAGE(STATUS "Check for CL compiler version - ${compilerVersion}")
- SET(MSVC60)
- SET(MSVC70)
- SET(MSVC71)
- SET(MSVC80)
- SET(CMAKE_COMPILER_2005)
- IF("${compilerVersion}" LESS 1300)
- SET(MSVC60 1)
- SET(CMAKE_COMPILER_SUPPORTS_PDBTYPE 1)
- ENDIF("${compilerVersion}" LESS 1300)
- IF("${compilerVersion}" EQUAL 1300)
- SET(MSVC70 1)
- SET(CMAKE_COMPILER_SUPPORTS_PDBTYPE 0)
- ENDIF("${compilerVersion}" EQUAL 1300)
- IF("${compilerVersion}" EQUAL 1310)
- SET(MSVC71 1)
- SET(CMAKE_COMPILER_SUPPORTS_PDBTYPE 0)
- ENDIF("${compilerVersion}" EQUAL 1310)
- IF("${compilerVersion}" EQUAL 1400)
- SET(MSVC80 1)
- SET(CMAKE_COMPILER_2005 1)
- ENDIF("${compilerVersion}" EQUAL 1400)
- IF("${compilerVersion}" EQUAL 1500)
- SET(MSVC90 1)
- ENDIF("${compilerVersion}" EQUAL 1500)
- IF("${compilerVersion}" EQUAL 1600)
- SET(MSVC10 1)
- ENDIF("${compilerVersion}" EQUAL 1600)
- SET(MSVC_VERSION "${compilerVersion}")
- ELSE(NOT CMAKE_COMPILER_RETURN)
- MESSAGE(STATUS "Check for CL compiler version - failed")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ message(STATUS "Check for CL compiler version - ${compilerVersion}")
+ set(MSVC60)
+ set(MSVC70)
+ set(MSVC71)
+ set(MSVC80)
+ set(CMAKE_COMPILER_2005)
+ if("${compilerVersion}" LESS 1300)
+ set(MSVC60 1)
+ set(CMAKE_COMPILER_SUPPORTS_PDBTYPE 1)
+ endif("${compilerVersion}" LESS 1300)
+ if("${compilerVersion}" EQUAL 1300)
+ set(MSVC70 1)
+ set(CMAKE_COMPILER_SUPPORTS_PDBTYPE 0)
+ endif("${compilerVersion}" EQUAL 1300)
+ if("${compilerVersion}" EQUAL 1310)
+ set(MSVC71 1)
+ set(CMAKE_COMPILER_SUPPORTS_PDBTYPE 0)
+ endif("${compilerVersion}" EQUAL 1310)
+ if("${compilerVersion}" EQUAL 1400)
+ set(MSVC80 1)
+ set(CMAKE_COMPILER_2005 1)
+ endif("${compilerVersion}" EQUAL 1400)
+ if("${compilerVersion}" EQUAL 1500)
+ set(MSVC90 1)
+ endif("${compilerVersion}" EQUAL 1500)
+ if("${compilerVersion}" EQUAL 1600)
+ set(MSVC10 1)
+ endif("${compilerVersion}" EQUAL 1600)
+ set(MSVC_VERSION "${compilerVersion}")
+ else(NOT CMAKE_COMPILER_RETURN)
+ message(STATUS "Check for CL compiler version - failed")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining the version of compiler failed with the following output:\n"
"${CMAKE_COMPILER_OUTPUT}\n\n")
- ENDIF(NOT CMAKE_COMPILER_RETURN)
+ endif(NOT CMAKE_COMPILER_RETURN)
# try to figure out if we are running the free command line
# tools from Microsoft. These tools do not provide debug libraries,
# so the link flags used have to be different.
- MAKE_DIRECTORY("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp2")
- SET(testForFreeVCFile
+ make_directory("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp2")
+ set(testForFreeVCFile
"${CMAKE_ROOT}/Modules/CMakeTestForFreeVC.cxx")
- STRING(REGEX REPLACE "/" "\\\\" testForFreeVCFile "${testForFreeVCFile}")
- MESSAGE(STATUS "Check if this is a free VC compiler")
- EXEC_PROGRAM(${CMAKE_TEST_COMPILER} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp2
+ string(REGEX REPLACE "/" "\\\\" testForFreeVCFile "${testForFreeVCFile}")
+ message(STATUS "Check if this is a free VC compiler")
+ exec_program(${CMAKE_TEST_COMPILER} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp2
ARGS /nologo /MD /EHsc
\"${testForFreeVCFile}\"
OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT
RETURN_VALUE CMAKE_COMPILER_RETURN
)
- IF(CMAKE_COMPILER_RETURN)
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ if(CMAKE_COMPILER_RETURN)
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if this is a free VC compiler failed with the following output:\n"
"${CMAKE_COMPILER_OUTPUT}\n\n")
- MESSAGE(STATUS "Check if this is a free VC compiler - yes")
- SET(CMAKE_USING_VC_FREE_TOOLS 1)
- ELSE(CMAKE_COMPILER_RETURN)
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ message(STATUS "Check if this is a free VC compiler - yes")
+ set(CMAKE_USING_VC_FREE_TOOLS 1)
+ else(CMAKE_COMPILER_RETURN)
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if this is a free VC compiler passed with the following output:\n"
"${CMAKE_COMPILER_OUTPUT}\n\n")
- MESSAGE(STATUS "Check if this is a free VC compiler - no")
- SET(CMAKE_USING_VC_FREE_TOOLS 0)
- ENDIF(CMAKE_COMPILER_RETURN)
- MAKE_DIRECTORY("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp3")
- ENDIF(NOT CMAKE_VC_COMPILER_TESTS_RUN)
-ENDIF(CMAKE_GENERATOR MATCHES "Makefiles" OR CMAKE_GENERATOR MATCHES "Ninja")
-
-IF(MSVC_C_ARCHITECTURE_ID MATCHES 64)
- SET(CMAKE_CL_64 1)
-ELSE(MSVC_C_ARCHITECTURE_ID MATCHES 64)
- SET(CMAKE_CL_64 0)
-ENDIF(MSVC_C_ARCHITECTURE_ID MATCHES 64)
-IF(CMAKE_FORCE_WIN64 OR CMAKE_FORCE_IA64)
- SET(CMAKE_CL_64 1)
-ENDIF(CMAKE_FORCE_WIN64 OR CMAKE_FORCE_IA64)
-
-IF("${MSVC_VERSION}" GREATER 1599)
- SET(MSVC_INCREMENTAL_DEFAULT ON)
-ENDIF()
+ message(STATUS "Check if this is a free VC compiler - no")
+ set(CMAKE_USING_VC_FREE_TOOLS 0)
+ endif(CMAKE_COMPILER_RETURN)
+ make_directory("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp3")
+ endif(NOT CMAKE_VC_COMPILER_TESTS_RUN)
+endif(CMAKE_GENERATOR MATCHES "Makefiles" OR CMAKE_GENERATOR MATCHES "Ninja")
+
+if(MSVC_C_ARCHITECTURE_ID MATCHES 64)
+ set(CMAKE_CL_64 1)
+else(MSVC_C_ARCHITECTURE_ID MATCHES 64)
+ set(CMAKE_CL_64 0)
+endif(MSVC_C_ARCHITECTURE_ID MATCHES 64)
+if(CMAKE_FORCE_WIN64 OR CMAKE_FORCE_IA64)
+ set(CMAKE_CL_64 1)
+endif(CMAKE_FORCE_WIN64 OR CMAKE_FORCE_IA64)
+
+if("${MSVC_VERSION}" GREATER 1599)
+ set(MSVC_INCREMENTAL_DEFAULT ON)
+endif()
# default to Debug builds
-IF(MSVC_VERSION GREATER 1310)
+if(MSVC_VERSION GREATER 1310)
# for 2005 make sure the manifest is put in the dll with mt
- SET(CMAKE_CXX_CREATE_SHARED_LIBRARY "<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_CXX_CREATE_SHARED_LIBRARY}")
- SET(CMAKE_CXX_CREATE_SHARED_MODULE "<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_CXX_CREATE_SHARED_MODULE}")
+ set(CMAKE_CXX_CREATE_SHARED_LIBRARY "<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_CXX_CREATE_SHARED_LIBRARY}")
+ set(CMAKE_CXX_CREATE_SHARED_MODULE "<CMAKE_COMMAND> -E vs_link_dll ${CMAKE_CXX_CREATE_SHARED_MODULE}")
# create a C shared library
- SET(CMAKE_C_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY}")
+ set(CMAKE_C_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY}")
# create a C shared module just copy the shared library rule
- SET(CMAKE_C_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE}")
- SET(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_COMMAND> -E vs_link_exe ${CMAKE_CXX_LINK_EXECUTABLE}")
- SET(CMAKE_C_LINK_EXECUTABLE "<CMAKE_COMMAND> -E vs_link_exe ${CMAKE_C_LINK_EXECUTABLE}")
-
- SET(CMAKE_BUILD_TYPE_INIT Debug)
- SET (CMAKE_CXX_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR")
- SET (CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1")
- SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG")
- SET (CMAKE_CXX_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /D NDEBUG")
- SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG")
- SET (CMAKE_C_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000")
- SET (CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1")
- SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG")
- SET (CMAKE_C_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /D NDEBUG")
- SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG")
- SET (CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib ")
- SET (CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS_INIT}")
-ELSE(MSVC_VERSION GREATER 1310)
- IF(CMAKE_USING_VC_FREE_TOOLS)
- MESSAGE(STATUS "Using FREE VC TOOLS, NO DEBUG available")
- SET(CMAKE_BUILD_TYPE_INIT Release)
- SET (CMAKE_CXX_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000 /GX /GR")
- SET (CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MTd /Zi /Ob0 /Od /GZ")
- SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MT /O1 /Ob1 /D NDEBUG")
- SET (CMAKE_CXX_FLAGS_RELEASE_INIT "/MT /O2 /Ob2 /D NDEBUG")
- SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MT /Zi /O2 /Ob1 /D NDEBUG")
- SET (CMAKE_C_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000")
- SET (CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MTd /Zi /Ob0 /Od /GZ")
- SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "/MT /O1 /Ob1 /D NDEBUG")
- SET (CMAKE_C_FLAGS_RELEASE_INIT "/MT /O2 /Ob2 /D NDEBUG")
- SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MT /Zi /O2 /Ob1 /D NDEBUG")
- ELSE(CMAKE_USING_VC_FREE_TOOLS)
- SET(CMAKE_BUILD_TYPE_INIT Debug)
- SET (CMAKE_CXX_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000 /GX /GR")
- SET (CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od /GZ")
- SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG")
- SET (CMAKE_CXX_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /D NDEBUG")
- SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG")
- SET (CMAKE_C_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000")
- SET (CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od /GZ")
- SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG")
- SET (CMAKE_C_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /D NDEBUG")
- SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG")
- ENDIF(CMAKE_USING_VC_FREE_TOOLS)
- SET (CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib")
-ENDIF(MSVC_VERSION GREATER 1310)
-
-SET(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
+ set(CMAKE_C_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE}")
+ set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_COMMAND> -E vs_link_exe ${CMAKE_CXX_LINK_EXECUTABLE}")
+ set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_COMMAND> -E vs_link_exe ${CMAKE_C_LINK_EXECUTABLE}")
+
+ set(CMAKE_BUILD_TYPE_INIT Debug)
+ set (CMAKE_CXX_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR")
+ set (CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1")
+ set (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG")
+ set (CMAKE_CXX_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /D NDEBUG")
+ set (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG")
+ set (CMAKE_C_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000")
+ set (CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1")
+ set (CMAKE_C_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG")
+ set (CMAKE_C_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /D NDEBUG")
+ set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG")
+ set (CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib ")
+ set (CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS_INIT}")
+else(MSVC_VERSION GREATER 1310)
+ if(CMAKE_USING_VC_FREE_TOOLS)
+ message(STATUS "Using FREE VC TOOLS, NO DEBUG available")
+ set(CMAKE_BUILD_TYPE_INIT Release)
+ set (CMAKE_CXX_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000 /GX /GR")
+ set (CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MTd /Zi /Ob0 /Od /GZ")
+ set (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MT /O1 /Ob1 /D NDEBUG")
+ set (CMAKE_CXX_FLAGS_RELEASE_INIT "/MT /O2 /Ob2 /D NDEBUG")
+ set (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MT /Zi /O2 /Ob1 /D NDEBUG")
+ set (CMAKE_C_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000")
+ set (CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MTd /Zi /Ob0 /Od /GZ")
+ set (CMAKE_C_FLAGS_MINSIZEREL_INIT "/MT /O1 /Ob1 /D NDEBUG")
+ set (CMAKE_C_FLAGS_RELEASE_INIT "/MT /O2 /Ob2 /D NDEBUG")
+ set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MT /Zi /O2 /Ob1 /D NDEBUG")
+ else(CMAKE_USING_VC_FREE_TOOLS)
+ set(CMAKE_BUILD_TYPE_INIT Debug)
+ set (CMAKE_CXX_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000 /GX /GR")
+ set (CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od /GZ")
+ set (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG")
+ set (CMAKE_CXX_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /D NDEBUG")
+ set (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG")
+ set (CMAKE_C_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000")
+ set (CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od /GZ")
+ set (CMAKE_C_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG")
+ set (CMAKE_C_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /D NDEBUG")
+ set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG")
+ endif(CMAKE_USING_VC_FREE_TOOLS)
+ set (CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib")
+endif(MSVC_VERSION GREATER 1310)
+
+set(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
# executable linker flags
-SET (CMAKE_LINK_DEF_FILE_FLAG "/DEF:")
+set (CMAKE_LINK_DEF_FILE_FLAG "/DEF:")
# set the stack size and the machine type
-SET(_MACHINE_ARCH_FLAG ${MSVC_C_ARCHITECTURE_ID})
-IF(NOT _MACHINE_ARCH_FLAG)
- SET(_MACHINE_ARCH_FLAG ${MSVC_CXX_ARCHITECTURE_ID})
-ENDIF(NOT _MACHINE_ARCH_FLAG)
-SET (CMAKE_EXE_LINKER_FLAGS_INIT
+set(_MACHINE_ARCH_FLAG ${MSVC_C_ARCHITECTURE_ID})
+if(NOT _MACHINE_ARCH_FLAG)
+ set(_MACHINE_ARCH_FLAG ${MSVC_CXX_ARCHITECTURE_ID})
+endif(NOT _MACHINE_ARCH_FLAG)
+set (CMAKE_EXE_LINKER_FLAGS_INIT
"${CMAKE_EXE_LINKER_FLAGS_INIT} /STACK:10000000 /machine:${_MACHINE_ARCH_FLAG}")
# add /debug and /INCREMENTAL:YES to DEBUG and RELWITHDEBINFO also add pdbtype
# on versions that support it
-SET( MSVC_INCREMENTAL_YES_FLAG "")
-IF(NOT MSVC_INCREMENTAL_DEFAULT)
- SET( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL:YES")
-ELSE()
- SET( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL" )
-ENDIF()
-
-IF (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
- SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug /pdbtype:sept ${MSVC_INCREMENTAL_YES_FLAG}")
- SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug /pdbtype:sept ${MSVC_INCREMENTAL_YES_FLAG}")
-ELSE (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
- SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug ${MSVC_INCREMENTAL_YES_FLAG}")
- SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug ${MSVC_INCREMENTAL_YES_FLAG}")
-ENDIF (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
+set( MSVC_INCREMENTAL_YES_FLAG "")
+if(NOT MSVC_INCREMENTAL_DEFAULT)
+ set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL:YES")
+else()
+ set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL" )
+endif()
+
+if (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
+ set (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug /pdbtype:sept ${MSVC_INCREMENTAL_YES_FLAG}")
+ set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug /pdbtype:sept ${MSVC_INCREMENTAL_YES_FLAG}")
+else (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
+ set (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug ${MSVC_INCREMENTAL_YES_FLAG}")
+ set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug ${MSVC_INCREMENTAL_YES_FLAG}")
+endif (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
# for release and minsize release default to no incremental linking
-SET(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT "/INCREMENTAL:NO")
-SET(CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT "/INCREMENTAL:NO")
+set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT "/INCREMENTAL:NO")
+set(CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT "/INCREMENTAL:NO")
# copy the EXE_LINKER flags to SHARED and MODULE linker flags
# shared linker flags
-SET (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT})
-SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
-SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
-SET (CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT})
-SET (CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL_INIT ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT})
+set (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT})
+set (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
+set (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
+set (CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT})
+set (CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL_INIT ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT})
# module linker flags
-SET (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT})
-SET (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT})
-SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT})
-SET (CMAKE_MODULE_LINKER_FLAGS_RELEASE_INIT ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT})
-SET (CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL_INIT ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT})
+set (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT})
+set (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT})
+set (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT})
+set (CMAKE_MODULE_LINKER_FLAGS_RELEASE_INIT ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT})
+set (CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL_INIT ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT})
# save computed information for this platform
-IF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake")
- CONFIGURE_FILE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake.in
+if(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake")
+ configure_file(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCPlatform.cmake IMMEDIATE)
-ENDIF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake")
+endif(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake")
-IF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake")
- CONFIGURE_FILE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake.in
+if(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake")
+ configure_file(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXPlatform.cmake IMMEDIATE)
-ENDIF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake")
+endif(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake")
diff --git a/Modules/Platform/Windows-cl.cmake.in b/Modules/Platform/Windows-cl.cmake.in
index 82a0e595f0..4f3ec3ee85 100644
--- a/Modules/Platform/Windows-cl.cmake.in
+++ b/Modules/Platform/Windows-cl.cmake.in
@@ -1,14 +1,14 @@
-SET(CMAKE_VC_COMPILER_TESTS_RUN 1)
-SET(CMAKE_COMPILER_SUPPORTS_PDBTYPE @CMAKE_COMPILER_SUPPORTS_PDBTYPE@)
-SET(CMAKE_COMPILER_2005 @CMAKE_COMPILER_2005@)
-SET(CMAKE_USING_VC_FREE_TOOLS @CMAKE_USING_VC_FREE_TOOLS@)
-SET(CMAKE_CL_64 @CMAKE_CL_64@)
-SET(MSVC60 @MSVC60@)
-SET(MSVC70 @MSVC70@)
-SET(MSVC71 @MSVC71@)
-SET(MSVC80 @MSVC80@)
-SET(MSVC90 @MSVC90@)
-SET(MSVC10 @MSVC10@)
-SET(MSVC_IDE @MSVC_IDE@)
-SET(MSVC_VERSION @MSVC_VERSION@)
-SET(WIN32 1)
+set(CMAKE_VC_COMPILER_TESTS_RUN 1)
+set(CMAKE_COMPILER_SUPPORTS_PDBTYPE @CMAKE_COMPILER_SUPPORTS_PDBTYPE@)
+set(CMAKE_COMPILER_2005 @CMAKE_COMPILER_2005@)
+set(CMAKE_USING_VC_FREE_TOOLS @CMAKE_USING_VC_FREE_TOOLS@)
+set(CMAKE_CL_64 @CMAKE_CL_64@)
+set(MSVC60 @MSVC60@)
+set(MSVC70 @MSVC70@)
+set(MSVC71 @MSVC71@)
+set(MSVC80 @MSVC80@)
+set(MSVC90 @MSVC90@)
+set(MSVC10 @MSVC10@)
+set(MSVC_IDE @MSVC_IDE@)
+set(MSVC_VERSION @MSVC_VERSION@)
+set(WIN32 1)
diff --git a/Modules/Platform/Windows-df.cmake b/Modules/Platform/Windows-df.cmake
index f5046bf357..dff58c5755 100644
--- a/Modules/Platform/Windows-df.cmake
+++ b/Modules/Platform/Windows-df.cmake
@@ -1,70 +1,70 @@
# compiler support for fortran CVF compiler on windows
-SET(CMAKE_WINDOWS_OBJECT_PATH 1)
-SET(CMAKE_LIBRARY_PATH_FLAG "-LIBPATH:")
-SET(CMAKE_LINK_LIBRARY_FLAG "")
-SET(WIN32 1)
-IF(CMAKE_VERBOSE_MAKEFILE)
- SET(CMAKE_CL_NOLOGO)
-ELSE(CMAKE_VERBOSE_MAKEFILE)
- SET(CMAKE_CL_NOLOGO "/nologo")
-ENDIF(CMAKE_VERBOSE_MAKEFILE)
+set(CMAKE_WINDOWS_OBJECT_PATH 1)
+set(CMAKE_LIBRARY_PATH_FLAG "-LIBPATH:")
+set(CMAKE_LINK_LIBRARY_FLAG "")
+set(WIN32 1)
+if(CMAKE_VERBOSE_MAKEFILE)
+ set(CMAKE_CL_NOLOGO)
+else(CMAKE_VERBOSE_MAKEFILE)
+ set(CMAKE_CL_NOLOGO "/nologo")
+endif(CMAKE_VERBOSE_MAKEFILE)
-SET(CMAKE_Fortran_MODDIR_FLAG "-module:")
+set(CMAKE_Fortran_MODDIR_FLAG "-module:")
-SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY
+set(CMAKE_Fortran_CREATE_SHARED_LIBRARY
"link ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out:<TARGET> /dll <LINK_FLAGS> <OBJECTS> <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
-SET(CMAKE_Fortran_CREATE_SHARED_MODULE ${CMAKE_Fortran_CREATE_SHARED_LIBRARY})
+set(CMAKE_Fortran_CREATE_SHARED_MODULE ${CMAKE_Fortran_CREATE_SHARED_LIBRARY})
# create a C++ static library
-SET(CMAKE_Fortran_CREATE_STATIC_LIBRARY "lib ${CMAKE_CL_NOLOGO} <LINK_FLAGS> /out:<TARGET> <OBJECTS> ")
+set(CMAKE_Fortran_CREATE_STATIC_LIBRARY "lib ${CMAKE_CL_NOLOGO} <LINK_FLAGS> /out:<TARGET> <OBJECTS> ")
# compile a C++ file into an object file
-SET(CMAKE_Fortran_COMPILE_OBJECT
+set(CMAKE_Fortran_COMPILE_OBJECT
"<CMAKE_Fortran_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} /object:<OBJECT> <FLAGS> /compile_only <SOURCE>${CMAKE_END_TEMP_FILE}")
-SET(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
+set(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
-SET(CMAKE_Fortran_LINK_EXECUTABLE
+set(CMAKE_Fortran_LINK_EXECUTABLE
"<CMAKE_Fortran_COMPILER> ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} <FLAGS> <OBJECTS> /exe:<TARGET> /link <CMAKE_Fortran_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
-SET(CMAKE_CREATE_WIN32_EXE /winapp)
-SET(CMAKE_CREATE_CONSOLE_EXE )
+set(CMAKE_CREATE_WIN32_EXE /winapp)
+set(CMAKE_CREATE_CONSOLE_EXE )
-IF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
- SET (CMAKE_NO_BUILD_TYPE 1)
-ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
-IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visual Studio 8")
- SET (CMAKE_NO_BUILD_TYPE 1)
- SET (CMAKE_CONFIGURATION_TYPES "Debug;Release;MinSizeRel;RelWithDebInfo" CACHE STRING
+if(CMAKE_GENERATOR MATCHES "Visual Studio 6")
+ set (CMAKE_NO_BUILD_TYPE 1)
+endif(CMAKE_GENERATOR MATCHES "Visual Studio 6")
+if(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visual Studio 8")
+ set (CMAKE_NO_BUILD_TYPE 1)
+ set (CMAKE_CONFIGURATION_TYPES "Debug;Release;MinSizeRel;RelWithDebInfo" CACHE STRING
"Semicolon separated list of supported configuration types, only supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything else will be ignored.")
-ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visual Studio 8")
+endif(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visual Studio 8")
# does the compiler support pdbtype and is it the newer compiler
-SET(CMAKE_BUILD_TYPE_INIT Debug)
-SET (CMAKE_Fortran_FLAGS_INIT "")
-SET (CMAKE_Fortran_FLAGS_DEBUG_INIT "/debug:full")
-SET (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "/Optimize:2 /Define:NDEBUG")
-SET (CMAKE_Fortran_FLAGS_RELEASE_INIT "/Optimize:1 /Define:NDEBUG")
-SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "/Optimize:1 /debug:full /Define:NDEBUG")
+set(CMAKE_BUILD_TYPE_INIT Debug)
+set (CMAKE_Fortran_FLAGS_INIT "")
+set (CMAKE_Fortran_FLAGS_DEBUG_INIT "/debug:full")
+set (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "/Optimize:2 /Define:NDEBUG")
+set (CMAKE_Fortran_FLAGS_RELEASE_INIT "/Optimize:1 /Define:NDEBUG")
+set (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "/Optimize:1 /debug:full /Define:NDEBUG")
-SET (CMAKE_Fortran_STANDARD_LIBRARIES_INIT "user32.lib")
+set (CMAKE_Fortran_STANDARD_LIBRARIES_INIT "user32.lib")
# executable linker flags
-SET (CMAKE_LINK_DEF_FILE_FLAG "/DEF:")
-SET (CMAKE_EXE_LINKER_FLAGS_INIT " /INCREMENTAL:YES")
-IF (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
- SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug /pdbtype:sept")
- SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug /pdbtype:sept")
-ELSE (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
- SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug")
- SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug")
-ENDIF (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
+set (CMAKE_LINK_DEF_FILE_FLAG "/DEF:")
+set (CMAKE_EXE_LINKER_FLAGS_INIT " /INCREMENTAL:YES")
+if (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
+ set (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug /pdbtype:sept")
+ set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug /pdbtype:sept")
+else (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
+ set (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug")
+ set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug")
+endif (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
-SET (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT})
-SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
-SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
-SET (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT})
-SET (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT})
-SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT})
+set (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT})
+set (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
+set (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT})
+set (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT})
+set (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT})
+set (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT})
diff --git a/Modules/Platform/Windows-wcl386.cmake b/Modules/Platform/Windows-wcl386.cmake
index 21c4a6907b..977531d44a 100644
--- a/Modules/Platform/Windows-wcl386.cmake
+++ b/Modules/Platform/Windows-wcl386.cmake
@@ -1,87 +1,87 @@
-SET(CMAKE_LIBRARY_PATH_FLAG "libpath ")
-SET(CMAKE_LINK_LIBRARY_FLAG "library ")
-SET(CMAKE_LINK_LIBRARY_FILE_FLAG "library")
-
-IF(CMAKE_VERBOSE_MAKEFILE)
- SET(CMAKE_WCL_QUIET)
- SET(CMAKE_WLINK_QUIET)
- SET(CMAKE_LIB_QUIET)
-ELSE(CMAKE_VERBOSE_MAKEFILE)
- SET(CMAKE_WCL_QUIET "-zq")
- SET(CMAKE_WLINK_QUIET "option quiet")
- SET(CMAKE_LIB_QUIET "-q")
-ENDIF(CMAKE_VERBOSE_MAKEFILE)
+set(CMAKE_LIBRARY_PATH_FLAG "libpath ")
+set(CMAKE_LINK_LIBRARY_FLAG "library ")
+set(CMAKE_LINK_LIBRARY_FILE_FLAG "library")
+
+if(CMAKE_VERBOSE_MAKEFILE)
+ set(CMAKE_WCL_QUIET)
+ set(CMAKE_WLINK_QUIET)
+ set(CMAKE_LIB_QUIET)
+else(CMAKE_VERBOSE_MAKEFILE)
+ set(CMAKE_WCL_QUIET "-zq")
+ set(CMAKE_WLINK_QUIET "option quiet")
+ set(CMAKE_LIB_QUIET "-q")
+endif(CMAKE_VERBOSE_MAKEFILE)
set(CMAKE_CREATE_WIN32_EXE "system nt_win" )
-SET(CMAKE_CREATE_CONSOLE_EXE "system nt" )
+set(CMAKE_CREATE_CONSOLE_EXE "system nt" )
-SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "debug all" )
-SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT "debug all" )
-SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "debug all" )
-SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT "debug all" )
+set (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "debug all" )
+set (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT "debug all" )
+set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "debug all" )
+set (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT "debug all" )
set(CMAKE_C_COMPILE_OPTIONS_DLL "-bd") # Note: This variable is a ';' separated list
set(CMAKE_SHARED_LIBRARY_C_FLAGS "-bd") # ... while this is a space separated string.
-SET(CMAKE_RC_COMPILER "rc" )
-
-SET(CMAKE_BUILD_TYPE_INIT Debug)
-SET (CMAKE_CXX_FLAGS_INIT "-w=3 -xs")
-SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-br -bm -d2")
-SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-br -bm -os -dNDEBUG")
-SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-br -bm -ot -dNDEBUG")
-SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-br -bm -d2 -ot -dNDEBUG")
-SET (CMAKE_C_FLAGS_INIT "-w=3 ")
-SET (CMAKE_C_FLAGS_DEBUG_INIT "-br -bm -d2 -od")
-SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-br -bm -os -dNDEBUG")
-SET (CMAKE_C_FLAGS_RELEASE_INIT "-br -bm -ot -dNDEBUG")
-SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-br -bm -d2 -ot -dNDEBUG")
-SET (CMAKE_C_STANDARD_LIBRARIES_INIT "library clbrdll.lib library plbrdll.lib library kernel32.lib library user32.lib library gdi32.lib library winspool.lib library comdlg32.lib library advapi32.lib library shell32.lib library ole32.lib library oleaut32.lib library uuid.lib library odbc32.lib library odbccp32.lib")
-SET (CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
-
-SET(CMAKE_C_CREATE_IMPORT_LIBRARY
+set(CMAKE_RC_COMPILER "rc" )
+
+set(CMAKE_BUILD_TYPE_INIT Debug)
+set (CMAKE_CXX_FLAGS_INIT "-w=3 -xs")
+set (CMAKE_CXX_FLAGS_DEBUG_INIT "-br -bm -d2")
+set (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-br -bm -os -dNDEBUG")
+set (CMAKE_CXX_FLAGS_RELEASE_INIT "-br -bm -ot -dNDEBUG")
+set (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-br -bm -d2 -ot -dNDEBUG")
+set (CMAKE_C_FLAGS_INIT "-w=3 ")
+set (CMAKE_C_FLAGS_DEBUG_INIT "-br -bm -d2 -od")
+set (CMAKE_C_FLAGS_MINSIZEREL_INIT "-br -bm -os -dNDEBUG")
+set (CMAKE_C_FLAGS_RELEASE_INIT "-br -bm -ot -dNDEBUG")
+set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-br -bm -d2 -ot -dNDEBUG")
+set (CMAKE_C_STANDARD_LIBRARIES_INIT "library clbrdll.lib library plbrdll.lib library kernel32.lib library user32.lib library gdi32.lib library winspool.lib library comdlg32.lib library advapi32.lib library shell32.lib library ole32.lib library oleaut32.lib library uuid.lib library odbc32.lib library odbccp32.lib")
+set (CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
+
+set(CMAKE_C_CREATE_IMPORT_LIBRARY
"wlib -c -q -n -b <TARGET_IMPLIB> +'<TARGET_UNQUOTED>'")
-SET(CMAKE_CXX_CREATE_IMPORT_LIBRARY ${CMAKE_C_CREATE_IMPORT_LIBRARY})
+set(CMAKE_CXX_CREATE_IMPORT_LIBRARY ${CMAKE_C_CREATE_IMPORT_LIBRARY})
-SET(CMAKE_C_LINK_EXECUTABLE
+set(CMAKE_C_LINK_EXECUTABLE
"wlink ${CMAKE_START_TEMP_FILE} ${CMAKE_WLINK_QUIET} name '<TARGET_UNQUOTED>' <LINK_FLAGS> option caseexact file {<OBJECTS>} <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
-SET(CMAKE_CXX_LINK_EXECUTABLE ${CMAKE_C_LINK_EXECUTABLE})
+set(CMAKE_CXX_LINK_EXECUTABLE ${CMAKE_C_LINK_EXECUTABLE})
# compile a C++ file into an object file
-SET(CMAKE_CXX_COMPILE_OBJECT
+set(CMAKE_CXX_COMPILE_OBJECT
"<CMAKE_CXX_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_WCL_QUIET} <FLAGS> -dWIN32 -d+ <DEFINES> -fo<OBJECT> -c -cc++ <SOURCE>${CMAKE_END_TEMP_FILE}")
# compile a C file into an object file
-SET(CMAKE_C_COMPILE_OBJECT
+set(CMAKE_C_COMPILE_OBJECT
"<CMAKE_C_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_WCL_QUIET} <FLAGS> -dWIN32 -d+ <DEFINES> -fo<OBJECT> -c -cc <SOURCE>${CMAKE_END_TEMP_FILE}")
# preprocess a C source file
-SET(CMAKE_C_CREATE_PREPROCESSED_SOURCE
+set(CMAKE_C_CREATE_PREPROCESSED_SOURCE
"<CMAKE_C_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_WCL_QUIET} <FLAGS> -dWIN32 -d+ <DEFINES> -fo<PREPROCESSED_SOURCE> -pl -cc <SOURCE>${CMAKE_END_TEMP_FILE}")
# preprocess a C++ source file
-SET(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE
+set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE
"<CMAKE_CXX_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_WCL_QUIET} <FLAGS> -dWIN32 -d+ <DEFINES> -fo<PREPROCESSED_SOURCE> -pl -cc++ <SOURCE>${CMAKE_END_TEMP_FILE}")
-SET(CMAKE_CXX_CREATE_SHARED_MODULE
+set(CMAKE_CXX_CREATE_SHARED_MODULE
"wlink ${CMAKE_START_TEMP_FILE} system nt_dll ${CMAKE_WLINK_QUIET} name '<TARGET_UNQUOTED>' <LINK_FLAGS> option caseexact file {<OBJECTS>} <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
-SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
+set(CMAKE_CXX_CREATE_SHARED_LIBRARY
${CMAKE_CXX_CREATE_SHARED_MODULE}
${CMAKE_CXX_CREATE_IMPORT_LIBRARY})
# create a C shared library
-SET(CMAKE_C_CREATE_SHARED_LIBRARY ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
+set(CMAKE_C_CREATE_SHARED_LIBRARY ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
# create a C shared module
-SET(CMAKE_C_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_MODULE})
+set(CMAKE_C_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_MODULE})
# create a C++ static library
-SET(CMAKE_CXX_CREATE_STATIC_LIBRARY "wlib ${CMAKE_LIB_QUIET} -c -n -b '<TARGET_UNQUOTED>' <LINK_FLAGS> <OBJECTS> ")
+set(CMAKE_CXX_CREATE_STATIC_LIBRARY "wlib ${CMAKE_LIB_QUIET} -c -n -b '<TARGET_UNQUOTED>' <LINK_FLAGS> <OBJECTS> ")
# create a C static library
-SET(CMAKE_C_CREATE_STATIC_LIBRARY ${CMAKE_CXX_CREATE_STATIC_LIBRARY})
+set(CMAKE_C_CREATE_STATIC_LIBRARY ${CMAKE_CXX_CREATE_STATIC_LIBRARY})
if(NOT _CMAKE_WATCOM_VERSION)
set(_CMAKE_WATCOM_VERSION 1)
diff --git a/Modules/Platform/Windows-windres.cmake b/Modules/Platform/Windows-windres.cmake
index 8bc1b15e9f..01d6be3dfd 100644
--- a/Modules/Platform/Windows-windres.cmake
+++ b/Modules/Platform/Windows-windres.cmake
@@ -1 +1 @@
-SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <FLAGS> <DEFINES> <SOURCE> <OBJECT>")
+set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <FLAGS> <DEFINES> <SOURCE> <OBJECT>")
diff --git a/Modules/Platform/Windows.cmake b/Modules/Platform/Windows.cmake
index 09cb8d3030..9481baa8e1 100644
--- a/Modules/Platform/Windows.cmake
+++ b/Modules/Platform/Windows.cmake
@@ -1,36 +1,36 @@
-SET(WIN32 1)
+set(WIN32 1)
-SET(CMAKE_STATIC_LIBRARY_PREFIX "")
-SET(CMAKE_STATIC_LIBRARY_SUFFIX ".lib")
-SET(CMAKE_SHARED_LIBRARY_PREFIX "") # lib
-SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll") # .so
-SET(CMAKE_IMPORT_LIBRARY_PREFIX "")
-SET(CMAKE_IMPORT_LIBRARY_SUFFIX ".lib")
-SET(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe
-SET(CMAKE_LINK_LIBRARY_SUFFIX ".lib")
-SET(CMAKE_DL_LIBS "")
+set(CMAKE_STATIC_LIBRARY_PREFIX "")
+set(CMAKE_STATIC_LIBRARY_SUFFIX ".lib")
+set(CMAKE_SHARED_LIBRARY_PREFIX "") # lib
+set(CMAKE_SHARED_LIBRARY_SUFFIX ".dll") # .so
+set(CMAKE_IMPORT_LIBRARY_PREFIX "")
+set(CMAKE_IMPORT_LIBRARY_SUFFIX ".lib")
+set(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe
+set(CMAKE_LINK_LIBRARY_SUFFIX ".lib")
+set(CMAKE_DL_LIBS "")
-SET(CMAKE_FIND_LIBRARY_PREFIXES "")
-SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
+set(CMAKE_FIND_LIBRARY_PREFIXES "")
+set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
# for borland make long command lines are redirected to a file
# with the following syntax, see Windows-bcc32.cmake for use
-IF(CMAKE_GENERATOR MATCHES "Borland")
- SET(CMAKE_START_TEMP_FILE "@&&|\n")
- SET(CMAKE_END_TEMP_FILE "\n|")
-ENDIF(CMAKE_GENERATOR MATCHES "Borland")
+if(CMAKE_GENERATOR MATCHES "Borland")
+ set(CMAKE_START_TEMP_FILE "@&&|\n")
+ set(CMAKE_END_TEMP_FILE "\n|")
+endif(CMAKE_GENERATOR MATCHES "Borland")
# for nmake make long command lines are redirected to a file
# with the following syntax, see Windows-bcc32.cmake for use
-IF(CMAKE_GENERATOR MATCHES "NMake")
- SET(CMAKE_START_TEMP_FILE "@<<\n")
- SET(CMAKE_END_TEMP_FILE "\n<<")
-ENDIF(CMAKE_GENERATOR MATCHES "NMake")
+if(CMAKE_GENERATOR MATCHES "NMake")
+ set(CMAKE_START_TEMP_FILE "@<<\n")
+ set(CMAKE_END_TEMP_FILE "\n<<")
+endif(CMAKE_GENERATOR MATCHES "NMake")
-INCLUDE(Platform/WindowsPaths)
+include(Platform/WindowsPaths)
# uncomment these out to debug nmake and borland makefiles
-#SET(CMAKE_START_TEMP_FILE "")
-#SET(CMAKE_END_TEMP_FILE "")
-#SET(CMAKE_VERBOSE_MAKEFILE 1)
+#set(CMAKE_START_TEMP_FILE "")
+#set(CMAKE_END_TEMP_FILE "")
+#set(CMAKE_VERBOSE_MAKEFILE 1)
diff --git a/Modules/Platform/WindowsPaths.cmake b/Modules/Platform/WindowsPaths.cmake
index c7b15b3423..bd31da021a 100644
--- a/Modules/Platform/WindowsPaths.cmake
+++ b/Modules/Platform/WindowsPaths.cmake
@@ -17,10 +17,10 @@
# "CMakeSystemSpecificInformation.cmake" already included it.
# The extra inclusion is a work-around documented next to the include()
# call, so this can be removed when the work-around is removed.
-IF(__WINDOWS_PATHS_INCLUDED)
- RETURN()
-ENDIF()
-SET(__WINDOWS_PATHS_INCLUDED 1)
+if(__WINDOWS_PATHS_INCLUDED)
+ return()
+endif()
+set(__WINDOWS_PATHS_INCLUDED 1)
# Add the program-files folder(s) to the list of installation
# prefixes.
@@ -42,39 +42,39 @@ SET(__WINDOWS_PATHS_INCLUDED 1)
# ENV{ProgramFiles(x86)} = <not set>
# ENV{ProgramFiles} = [C:\Program Files (x86)]
# ENV{ProgramW6432} = [C:\Program Files]
-IF(DEFINED "ENV{ProgramW6432}")
+if(DEFINED "ENV{ProgramW6432}")
# 32-bit binary on 64-bit windows.
# The 64-bit program files are in ProgramW6432.
- LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{ProgramW6432}")
+ list(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{ProgramW6432}")
# The 32-bit program files are in ProgramFiles.
- IF(DEFINED "ENV{ProgramFiles}")
- LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{ProgramFiles}")
- ENDIF()
-ELSE()
+ if(DEFINED "ENV{ProgramFiles}")
+ list(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{ProgramFiles}")
+ endif()
+else()
# 64-bit binary, or 32-bit binary on 32-bit windows.
- IF(DEFINED "ENV{ProgramFiles}")
- LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{ProgramFiles}")
- ENDIF()
- IF(DEFINED "ENV{ProgramFiles(x86)}")
+ if(DEFINED "ENV{ProgramFiles}")
+ list(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{ProgramFiles}")
+ endif()
+ if(DEFINED "ENV{ProgramFiles(x86)}")
# 64-bit binary. 32-bit program files are in ProgramFiles(x86).
- LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{ProgramFiles(x86)}")
- ELSEIF(DEFINED "ENV{SystemDrive}")
+ list(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{ProgramFiles(x86)}")
+ elseif(DEFINED "ENV{SystemDrive}")
# Guess the 32-bit program files location.
- IF(EXISTS "$ENV{SystemDrive}/Program Files (x86)")
- LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH
+ if(EXISTS "$ENV{SystemDrive}/Program Files (x86)")
+ list(APPEND CMAKE_SYSTEM_PREFIX_PATH
"$ENV{SystemDrive}/Program Files (x86)")
- ENDIF()
- ENDIF()
-ENDIF()
+ endif()
+ endif()
+endif()
# Add the CMake install location.
-GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH)
-GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
-LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH "${_CMAKE_INSTALL_DIR}")
+get_filename_component(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH)
+get_filename_component(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
+list(APPEND CMAKE_SYSTEM_PREFIX_PATH "${_CMAKE_INSTALL_DIR}")
# Add other locations.
-LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH
+list(APPEND CMAKE_SYSTEM_PREFIX_PATH
# Project install destination.
"${CMAKE_INSTALL_PREFIX}"
@@ -82,15 +82,15 @@ LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH
/
)
-LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH
+list(APPEND CMAKE_SYSTEM_INCLUDE_PATH
)
# mingw can also link against dlls which can also be in /bin, so list this too
-LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH
+list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
"${CMAKE_INSTALL_PREFIX}/bin"
"${_CMAKE_INSTALL_DIR}/bin"
/bin
)
-LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH
+list(APPEND CMAKE_SYSTEM_PROGRAM_PATH
)
diff --git a/Modules/Platform/Xenix.cmake b/Modules/Platform/Xenix.cmake
index cf9d17bfda..47852f8e13 100644
--- a/Modules/Platform/Xenix.cmake
+++ b/Modules/Platform/Xenix.cmake
@@ -1,2 +1,2 @@
-INCLUDE(Platform/UnixPaths)
+include(Platform/UnixPaths)
diff --git a/Modules/Platform/cl.cmake b/Modules/Platform/cl.cmake
index c0f014b584..c8dc025637 100644
--- a/Modules/Platform/cl.cmake
+++ b/Modules/Platform/cl.cmake
@@ -1,62 +1,62 @@
-SET(CMAKE_LIBRARY_PATH_FLAG "-LIBPATH:")
-SET(CMAKE_LINK_LIBRARY_FLAG "")
-SET(MSVC 1)
+set(CMAKE_LIBRARY_PATH_FLAG "-LIBPATH:")
+set(CMAKE_LINK_LIBRARY_FLAG "")
+set(MSVC 1)
# hack: if a new cmake (which uses CMAKE__LINKER) runs on an old build tree
# (where link was hardcoded) and where CMAKE_LINKER isn't in the cache
# and still cmake didn't fail in CMakeFindBinUtils.cmake (because it isn't rerun)
# hardcode CMAKE_LINKER here to link, so it behaves as it did before, Alex
-IF(NOT DEFINED CMAKE_LINKER)
- SET(CMAKE_LINKER link)
-ENDIF(NOT DEFINED CMAKE_LINKER)
-
-IF(CMAKE_VERBOSE_MAKEFILE)
- SET(CMAKE_CL_NOLOGO)
-ELSE(CMAKE_VERBOSE_MAKEFILE)
- SET(CMAKE_CL_NOLOGO "/nologo")
-ENDIF(CMAKE_VERBOSE_MAKEFILE)
+if(NOT DEFINED CMAKE_LINKER)
+ set(CMAKE_LINKER link)
+endif(NOT DEFINED CMAKE_LINKER)
+
+if(CMAKE_VERBOSE_MAKEFILE)
+ set(CMAKE_CL_NOLOGO)
+else(CMAKE_VERBOSE_MAKEFILE)
+ set(CMAKE_CL_NOLOGO "/nologo")
+endif(CMAKE_VERBOSE_MAKEFILE)
# create a shared C++ library
-SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
+set(CMAKE_CXX_CREATE_SHARED_LIBRARY
"<CMAKE_LINKER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} /out:<TARGET> /implib:<TARGET_IMPLIB> /pdb:<TARGET_PDB> /dll /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> <LINK_FLAGS> <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
-SET(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
+set(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
# create a C shared library
-SET(CMAKE_C_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY}")
+set(CMAKE_C_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY}")
# create a C shared module
-SET(CMAKE_C_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE}")
+set(CMAKE_C_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE}")
# create a C++ static library
-SET(CMAKE_CXX_CREATE_STATIC_LIBRARY "<CMAKE_LINKER> /lib ${CMAKE_CL_NOLOGO} <LINK_FLAGS> /out:<TARGET> <OBJECTS> ")
+set(CMAKE_CXX_CREATE_STATIC_LIBRARY "<CMAKE_LINKER> /lib ${CMAKE_CL_NOLOGO} <LINK_FLAGS> /out:<TARGET> <OBJECTS> ")
# create a C static library
-SET(CMAKE_C_CREATE_STATIC_LIBRARY "${CMAKE_CXX_CREATE_STATIC_LIBRARY}")
+set(CMAKE_C_CREATE_STATIC_LIBRARY "${CMAKE_CXX_CREATE_STATIC_LIBRARY}")
# compile a C++ file into an object file
-SET(CMAKE_CXX_COMPILE_OBJECT
+set(CMAKE_CXX_COMPILE_OBJECT
"<CMAKE_CXX_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} <FLAGS> <DEFINES> /TP /Fo<OBJECT> /Fd<TARGET_PDB> -c <SOURCE>${CMAKE_END_TEMP_FILE}")
# compile a C file into an object file
-SET(CMAKE_C_COMPILE_OBJECT
+set(CMAKE_C_COMPILE_OBJECT
"<CMAKE_C_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} <FLAGS> <DEFINES> /Fo<OBJECT> /Fd<TARGET_PDB> -c <SOURCE>${CMAKE_END_TEMP_FILE}")
-SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
-SET(CMAKE_C_LINK_EXECUTABLE
+set(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
+set(CMAKE_C_LINK_EXECUTABLE
"<CMAKE_C_COMPILER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} <FLAGS> /Fe<TARGET> /Fd<TARGET_PDB> -link /implib:<TARGET_IMPLIB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
-SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1)
-SET(CMAKE_CXX_LINK_EXECUTABLE
+set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1)
+set(CMAKE_CXX_LINK_EXECUTABLE
"<CMAKE_CXX_COMPILER> ${CMAKE_CL_NOLOGO} <OBJECTS> ${CMAKE_START_TEMP_FILE} <FLAGS> /Fe<TARGET> /Fd<TARGET_PDB> -link /implib:<TARGET_IMPLIB> /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>${CMAKE_END_TEMP_FILE}")
-SET(CMAKE_C_CREATE_PREPROCESSED_SOURCE
+set(CMAKE_C_CREATE_PREPROCESSED_SOURCE
"<CMAKE_C_COMPILER> > <PREPROCESSED_SOURCE> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} <FLAGS> <DEFINES> -E <SOURCE>${CMAKE_END_TEMP_FILE}")
-SET(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE
+set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE
"<CMAKE_CXX_COMPILER> > <PREPROCESSED_SOURCE> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} <FLAGS> <DEFINES> /TP -E <SOURCE>${CMAKE_END_TEMP_FILE}")
-SET(CMAKE_C_CREATE_ASSEMBLY_SOURCE
+set(CMAKE_C_CREATE_ASSEMBLY_SOURCE
"<CMAKE_C_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} <FLAGS> /FAs /FoNUL /Fa<ASSEMBLY_SOURCE> /c <SOURCE>${CMAKE_END_TEMP_FILE}")
-SET(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE
+set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE
"<CMAKE_CXX_COMPILER> ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} <FLAGS> /TP /FAs /FoNUL /Fa<ASSEMBLY_SOURCE> /c <SOURCE>${CMAKE_END_TEMP_FILE}")
diff --git a/Modules/Platform/eCos.cmake b/Modules/Platform/eCos.cmake
index b437c1a9b7..c839b0ebbb 100644
--- a/Modules/Platform/eCos.cmake
+++ b/Modules/Platform/eCos.cmake
@@ -1,65 +1,65 @@
# support for eCos http://ecos.sourceware.org
# Guard against multiple inclusion, which e.g. leads to multiple calls to add_definition() #12987
-IF(__ECOS_CMAKE_INCLUDED)
- RETURN()
-ENDIF()
-SET(__ECOS_CMAKE_INCLUDED TRUE)
+if(__ECOS_CMAKE_INCLUDED)
+ return()
+endif()
+set(__ECOS_CMAKE_INCLUDED TRUE)
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "") # -shared
-SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath
-SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
+set(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "") # -shared
+set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath
+set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
-SET(CMAKE_LINK_LIBRARY_SUFFIX "")
-SET(CMAKE_STATIC_LIBRARY_PREFIX "lib")
-SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
-SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
-SET(CMAKE_SHARED_LIBRARY_SUFFIX ".a") # .a
-SET(CMAKE_EXECUTABLE_SUFFIX ".elf") # same suffix as if built using UseEcos.cmake
-SET(CMAKE_DL_LIBS "" )
+set(CMAKE_LINK_LIBRARY_SUFFIX "")
+set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
+set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
+set(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
+set(CMAKE_SHARED_LIBRARY_SUFFIX ".a") # .a
+set(CMAKE_EXECUTABLE_SUFFIX ".elf") # same suffix as if built using UseEcos.cmake
+set(CMAKE_DL_LIBS "" )
-SET(CMAKE_FIND_LIBRARY_PREFIXES "lib")
-SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+set(CMAKE_FIND_LIBRARY_PREFIXES "lib")
+set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
-INCLUDE(Platform/UnixPaths)
+include(Platform/UnixPaths)
# eCos can be built only with gcc
-GET_PROPERTY(_IN_TC GLOBAL PROPERTY IN_TRY_COMPILE)
-IF(CMAKE_C_COMPILER AND NOT "${CMAKE_C_COMPILER_ID}" MATCHES "GNU" AND NOT _IN_TC)
- MESSAGE(FATAL_ERROR "GNU gcc is required for eCos")
-ENDIF(CMAKE_C_COMPILER AND NOT "${CMAKE_C_COMPILER_ID}" MATCHES "GNU" AND NOT _IN_TC)
-IF(CMAKE_CXX_COMPILER AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" AND NOT _IN_TC)
- MESSAGE(FATAL_ERROR "GNU g++ is required for eCos")
-ENDIF(CMAKE_CXX_COMPILER AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" AND NOT _IN_TC)
+get_property(_IN_TC GLOBAL PROPERTY IN_TRY_COMPILE)
+if(CMAKE_C_COMPILER AND NOT "${CMAKE_C_COMPILER_ID}" MATCHES "GNU" AND NOT _IN_TC)
+ message(FATAL_ERROR "GNU gcc is required for eCos")
+endif(CMAKE_C_COMPILER AND NOT "${CMAKE_C_COMPILER_ID}" MATCHES "GNU" AND NOT _IN_TC)
+if(CMAKE_CXX_COMPILER AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" AND NOT _IN_TC)
+ message(FATAL_ERROR "GNU g++ is required for eCos")
+endif(CMAKE_CXX_COMPILER AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" AND NOT _IN_TC)
# find eCos system files
-FIND_PATH(ECOS_SYSTEM_CONFIG_HEADER_PATH NAMES pkgconf/system.h)
-FIND_LIBRARY(ECOS_SYSTEM_TARGET_LIBRARY NAMES libtarget.a)
+find_path(ECOS_SYSTEM_CONFIG_HEADER_PATH NAMES pkgconf/system.h)
+find_library(ECOS_SYSTEM_TARGET_LIBRARY NAMES libtarget.a)
-IF(NOT ECOS_SYSTEM_CONFIG_HEADER_PATH)
- MESSAGE(FATAL_ERROR "Could not find eCos pkgconf/system.h. Build eCos first and set up CMAKE_FIND_ROOT_PATH correctly.")
-ENDIF(NOT ECOS_SYSTEM_CONFIG_HEADER_PATH)
+if(NOT ECOS_SYSTEM_CONFIG_HEADER_PATH)
+ message(FATAL_ERROR "Could not find eCos pkgconf/system.h. Build eCos first and set up CMAKE_FIND_ROOT_PATH correctly.")
+endif(NOT ECOS_SYSTEM_CONFIG_HEADER_PATH)
-IF(NOT ECOS_SYSTEM_TARGET_LIBRARY)
- MESSAGE(FATAL_ERROR "Could not find eCos \"libtarget.a\". Build eCos first and set up CMAKE_FIND_ROOT_PATH correctly.")
-ENDIF(NOT ECOS_SYSTEM_TARGET_LIBRARY)
+if(NOT ECOS_SYSTEM_TARGET_LIBRARY)
+ message(FATAL_ERROR "Could not find eCos \"libtarget.a\". Build eCos first and set up CMAKE_FIND_ROOT_PATH correctly.")
+endif(NOT ECOS_SYSTEM_TARGET_LIBRARY)
-GET_FILENAME_COMPONENT(ECOS_LIBTARGET_DIRECTORY "${ECOS_SYSTEM_TARGET_LIBRARY}" PATH)
-INCLUDE_DIRECTORIES(${ECOS_SYSTEM_CONFIG_HEADER_PATH})
-ADD_DEFINITIONS(-D__ECOS__=1 -D__ECOS=1)
+get_filename_component(ECOS_LIBTARGET_DIRECTORY "${ECOS_SYSTEM_TARGET_LIBRARY}" PATH)
+include_directories(${ECOS_SYSTEM_CONFIG_HEADER_PATH})
+add_definitions(-D__ECOS__=1 -D__ECOS=1)
# special link commands for eCos executables
-SET(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> -nostdlib -nostartfiles -L${ECOS_LIBTARGET_DIRECTORY} -Ttarget.ld <LINK_LIBRARIES>")
-SET(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> -nostdlib -nostartfiles -L${ECOS_LIBTARGET_DIRECTORY} -Ttarget.ld <LINK_LIBRARIES>")
+set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> -nostdlib -nostartfiles -L${ECOS_LIBTARGET_DIRECTORY} -Ttarget.ld <LINK_LIBRARIES>")
+set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> -nostdlib -nostartfiles -L${ECOS_LIBTARGET_DIRECTORY} -Ttarget.ld <LINK_LIBRARIES>")
# eCos doesn't support shared libs
-SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
+set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
-SET(CMAKE_CXX_LINK_SHARED_LIBRARY )
-SET(CMAKE_CXX_LINK_MODULE_LIBRARY )
-SET(CMAKE_C_LINK_SHARED_LIBRARY )
-SET(CMAKE_C_LINK_MODULE_LIBRARY )
+set(CMAKE_CXX_LINK_SHARED_LIBRARY )
+set(CMAKE_CXX_LINK_MODULE_LIBRARY )
+set(CMAKE_C_LINK_SHARED_LIBRARY )
+set(CMAKE_C_LINK_MODULE_LIBRARY )
diff --git a/Modules/Platform/gas.cmake b/Modules/Platform/gas.cmake
index b9d2a65821..6ac3b559fc 100644
--- a/Modules/Platform/gas.cmake
+++ b/Modules/Platform/gas.cmake
@@ -1,19 +1,19 @@
-IF(UNIX)
- SET(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .o)
-ELSE(UNIX)
- SET(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .obj)
-ENDIF(UNIX)
+if(UNIX)
+ set(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .o)
+else(UNIX)
+ set(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .obj)
+endif(UNIX)
-SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> -o <OBJECT> <SOURCE>")
+set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> -o <OBJECT> <SOURCE>")
-SET(CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY
+set(CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY
"<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS> "
"<CMAKE_RANLIB> <TARGET> ")
-SET(CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE
+set(CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE
"<CMAKE_LINKER> <FLAGS> <CMAKE_ASM${ASM_DIALECT}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
# to be done
-SET(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
-SET(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE)
+set(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY)
+set(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE)
diff --git a/Modules/Platform/kFreeBSD.cmake b/Modules/Platform/kFreeBSD.cmake
index c1295fb0d3..c1db2594d4 100644
--- a/Modules/Platform/kFreeBSD.cmake
+++ b/Modules/Platform/kFreeBSD.cmake
@@ -1,4 +1,4 @@
# kFreeBSD looks just like Linux.
-INCLUDE(Platform/Linux)
+include(Platform/Linux)
-SET(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-kfreebsd-gnu[a-z0-9_]*")
+set(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-kfreebsd-gnu[a-z0-9_]*")
diff --git a/Modules/Platform/syllable.cmake b/Modules/Platform/syllable.cmake
index 2d11d08b39..50c695f66c 100644
--- a/Modules/Platform/syllable.cmake
+++ b/Modules/Platform/syllable.cmake
@@ -9,25 +9,25 @@
# @bindir@/. and @bindir@/../lib are in DLL_PATH
-SET(CMAKE_DL_LIBS "dl")
-SET(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC")
-SET(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE")
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
-SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
-SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
-#SET(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
+set(CMAKE_DL_LIBS "dl")
+set(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC")
+set(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE")
+set(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
+set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
+set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
+#set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
# Initialize C link type selection flags. These flags are used when
# building a shared library, shared module, or executable that links
# to other libraries to select whether to use the static or shared
# versions of the libraries.
-FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE)
- SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic")
- SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
-ENDFOREACH(type)
+foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
+ set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic")
+ set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
+endforeach(type)
-INCLUDE(Platform/UnixPaths)
+include(Platform/UnixPaths)
# these are Syllable specific:
-LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH /usr/indexes)
+list(APPEND CMAKE_SYSTEM_PREFIX_PATH /usr/indexes)
diff --git a/Modules/Qt4ConfigDependentSettings.cmake b/Modules/Qt4ConfigDependentSettings.cmake
index 665d2747e5..2a7a1ce7d7 100644
--- a/Modules/Qt4ConfigDependentSettings.cmake
+++ b/Modules/Qt4ConfigDependentSettings.cmake
@@ -26,270 +26,270 @@
# if a user needs the dependencies, and they couldn't be found, they can set
# the variables themselves.
-SET(QT_QTGUI_LIB_DEPENDENCIES "")
-SET(QT_QTCORE_LIB_DEPENDENCIES "")
-SET(QT_QTNETWORK_LIB_DEPENDENCIES "")
-SET(QT_QTOPENGL_LIB_DEPENDENCIES "")
-SET(QT_QTDBUS_LIB_DEPENDENCIES "")
-SET(QT_QTHELP_LIB_DEPENDENCIES ${QT_QTCLUCENE_LIBRARY})
+set(QT_QTGUI_LIB_DEPENDENCIES "")
+set(QT_QTCORE_LIB_DEPENDENCIES "")
+set(QT_QTNETWORK_LIB_DEPENDENCIES "")
+set(QT_QTOPENGL_LIB_DEPENDENCIES "")
+set(QT_QTDBUS_LIB_DEPENDENCIES "")
+set(QT_QTHELP_LIB_DEPENDENCIES ${QT_QTCLUCENE_LIBRARY})
-IF(Q_WS_WIN)
+if(Q_WS_WIN)
# On Windows, qconfig.pri has "shared" for shared library builds
- IF(NOT QT_CONFIG MATCHES "shared")
- SET(QT_IS_STATIC 1)
- ENDIF(NOT QT_CONFIG MATCHES "shared")
-ELSE(Q_WS_WIN)
+ if(NOT QT_CONFIG MATCHES "shared")
+ set(QT_IS_STATIC 1)
+ endif(NOT QT_CONFIG MATCHES "shared")
+else(Q_WS_WIN)
# On other platforms, check file extension to know if its static
- IF(QT_QTCORE_LIBRARY_RELEASE)
- GET_FILENAME_COMPONENT(qtcore_lib_ext "${QT_QTCORE_LIBRARY_RELEASE}" EXT)
- IF("${qtcore_lib_ext}" STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}")
- SET(QT_IS_STATIC 1)
- ENDIF("${qtcore_lib_ext}" STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}")
- ENDIF(QT_QTCORE_LIBRARY_RELEASE)
- IF(QT_QTCORE_LIBRARY_DEBUG)
- GET_FILENAME_COMPONENT(qtcore_lib_ext "${QT_QTCORE_LIBRARY_DEBUG}" EXT)
- IF(${qtcore_lib_ext} STREQUAL ${CMAKE_STATIC_LIBRARY_SUFFIX})
- SET(QT_IS_STATIC 1)
- ENDIF(${qtcore_lib_ext} STREQUAL ${CMAKE_STATIC_LIBRARY_SUFFIX})
- ENDIF(QT_QTCORE_LIBRARY_DEBUG)
-ENDIF(Q_WS_WIN)
+ if(QT_QTCORE_LIBRARY_RELEASE)
+ get_filename_component(qtcore_lib_ext "${QT_QTCORE_LIBRARY_RELEASE}" EXT)
+ if("${qtcore_lib_ext}" STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}")
+ set(QT_IS_STATIC 1)
+ endif("${qtcore_lib_ext}" STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}")
+ endif(QT_QTCORE_LIBRARY_RELEASE)
+ if(QT_QTCORE_LIBRARY_DEBUG)
+ get_filename_component(qtcore_lib_ext "${QT_QTCORE_LIBRARY_DEBUG}" EXT)
+ if(${qtcore_lib_ext} STREQUAL ${CMAKE_STATIC_LIBRARY_SUFFIX})
+ set(QT_IS_STATIC 1)
+ endif(${qtcore_lib_ext} STREQUAL ${CMAKE_STATIC_LIBRARY_SUFFIX})
+ endif(QT_QTCORE_LIBRARY_DEBUG)
+endif(Q_WS_WIN)
# build using shared Qt needs -DQT_DLL on Windows
-IF(Q_WS_WIN AND NOT QT_IS_STATIC)
- SET(QT_DEFINITIONS ${QT_DEFINITIONS} -DQT_DLL)
-ENDIF(Q_WS_WIN AND NOT QT_IS_STATIC)
+if(Q_WS_WIN AND NOT QT_IS_STATIC)
+ set(QT_DEFINITIONS ${QT_DEFINITIONS} -DQT_DLL)
+endif(Q_WS_WIN AND NOT QT_IS_STATIC)
-IF(NOT QT_IS_STATIC)
- RETURN()
-ENDIF(NOT QT_IS_STATIC)
+if(NOT QT_IS_STATIC)
+ return()
+endif(NOT QT_IS_STATIC)
# QtOpenGL dependencies
find_package(OpenGL)
-SET (QT_QTOPENGL_LIB_DEPENDENCIES ${OPENGL_glu_LIBRARY} ${OPENGL_gl_LIBRARY})
+set (QT_QTOPENGL_LIB_DEPENDENCIES ${OPENGL_glu_LIBRARY} ${OPENGL_gl_LIBRARY})
## system png
-IF(QT_QCONFIG MATCHES "system-png")
+if(QT_QCONFIG MATCHES "system-png")
find_package(PNG)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${PNG_LIBRARY})
-ENDIF(QT_QCONFIG MATCHES "system-png")
+ set(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${PNG_LIBRARY})
+endif(QT_QCONFIG MATCHES "system-png")
## system jpeg
-IF(QT_QCONFIG MATCHES "system-jpeg")
+if(QT_QCONFIG MATCHES "system-jpeg")
find_package(JPEG)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${JPEG_LIBRARIES})
-ENDIF(QT_QCONFIG MATCHES "system-jpeg")
+ set(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${JPEG_LIBRARIES})
+endif(QT_QCONFIG MATCHES "system-jpeg")
## system tiff
-IF(QT_QCONFIG MATCHES "system-tiff")
+if(QT_QCONFIG MATCHES "system-tiff")
find_package(TIFF)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${TIFF_LIBRARIES})
-ENDIF(QT_QCONFIG MATCHES "system-tiff")
+ set(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${TIFF_LIBRARIES})
+endif(QT_QCONFIG MATCHES "system-tiff")
## system mng
-IF(QT_QCONFIG MATCHES "system-mng")
+if(QT_QCONFIG MATCHES "system-mng")
find_library(MNG_LIBRARY NAMES mng)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${MNG_LIBRARY})
-ENDIF(QT_QCONFIG MATCHES "system-mng")
+ set(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${MNG_LIBRARY})
+endif(QT_QCONFIG MATCHES "system-mng")
# for X11, get X11 library directory
-IF(Q_WS_X11)
- FIND_PACKAGE(X11)
-ENDIF(Q_WS_X11)
+if(Q_WS_X11)
+ find_package(X11)
+endif(Q_WS_X11)
## X11 SM
-IF(QT_QCONFIG MATCHES "x11sm")
- IF(X11_SM_LIB AND X11_ICE_LIB)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_SM_LIB} ${X11_ICE_LIB})
- ENDIF(X11_SM_LIB AND X11_ICE_LIB)
-ENDIF(QT_QCONFIG MATCHES "x11sm")
+if(QT_QCONFIG MATCHES "x11sm")
+ if(X11_SM_LIB AND X11_ICE_LIB)
+ set(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_SM_LIB} ${X11_ICE_LIB})
+ endif(X11_SM_LIB AND X11_ICE_LIB)
+endif(QT_QCONFIG MATCHES "x11sm")
## Xi
-IF(QT_QCONFIG MATCHES "tablet")
- IF(X11_Xi_LIB)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_Xi_LIB})
- ENDIF(X11_Xi_LIB)
-ENDIF(QT_QCONFIG MATCHES "tablet")
+if(QT_QCONFIG MATCHES "tablet")
+ if(X11_Xi_LIB)
+ set(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_Xi_LIB})
+ endif(X11_Xi_LIB)
+endif(QT_QCONFIG MATCHES "tablet")
## Xrender
-IF(QT_QCONFIG MATCHES "xrender")
- IF(X11_Xrender_LIB)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_Xrender_LIB})
- ENDIF(X11_Xrender_LIB)
-ENDIF(QT_QCONFIG MATCHES "xrender")
+if(QT_QCONFIG MATCHES "xrender")
+ if(X11_Xrender_LIB)
+ set(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_Xrender_LIB})
+ endif(X11_Xrender_LIB)
+endif(QT_QCONFIG MATCHES "xrender")
## Xrandr
-IF(QT_QCONFIG MATCHES "xrandr")
- IF(X11_Xrandr_LIB)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_Xrandr_LIB})
- ENDIF(X11_Xrandr_LIB)
-ENDIF(QT_QCONFIG MATCHES "xrandr")
+if(QT_QCONFIG MATCHES "xrandr")
+ if(X11_Xrandr_LIB)
+ set(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_Xrandr_LIB})
+ endif(X11_Xrandr_LIB)
+endif(QT_QCONFIG MATCHES "xrandr")
## Xcursor
-IF(QT_QCONFIG MATCHES "xcursor")
- IF(X11_Xcursor_LIB)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_Xcursor_LIB})
- ENDIF(X11_Xcursor_LIB)
-ENDIF(QT_QCONFIG MATCHES "xcursor")
+if(QT_QCONFIG MATCHES "xcursor")
+ if(X11_Xcursor_LIB)
+ set(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_Xcursor_LIB})
+ endif(X11_Xcursor_LIB)
+endif(QT_QCONFIG MATCHES "xcursor")
## Xinerama
-IF(QT_QCONFIG MATCHES "xinerama")
- IF(X11_Xinerama_LIB)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_Xinerama_LIB})
- ENDIF(X11_Xinerama_LIB)
-ENDIF(QT_QCONFIG MATCHES "xinerama")
+if(QT_QCONFIG MATCHES "xinerama")
+ if(X11_Xinerama_LIB)
+ set(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_Xinerama_LIB})
+ endif(X11_Xinerama_LIB)
+endif(QT_QCONFIG MATCHES "xinerama")
## Xfixes
-IF(QT_QCONFIG MATCHES "xfixes")
- IF(X11_Xfixes_LIB)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_Xfixes_LIB})
- ENDIF(X11_Xfixes_LIB)
-ENDIF(QT_QCONFIG MATCHES "xfixes")
+if(QT_QCONFIG MATCHES "xfixes")
+ if(X11_Xfixes_LIB)
+ set(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_Xfixes_LIB})
+ endif(X11_Xfixes_LIB)
+endif(QT_QCONFIG MATCHES "xfixes")
## fontconfig
-IF(QT_QCONFIG MATCHES "fontconfig")
- FIND_LIBRARY(QT_FONTCONFIG_LIBRARY NAMES fontconfig)
- MARK_AS_ADVANCED(QT_FONTCONFIG_LIBRARY)
- IF(QT_FONTCONFIG_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_FONTCONFIG_LIBRARY})
- ENDIF(QT_FONTCONFIG_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "fontconfig")
+if(QT_QCONFIG MATCHES "fontconfig")
+ find_library(QT_FONTCONFIG_LIBRARY NAMES fontconfig)
+ mark_as_advanced(QT_FONTCONFIG_LIBRARY)
+ if(QT_FONTCONFIG_LIBRARY)
+ set(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_FONTCONFIG_LIBRARY})
+ endif(QT_FONTCONFIG_LIBRARY)
+endif(QT_QCONFIG MATCHES "fontconfig")
## system-freetype
-IF(QT_QCONFIG MATCHES "system-freetype")
+if(QT_QCONFIG MATCHES "system-freetype")
find_package(Freetype)
if(FREETYPE_LIBRARIES)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${FREETYPE_LIBRARIES})
+ set(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${FREETYPE_LIBRARIES})
endif(FREETYPE_LIBRARIES)
-ENDIF(QT_QCONFIG MATCHES "system-freetype")
+endif(QT_QCONFIG MATCHES "system-freetype")
## system-zlib
-IF(QT_QCONFIG MATCHES "system-zlib")
+if(QT_QCONFIG MATCHES "system-zlib")
find_package(ZLIB)
- SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${ZLIB_LIBRARIES})
-ENDIF(QT_QCONFIG MATCHES "system-zlib")
+ set(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${ZLIB_LIBRARIES})
+endif(QT_QCONFIG MATCHES "system-zlib")
## openssl
-IF(NOT Q_WS_WIN)
- SET(_QT_NEED_OPENSSL 0)
- IF(QT_VERSION_MINOR LESS 4 AND QT_QCONFIG MATCHES "openssl")
- SET(_QT_NEED_OPENSSL 1)
- ENDIF(QT_VERSION_MINOR LESS 4 AND QT_QCONFIG MATCHES "openssl")
- IF(QT_VERSION_MINOR GREATER 3 AND QT_QCONFIG MATCHES "openssl-linked")
- SET(_QT_NEED_OPENSSL 1)
- ENDIF(QT_VERSION_MINOR GREATER 3 AND QT_QCONFIG MATCHES "openssl-linked")
- IF(_QT_NEED_OPENSSL)
- FIND_PACKAGE(OpenSSL)
- IF(OPENSSL_LIBRARIES)
- SET(QT_QTNETWORK_LIB_DEPENDENCIES ${QT_QTNETWORK_LIB_DEPENDENCIES} ${OPENSSL_LIBRARIES})
- ENDIF(OPENSSL_LIBRARIES)
- ENDIF(_QT_NEED_OPENSSL)
-ENDIF(NOT Q_WS_WIN)
+if(NOT Q_WS_WIN)
+ set(_QT_NEED_OPENSSL 0)
+ if(QT_VERSION_MINOR LESS 4 AND QT_QCONFIG MATCHES "openssl")
+ set(_QT_NEED_OPENSSL 1)
+ endif(QT_VERSION_MINOR LESS 4 AND QT_QCONFIG MATCHES "openssl")
+ if(QT_VERSION_MINOR GREATER 3 AND QT_QCONFIG MATCHES "openssl-linked")
+ set(_QT_NEED_OPENSSL 1)
+ endif(QT_VERSION_MINOR GREATER 3 AND QT_QCONFIG MATCHES "openssl-linked")
+ if(_QT_NEED_OPENSSL)
+ find_package(OpenSSL)
+ if(OPENSSL_LIBRARIES)
+ set(QT_QTNETWORK_LIB_DEPENDENCIES ${QT_QTNETWORK_LIB_DEPENDENCIES} ${OPENSSL_LIBRARIES})
+ endif(OPENSSL_LIBRARIES)
+ endif(_QT_NEED_OPENSSL)
+endif(NOT Q_WS_WIN)
## dbus
-IF(QT_QCONFIG MATCHES "dbus")
+if(QT_QCONFIG MATCHES "dbus")
- FIND_LIBRARY(QT_DBUS_LIBRARY NAMES dbus-1 )
- IF(QT_DBUS_LIBRARY)
- SET(QT_QTDBUS_LIB_DEPENDENCIES ${QT_QTDBUS_LIB_DEPENDENCIES} ${QT_DBUS_LIBRARY})
- ENDIF(QT_DBUS_LIBRARY)
- MARK_AS_ADVANCED(QT_DBUS_LIBRARY)
+ find_library(QT_DBUS_LIBRARY NAMES dbus-1 )
+ if(QT_DBUS_LIBRARY)
+ set(QT_QTDBUS_LIB_DEPENDENCIES ${QT_QTDBUS_LIB_DEPENDENCIES} ${QT_DBUS_LIBRARY})
+ endif(QT_DBUS_LIBRARY)
+ mark_as_advanced(QT_DBUS_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "dbus")
+endif(QT_QCONFIG MATCHES "dbus")
## glib
-IF(QT_QCONFIG MATCHES "glib")
+if(QT_QCONFIG MATCHES "glib")
# Qt 4.2.0+ uses glib-2.0
- FIND_LIBRARY(QT_GLIB_LIBRARY NAMES glib-2.0 )
- FIND_LIBRARY(QT_GTHREAD_LIBRARY NAMES gthread-2.0 )
- MARK_AS_ADVANCED(QT_GLIB_LIBRARY)
- MARK_AS_ADVANCED(QT_GTHREAD_LIBRARY)
+ find_library(QT_GLIB_LIBRARY NAMES glib-2.0 )
+ find_library(QT_GTHREAD_LIBRARY NAMES gthread-2.0 )
+ mark_as_advanced(QT_GLIB_LIBRARY)
+ mark_as_advanced(QT_GTHREAD_LIBRARY)
- IF(QT_GLIB_LIBRARY AND QT_GTHREAD_LIBRARY)
- SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES}
+ if(QT_GLIB_LIBRARY AND QT_GTHREAD_LIBRARY)
+ set(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES}
${QT_GTHREAD_LIBRARY} ${QT_GLIB_LIBRARY})
- ENDIF(QT_GLIB_LIBRARY AND QT_GTHREAD_LIBRARY)
+ endif(QT_GLIB_LIBRARY AND QT_GTHREAD_LIBRARY)
# Qt 4.5+ also links to gobject-2.0
- IF(QT_VERSION_MINOR GREATER 4)
- FIND_LIBRARY(QT_GOBJECT_LIBRARY NAMES gobject-2.0 PATHS ${_glib_query_output} )
- MARK_AS_ADVANCED(QT_GOBJECT_LIBRARY)
+ if(QT_VERSION_MINOR GREATER 4)
+ find_library(QT_GOBJECT_LIBRARY NAMES gobject-2.0 PATHS ${_glib_query_output} )
+ mark_as_advanced(QT_GOBJECT_LIBRARY)
- IF(QT_GOBJECT_LIBRARY)
- SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES}
+ if(QT_GOBJECT_LIBRARY)
+ set(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES}
${QT_GOBJECT_LIBRARY})
- ENDIF(QT_GOBJECT_LIBRARY)
- ENDIF(QT_VERSION_MINOR GREATER 4)
+ endif(QT_GOBJECT_LIBRARY)
+ endif(QT_VERSION_MINOR GREATER 4)
-ENDIF(QT_QCONFIG MATCHES "glib")
+endif(QT_QCONFIG MATCHES "glib")
## clock-monotonic, just see if we need to link with rt
-IF(QT_QCONFIG MATCHES "clock-monotonic")
- SET(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES})
- SET(CMAKE_REQUIRED_LIBRARIES rt)
+if(QT_QCONFIG MATCHES "clock-monotonic")
+ set(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES})
+ set(CMAKE_REQUIRED_LIBRARIES rt)
CHECK_SYMBOL_EXISTS(_POSIX_TIMERS "unistd.h;time.h" QT_POSIX_TIMERS)
- SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAVE})
- IF(QT_POSIX_TIMERS)
- FIND_LIBRARY(QT_RT_LIBRARY NAMES rt)
- MARK_AS_ADVANCED(QT_RT_LIBRARY)
- IF(QT_RT_LIBRARY)
- SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_RT_LIBRARY})
- ENDIF(QT_RT_LIBRARY)
- ENDIF(QT_POSIX_TIMERS)
-ENDIF(QT_QCONFIG MATCHES "clock-monotonic")
-
-
-IF(Q_WS_X11)
+ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAVE})
+ if(QT_POSIX_TIMERS)
+ find_library(QT_RT_LIBRARY NAMES rt)
+ mark_as_advanced(QT_RT_LIBRARY)
+ if(QT_RT_LIBRARY)
+ set(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_RT_LIBRARY})
+ endif(QT_RT_LIBRARY)
+ endif(QT_POSIX_TIMERS)
+endif(QT_QCONFIG MATCHES "clock-monotonic")
+
+
+if(Q_WS_X11)
# X11 libraries Qt always depends on
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_Xext_LIB} ${X11_X11_LIB})
+ set(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_Xext_LIB} ${X11_X11_LIB})
set(CMAKE_THREAD_PREFER_PTHREADS 1)
find_package(Threads)
if(CMAKE_USE_PTHREADS_INIT)
- SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${CMAKE_THREAD_LIBS_INIT})
+ set(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${CMAKE_THREAD_LIBS_INIT})
endif(CMAKE_USE_PTHREADS_INIT)
- SET (QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${CMAKE_DL_LIBS})
+ set (QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${CMAKE_DL_LIBS})
-ENDIF(Q_WS_X11)
+endif(Q_WS_X11)
-IF(Q_WS_WIN)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} imm32 winmm)
- SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ws2_32)
-ENDIF(Q_WS_WIN)
+if(Q_WS_WIN)
+ set(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} imm32 winmm)
+ set(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ws2_32)
+endif(Q_WS_WIN)
-IF(Q_WS_MAC)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} "-framework Carbon")
+if(Q_WS_MAC)
+ set(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} "-framework Carbon")
# Qt 4.0, 4.1, 4.2 use QuickTime
- IF(QT_VERSION_MINOR LESS 3)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} "-framework QuickTime")
- ENDIF(QT_VERSION_MINOR LESS 3)
+ if(QT_VERSION_MINOR LESS 3)
+ set(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} "-framework QuickTime")
+ endif(QT_VERSION_MINOR LESS 3)
# Qt 4.2+ use AppKit
- IF(QT_VERSION_MINOR GREATER 1)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} "-framework AppKit")
- ENDIF(QT_VERSION_MINOR GREATER 1)
+ if(QT_VERSION_MINOR GREATER 1)
+ set(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} "-framework AppKit")
+ endif(QT_VERSION_MINOR GREATER 1)
- SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} "-framework ApplicationServices")
-ENDIF(Q_WS_MAC)
+ set(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} "-framework ApplicationServices")
+endif(Q_WS_MAC)
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake
index 27a8ee878a..1e19ff292f 100644
--- a/Modules/Qt4Macros.cmake
+++ b/Modules/Qt4Macros.cmake
@@ -21,322 +21,322 @@
######################################
-MACRO (QT4_EXTRACT_OPTIONS _qt4_files _qt4_options)
- SET(${_qt4_files})
- SET(${_qt4_options})
- SET(_QT4_DOING_OPTIONS FALSE)
- FOREACH(_currentArg ${ARGN})
- IF ("${_currentArg}" STREQUAL "OPTIONS")
- SET(_QT4_DOING_OPTIONS TRUE)
- ELSE ("${_currentArg}" STREQUAL "OPTIONS")
- IF(_QT4_DOING_OPTIONS)
- LIST(APPEND ${_qt4_options} "${_currentArg}")
- ELSE(_QT4_DOING_OPTIONS)
- LIST(APPEND ${_qt4_files} "${_currentArg}")
- ENDIF(_QT4_DOING_OPTIONS)
- ENDIF ("${_currentArg}" STREQUAL "OPTIONS")
- ENDFOREACH(_currentArg)
-ENDMACRO (QT4_EXTRACT_OPTIONS)
+macro (QT4_EXTRACT_OPTIONS _qt4_files _qt4_options)
+ set(${_qt4_files})
+ set(${_qt4_options})
+ set(_QT4_DOING_OPTIONS FALSE)
+ foreach(_currentArg ${ARGN})
+ if ("${_currentArg}" STREQUAL "OPTIONS")
+ set(_QT4_DOING_OPTIONS TRUE)
+ else ("${_currentArg}" STREQUAL "OPTIONS")
+ if(_QT4_DOING_OPTIONS)
+ list(APPEND ${_qt4_options} "${_currentArg}")
+ else(_QT4_DOING_OPTIONS)
+ list(APPEND ${_qt4_files} "${_currentArg}")
+ endif(_QT4_DOING_OPTIONS)
+ endif ("${_currentArg}" STREQUAL "OPTIONS")
+ endforeach(_currentArg)
+endmacro (QT4_EXTRACT_OPTIONS)
# macro used to create the names of output files preserving relative dirs
-MACRO (QT4_MAKE_OUTPUT_FILE infile prefix ext outfile )
- STRING(LENGTH ${CMAKE_CURRENT_BINARY_DIR} _binlength)
- STRING(LENGTH ${infile} _infileLength)
- SET(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR})
- IF(_infileLength GREATER _binlength)
- STRING(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile)
- IF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
- FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile})
- ELSE(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
- FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
- ENDIF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
- ELSE(_infileLength GREATER _binlength)
- FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
- ENDIF(_infileLength GREATER _binlength)
- IF(WIN32 AND rel MATCHES "^[a-zA-Z]:") # absolute path
- STRING(REGEX REPLACE "^([a-zA-Z]):(.*)$" "\\1_\\2" rel "${rel}")
- ENDIF(WIN32 AND rel MATCHES "^[a-zA-Z]:")
- SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
- STRING(REPLACE ".." "__" _outfile ${_outfile})
- GET_FILENAME_COMPONENT(outpath ${_outfile} PATH)
- GET_FILENAME_COMPONENT(_outfile ${_outfile} NAME_WE)
- FILE(MAKE_DIRECTORY ${outpath})
- SET(${outfile} ${outpath}/${prefix}${_outfile}.${ext})
-ENDMACRO (QT4_MAKE_OUTPUT_FILE )
-
-
-MACRO (QT4_GET_MOC_FLAGS _moc_flags)
- SET(${_moc_flags})
- GET_DIRECTORY_PROPERTY(_inc_DIRS INCLUDE_DIRECTORIES)
-
- FOREACH(_current ${_inc_DIRS})
- IF("${_current}" MATCHES "\\.framework/?$")
- STRING(REGEX REPLACE "/[^/]+\\.framework" "" framework_path "${_current}")
- SET(${_moc_flags} ${${_moc_flags}} "-F${framework_path}")
- ELSE("${_current}" MATCHES "\\.framework/?$")
- SET(${_moc_flags} ${${_moc_flags}} "-I${_current}")
- ENDIF("${_current}" MATCHES "\\.framework/?$")
- ENDFOREACH(_current ${_inc_DIRS})
-
- GET_DIRECTORY_PROPERTY(_defines COMPILE_DEFINITIONS)
- FOREACH(_current ${_defines})
- SET(${_moc_flags} ${${_moc_flags}} "-D${_current}")
- ENDFOREACH(_current ${_defines})
-
- IF(Q_WS_WIN)
- SET(${_moc_flags} ${${_moc_flags}} -DWIN32)
- ENDIF(Q_WS_WIN)
-
-ENDMACRO(QT4_GET_MOC_FLAGS)
+macro (QT4_MAKE_OUTPUT_FILE infile prefix ext outfile )
+ string(LENGTH ${CMAKE_CURRENT_BINARY_DIR} _binlength)
+ string(LENGTH ${infile} _infileLength)
+ set(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR})
+ if(_infileLength GREATER _binlength)
+ string(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile)
+ if(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
+ file(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile})
+ else(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
+ file(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
+ endif(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
+ else(_infileLength GREATER _binlength)
+ file(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
+ endif(_infileLength GREATER _binlength)
+ if(WIN32 AND rel MATCHES "^[a-zA-Z]:") # absolute path
+ string(REGEX REPLACE "^([a-zA-Z]):(.*)$" "\\1_\\2" rel "${rel}")
+ endif(WIN32 AND rel MATCHES "^[a-zA-Z]:")
+ set(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
+ string(REPLACE ".." "__" _outfile ${_outfile})
+ get_filename_component(outpath ${_outfile} PATH)
+ get_filename_component(_outfile ${_outfile} NAME_WE)
+ file(MAKE_DIRECTORY ${outpath})
+ set(${outfile} ${outpath}/${prefix}${_outfile}.${ext})
+endmacro (QT4_MAKE_OUTPUT_FILE )
+
+
+macro (QT4_GET_MOC_FLAGS _moc_flags)
+ set(${_moc_flags})
+ get_directory_property(_inc_DIRS INCLUDE_DIRECTORIES)
+
+ foreach(_current ${_inc_DIRS})
+ if("${_current}" MATCHES "\\.framework/?$")
+ string(REGEX REPLACE "/[^/]+\\.framework" "" framework_path "${_current}")
+ set(${_moc_flags} ${${_moc_flags}} "-F${framework_path}")
+ else("${_current}" MATCHES "\\.framework/?$")
+ set(${_moc_flags} ${${_moc_flags}} "-I${_current}")
+ endif("${_current}" MATCHES "\\.framework/?$")
+ endforeach(_current ${_inc_DIRS})
+
+ get_directory_property(_defines COMPILE_DEFINITIONS)
+ foreach(_current ${_defines})
+ set(${_moc_flags} ${${_moc_flags}} "-D${_current}")
+ endforeach(_current ${_defines})
+
+ if(Q_WS_WIN)
+ set(${_moc_flags} ${${_moc_flags}} -DWIN32)
+ endif(Q_WS_WIN)
+
+endmacro(QT4_GET_MOC_FLAGS)
# helper macro to set up a moc rule
-MACRO (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options)
+macro (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options)
# For Windows, create a parameters file to work around command line length limit
- IF (WIN32)
+ if (WIN32)
# Pass the parameters in a file. Set the working directory to
# be that containing the parameters file and reference it by
# just the file name. This is necessary because the moc tool on
# MinGW builds does not seem to handle spaces in the path to the
# file given with the @ syntax.
- GET_FILENAME_COMPONENT(_moc_outfile_name "${outfile}" NAME)
- GET_FILENAME_COMPONENT(_moc_outfile_dir "${outfile}" PATH)
- IF(_moc_outfile_dir)
- SET(_moc_working_dir WORKING_DIRECTORY ${_moc_outfile_dir})
- ENDIF(_moc_outfile_dir)
- SET (_moc_parameters_file ${outfile}_parameters)
- SET (_moc_parameters ${moc_flags} ${moc_options} -o "${outfile}" "${infile}")
- STRING (REPLACE ";" "\n" _moc_parameters "${_moc_parameters}")
- FILE (WRITE ${_moc_parameters_file} "${_moc_parameters}")
- ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
+ get_filename_component(_moc_outfile_name "${outfile}" NAME)
+ get_filename_component(_moc_outfile_dir "${outfile}" PATH)
+ if(_moc_outfile_dir)
+ set(_moc_working_dir WORKING_DIRECTORY ${_moc_outfile_dir})
+ endif(_moc_outfile_dir)
+ set (_moc_parameters_file ${outfile}_parameters)
+ set (_moc_parameters ${moc_flags} ${moc_options} -o "${outfile}" "${infile}")
+ string (REPLACE ";" "\n" _moc_parameters "${_moc_parameters}")
+ file (WRITE ${_moc_parameters_file} "${_moc_parameters}")
+ add_custom_command(OUTPUT ${outfile}
COMMAND ${QT_MOC_EXECUTABLE} @${_moc_outfile_name}_parameters
DEPENDS ${infile}
${_moc_working_dir}
VERBATIM)
- ELSE (WIN32)
- ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
+ else (WIN32)
+ add_custom_command(OUTPUT ${outfile}
COMMAND ${QT_MOC_EXECUTABLE}
ARGS ${moc_flags} ${moc_options} -o ${outfile} ${infile}
DEPENDS ${infile} VERBATIM)
- ENDIF (WIN32)
-ENDMACRO (QT4_CREATE_MOC_COMMAND)
+ endif (WIN32)
+endmacro (QT4_CREATE_MOC_COMMAND)
-MACRO (QT4_GENERATE_MOC infile outfile )
+macro (QT4_GENERATE_MOC infile outfile )
# get include dirs and flags
QT4_GET_MOC_FLAGS(moc_flags)
- GET_FILENAME_COMPONENT(abs_infile ${infile} ABSOLUTE)
- SET(_outfile "${outfile}")
- IF(NOT IS_ABSOLUTE "${outfile}")
- SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}")
- ENDIF(NOT IS_ABSOLUTE "${outfile}")
+ get_filename_component(abs_infile ${infile} ABSOLUTE)
+ set(_outfile "${outfile}")
+ if(NOT IS_ABSOLUTE "${outfile}")
+ set(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}")
+ endif(NOT IS_ABSOLUTE "${outfile}")
QT4_CREATE_MOC_COMMAND(${abs_infile} ${_outfile} "${moc_flags}" "")
- SET_SOURCE_FILES_PROPERTIES(${outfile} PROPERTIES SKIP_AUTOMOC TRUE) # dont run automoc on this file
-ENDMACRO (QT4_GENERATE_MOC)
+ set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOMOC TRUE) # dont run automoc on this file
+endmacro (QT4_GENERATE_MOC)
# QT4_WRAP_CPP(outfiles inputfile ... )
-MACRO (QT4_WRAP_CPP outfiles )
+macro (QT4_WRAP_CPP outfiles )
# get include dirs
QT4_GET_MOC_FLAGS(moc_flags)
QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
- FOREACH (it ${moc_files})
- GET_FILENAME_COMPONENT(it ${it} ABSOLUTE)
+ foreach (it ${moc_files})
+ get_filename_component(it ${it} ABSOLUTE)
QT4_MAKE_OUTPUT_FILE(${it} moc_ cxx outfile)
QT4_CREATE_MOC_COMMAND(${it} ${outfile} "${moc_flags}" "${moc_options}")
- SET(${outfiles} ${${outfiles}} ${outfile})
- ENDFOREACH(it)
+ set(${outfiles} ${${outfiles}} ${outfile})
+ endforeach(it)
-ENDMACRO (QT4_WRAP_CPP)
+endmacro (QT4_WRAP_CPP)
# QT4_WRAP_UI(outfiles inputfile ... )
-MACRO (QT4_WRAP_UI outfiles )
+macro (QT4_WRAP_UI outfiles )
QT4_EXTRACT_OPTIONS(ui_files ui_options ${ARGN})
- FOREACH (it ${ui_files})
- GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
- GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
- SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h)
- ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
+ foreach (it ${ui_files})
+ get_filename_component(outfile ${it} NAME_WE)
+ get_filename_component(infile ${it} ABSOLUTE)
+ set(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h)
+ add_custom_command(OUTPUT ${outfile}
COMMAND ${QT_UIC_EXECUTABLE}
ARGS ${ui_options} -o ${outfile} ${infile}
MAIN_DEPENDENCY ${infile} VERBATIM)
- SET(${outfiles} ${${outfiles}} ${outfile})
- ENDFOREACH (it)
+ set(${outfiles} ${${outfiles}} ${outfile})
+ endforeach (it)
-ENDMACRO (QT4_WRAP_UI)
+endmacro (QT4_WRAP_UI)
# QT4_ADD_RESOURCES(outfiles inputfile ... )
-MACRO (QT4_ADD_RESOURCES outfiles )
+macro (QT4_ADD_RESOURCES outfiles )
QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN})
- FOREACH (it ${rcc_files})
- GET_FILENAME_COMPONENT(outfilename ${it} NAME_WE)
- GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
- GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
- SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx)
+ foreach (it ${rcc_files})
+ get_filename_component(outfilename ${it} NAME_WE)
+ get_filename_component(infile ${it} ABSOLUTE)
+ get_filename_component(rc_path ${infile} PATH)
+ set(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx)
- SET(_RC_DEPENDS)
- IF(EXISTS "${infile}")
+ set(_RC_DEPENDS)
+ if(EXISTS "${infile}")
# parse file for dependencies
# all files are absolute paths or relative to the location of the qrc file
- FILE(READ "${infile}" _RC_FILE_CONTENTS)
- STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
- FOREACH(_RC_FILE ${_RC_FILES})
- STRING(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
- IF(NOT IS_ABSOLUTE "${_RC_FILE}")
- SET(_RC_FILE "${rc_path}/${_RC_FILE}")
- ENDIF(NOT IS_ABSOLUTE "${_RC_FILE}")
- SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
- ENDFOREACH(_RC_FILE)
+ file(READ "${infile}" _RC_FILE_CONTENTS)
+ string(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
+ foreach(_RC_FILE ${_RC_FILES})
+ string(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
+ if(NOT IS_ABSOLUTE "${_RC_FILE}")
+ set(_RC_FILE "${rc_path}/${_RC_FILE}")
+ endif(NOT IS_ABSOLUTE "${_RC_FILE}")
+ set(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
+ endforeach(_RC_FILE)
# Since this cmake macro is doing the dependency scanning for these files,
# let's make a configured file and add it as a dependency so cmake is run
# again when dependencies need to be recomputed.
QT4_MAKE_OUTPUT_FILE("${infile}" "" "qrc.depends" out_depends)
- CONFIGURE_FILE("${infile}" "${out_depends}" COPY_ONLY)
- ELSE(EXISTS "${infile}")
+ configure_file("${infile}" "${out_depends}" COPY_ONLY)
+ else(EXISTS "${infile}")
# The .qrc file does not exist (yet). Let's add a dependency and hope
# that it will be generated later
- SET(out_depends)
- ENDIF(EXISTS "${infile}")
+ set(out_depends)
+ endif(EXISTS "${infile}")
- ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
+ add_custom_command(OUTPUT ${outfile}
COMMAND ${QT_RCC_EXECUTABLE}
ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
MAIN_DEPENDENCY ${infile}
DEPENDS ${_RC_DEPENDS} "${out_depends}" VERBATIM)
- SET(${outfiles} ${${outfiles}} ${outfile})
- ENDFOREACH (it)
+ set(${outfiles} ${${outfiles}} ${outfile})
+ endforeach (it)
-ENDMACRO (QT4_ADD_RESOURCES)
+endmacro (QT4_ADD_RESOURCES)
-MACRO(QT4_ADD_DBUS_INTERFACE _sources _interface _basename)
- GET_FILENAME_COMPONENT(_infile ${_interface} ABSOLUTE)
- SET(_header "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h")
- SET(_impl "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp")
- SET(_moc "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc")
+macro(QT4_ADD_DBUS_INTERFACE _sources _interface _basename)
+ get_filename_component(_infile ${_interface} ABSOLUTE)
+ set(_header "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h")
+ set(_impl "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp")
+ set(_moc "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc")
- GET_SOURCE_FILE_PROPERTY(_nonamespace ${_interface} NO_NAMESPACE)
- IF(_nonamespace)
- SET(_params -N -m)
- ELSE(_nonamespace)
- SET(_params -m)
- ENDIF(_nonamespace)
+ get_source_file_property(_nonamespace ${_interface} NO_NAMESPACE)
+ if(_nonamespace)
+ set(_params -N -m)
+ else(_nonamespace)
+ set(_params -m)
+ endif(_nonamespace)
- GET_SOURCE_FILE_PROPERTY(_classname ${_interface} CLASSNAME)
- IF(_classname)
- SET(_params ${_params} -c ${_classname})
- ENDIF(_classname)
+ get_source_file_property(_classname ${_interface} CLASSNAME)
+ if(_classname)
+ set(_params ${_params} -c ${_classname})
+ endif(_classname)
- GET_SOURCE_FILE_PROPERTY(_include ${_interface} INCLUDE)
- IF(_include)
- SET(_params ${_params} -i ${_include})
- ENDIF(_include)
+ get_source_file_property(_include ${_interface} INCLUDE)
+ if(_include)
+ set(_params ${_params} -i ${_include})
+ endif(_include)
- ADD_CUSTOM_COMMAND(OUTPUT "${_impl}" "${_header}"
+ add_custom_command(OUTPUT "${_impl}" "${_header}"
COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} ${_params} -p ${_basename} ${_infile}
DEPENDS ${_infile} VERBATIM)
- SET_SOURCE_FILES_PROPERTIES("${_impl}" PROPERTIES SKIP_AUTOMOC TRUE)
+ set_source_files_properties("${_impl}" PROPERTIES SKIP_AUTOMOC TRUE)
QT4_GENERATE_MOC("${_header}" "${_moc}")
- LIST(APPEND ${_sources} "${_impl}" "${_header}" "${_moc}")
+ list(APPEND ${_sources} "${_impl}" "${_header}" "${_moc}")
MACRO_ADD_FILE_DEPENDENCIES("${_impl}" "${_moc}")
-ENDMACRO(QT4_ADD_DBUS_INTERFACE)
+endmacro(QT4_ADD_DBUS_INTERFACE)
-MACRO(QT4_ADD_DBUS_INTERFACES _sources)
- FOREACH (_current_FILE ${ARGN})
- GET_FILENAME_COMPONENT(_infile ${_current_FILE} ABSOLUTE)
- GET_FILENAME_COMPONENT(_basename ${_current_FILE} NAME)
+macro(QT4_ADD_DBUS_INTERFACES _sources)
+ foreach (_current_FILE ${ARGN})
+ get_filename_component(_infile ${_current_FILE} ABSOLUTE)
+ get_filename_component(_basename ${_current_FILE} NAME)
# get the part before the ".xml" suffix
- STRING(TOLOWER ${_basename} _basename)
- STRING(REGEX REPLACE "(.*\\.)?([^\\.]+)\\.xml" "\\2" _basename ${_basename})
+ string(TOLOWER ${_basename} _basename)
+ string(REGEX REPLACE "(.*\\.)?([^\\.]+)\\.xml" "\\2" _basename ${_basename})
QT4_ADD_DBUS_INTERFACE(${_sources} ${_infile} ${_basename}interface)
- ENDFOREACH (_current_FILE)
-ENDMACRO(QT4_ADD_DBUS_INTERFACES)
+ endforeach (_current_FILE)
+endmacro(QT4_ADD_DBUS_INTERFACES)
-MACRO(QT4_GENERATE_DBUS_INTERFACE _header) # _customName OPTIONS -some -options )
+macro(QT4_GENERATE_DBUS_INTERFACE _header) # _customName OPTIONS -some -options )
QT4_EXTRACT_OPTIONS(_customName _qt4_dbus_options ${ARGN})
- GET_FILENAME_COMPONENT(_in_file ${_header} ABSOLUTE)
- GET_FILENAME_COMPONENT(_basename ${_header} NAME_WE)
+ get_filename_component(_in_file ${_header} ABSOLUTE)
+ get_filename_component(_basename ${_header} NAME_WE)
- IF (_customName)
+ if (_customName)
if (IS_ABSOLUTE ${_customName})
get_filename_component(_containingDir ${_customName} PATH)
if (NOT EXISTS ${_containingDir})
file(MAKE_DIRECTORY "${_containingDir}")
endif()
- SET(_target ${_customName})
+ set(_target ${_customName})
else()
- SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_customName})
+ set(_target ${CMAKE_CURRENT_BINARY_DIR}/${_customName})
endif()
- ELSE (_customName)
- SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.xml)
- ENDIF (_customName)
+ else (_customName)
+ set(_target ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.xml)
+ endif (_customName)
- ADD_CUSTOM_COMMAND(OUTPUT ${_target}
+ add_custom_command(OUTPUT ${_target}
COMMAND ${QT_DBUSCPP2XML_EXECUTABLE} ${_qt4_dbus_options} ${_in_file} -o ${_target}
DEPENDS ${_in_file} VERBATIM
)
-ENDMACRO(QT4_GENERATE_DBUS_INTERFACE)
+endmacro(QT4_GENERATE_DBUS_INTERFACE)
-MACRO(QT4_ADD_DBUS_ADAPTOR _sources _xml_file _include _parentClass) # _optionalBasename _optionalClassName)
- GET_FILENAME_COMPONENT(_infile ${_xml_file} ABSOLUTE)
+macro(QT4_ADD_DBUS_ADAPTOR _sources _xml_file _include _parentClass) # _optionalBasename _optionalClassName)
+ get_filename_component(_infile ${_xml_file} ABSOLUTE)
- SET(_optionalBasename "${ARGV4}")
- IF (_optionalBasename)
- SET(_basename ${_optionalBasename} )
- ELSE (_optionalBasename)
- STRING(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2adaptor" _basename ${_infile})
- STRING(TOLOWER ${_basename} _basename)
- ENDIF (_optionalBasename)
+ set(_optionalBasename "${ARGV4}")
+ if (_optionalBasename)
+ set(_basename ${_optionalBasename} )
+ else (_optionalBasename)
+ string(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2adaptor" _basename ${_infile})
+ string(TOLOWER ${_basename} _basename)
+ endif (_optionalBasename)
- SET(_optionalClassName "${ARGV5}")
- SET(_header "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h")
- SET(_impl "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp")
- SET(_moc "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc")
+ set(_optionalClassName "${ARGV5}")
+ set(_header "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h")
+ set(_impl "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp")
+ set(_moc "${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc")
- IF(_optionalClassName)
- ADD_CUSTOM_COMMAND(OUTPUT "${_impl}" "${_header}"
+ if(_optionalClassName)
+ add_custom_command(OUTPUT "${_impl}" "${_header}"
COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -c ${_optionalClassName} -i ${_include} -l ${_parentClass} ${_infile}
DEPENDS ${_infile} VERBATIM
)
- ELSE(_optionalClassName)
- ADD_CUSTOM_COMMAND(OUTPUT "${_impl}" "${_header}"
+ else(_optionalClassName)
+ add_custom_command(OUTPUT "${_impl}" "${_header}"
COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -i ${_include} -l ${_parentClass} ${_infile}
DEPENDS ${_infile} VERBATIM
)
- ENDIF(_optionalClassName)
+ endif(_optionalClassName)
QT4_GENERATE_MOC("${_header}" "${_moc}")
- SET_SOURCE_FILES_PROPERTIES("${_impl}" PROPERTIES SKIP_AUTOMOC TRUE)
+ set_source_files_properties("${_impl}" PROPERTIES SKIP_AUTOMOC TRUE)
MACRO_ADD_FILE_DEPENDENCIES("${_impl}" "${_moc}")
- LIST(APPEND ${_sources} "${_impl}" "${_header}" "${_moc}")
-ENDMACRO(QT4_ADD_DBUS_ADAPTOR)
+ list(APPEND ${_sources} "${_impl}" "${_header}" "${_moc}")
+endmacro(QT4_ADD_DBUS_ADAPTOR)
-MACRO(QT4_AUTOMOC)
+macro(QT4_AUTOMOC)
QT4_GET_MOC_FLAGS(_moc_INCS)
- SET(_matching_FILES )
- FOREACH (_current_FILE ${ARGN})
+ set(_matching_FILES )
+ foreach (_current_FILE ${ARGN})
- GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE)
+ get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE)
# if "SKIP_AUTOMOC" is set to true, we will not handle this file here.
# This is required to make uic work correctly:
# we need to add generated .cpp files to the sources (to compile them),
@@ -344,98 +344,98 @@ MACRO(QT4_AUTOMOC)
# cmake is run for the very first time on them -> however the .cpp files might
# exist at a later run. at that time we need to skip them, so that we don't add two
# different rules for the same moc file
- GET_SOURCE_FILE_PROPERTY(_skip ${_abs_FILE} SKIP_AUTOMOC)
+ get_source_file_property(_skip ${_abs_FILE} SKIP_AUTOMOC)
- IF ( NOT _skip AND EXISTS ${_abs_FILE} )
+ if ( NOT _skip AND EXISTS ${_abs_FILE} )
- FILE(READ ${_abs_FILE} _contents)
+ file(READ ${_abs_FILE} _contents)
- GET_FILENAME_COMPONENT(_abs_PATH ${_abs_FILE} PATH)
+ get_filename_component(_abs_PATH ${_abs_FILE} PATH)
- STRING(REGEX MATCHALL "# *include +[^ ]+\\.moc[\">]" _match "${_contents}")
- IF(_match)
- FOREACH (_current_MOC_INC ${_match})
- STRING(REGEX MATCH "[^ <\"]+\\.moc" _current_MOC "${_current_MOC_INC}")
+ string(REGEX MATCHALL "# *include +[^ ]+\\.moc[\">]" _match "${_contents}")
+ if(_match)
+ foreach (_current_MOC_INC ${_match})
+ string(REGEX MATCH "[^ <\"]+\\.moc" _current_MOC "${_current_MOC_INC}")
- GET_FILENAME_COMPONENT(_basename ${_current_MOC} NAME_WE)
- IF(EXISTS ${_abs_PATH}/${_basename}.hpp)
- SET(_header ${_abs_PATH}/${_basename}.hpp)
- ELSE(EXISTS ${_abs_PATH}/${_basename}.hpp)
- SET(_header ${_abs_PATH}/${_basename}.h)
- ENDIF(EXISTS ${_abs_PATH}/${_basename}.hpp)
- SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC})
+ get_filename_component(_basename ${_current_MOC} NAME_WE)
+ if(EXISTS ${_abs_PATH}/${_basename}.hpp)
+ set(_header ${_abs_PATH}/${_basename}.hpp)
+ else(EXISTS ${_abs_PATH}/${_basename}.hpp)
+ set(_header ${_abs_PATH}/${_basename}.h)
+ endif(EXISTS ${_abs_PATH}/${_basename}.hpp)
+ set(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC})
QT4_CREATE_MOC_COMMAND(${_header} ${_moc} "${_moc_INCS}" "")
MACRO_ADD_FILE_DEPENDENCIES(${_abs_FILE} ${_moc})
- ENDFOREACH (_current_MOC_INC)
- ENDIF(_match)
- ENDIF ( NOT _skip AND EXISTS ${_abs_FILE} )
- ENDFOREACH (_current_FILE)
-ENDMACRO(QT4_AUTOMOC)
+ endforeach (_current_MOC_INC)
+ endif(_match)
+ endif ( NOT _skip AND EXISTS ${_abs_FILE} )
+ endforeach (_current_FILE)
+endmacro(QT4_AUTOMOC)
-MACRO(QT4_CREATE_TRANSLATION _qm_files)
+macro(QT4_CREATE_TRANSLATION _qm_files)
QT4_EXTRACT_OPTIONS(_lupdate_files _lupdate_options ${ARGN})
- SET(_my_sources)
- SET(_my_dirs)
- SET(_my_tsfiles)
- SET(_ts_pro)
- FOREACH (_file ${_lupdate_files})
- GET_FILENAME_COMPONENT(_ext ${_file} EXT)
- GET_FILENAME_COMPONENT(_abs_FILE ${_file} ABSOLUTE)
- IF(_ext MATCHES "ts")
- LIST(APPEND _my_tsfiles ${_abs_FILE})
- ELSE(_ext MATCHES "ts")
- IF(NOT _ext)
- LIST(APPEND _my_dirs ${_abs_FILE})
- ELSE(NOT _ext)
- LIST(APPEND _my_sources ${_abs_FILE})
- ENDIF(NOT _ext)
- ENDIF(_ext MATCHES "ts")
- ENDFOREACH(_file)
- FOREACH(_ts_file ${_my_tsfiles})
- IF(_my_sources)
+ set(_my_sources)
+ set(_my_dirs)
+ set(_my_tsfiles)
+ set(_ts_pro)
+ foreach (_file ${_lupdate_files})
+ get_filename_component(_ext ${_file} EXT)
+ get_filename_component(_abs_FILE ${_file} ABSOLUTE)
+ if(_ext MATCHES "ts")
+ list(APPEND _my_tsfiles ${_abs_FILE})
+ else(_ext MATCHES "ts")
+ if(NOT _ext)
+ list(APPEND _my_dirs ${_abs_FILE})
+ else(NOT _ext)
+ list(APPEND _my_sources ${_abs_FILE})
+ endif(NOT _ext)
+ endif(_ext MATCHES "ts")
+ endforeach(_file)
+ foreach(_ts_file ${_my_tsfiles})
+ if(_my_sources)
# make a .pro file to call lupdate on, so we don't make our commands too
# long for some systems
- GET_FILENAME_COMPONENT(_ts_name ${_ts_file} NAME_WE)
- SET(_ts_pro ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${_ts_name}_lupdate.pro)
- SET(_pro_srcs)
- FOREACH(_pro_src ${_my_sources})
- SET(_pro_srcs "${_pro_srcs} \"${_pro_src}\"")
- ENDFOREACH(_pro_src ${_my_sources})
- SET(_pro_includes)
- GET_DIRECTORY_PROPERTY(_inc_DIRS INCLUDE_DIRECTORIES)
- FOREACH(_pro_include ${_inc_DIRS})
- GET_FILENAME_COMPONENT(_abs_include "${_pro_include}" ABSOLUTE)
- SET(_pro_includes "${_pro_includes} \"${_abs_include}\"")
- ENDFOREACH(_pro_include ${CMAKE_CXX_INCLUDE_PATH})
- FILE(WRITE ${_ts_pro} "SOURCES = ${_pro_srcs}\nINCLUDEPATH = ${_pro_includes}\n")
- ENDIF(_my_sources)
- ADD_CUSTOM_COMMAND(OUTPUT ${_ts_file}
+ get_filename_component(_ts_name ${_ts_file} NAME_WE)
+ set(_ts_pro ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${_ts_name}_lupdate.pro)
+ set(_pro_srcs)
+ foreach(_pro_src ${_my_sources})
+ set(_pro_srcs "${_pro_srcs} \"${_pro_src}\"")
+ endforeach(_pro_src ${_my_sources})
+ set(_pro_includes)
+ get_directory_property(_inc_DIRS INCLUDE_DIRECTORIES)
+ foreach(_pro_include ${_inc_DIRS})
+ get_filename_component(_abs_include "${_pro_include}" ABSOLUTE)
+ set(_pro_includes "${_pro_includes} \"${_abs_include}\"")
+ endforeach(_pro_include ${CMAKE_CXX_INCLUDE_PATH})
+ file(WRITE ${_ts_pro} "SOURCES = ${_pro_srcs}\nINCLUDEPATH = ${_pro_includes}\n")
+ endif(_my_sources)
+ add_custom_command(OUTPUT ${_ts_file}
COMMAND ${QT_LUPDATE_EXECUTABLE}
ARGS ${_lupdate_options} ${_ts_pro} ${_my_dirs} -ts ${_ts_file}
DEPENDS ${_my_sources} ${_ts_pro} VERBATIM)
- ENDFOREACH(_ts_file)
+ endforeach(_ts_file)
QT4_ADD_TRANSLATION(${_qm_files} ${_my_tsfiles})
-ENDMACRO(QT4_CREATE_TRANSLATION)
-
-
-MACRO(QT4_ADD_TRANSLATION _qm_files)
- FOREACH (_current_FILE ${ARGN})
- GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE)
- GET_FILENAME_COMPONENT(qm ${_abs_FILE} NAME_WE)
- GET_SOURCE_FILE_PROPERTY(output_location ${_abs_FILE} OUTPUT_LOCATION)
- IF(output_location)
- FILE(MAKE_DIRECTORY "${output_location}")
- SET(qm "${output_location}/${qm}.qm")
- ELSE(output_location)
- SET(qm "${CMAKE_CURRENT_BINARY_DIR}/${qm}.qm")
- ENDIF(output_location)
-
- ADD_CUSTOM_COMMAND(OUTPUT ${qm}
+endmacro(QT4_CREATE_TRANSLATION)
+
+
+macro(QT4_ADD_TRANSLATION _qm_files)
+ foreach (_current_FILE ${ARGN})
+ get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE)
+ get_filename_component(qm ${_abs_FILE} NAME_WE)
+ get_source_file_property(output_location ${_abs_FILE} OUTPUT_LOCATION)
+ if(output_location)
+ file(MAKE_DIRECTORY "${output_location}")
+ set(qm "${output_location}/${qm}.qm")
+ else(output_location)
+ set(qm "${CMAKE_CURRENT_BINARY_DIR}/${qm}.qm")
+ endif(output_location)
+
+ add_custom_command(OUTPUT ${qm}
COMMAND ${QT_LRELEASE_EXECUTABLE}
ARGS ${_abs_FILE} -qm ${qm}
DEPENDS ${_abs_FILE} VERBATIM
)
- SET(${_qm_files} ${${_qm_files}} ${qm})
- ENDFOREACH (_current_FILE)
-ENDMACRO(QT4_ADD_TRANSLATION)
+ set(${_qm_files} ${${_qm_files}} ${qm})
+ endforeach (_current_FILE)
+endmacro(QT4_ADD_TRANSLATION)
diff --git a/Modules/SystemInformation.cmake b/Modules/SystemInformation.cmake
index 443c7aa849..73674e6fa1 100644
--- a/Modules/SystemInformation.cmake
+++ b/Modules/SystemInformation.cmake
@@ -12,92 +12,92 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-CMAKE_MINIMUM_REQUIRED(VERSION ${CMAKE_VERSION})
-PROJECT(DumpInformation)
+cmake_minimum_required(VERSION ${CMAKE_VERSION})
+project(DumpInformation)
# first get the standard information for th platform
-INCLUDE_DIRECTORIES("This does not exists")
-GET_DIRECTORY_PROPERTY(incl INCLUDE_DIRECTORIES)
-SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${DumpInformation_BINARY_DIR};${DumpInformation_SOURCE_DIR}")
+include_directories("This does not exists")
+get_directory_property(incl INCLUDE_DIRECTORIES)
+set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "${DumpInformation_BINARY_DIR};${DumpInformation_SOURCE_DIR}")
-CONFIGURE_FILE("${CMAKE_ROOT}/Modules/SystemInformation.in" "${RESULT_FILE}")
+configure_file("${CMAKE_ROOT}/Modules/SystemInformation.in" "${RESULT_FILE}")
-FILE(APPEND "${RESULT_FILE}"
+file(APPEND "${RESULT_FILE}"
"\n=================================================================\n")
-FILE(APPEND "${RESULT_FILE}"
+file(APPEND "${RESULT_FILE}"
"=== VARIABLES\n")
-FILE(APPEND "${RESULT_FILE}"
+file(APPEND "${RESULT_FILE}"
"=================================================================\n")
-GET_CMAKE_PROPERTY(res VARIABLES)
-FOREACH(var ${res})
- FILE(APPEND "${RESULT_FILE}" "${var} \"${${var}}\"\n")
-ENDFOREACH(var ${res})
+get_cmake_property(res VARIABLES)
+foreach(var ${res})
+ file(APPEND "${RESULT_FILE}" "${var} \"${${var}}\"\n")
+endforeach(var ${res})
-FILE(APPEND "${RESULT_FILE}"
+file(APPEND "${RESULT_FILE}"
"\n=================================================================\n")
-FILE(APPEND "${RESULT_FILE}"
+file(APPEND "${RESULT_FILE}"
"=== COMMANDS\n")
-FILE(APPEND "${RESULT_FILE}"
+file(APPEND "${RESULT_FILE}"
"=================================================================\n")
-GET_CMAKE_PROPERTY(res COMMANDS)
-FOREACH(var ${res})
- FILE(APPEND "${RESULT_FILE}" "${var}\n")
-ENDFOREACH(var ${res})
+get_cmake_property(res COMMANDS)
+foreach(var ${res})
+ file(APPEND "${RESULT_FILE}" "${var}\n")
+endforeach(var ${res})
-FILE(APPEND "${RESULT_FILE}"
+file(APPEND "${RESULT_FILE}"
"\n=================================================================\n")
-FILE(APPEND "${RESULT_FILE}"
+file(APPEND "${RESULT_FILE}"
"=== MACROS\n")
-FILE(APPEND "${RESULT_FILE}"
+file(APPEND "${RESULT_FILE}"
"=================================================================\n")
-FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllMacros.txt "")
-GET_CMAKE_PROPERTY(res MACROS)
-FOREACH(var ${res})
- FILE(APPEND "${RESULT_FILE}" "${var}\n")
-ENDFOREACH(var ${res})
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllMacros.txt "")
+get_cmake_property(res MACROS)
+foreach(var ${res})
+ file(APPEND "${RESULT_FILE}" "${var}\n")
+endforeach(var ${res})
-FILE(APPEND "${RESULT_FILE}"
+file(APPEND "${RESULT_FILE}"
"\n=================================================================\n")
-FILE(APPEND "${RESULT_FILE}"
+file(APPEND "${RESULT_FILE}"
"=== OTHER\n")
-FILE(APPEND "${RESULT_FILE}"
+file(APPEND "${RESULT_FILE}"
"=================================================================\n")
-GET_DIRECTORY_PROPERTY(res INCLUDE_DIRECTORIES)
-FOREACH(var ${res})
- FILE(APPEND "${RESULT_FILE}" "INCLUDE_DIRECTORY: ${var}\n")
-ENDFOREACH(var)
+get_directory_property(res INCLUDE_DIRECTORIES)
+foreach(var ${res})
+ file(APPEND "${RESULT_FILE}" "INCLUDE_DIRECTORY: ${var}\n")
+endforeach(var)
-GET_DIRECTORY_PROPERTY(res LINK_DIRECTORIES)
-FOREACH(var ${res})
- FILE(APPEND "${RESULT_FILE}" "LINK_DIRECTORIES: ${var}\n")
-ENDFOREACH(var)
+get_directory_property(res LINK_DIRECTORIES)
+foreach(var ${res})
+ file(APPEND "${RESULT_FILE}" "LINK_DIRECTORIES: ${var}\n")
+endforeach(var)
-GET_DIRECTORY_PROPERTY(res INCLUDE_REGULAR_EXPRESSION)
-FILE(APPEND "${RESULT_FILE}" "INCLUDE_REGULAR_EXPRESSION: ${res}\n")
+get_directory_property(res INCLUDE_REGULAR_EXPRESSION)
+file(APPEND "${RESULT_FILE}" "INCLUDE_REGULAR_EXPRESSION: ${res}\n")
# include other files if they are present, such as when run from within the
# binary tree
-MACRO(DUMP_FILE THE_FILE)
- IF (EXISTS "${THE_FILE}")
- FILE(APPEND "${RESULT_FILE}"
+macro(DUMP_FILE THE_FILE)
+ if (EXISTS "${THE_FILE}")
+ file(APPEND "${RESULT_FILE}"
"\n=================================================================\n")
- FILE(APPEND "${RESULT_FILE}"
+ file(APPEND "${RESULT_FILE}"
"=== ${THE_FILE}\n")
- FILE(APPEND "${RESULT_FILE}"
+ file(APPEND "${RESULT_FILE}"
"=================================================================\n")
- FILE(READ "${THE_FILE}" FILE_CONTENTS LIMIT 50000)
- FILE(APPEND "${RESULT_FILE}" "${FILE_CONTENTS}")
- ENDIF (EXISTS "${THE_FILE}")
-ENDMACRO(DUMP_FILE)
+ file(READ "${THE_FILE}" FILE_CONTENTS LIMIT 50000)
+ file(APPEND "${RESULT_FILE}" "${FILE_CONTENTS}")
+ endif (EXISTS "${THE_FILE}")
+endmacro(DUMP_FILE)
DUMP_FILE("../CMakeCache.txt")
DUMP_FILE("../CMakeFiles/CMakeOutput.log")
DUMP_FILE("../CMakeFiles/CMakeError.log")
DUMP_FILE("../CMakeFiles/CMakeSystem.cmake")
-FOREACH (EXTRA_FILE ${EXTRA_DUMP_FILES})
+foreach (EXTRA_FILE ${EXTRA_DUMP_FILES})
DUMP_FILE("${EXTRA_FILE}")
-ENDFOREACH (EXTRA_FILE)
+endforeach (EXTRA_FILE)
diff --git a/Modules/TestBigEndian.cmake b/Modules/TestBigEndian.cmake
index bca7979df7..d162f13e7f 100644
--- a/Modules/TestBigEndian.cmake
+++ b/Modules/TestBigEndian.cmake
@@ -17,96 +17,96 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-MACRO(TEST_BIG_ENDIAN VARIABLE)
- IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
- MESSAGE(STATUS "Check if the system is big endian")
- MESSAGE(STATUS "Searching 16 bit integer")
+macro(TEST_BIG_ENDIAN VARIABLE)
+ if("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
+ message(STATUS "Check if the system is big endian")
+ message(STATUS "Searching 16 bit integer")
- INCLUDE(CheckTypeSize)
+ include(CheckTypeSize)
CHECK_TYPE_SIZE("unsigned short" CMAKE_SIZEOF_UNSIGNED_SHORT)
- IF(CMAKE_SIZEOF_UNSIGNED_SHORT EQUAL 2)
- MESSAGE(STATUS "Using unsigned short")
- SET(CMAKE_16BIT_TYPE "unsigned short")
- ELSE(CMAKE_SIZEOF_UNSIGNED_SHORT EQUAL 2)
+ if(CMAKE_SIZEOF_UNSIGNED_SHORT EQUAL 2)
+ message(STATUS "Using unsigned short")
+ set(CMAKE_16BIT_TYPE "unsigned short")
+ else(CMAKE_SIZEOF_UNSIGNED_SHORT EQUAL 2)
CHECK_TYPE_SIZE("unsigned int" CMAKE_SIZEOF_UNSIGNED_INT)
- IF(CMAKE_SIZEOF_UNSIGNED_INT)
- MESSAGE(STATUS "Using unsigned int")
- SET(CMAKE_16BIT_TYPE "unsigned int")
+ if(CMAKE_SIZEOF_UNSIGNED_INT)
+ message(STATUS "Using unsigned int")
+ set(CMAKE_16BIT_TYPE "unsigned int")
- ELSE(CMAKE_SIZEOF_UNSIGNED_INT)
+ else(CMAKE_SIZEOF_UNSIGNED_INT)
CHECK_TYPE_SIZE("unsigned long" CMAKE_SIZEOF_UNSIGNED_LONG)
- IF(CMAKE_SIZEOF_UNSIGNED_LONG)
- MESSAGE(STATUS "Using unsigned long")
- SET(CMAKE_16BIT_TYPE "unsigned long")
- ELSE(CMAKE_SIZEOF_UNSIGNED_LONG)
- MESSAGE(FATAL_ERROR "no suitable type found")
- ENDIF(CMAKE_SIZEOF_UNSIGNED_LONG)
+ if(CMAKE_SIZEOF_UNSIGNED_LONG)
+ message(STATUS "Using unsigned long")
+ set(CMAKE_16BIT_TYPE "unsigned long")
+ else(CMAKE_SIZEOF_UNSIGNED_LONG)
+ message(FATAL_ERROR "no suitable type found")
+ endif(CMAKE_SIZEOF_UNSIGNED_LONG)
- ENDIF(CMAKE_SIZEOF_UNSIGNED_INT)
+ endif(CMAKE_SIZEOF_UNSIGNED_INT)
- ENDIF(CMAKE_SIZEOF_UNSIGNED_SHORT EQUAL 2)
+ endif(CMAKE_SIZEOF_UNSIGNED_SHORT EQUAL 2)
- CONFIGURE_FILE("${CMAKE_ROOT}/Modules/TestEndianess.c.in"
+ configure_file("${CMAKE_ROOT}/Modules/TestEndianess.c.in"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/TestEndianess.c"
IMMEDIATE @ONLY)
- FILE(READ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/TestEndianess.c"
+ file(READ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/TestEndianess.c"
TEST_ENDIANESS_FILE_CONTENT)
- TRY_COMPILE(HAVE_${VARIABLE}
+ try_compile(HAVE_${VARIABLE}
"${CMAKE_BINARY_DIR}"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/TestEndianess.c"
OUTPUT_VARIABLE OUTPUT
COPY_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/TestEndianess.bin" )
- IF(HAVE_${VARIABLE})
+ if(HAVE_${VARIABLE})
- FILE(STRINGS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/TestEndianess.bin"
+ file(STRINGS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/TestEndianess.bin"
CMAKE_TEST_ENDIANESS_STRINGS_LE LIMIT_COUNT 1 REGEX "THIS IS LITTLE ENDIAN")
- FILE(STRINGS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/TestEndianess.bin"
+ file(STRINGS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/TestEndianess.bin"
CMAKE_TEST_ENDIANESS_STRINGS_BE LIMIT_COUNT 1 REGEX "THIS IS BIG ENDIAN")
# on mac, if there are universal binaries built both will be true
# return the result depending on the machine on which cmake runs
- IF(CMAKE_TEST_ENDIANESS_STRINGS_BE AND CMAKE_TEST_ENDIANESS_STRINGS_LE)
- IF(CMAKE_SYSTEM_PROCESSOR MATCHES powerpc)
- SET(CMAKE_TEST_ENDIANESS_STRINGS_BE TRUE)
- SET(CMAKE_TEST_ENDIANESS_STRINGS_LE FALSE)
- ELSE(CMAKE_SYSTEM_PROCESSOR MATCHES powerpc)
- SET(CMAKE_TEST_ENDIANESS_STRINGS_BE FALSE)
- SET(CMAKE_TEST_ENDIANESS_STRINGS_LE TRUE)
- ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES powerpc)
- MESSAGE(STATUS "TEST_BIG_ENDIAN found different results, consider setting CMAKE_OSX_ARCHITECTURES or CMAKE_TRY_COMPILE_OSX_ARCHITECTURES to one or no architecture !")
- ENDIF(CMAKE_TEST_ENDIANESS_STRINGS_BE AND CMAKE_TEST_ENDIANESS_STRINGS_LE)
-
- IF(CMAKE_TEST_ENDIANESS_STRINGS_LE)
- SET(${VARIABLE} 0 CACHE INTERNAL "Result of TEST_BIG_ENDIAN" FORCE)
- MESSAGE(STATUS "Check if the system is big endian - little endian")
- ENDIF(CMAKE_TEST_ENDIANESS_STRINGS_LE)
-
- IF(CMAKE_TEST_ENDIANESS_STRINGS_BE)
- SET(${VARIABLE} 1 CACHE INTERNAL "Result of TEST_BIG_ENDIAN" FORCE)
- MESSAGE(STATUS "Check if the system is big endian - big endian")
- ENDIF(CMAKE_TEST_ENDIANESS_STRINGS_BE)
-
- IF(NOT CMAKE_TEST_ENDIANESS_STRINGS_BE AND NOT CMAKE_TEST_ENDIANESS_STRINGS_LE)
- MESSAGE(SEND_ERROR "TEST_BIG_ENDIAN found no result!")
- ENDIF(NOT CMAKE_TEST_ENDIANESS_STRINGS_BE AND NOT CMAKE_TEST_ENDIANESS_STRINGS_LE)
-
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ if(CMAKE_TEST_ENDIANESS_STRINGS_BE AND CMAKE_TEST_ENDIANESS_STRINGS_LE)
+ if(CMAKE_SYSTEM_PROCESSOR MATCHES powerpc)
+ set(CMAKE_TEST_ENDIANESS_STRINGS_BE TRUE)
+ set(CMAKE_TEST_ENDIANESS_STRINGS_LE FALSE)
+ else(CMAKE_SYSTEM_PROCESSOR MATCHES powerpc)
+ set(CMAKE_TEST_ENDIANESS_STRINGS_BE FALSE)
+ set(CMAKE_TEST_ENDIANESS_STRINGS_LE TRUE)
+ endif(CMAKE_SYSTEM_PROCESSOR MATCHES powerpc)
+ message(STATUS "TEST_BIG_ENDIAN found different results, consider setting CMAKE_OSX_ARCHITECTURES or CMAKE_TRY_COMPILE_OSX_ARCHITECTURES to one or no architecture !")
+ endif(CMAKE_TEST_ENDIANESS_STRINGS_BE AND CMAKE_TEST_ENDIANESS_STRINGS_LE)
+
+ if(CMAKE_TEST_ENDIANESS_STRINGS_LE)
+ set(${VARIABLE} 0 CACHE INTERNAL "Result of TEST_BIG_ENDIAN" FORCE)
+ message(STATUS "Check if the system is big endian - little endian")
+ endif(CMAKE_TEST_ENDIANESS_STRINGS_LE)
+
+ if(CMAKE_TEST_ENDIANESS_STRINGS_BE)
+ set(${VARIABLE} 1 CACHE INTERNAL "Result of TEST_BIG_ENDIAN" FORCE)
+ message(STATUS "Check if the system is big endian - big endian")
+ endif(CMAKE_TEST_ENDIANESS_STRINGS_BE)
+
+ if(NOT CMAKE_TEST_ENDIANESS_STRINGS_BE AND NOT CMAKE_TEST_ENDIANESS_STRINGS_LE)
+ message(SEND_ERROR "TEST_BIG_ENDIAN found no result!")
+ endif(NOT CMAKE_TEST_ENDIANESS_STRINGS_BE AND NOT CMAKE_TEST_ENDIANESS_STRINGS_LE)
+
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the system is big endian passed with the following output:\n${OUTPUT}\nTestEndianess.c:\n${TEST_ENDIANESS_FILE_CONTENT}\n\n")
- ELSE(HAVE_${VARIABLE})
- MESSAGE(STATUS "Check if the system is big endian - failed")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ else(HAVE_${VARIABLE})
+ message(STATUS "Check if the system is big endian - failed")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the system is big endian failed with the following output:\n${OUTPUT}\nTestEndianess.c:\n${TEST_ENDIANESS_FILE_CONTENT}\n\n")
- SET(${VARIABLE})
- ENDIF(HAVE_${VARIABLE})
- ENDIF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
-ENDMACRO(TEST_BIG_ENDIAN)
+ set(${VARIABLE})
+ endif(HAVE_${VARIABLE})
+ endif("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
+endmacro(TEST_BIG_ENDIAN)
diff --git a/Modules/TestCXXAcceptsFlag.cmake b/Modules/TestCXXAcceptsFlag.cmake
index 0d945bbdc9..58623f8c4f 100644
--- a/Modules/TestCXXAcceptsFlag.cmake
+++ b/Modules/TestCXXAcceptsFlag.cmake
@@ -20,24 +20,24 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-MACRO(CHECK_CXX_ACCEPTS_FLAG FLAGS VARIABLE)
- IF(NOT DEFINED ${VARIABLE})
- MESSAGE(STATUS "Checking to see if CXX compiler accepts flag ${FLAGS}")
- TRY_COMPILE(${VARIABLE}
+macro(CHECK_CXX_ACCEPTS_FLAG FLAGS VARIABLE)
+ if(NOT DEFINED ${VARIABLE})
+ message(STATUS "Checking to see if CXX compiler accepts flag ${FLAGS}")
+ try_compile(${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_ROOT}/Modules/DummyCXXFile.cxx
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${FLAGS}
OUTPUT_VARIABLE OUTPUT)
- IF(${VARIABLE})
- MESSAGE(STATUS "Checking to see if CXX compiler accepts flag ${FLAGS} - yes")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ if(${VARIABLE})
+ message(STATUS "Checking to see if CXX compiler accepts flag ${FLAGS} - yes")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the CXX compiler accepts the flag ${FLAGS} passed with "
"the following output:\n${OUTPUT}\n\n")
- ELSE(${VARIABLE})
- MESSAGE(STATUS "Checking to see if CXX compiler accepts flag ${FLAGS} - no")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ else(${VARIABLE})
+ message(STATUS "Checking to see if CXX compiler accepts flag ${FLAGS} - no")
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the CXX compiler accepts the flag ${FLAGS} failed with "
"the following output:\n${OUTPUT}\n\n")
- ENDIF(${VARIABLE})
- ENDIF(NOT DEFINED ${VARIABLE})
-ENDMACRO(CHECK_CXX_ACCEPTS_FLAG)
+ endif(${VARIABLE})
+ endif(NOT DEFINED ${VARIABLE})
+endmacro(CHECK_CXX_ACCEPTS_FLAG)
diff --git a/Modules/TestForANSIForScope.cmake b/Modules/TestForANSIForScope.cmake
index a60719e1a9..d7e2c926f5 100644
--- a/Modules/TestForANSIForScope.cmake
+++ b/Modules/TestForANSIForScope.cmake
@@ -16,27 +16,27 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-IF("CMAKE_ANSI_FOR_SCOPE" MATCHES "^CMAKE_ANSI_FOR_SCOPE$")
- MESSAGE(STATUS "Check for ANSI scope")
- TRY_COMPILE(CMAKE_ANSI_FOR_SCOPE ${CMAKE_BINARY_DIR}
+if("CMAKE_ANSI_FOR_SCOPE" MATCHES "^CMAKE_ANSI_FOR_SCOPE$")
+ message(STATUS "Check for ANSI scope")
+ try_compile(CMAKE_ANSI_FOR_SCOPE ${CMAKE_BINARY_DIR}
${CMAKE_ROOT}/Modules/TestForAnsiForScope.cxx
OUTPUT_VARIABLE OUTPUT)
- IF (CMAKE_ANSI_FOR_SCOPE)
- MESSAGE(STATUS "Check for ANSI scope - found")
- SET (CMAKE_NO_ANSI_FOR_SCOPE 0 CACHE INTERNAL
+ if (CMAKE_ANSI_FOR_SCOPE)
+ message(STATUS "Check for ANSI scope - found")
+ set (CMAKE_NO_ANSI_FOR_SCOPE 0 CACHE INTERNAL
"Does the compiler support ansi for scope.")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the CXX compiler understands ansi for scopes passed with "
"the following output:\n${OUTPUT}\n\n")
- ELSE (CMAKE_ANSI_FOR_SCOPE)
- MESSAGE(STATUS "Check for ANSI scope - not found")
- SET (CMAKE_NO_ANSI_FOR_SCOPE 1 CACHE INTERNAL
+ else (CMAKE_ANSI_FOR_SCOPE)
+ message(STATUS "Check for ANSI scope - not found")
+ set (CMAKE_NO_ANSI_FOR_SCOPE 1 CACHE INTERNAL
"Does the compiler support ansi for scope.")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the CXX compiler understands ansi for scopes failed with "
"the following output:\n${OUTPUT}\n\n")
- ENDIF (CMAKE_ANSI_FOR_SCOPE)
-ENDIF("CMAKE_ANSI_FOR_SCOPE" MATCHES "^CMAKE_ANSI_FOR_SCOPE$")
+ endif (CMAKE_ANSI_FOR_SCOPE)
+endif("CMAKE_ANSI_FOR_SCOPE" MATCHES "^CMAKE_ANSI_FOR_SCOPE$")
diff --git a/Modules/TestForANSIStreamHeaders.cmake b/Modules/TestForANSIStreamHeaders.cmake
index b542b74813..1ed532ed5f 100644
--- a/Modules/TestForANSIStreamHeaders.cmake
+++ b/Modules/TestForANSIStreamHeaders.cmake
@@ -16,19 +16,19 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-INCLUDE(CheckIncludeFileCXX)
+include(CheckIncludeFileCXX)
-IF(NOT CMAKE_NO_ANSI_STREAM_HEADERS)
+if(NOT CMAKE_NO_ANSI_STREAM_HEADERS)
CHECK_INCLUDE_FILE_CXX(iostream CMAKE_ANSI_STREAM_HEADERS)
- IF (CMAKE_ANSI_STREAM_HEADERS)
- SET (CMAKE_NO_ANSI_STREAM_HEADERS 0 CACHE INTERNAL
+ if (CMAKE_ANSI_STREAM_HEADERS)
+ set (CMAKE_NO_ANSI_STREAM_HEADERS 0 CACHE INTERNAL
"Does the compiler support headers like iostream.")
- ELSE (CMAKE_ANSI_STREAM_HEADERS)
- SET (CMAKE_NO_ANSI_STREAM_HEADERS 1 CACHE INTERNAL
+ else (CMAKE_ANSI_STREAM_HEADERS)
+ set (CMAKE_NO_ANSI_STREAM_HEADERS 1 CACHE INTERNAL
"Does the compiler support headers like iostream.")
- ENDIF (CMAKE_ANSI_STREAM_HEADERS)
+ endif (CMAKE_ANSI_STREAM_HEADERS)
- MARK_AS_ADVANCED(CMAKE_NO_ANSI_STREAM_HEADERS)
-ENDIF(NOT CMAKE_NO_ANSI_STREAM_HEADERS)
+ mark_as_advanced(CMAKE_NO_ANSI_STREAM_HEADERS)
+endif(NOT CMAKE_NO_ANSI_STREAM_HEADERS)
diff --git a/Modules/TestForSSTREAM.cmake b/Modules/TestForSSTREAM.cmake
index 30ff3bcb94..cdd8091117 100644
--- a/Modules/TestForSSTREAM.cmake
+++ b/Modules/TestForSSTREAM.cmake
@@ -16,27 +16,27 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-IF("CMAKE_HAS_ANSI_STRING_STREAM" MATCHES "^CMAKE_HAS_ANSI_STRING_STREAM$")
- MESSAGE(STATUS "Check for sstream")
- TRY_COMPILE(CMAKE_HAS_ANSI_STRING_STREAM ${CMAKE_BINARY_DIR}
+if("CMAKE_HAS_ANSI_STRING_STREAM" MATCHES "^CMAKE_HAS_ANSI_STRING_STREAM$")
+ message(STATUS "Check for sstream")
+ try_compile(CMAKE_HAS_ANSI_STRING_STREAM ${CMAKE_BINARY_DIR}
${CMAKE_ROOT}/Modules/TestForSSTREAM.cxx
OUTPUT_VARIABLE OUTPUT)
- IF (CMAKE_HAS_ANSI_STRING_STREAM)
- MESSAGE(STATUS "Check for sstream - found")
- SET (CMAKE_NO_ANSI_STRING_STREAM 0 CACHE INTERNAL
+ if (CMAKE_HAS_ANSI_STRING_STREAM)
+ message(STATUS "Check for sstream - found")
+ set (CMAKE_NO_ANSI_STRING_STREAM 0 CACHE INTERNAL
"Does the compiler support sstream")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the CXX compiler has sstream passed with "
"the following output:\n${OUTPUT}\n\n")
- ELSE (CMAKE_HAS_ANSI_STRING_STREAM)
- MESSAGE(STATUS "Check for sstream - not found")
- SET (CMAKE_NO_ANSI_STRING_STREAM 1 CACHE INTERNAL
+ else (CMAKE_HAS_ANSI_STRING_STREAM)
+ message(STATUS "Check for sstream - not found")
+ set (CMAKE_NO_ANSI_STRING_STREAM 1 CACHE INTERNAL
"Does the compiler support sstream")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the CXX compiler has sstream failed with "
"the following output:\n${OUTPUT}\n\n")
- ENDIF (CMAKE_HAS_ANSI_STRING_STREAM)
-ENDIF("CMAKE_HAS_ANSI_STRING_STREAM" MATCHES "^CMAKE_HAS_ANSI_STRING_STREAM$")
+ endif (CMAKE_HAS_ANSI_STRING_STREAM)
+endif("CMAKE_HAS_ANSI_STRING_STREAM" MATCHES "^CMAKE_HAS_ANSI_STRING_STREAM$")
diff --git a/Modules/TestForSTDNamespace.cmake b/Modules/TestForSTDNamespace.cmake
index 65e0de0446..848aa87228 100644
--- a/Modules/TestForSTDNamespace.cmake
+++ b/Modules/TestForSTDNamespace.cmake
@@ -16,27 +16,27 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-IF("CMAKE_STD_NAMESPACE" MATCHES "^CMAKE_STD_NAMESPACE$")
- MESSAGE(STATUS "Check for STD namespace")
- TRY_COMPILE(CMAKE_STD_NAMESPACE ${CMAKE_BINARY_DIR}
+if("CMAKE_STD_NAMESPACE" MATCHES "^CMAKE_STD_NAMESPACE$")
+ message(STATUS "Check for STD namespace")
+ try_compile(CMAKE_STD_NAMESPACE ${CMAKE_BINARY_DIR}
${CMAKE_ROOT}/Modules/TestForSTDNamespace.cxx
OUTPUT_VARIABLE OUTPUT)
- IF (CMAKE_STD_NAMESPACE)
- MESSAGE(STATUS "Check for STD namespace - found")
- SET (CMAKE_NO_STD_NAMESPACE 0 CACHE INTERNAL
+ if (CMAKE_STD_NAMESPACE)
+ message(STATUS "Check for STD namespace - found")
+ set (CMAKE_NO_STD_NAMESPACE 0 CACHE INTERNAL
"Does the compiler support std::.")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the CXX compiler has std namespace passed with "
"the following output:\n${OUTPUT}\n\n")
- ELSE (CMAKE_STD_NAMESPACE)
- MESSAGE(STATUS "Check for STD namespace - not found")
- SET (CMAKE_NO_STD_NAMESPACE 1 CACHE INTERNAL
+ else (CMAKE_STD_NAMESPACE)
+ message(STATUS "Check for STD namespace - not found")
+ set (CMAKE_NO_STD_NAMESPACE 1 CACHE INTERNAL
"Does the compiler support std::.")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the CXX compiler has std namespace failed with "
"the following output:\n${OUTPUT}\n\n")
- ENDIF (CMAKE_STD_NAMESPACE)
-ENDIF("CMAKE_STD_NAMESPACE" MATCHES "^CMAKE_STD_NAMESPACE$")
+ endif (CMAKE_STD_NAMESPACE)
+endif("CMAKE_STD_NAMESPACE" MATCHES "^CMAKE_STD_NAMESPACE$")
diff --git a/Modules/UseEcos.cmake b/Modules/UseEcos.cmake
index 60e1e46b47..e3e7798d81 100644
--- a/Modules/UseEcos.cmake
+++ b/Modules/UseEcos.cmake
@@ -30,89 +30,89 @@
# License text for the above reference.)
# first check that ecosconfig is available
-FIND_PROGRAM(ECOSCONFIG_EXECUTABLE NAMES ecosconfig)
-IF(NOT ECOSCONFIG_EXECUTABLE)
- MESSAGE(SEND_ERROR "ecosconfig was not found. Either include it in the system path or set it manually using ccmake.")
-ELSE(NOT ECOSCONFIG_EXECUTABLE)
- MESSAGE(STATUS "Found ecosconfig: ${ECOSCONFIG_EXECUTABLE}")
-ENDIF(NOT ECOSCONFIG_EXECUTABLE)
+find_program(ECOSCONFIG_EXECUTABLE NAMES ecosconfig)
+if(NOT ECOSCONFIG_EXECUTABLE)
+ message(SEND_ERROR "ecosconfig was not found. Either include it in the system path or set it manually using ccmake.")
+else(NOT ECOSCONFIG_EXECUTABLE)
+ message(STATUS "Found ecosconfig: ${ECOSCONFIG_EXECUTABLE}")
+endif(NOT ECOSCONFIG_EXECUTABLE)
# check that ECOS_REPOSITORY is set correctly
-IF (NOT EXISTS $ENV{ECOS_REPOSITORY}/ecos.db)
- MESSAGE(SEND_ERROR "The environment variable ECOS_REPOSITORY is not set correctly. Set it to the directory which contains the file ecos.db")
-ELSE (NOT EXISTS $ENV{ECOS_REPOSITORY}/ecos.db)
- MESSAGE(STATUS "ECOS_REPOSITORY is set to $ENV{ECOS_REPOSITORY}")
-ENDIF (NOT EXISTS $ENV{ECOS_REPOSITORY}/ecos.db)
+if (NOT EXISTS $ENV{ECOS_REPOSITORY}/ecos.db)
+ message(SEND_ERROR "The environment variable ECOS_REPOSITORY is not set correctly. Set it to the directory which contains the file ecos.db")
+else (NOT EXISTS $ENV{ECOS_REPOSITORY}/ecos.db)
+ message(STATUS "ECOS_REPOSITORY is set to $ENV{ECOS_REPOSITORY}")
+endif (NOT EXISTS $ENV{ECOS_REPOSITORY}/ecos.db)
# check that tclsh (coming with TCL) is available, otherwise ecosconfig doesn't work
-FIND_PACKAGE(Tclsh)
-IF (NOT TCL_TCLSH)
- MESSAGE(SEND_ERROR "The TCL tclsh was not found. Please install TCL, it is required for building eCos applications.")
-ELSE (NOT TCL_TCLSH)
- MESSAGE(STATUS "tlcsh found: ${TCL_TCLSH}")
-ENDIF (NOT TCL_TCLSH)
+find_package(Tclsh)
+if (NOT TCL_TCLSH)
+ message(SEND_ERROR "The TCL tclsh was not found. Please install TCL, it is required for building eCos applications.")
+else (NOT TCL_TCLSH)
+ message(STATUS "tlcsh found: ${TCL_TCLSH}")
+endif (NOT TCL_TCLSH)
#add the globale include-diretories
#usage: ECOS_ADD_INCLUDE_DIRECTORIES()
-MACRO(ECOS_ADD_INCLUDE_DIRECTORIES)
+macro(ECOS_ADD_INCLUDE_DIRECTORIES)
#check for ProjectSources.txt one level higher
- IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../ProjectSources.txt)
- INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../)
- ELSE (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../ProjectSources.txt)
- INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/)
- ENDIF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../ProjectSources.txt)
+ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../ProjectSources.txt)
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../)
+ else (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../ProjectSources.txt)
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/)
+ endif (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../ProjectSources.txt)
#the ecos include directory
- INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/ecos/install/include/)
+ include_directories(${CMAKE_CURRENT_BINARY_DIR}/ecos/install/include/)
-ENDMACRO(ECOS_ADD_INCLUDE_DIRECTORIES)
+endmacro(ECOS_ADD_INCLUDE_DIRECTORIES)
#we want to compile for the xscale processor, in this case the following macro has to be called
#usage: ECOS_USE_ARM_ELF_TOOLS()
-MACRO (ECOS_USE_ARM_ELF_TOOLS)
- SET(CMAKE_CXX_COMPILER "arm-elf-c++")
- SET(CMAKE_COMPILER_IS_GNUCXX 1)
- SET(CMAKE_C_COMPILER "arm-elf-gcc")
- SET(CMAKE_AR "arm-elf-ar")
- SET(CMAKE_RANLIB "arm-elf-ranlib")
+macro (ECOS_USE_ARM_ELF_TOOLS)
+ set(CMAKE_CXX_COMPILER "arm-elf-c++")
+ set(CMAKE_COMPILER_IS_GNUCXX 1)
+ set(CMAKE_C_COMPILER "arm-elf-gcc")
+ set(CMAKE_AR "arm-elf-ar")
+ set(CMAKE_RANLIB "arm-elf-ranlib")
#for linking
- SET(ECOS_LD_MCPU "-mcpu=xscale")
+ set(ECOS_LD_MCPU "-mcpu=xscale")
#for compiling
- ADD_DEFINITIONS(-mcpu=xscale -mapcs-frame)
+ add_definitions(-mcpu=xscale -mapcs-frame)
#for the obj-tools
- SET(ECOS_ARCH_PREFIX "arm-elf-")
-ENDMACRO (ECOS_USE_ARM_ELF_TOOLS)
+ set(ECOS_ARCH_PREFIX "arm-elf-")
+endmacro (ECOS_USE_ARM_ELF_TOOLS)
#usage: ECOS_USE_PPC_EABI_TOOLS()
-MACRO (ECOS_USE_PPC_EABI_TOOLS)
- SET(CMAKE_CXX_COMPILER "powerpc-eabi-c++")
- SET(CMAKE_COMPILER_IS_GNUCXX 1)
- SET(CMAKE_C_COMPILER "powerpc-eabi-gcc")
- SET(CMAKE_AR "powerpc-eabi-ar")
- SET(CMAKE_RANLIB "powerpc-eabi-ranlib")
+macro (ECOS_USE_PPC_EABI_TOOLS)
+ set(CMAKE_CXX_COMPILER "powerpc-eabi-c++")
+ set(CMAKE_COMPILER_IS_GNUCXX 1)
+ set(CMAKE_C_COMPILER "powerpc-eabi-gcc")
+ set(CMAKE_AR "powerpc-eabi-ar")
+ set(CMAKE_RANLIB "powerpc-eabi-ranlib")
#for linking
- SET(ECOS_LD_MCPU "")
+ set(ECOS_LD_MCPU "")
#for compiling
- ADD_DEFINITIONS()
+ add_definitions()
#for the obj-tools
- SET(ECOS_ARCH_PREFIX "powerpc-eabi-")
-ENDMACRO (ECOS_USE_PPC_EABI_TOOLS)
+ set(ECOS_ARCH_PREFIX "powerpc-eabi-")
+endmacro (ECOS_USE_PPC_EABI_TOOLS)
#usage: ECOS_USE_I386_ELF_TOOLS()
-MACRO (ECOS_USE_I386_ELF_TOOLS)
- SET(CMAKE_CXX_COMPILER "i386-elf-c++")
- SET(CMAKE_COMPILER_IS_GNUCXX 1)
- SET(CMAKE_C_COMPILER "i386-elf-gcc")
- SET(CMAKE_AR "i386-elf-ar")
- SET(CMAKE_RANLIB "i386-elf-ranlib")
+macro (ECOS_USE_I386_ELF_TOOLS)
+ set(CMAKE_CXX_COMPILER "i386-elf-c++")
+ set(CMAKE_COMPILER_IS_GNUCXX 1)
+ set(CMAKE_C_COMPILER "i386-elf-gcc")
+ set(CMAKE_AR "i386-elf-ar")
+ set(CMAKE_RANLIB "i386-elf-ranlib")
#for linking
- SET(ECOS_LD_MCPU "")
+ set(ECOS_LD_MCPU "")
#for compiling
- ADD_DEFINITIONS()
+ add_definitions()
#for the obj-tools
- SET(ECOS_ARCH_PREFIX "i386-elf-")
-ENDMACRO (ECOS_USE_I386_ELF_TOOLS)
+ set(ECOS_ARCH_PREFIX "i386-elf-")
+endmacro (ECOS_USE_I386_ELF_TOOLS)
#since the actual sources are located one level upwards
@@ -121,84 +121,84 @@ ENDMACRO (ECOS_USE_I386_ELF_TOOLS)
#is the name of the new list of source files with adjusted paths,
#followed by all source files
#usage: ECOS_ADJUST_DIRECTORY(adjusted_SRCS ${my_srcs})
-MACRO(ECOS_ADJUST_DIRECTORY _target_FILES )
- FOREACH (_current_FILE ${ARGN})
- GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE)
- IF (NOT ${_abs_FILE} STREQUAL ${_current_FILE})
- GET_FILENAME_COMPONENT(_abs_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../${_current_FILE} ABSOLUTE)
- ENDIF (NOT ${_abs_FILE} STREQUAL ${_current_FILE})
- LIST(APPEND ${_target_FILES} ${_abs_FILE})
- ENDFOREACH (_current_FILE)
-ENDMACRO(ECOS_ADJUST_DIRECTORY)
+macro(ECOS_ADJUST_DIRECTORY _target_FILES )
+ foreach (_current_FILE ${ARGN})
+ get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE)
+ if (NOT ${_abs_FILE} STREQUAL ${_current_FILE})
+ get_filename_component(_abs_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../${_current_FILE} ABSOLUTE)
+ endif (NOT ${_abs_FILE} STREQUAL ${_current_FILE})
+ list(APPEND ${_target_FILES} ${_abs_FILE})
+ endforeach (_current_FILE)
+endmacro(ECOS_ADJUST_DIRECTORY)
# the default ecos config file name
# maybe in the future also out-of-source builds may be possible
-SET(ECOS_CONFIG_FILE ecos.ecc)
+set(ECOS_CONFIG_FILE ecos.ecc)
#creates the dependancy from all source files on the ecos target.ld,
#adds the command for compiling ecos
-MACRO(ECOS_ADD_TARGET_LIB)
+macro(ECOS_ADD_TARGET_LIB)
# when building out-of-source, create the ecos/ subdir
- IF(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/ecos)
- FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ecos)
- ENDIF(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/ecos)
+ if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/ecos)
+ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ecos)
+ endif(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/ecos)
#sources depend on target.ld
- SET_SOURCE_FILES_PROPERTIES(
+ set_source_files_properties(
${ARGN}
PROPERTIES
OBJECT_DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/ecos/install/lib/target.ld
)
- ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ecos/install/lib/target.ld
+ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ecos/install/lib/target.ld
COMMAND sh -c \"make -C ${CMAKE_CURRENT_BINARY_DIR}/ecos || exit -1\; if [ -e ${CMAKE_CURRENT_BINARY_DIR}/ecos/install/lib/target.ld ] \; then touch ${CMAKE_CURRENT_BINARY_DIR}/ecos/install/lib/target.ld\; fi\"
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/ecos/makefile
)
- ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ecos/makefile
+ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ecos/makefile
COMMAND sh -c \" cd ${CMAKE_CURRENT_BINARY_DIR}/ecos\; ${ECOSCONFIG_EXECUTABLE} --config=${CMAKE_CURRENT_SOURCE_DIR}/ecos/${ECOS_CONFIG_FILE} tree || exit -1\;\"
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ecos/${ECOS_CONFIG_FILE}
)
- ADD_CUSTOM_TARGET( ecos make -C ${CMAKE_CURRENT_BINARY_DIR}/ecos/ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/ecos/makefile )
-ENDMACRO(ECOS_ADD_TARGET_LIB)
+ add_custom_target( ecos make -C ${CMAKE_CURRENT_BINARY_DIR}/ecos/ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/ecos/makefile )
+endmacro(ECOS_ADD_TARGET_LIB)
# get the directory of the current file, used later on in the file
-GET_FILENAME_COMPONENT( ECOS_CMAKE_MODULE_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
+get_filename_component( ECOS_CMAKE_MODULE_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
#macro for creating an executable ecos application
#the first parameter is the name of the executable,
#the second is the list of all source files (where the path
#has been adjusted beforehand by calling ECOS_ADJUST_DIRECTORY()
#usage: ECOS_ADD_EXECUTABLE(my_app ${adjusted_SRCS})
-MACRO(ECOS_ADD_EXECUTABLE _exe_NAME )
+macro(ECOS_ADD_EXECUTABLE _exe_NAME )
#definitions, valid for all ecos projects
#the optimization and "-g" for debugging has to be enabled
#in the project-specific CMakeLists.txt
- ADD_DEFINITIONS(-D__ECOS__=1 -D__ECOS=1)
- SET(ECOS_DEFINITIONS -Wall -Wno-long-long -pipe -fno-builtin)
+ add_definitions(-D__ECOS__=1 -D__ECOS=1)
+ set(ECOS_DEFINITIONS -Wall -Wno-long-long -pipe -fno-builtin)
#the executable depends on ecos target.ld
ECOS_ADD_TARGET_LIB(${ARGN})
# when using nmake makefiles, the custom buildtype supresses the default cl.exe flags
# and the rules for creating objects are adjusted for gcc
- SET(CMAKE_BUILD_TYPE CUSTOM_ECOS_BUILD)
- SET(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <FLAGS> -o <OBJECT> -c <SOURCE>")
- SET(CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <FLAGS> -o <OBJECT> -c <SOURCE>")
+ set(CMAKE_BUILD_TYPE CUSTOM_ECOS_BUILD)
+ set(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <FLAGS> -o <OBJECT> -c <SOURCE>")
+ set(CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <FLAGS> -o <OBJECT> -c <SOURCE>")
# special link commands for ecos-executables
- SET(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER> <CMAKE_CXX_LINK_FLAGS> <OBJECTS> -o <TARGET> ${_ecos_EXTRA_LIBS} -nostdlib -nostartfiles -L${CMAKE_CURRENT_BINARY_DIR}/ecos/install/lib -Ttarget.ld ${ECOS_LD_MCPU}")
- SET(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <CMAKE_C_LINK_FLAGS> <OBJECTS> -o <TARGET> ${_ecos_EXTRA_LIBS} -nostdlib -nostartfiles -L${CMAKE_CURRENT_BINARY_DIR}/ecos/install/lib -Ttarget.ld ${ECOS_LD_MCPU}")
+ set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER> <CMAKE_CXX_LINK_FLAGS> <OBJECTS> -o <TARGET> ${_ecos_EXTRA_LIBS} -nostdlib -nostartfiles -L${CMAKE_CURRENT_BINARY_DIR}/ecos/install/lib -Ttarget.ld ${ECOS_LD_MCPU}")
+ set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <CMAKE_C_LINK_FLAGS> <OBJECTS> -o <TARGET> ${_ecos_EXTRA_LIBS} -nostdlib -nostartfiles -L${CMAKE_CURRENT_BINARY_DIR}/ecos/install/lib -Ttarget.ld ${ECOS_LD_MCPU}")
# some strict compiler flags
- SET (CMAKE_C_FLAGS "-Wstrict-prototypes")
- SET (CMAKE_CXX_FLAGS "-Woverloaded-virtual -fno-rtti -Wctor-dtor-privacy -fno-strict-aliasing -fno-exceptions")
+ set (CMAKE_C_FLAGS "-Wstrict-prototypes")
+ set (CMAKE_CXX_FLAGS "-Woverloaded-virtual -fno-rtti -Wctor-dtor-privacy -fno-strict-aliasing -fno-exceptions")
- ADD_EXECUTABLE(${_exe_NAME} ${ARGN})
- SET_TARGET_PROPERTIES(${_exe_NAME} PROPERTIES SUFFIX ".elf")
+ add_executable(${_exe_NAME} ${ARGN})
+ set_target_properties(${_exe_NAME} PROPERTIES SUFFIX ".elf")
#create a binary file
- ADD_CUSTOM_COMMAND(
+ add_custom_command(
TARGET ${_exe_NAME}
POST_BUILD
COMMAND ${ECOS_ARCH_PREFIX}objcopy
@@ -206,7 +206,7 @@ MACRO(ECOS_ADD_EXECUTABLE _exe_NAME )
)
#and an srec file
- ADD_CUSTOM_COMMAND(
+ add_custom_command(
TARGET ${_exe_NAME}
POST_BUILD
COMMAND ${ECOS_ARCH_PREFIX}objcopy
@@ -214,17 +214,17 @@ MACRO(ECOS_ADD_EXECUTABLE _exe_NAME )
)
#add the created files to the clean-files
- SET_DIRECTORY_PROPERTIES(
+ set_directory_properties(
PROPERTIES
ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.bin;${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.srec;${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.lst;"
)
- ADD_CUSTOM_TARGET(ecosclean ${CMAKE_COMMAND} -DECOS_DIR=${CMAKE_CURRENT_BINARY_DIR}/ecos/ -P ${ECOS_CMAKE_MODULE_DIR}/ecos_clean.cmake )
- ADD_CUSTOM_TARGET(normalclean ${CMAKE_MAKE_PROGRAM} clean WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
- ADD_DEPENDENCIES (ecosclean normalclean)
+ add_custom_target(ecosclean ${CMAKE_COMMAND} -DECOS_DIR=${CMAKE_CURRENT_BINARY_DIR}/ecos/ -P ${ECOS_CMAKE_MODULE_DIR}/ecos_clean.cmake )
+ add_custom_target(normalclean ${CMAKE_MAKE_PROGRAM} clean WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+ add_dependencies (ecosclean normalclean)
- ADD_CUSTOM_TARGET( listing
+ add_custom_target( listing
COMMAND echo -e \"\\n--- Symbols sorted by address ---\\n\" > ${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.lst
COMMAND ${ECOS_ARCH_PREFIX}nm -S -C -n ${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.elf >> ${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.lst
COMMAND echo -e \"\\n--- Symbols sorted by size ---\\n\" >> ${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.lst
@@ -232,5 +232,5 @@ MACRO(ECOS_ADD_EXECUTABLE _exe_NAME )
COMMAND echo -e \"\\n--- Full assembly listing ---\\n\" >> ${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.lst
COMMAND ${ECOS_ARCH_PREFIX}objdump -S -x -d -C ${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.elf >> ${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.lst )
-ENDMACRO(ECOS_ADD_EXECUTABLE)
+endmacro(ECOS_ADD_EXECUTABLE)
diff --git a/Modules/UsePkgConfig.cmake b/Modules/UsePkgConfig.cmake
index 7f4318f055..b4517f75fb 100644
--- a/Modules/UsePkgConfig.cmake
+++ b/Modules/UsePkgConfig.cmake
@@ -24,55 +24,55 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PROGRAM(PKGCONFIG_EXECUTABLE NAMES pkg-config )
+find_program(PKGCONFIG_EXECUTABLE NAMES pkg-config )
-MACRO(PKGCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags)
- MESSAGE(STATUS
+macro(PKGCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags)
+ message(STATUS
"WARNING: you are using the obsolete 'PKGCONFIG' macro, use FindPkgConfig")
# reset the variables at the beginning
- SET(${_include_DIR})
- SET(${_link_DIR})
- SET(${_link_FLAGS})
- SET(${_cflags})
+ set(${_include_DIR})
+ set(${_link_DIR})
+ set(${_link_FLAGS})
+ set(${_cflags})
# if pkg-config has been found
- IF(PKGCONFIG_EXECUTABLE)
+ if(PKGCONFIG_EXECUTABLE)
- EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --exists RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
+ exec_program(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --exists RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull )
# and if the package of interest also exists for pkg-config, then get the information
- IF(NOT _return_VALUE)
+ if(NOT _return_VALUE)
- EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=includedir
+ exec_program(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=includedir
OUTPUT_VARIABLE ${_include_DIR} )
- STRING(REGEX REPLACE "[\r\n]" " " ${_include_DIR} "${${_include_DIR}}")
+ string(REGEX REPLACE "[\r\n]" " " ${_include_DIR} "${${_include_DIR}}")
- EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=libdir
+ exec_program(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=libdir
OUTPUT_VARIABLE ${_link_DIR} )
- STRING(REGEX REPLACE "[\r\n]" " " ${_link_DIR} "${${_link_DIR}}")
+ string(REGEX REPLACE "[\r\n]" " " ${_link_DIR} "${${_link_DIR}}")
- EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --libs
+ exec_program(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --libs
OUTPUT_VARIABLE ${_link_FLAGS} )
- STRING(REGEX REPLACE "[\r\n]" " " ${_link_FLAGS} "${${_link_FLAGS}}")
+ string(REGEX REPLACE "[\r\n]" " " ${_link_FLAGS} "${${_link_FLAGS}}")
- EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --cflags
+ exec_program(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --cflags
OUTPUT_VARIABLE ${_cflags} )
- STRING(REGEX REPLACE "[\r\n]" " " ${_cflags} "${${_cflags}}")
+ string(REGEX REPLACE "[\r\n]" " " ${_cflags} "${${_cflags}}")
- ELSE( NOT _return_VALUE)
+ else( NOT _return_VALUE)
- MESSAGE(STATUS "PKGCONFIG() indicates that ${_package} is not installed (install the package which contains ${_package}.pc if you want to support this feature)")
+ message(STATUS "PKGCONFIG() indicates that ${_package} is not installed (install the package which contains ${_package}.pc if you want to support this feature)")
- ENDIF(NOT _return_VALUE)
+ endif(NOT _return_VALUE)
# if pkg-config has NOT been found, INFORM the user
- ELSE(PKGCONFIG_EXECUTABLE)
+ else(PKGCONFIG_EXECUTABLE)
- MESSAGE(STATUS "WARNING: PKGCONFIG() indicates that the tool pkg-config has not been found on your system. You should install it.")
+ message(STATUS "WARNING: PKGCONFIG() indicates that the tool pkg-config has not been found on your system. You should install it.")
- ENDIF(PKGCONFIG_EXECUTABLE)
+ endif(PKGCONFIG_EXECUTABLE)
-ENDMACRO(PKGCONFIG _include_DIR _link_DIR _link_FLAGS _cflags)
+endmacro(PKGCONFIG _include_DIR _link_DIR _link_FLAGS _cflags)
-MARK_AS_ADVANCED(PKGCONFIG_EXECUTABLE)
+mark_as_advanced(PKGCONFIG_EXECUTABLE)
diff --git a/Modules/UseQt4.cmake b/Modules/UseQt4.cmake
index d4852a0834..260c3cd292 100644
--- a/Modules/UseQt4.cmake
+++ b/Modules/UseQt4.cmake
@@ -16,93 +16,93 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-ADD_DEFINITIONS(${QT_DEFINITIONS})
-SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG QT_DEBUG)
-SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE QT_NO_DEBUG)
-SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_DEBUG)
-SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG)
-IF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
- SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_DEBUG)
-ENDIF()
+add_definitions(${QT_DEFINITIONS})
+set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG QT_DEBUG)
+set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE QT_NO_DEBUG)
+set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_DEBUG)
+set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG)
+if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
+ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_DEBUG)
+endif()
-INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR})
+include_directories(${QT_INCLUDE_DIR})
-SET(QT_LIBRARIES "")
-SET(QT_LIBRARIES_PLUGINS "")
+set(QT_LIBRARIES "")
+set(QT_LIBRARIES_PLUGINS "")
-IF (QT_USE_QTMAIN)
- IF (Q_WS_WIN)
- SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY})
- ENDIF (Q_WS_WIN)
-ENDIF (QT_USE_QTMAIN)
+if (QT_USE_QTMAIN)
+ if (Q_WS_WIN)
+ set(QT_LIBRARIES ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY})
+ endif (Q_WS_WIN)
+endif (QT_USE_QTMAIN)
-IF(QT_DONT_USE_QTGUI)
- SET(QT_USE_QTGUI 0)
-ELSE(QT_DONT_USE_QTGUI)
- SET(QT_USE_QTGUI 1)
-ENDIF(QT_DONT_USE_QTGUI)
+if(QT_DONT_USE_QTGUI)
+ set(QT_USE_QTGUI 0)
+else(QT_DONT_USE_QTGUI)
+ set(QT_USE_QTGUI 1)
+endif(QT_DONT_USE_QTGUI)
-IF(QT_DONT_USE_QTCORE)
- SET(QT_USE_QTCORE 0)
-ELSE(QT_DONT_USE_QTCORE)
- SET(QT_USE_QTCORE 1)
-ENDIF(QT_DONT_USE_QTCORE)
+if(QT_DONT_USE_QTCORE)
+ set(QT_USE_QTCORE 0)
+else(QT_DONT_USE_QTCORE)
+ set(QT_USE_QTCORE 1)
+endif(QT_DONT_USE_QTCORE)
-IF (QT_USE_QT3SUPPORT)
- ADD_DEFINITIONS(-DQT3_SUPPORT)
-ENDIF (QT_USE_QT3SUPPORT)
+if (QT_USE_QT3SUPPORT)
+ add_definitions(-DQT3_SUPPORT)
+endif (QT_USE_QT3SUPPORT)
# list dependent modules, so dependent libraries are added
-SET(QT_QT3SUPPORT_MODULE_DEPENDS QTGUI QTSQL QTXML QTNETWORK QTCORE)
-SET(QT_QTSVG_MODULE_DEPENDS QTGUI QTXML QTCORE)
-SET(QT_QTUITOOLS_MODULE_DEPENDS QTGUI QTXML QTCORE)
-SET(QT_QTHELP_MODULE_DEPENDS QTGUI QTSQL QTXML QTNETWORK QTCORE)
-IF(QT_QTDBUS_FOUND)
- SET(QT_PHONON_MODULE_DEPENDS QTGUI QTDBUS QTCORE)
-ELSE(QT_QTDBUS_FOUND)
- SET(QT_PHONON_MODULE_DEPENDS QTGUI QTCORE)
-ENDIF(QT_QTDBUS_FOUND)
-SET(QT_QTDBUS_MODULE_DEPENDS QTXML QTCORE)
-SET(QT_QTXMLPATTERNS_MODULE_DEPENDS QTNETWORK QTCORE)
-SET(QT_QAXCONTAINER_MODULE_DEPENDS QTGUI QTCORE)
-SET(QT_QAXSERVER_MODULE_DEPENDS QTGUI QTCORE)
-SET(QT_QTSCRIPTTOOLS_MODULE_DEPENDS QTGUI QTCORE)
-SET(QT_QTWEBKIT_MODULE_DEPENDS QTXMLPATTERNS QTGUI QTCORE)
-SET(QT_QTDECLARATIVE_MODULE_DEPENDS QTSCRIPT QTSVG QTSQL QTXMLPATTERNS QTGUI QTCORE)
-SET(QT_QTMULTIMEDIA_MODULE_DEPENDS QTGUI QTCORE)
-SET(QT_QTOPENGL_MODULE_DEPENDS QTGUI QTCORE)
-SET(QT_QTSCRIPT_MODULE_DEPENDS QTCORE)
-SET(QT_QTGUI_MODULE_DEPENDS QTCORE)
-SET(QT_QTTEST_MODULE_DEPENDS QTCORE)
-SET(QT_QTXML_MODULE_DEPENDS QTCORE)
-SET(QT_QTSQL_MODULE_DEPENDS QTCORE)
-SET(QT_QTNETWORK_MODULE_DEPENDS QTCORE)
+set(QT_QT3SUPPORT_MODULE_DEPENDS QTGUI QTSQL QTXML QTNETWORK QTCORE)
+set(QT_QTSVG_MODULE_DEPENDS QTGUI QTXML QTCORE)
+set(QT_QTUITOOLS_MODULE_DEPENDS QTGUI QTXML QTCORE)
+set(QT_QTHELP_MODULE_DEPENDS QTGUI QTSQL QTXML QTNETWORK QTCORE)
+if(QT_QTDBUS_FOUND)
+ set(QT_PHONON_MODULE_DEPENDS QTGUI QTDBUS QTCORE)
+else(QT_QTDBUS_FOUND)
+ set(QT_PHONON_MODULE_DEPENDS QTGUI QTCORE)
+endif(QT_QTDBUS_FOUND)
+set(QT_QTDBUS_MODULE_DEPENDS QTXML QTCORE)
+set(QT_QTXMLPATTERNS_MODULE_DEPENDS QTNETWORK QTCORE)
+set(QT_QAXCONTAINER_MODULE_DEPENDS QTGUI QTCORE)
+set(QT_QAXSERVER_MODULE_DEPENDS QTGUI QTCORE)
+set(QT_QTSCRIPTTOOLS_MODULE_DEPENDS QTGUI QTCORE)
+set(QT_QTWEBKIT_MODULE_DEPENDS QTXMLPATTERNS QTGUI QTCORE)
+set(QT_QTDECLARATIVE_MODULE_DEPENDS QTSCRIPT QTSVG QTSQL QTXMLPATTERNS QTGUI QTCORE)
+set(QT_QTMULTIMEDIA_MODULE_DEPENDS QTGUI QTCORE)
+set(QT_QTOPENGL_MODULE_DEPENDS QTGUI QTCORE)
+set(QT_QTSCRIPT_MODULE_DEPENDS QTCORE)
+set(QT_QTGUI_MODULE_DEPENDS QTCORE)
+set(QT_QTTEST_MODULE_DEPENDS QTCORE)
+set(QT_QTXML_MODULE_DEPENDS QTCORE)
+set(QT_QTSQL_MODULE_DEPENDS QTCORE)
+set(QT_QTNETWORK_MODULE_DEPENDS QTCORE)
# Qt modules (in order of dependence)
-FOREACH(module QT3SUPPORT QTOPENGL QTASSISTANT QTDESIGNER QTMOTIF QTNSPLUGIN
+foreach(module QT3SUPPORT QTOPENGL QTASSISTANT QTDESIGNER QTMOTIF QTNSPLUGIN
QAXSERVER QAXCONTAINER QTDECLARATIVE QTSCRIPT QTSVG QTUITOOLS QTHELP
QTWEBKIT PHONON QTSCRIPTTOOLS QTMULTIMEDIA QTXMLPATTERNS QTGUI QTTEST
QTDBUS QTXML QTSQL QTNETWORK QTCORE)
- IF (QT_USE_${module} OR QT_USE_${module}_DEPENDS)
- IF (QT_${module}_FOUND)
- IF(QT_USE_${module})
- STRING(REPLACE "QT" "" qt_module_def "${module}")
- ADD_DEFINITIONS(-DQT_${qt_module_def}_LIB)
- INCLUDE_DIRECTORIES(${QT_${module}_INCLUDE_DIR})
- ENDIF(QT_USE_${module})
- SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIBRARY})
- SET(QT_LIBRARIES_PLUGINS ${QT_LIBRARIES_PLUGINS} ${QT_${module}_PLUGINS})
- IF(QT_IS_STATIC)
- SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIB_DEPENDENCIES})
- ENDIF(QT_IS_STATIC)
- FOREACH(depend_module ${QT_${module}_MODULE_DEPENDS})
- SET(QT_USE_${depend_module}_DEPENDS 1)
- ENDFOREACH(depend_module ${QT_${module}_MODULE_DEPENDS})
- ELSE (QT_${module}_FOUND)
- MESSAGE("Qt ${module} library not found.")
- ENDIF (QT_${module}_FOUND)
- ENDIF (QT_USE_${module} OR QT_USE_${module}_DEPENDS)
+ if (QT_USE_${module} OR QT_USE_${module}_DEPENDS)
+ if (QT_${module}_FOUND)
+ if(QT_USE_${module})
+ string(REPLACE "QT" "" qt_module_def "${module}")
+ add_definitions(-DQT_${qt_module_def}_LIB)
+ include_directories(${QT_${module}_INCLUDE_DIR})
+ endif(QT_USE_${module})
+ set(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIBRARY})
+ set(QT_LIBRARIES_PLUGINS ${QT_LIBRARIES_PLUGINS} ${QT_${module}_PLUGINS})
+ if(QT_IS_STATIC)
+ set(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIB_DEPENDENCIES})
+ endif(QT_IS_STATIC)
+ foreach(depend_module ${QT_${module}_MODULE_DEPENDS})
+ set(QT_USE_${depend_module}_DEPENDS 1)
+ endforeach(depend_module ${QT_${module}_MODULE_DEPENDS})
+ else (QT_${module}_FOUND)
+ message("Qt ${module} library not found.")
+ endif (QT_${module}_FOUND)
+ endif (QT_USE_${module} OR QT_USE_${module}_DEPENDS)
-ENDFOREACH(module)
+endforeach(module)
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index a7085ee314..e4e72c2aad 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -15,7 +15,7 @@
# The name-specific variable SWIG_MODULE_<name>_EXTRA_DEPS may be used
# to specify extra dependencies for the generated modules.
# If the source file generated by swig need some special flag you can use
-# SET_SOURCE_FILES_PROPERTIES( ${swig_generated_file_fullname}
+# set_source_files_properties( ${swig_generated_file_fullname}
# PROPERTIES COMPILE_FLAGS "-bla")
@@ -33,136 +33,136 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-SET(SWIG_CXX_EXTENSION "cxx")
-SET(SWIG_EXTRA_LIBRARIES "")
+set(SWIG_CXX_EXTENSION "cxx")
+set(SWIG_EXTRA_LIBRARIES "")
-SET(SWIG_PYTHON_EXTRA_FILE_EXTENSION "py")
+set(SWIG_PYTHON_EXTRA_FILE_EXTENSION "py")
#
# For given swig module initialize variables associated with it
#
-MACRO(SWIG_MODULE_INITIALIZE name language)
- STRING(TOUPPER "${language}" swig_uppercase_language)
- STRING(TOLOWER "${language}" swig_lowercase_language)
- SET(SWIG_MODULE_${name}_LANGUAGE "${swig_uppercase_language}")
- SET(SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG "${swig_lowercase_language}")
-
- SET(SWIG_MODULE_${name}_REAL_NAME "${name}")
- IF("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "UNKNOWN")
- MESSAGE(FATAL_ERROR "SWIG Error: Language \"${language}\" not found")
- ELSEIF("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "PYTHON")
+macro(SWIG_MODULE_INITIALIZE name language)
+ string(TOUPPER "${language}" swig_uppercase_language)
+ string(TOLOWER "${language}" swig_lowercase_language)
+ set(SWIG_MODULE_${name}_LANGUAGE "${swig_uppercase_language}")
+ set(SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG "${swig_lowercase_language}")
+
+ set(SWIG_MODULE_${name}_REAL_NAME "${name}")
+ if("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "UNKNOWN")
+ message(FATAL_ERROR "SWIG Error: Language \"${language}\" not found")
+ elseif("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "PYTHON")
# when swig is used without the -interface it will produce in the module.py
# a 'import _modulename' statement, which implies having a corresponding
# _modulename.so (*NIX), _modulename.pyd (Win32).
- SET(SWIG_MODULE_${name}_REAL_NAME "_${name}")
- ELSEIF("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "PERL")
- SET(SWIG_MODULE_${name}_EXTRA_FLAGS "-shadow")
- ENDIF()
-ENDMACRO(SWIG_MODULE_INITIALIZE)
+ set(SWIG_MODULE_${name}_REAL_NAME "_${name}")
+ elseif("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "PERL")
+ set(SWIG_MODULE_${name}_EXTRA_FLAGS "-shadow")
+ endif()
+endmacro(SWIG_MODULE_INITIALIZE)
#
# For a given language, input file, and output file, determine extra files that
# will be generated. This is internal swig macro.
#
-MACRO(SWIG_GET_EXTRA_OUTPUT_FILES language outfiles generatedpath infile)
- SET(${outfiles} "")
- GET_SOURCE_FILE_PROPERTY(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename
+macro(SWIG_GET_EXTRA_OUTPUT_FILES language outfiles generatedpath infile)
+ set(${outfiles} "")
+ get_source_file_property(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename
${infile} SWIG_MODULE_NAME)
- IF(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename STREQUAL "NOTFOUND")
- GET_FILENAME_COMPONENT(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename "${infile}" NAME_WE)
- ENDIF(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename STREQUAL "NOTFOUND")
- FOREACH(it ${SWIG_${language}_EXTRA_FILE_EXTENSION})
- SET(${outfiles} ${${outfiles}}
+ if(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename STREQUAL "NOTFOUND")
+ get_filename_component(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename "${infile}" NAME_WE)
+ endif(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename STREQUAL "NOTFOUND")
+ foreach(it ${SWIG_${language}_EXTRA_FILE_EXTENSION})
+ set(${outfiles} ${${outfiles}}
"${generatedpath}/${SWIG_GET_EXTRA_OUTPUT_FILES_module_basename}.${it}")
- ENDFOREACH(it)
-ENDMACRO(SWIG_GET_EXTRA_OUTPUT_FILES)
+ endforeach(it)
+endmacro(SWIG_GET_EXTRA_OUTPUT_FILES)
#
# Take swig (*.i) file and add proper custom commands for it
#
-MACRO(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
- SET(swig_full_infile ${infile})
- GET_FILENAME_COMPONENT(swig_source_file_path "${infile}" PATH)
- GET_FILENAME_COMPONENT(swig_source_file_name_we "${infile}" NAME_WE)
- GET_SOURCE_FILE_PROPERTY(swig_source_file_generated ${infile} GENERATED)
- GET_SOURCE_FILE_PROPERTY(swig_source_file_cplusplus ${infile} CPLUSPLUS)
- GET_SOURCE_FILE_PROPERTY(swig_source_file_flags ${infile} SWIG_FLAGS)
- IF("${swig_source_file_flags}" STREQUAL "NOTFOUND")
- SET(swig_source_file_flags "")
- ENDIF("${swig_source_file_flags}" STREQUAL "NOTFOUND")
- SET(swig_source_file_fullname "${infile}")
- IF(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_SOURCE_DIR}")
- STRING(REGEX REPLACE
+macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
+ set(swig_full_infile ${infile})
+ get_filename_component(swig_source_file_path "${infile}" PATH)
+ get_filename_component(swig_source_file_name_we "${infile}" NAME_WE)
+ get_source_file_property(swig_source_file_generated ${infile} GENERATED)
+ get_source_file_property(swig_source_file_cplusplus ${infile} CPLUSPLUS)
+ get_source_file_property(swig_source_file_flags ${infile} SWIG_FLAGS)
+ if("${swig_source_file_flags}" STREQUAL "NOTFOUND")
+ set(swig_source_file_flags "")
+ endif("${swig_source_file_flags}" STREQUAL "NOTFOUND")
+ set(swig_source_file_fullname "${infile}")
+ if(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_SOURCE_DIR}")
+ string(REGEX REPLACE
"^${CMAKE_CURRENT_SOURCE_DIR}" ""
swig_source_file_relative_path
"${swig_source_file_path}")
- ELSE(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_SOURCE_DIR}")
- IF(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_BINARY_DIR}")
- STRING(REGEX REPLACE
+ else(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_SOURCE_DIR}")
+ if(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_BINARY_DIR}")
+ string(REGEX REPLACE
"^${CMAKE_CURRENT_BINARY_DIR}" ""
swig_source_file_relative_path
"${swig_source_file_path}")
- SET(swig_source_file_generated 1)
- ELSE(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_BINARY_DIR}")
- SET(swig_source_file_relative_path "${swig_source_file_path}")
- IF(swig_source_file_generated)
- SET(swig_source_file_fullname "${CMAKE_CURRENT_BINARY_DIR}/${infile}")
- ELSE(swig_source_file_generated)
- SET(swig_source_file_fullname "${CMAKE_CURRENT_SOURCE_DIR}/${infile}")
- ENDIF(swig_source_file_generated)
- ENDIF(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_BINARY_DIR}")
- ENDIF(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_SOURCE_DIR}")
-
- SET(swig_generated_file_fullname
+ set(swig_source_file_generated 1)
+ else(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_BINARY_DIR}")
+ set(swig_source_file_relative_path "${swig_source_file_path}")
+ if(swig_source_file_generated)
+ set(swig_source_file_fullname "${CMAKE_CURRENT_BINARY_DIR}/${infile}")
+ else(swig_source_file_generated)
+ set(swig_source_file_fullname "${CMAKE_CURRENT_SOURCE_DIR}/${infile}")
+ endif(swig_source_file_generated)
+ endif(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_BINARY_DIR}")
+ endif(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_SOURCE_DIR}")
+
+ set(swig_generated_file_fullname
"${CMAKE_CURRENT_BINARY_DIR}")
- IF(swig_source_file_relative_path)
- SET(swig_generated_file_fullname
+ if(swig_source_file_relative_path)
+ set(swig_generated_file_fullname
"${swig_generated_file_fullname}/${swig_source_file_relative_path}")
- ENDIF(swig_source_file_relative_path)
+ endif(swig_source_file_relative_path)
# If CMAKE_SWIG_OUTDIR was specified then pass it to -outdir
- IF(CMAKE_SWIG_OUTDIR)
- SET(swig_outdir ${CMAKE_SWIG_OUTDIR})
- ELSE(CMAKE_SWIG_OUTDIR)
- SET(swig_outdir ${CMAKE_CURRENT_BINARY_DIR})
- ENDIF(CMAKE_SWIG_OUTDIR)
+ if(CMAKE_SWIG_OUTDIR)
+ set(swig_outdir ${CMAKE_SWIG_OUTDIR})
+ else(CMAKE_SWIG_OUTDIR)
+ set(swig_outdir ${CMAKE_CURRENT_BINARY_DIR})
+ endif(CMAKE_SWIG_OUTDIR)
SWIG_GET_EXTRA_OUTPUT_FILES(${SWIG_MODULE_${name}_LANGUAGE}
swig_extra_generated_files
"${swig_outdir}"
"${infile}")
- SET(swig_generated_file_fullname
+ set(swig_generated_file_fullname
"${swig_generated_file_fullname}/${swig_source_file_name_we}")
# add the language into the name of the file (i.e. TCL_wrap)
# this allows for the same .i file to be wrapped into different languages
- SET(swig_generated_file_fullname
+ set(swig_generated_file_fullname
"${swig_generated_file_fullname}${SWIG_MODULE_${name}_LANGUAGE}_wrap")
- IF(swig_source_file_cplusplus)
- SET(swig_generated_file_fullname
+ if(swig_source_file_cplusplus)
+ set(swig_generated_file_fullname
"${swig_generated_file_fullname}.${SWIG_CXX_EXTENSION}")
- ELSE(swig_source_file_cplusplus)
- SET(swig_generated_file_fullname
+ else(swig_source_file_cplusplus)
+ set(swig_generated_file_fullname
"${swig_generated_file_fullname}.c")
- ENDIF(swig_source_file_cplusplus)
+ endif(swig_source_file_cplusplus)
- #MESSAGE("Full path to source file: ${swig_source_file_fullname}")
- #MESSAGE("Full path to the output file: ${swig_generated_file_fullname}")
- GET_DIRECTORY_PROPERTY(cmake_include_directories INCLUDE_DIRECTORIES)
- SET(swig_include_dirs)
- FOREACH(it ${cmake_include_directories})
- SET(swig_include_dirs ${swig_include_dirs} "-I${it}")
- ENDFOREACH(it)
+ #message("Full path to source file: ${swig_source_file_fullname}")
+ #message("Full path to the output file: ${swig_generated_file_fullname}")
+ get_directory_property(cmake_include_directories INCLUDE_DIRECTORIES)
+ set(swig_include_dirs)
+ foreach(it ${cmake_include_directories})
+ set(swig_include_dirs ${swig_include_dirs} "-I${it}")
+ endforeach(it)
- SET(swig_special_flags)
+ set(swig_special_flags)
# default is c, so add c++ flag if it is c++
- IF(swig_source_file_cplusplus)
- SET(swig_special_flags ${swig_special_flags} "-c++")
- ENDIF(swig_source_file_cplusplus)
- SET(swig_extra_flags)
- IF(SWIG_MODULE_${name}_EXTRA_FLAGS)
- SET(swig_extra_flags ${swig_extra_flags} ${SWIG_MODULE_${name}_EXTRA_FLAGS})
- ENDIF(SWIG_MODULE_${name}_EXTRA_FLAGS)
- ADD_CUSTOM_COMMAND(
+ if(swig_source_file_cplusplus)
+ set(swig_special_flags ${swig_special_flags} "-c++")
+ endif(swig_source_file_cplusplus)
+ set(swig_extra_flags)
+ if(SWIG_MODULE_${name}_EXTRA_FLAGS)
+ set(swig_extra_flags ${swig_extra_flags} ${SWIG_MODULE_${name}_EXTRA_FLAGS})
+ endif(SWIG_MODULE_${name}_EXTRA_FLAGS)
+ add_custom_command(
OUTPUT "${swig_generated_file_fullname}" ${swig_extra_generated_files}
# Let's create the ${swig_outdir} at execution time, in case dir contains $(OutDir)
COMMAND ${CMAKE_COMMAND} -E make_directory ${swig_outdir}
@@ -179,53 +179,53 @@ MACRO(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
MAIN_DEPENDENCY "${swig_source_file_fullname}"
DEPENDS ${SWIG_MODULE_${name}_EXTRA_DEPS}
COMMENT "Swig source")
- SET_SOURCE_FILES_PROPERTIES("${swig_generated_file_fullname}" ${swig_extra_generated_files}
+ set_source_files_properties("${swig_generated_file_fullname}" ${swig_extra_generated_files}
PROPERTIES GENERATED 1)
- SET(${outfiles} "${swig_generated_file_fullname}" ${swig_extra_generated_files})
-ENDMACRO(SWIG_ADD_SOURCE_TO_MODULE)
+ set(${outfiles} "${swig_generated_file_fullname}" ${swig_extra_generated_files})
+endmacro(SWIG_ADD_SOURCE_TO_MODULE)
#
# Create Swig module
#
-MACRO(SWIG_ADD_MODULE name language)
+macro(SWIG_ADD_MODULE name language)
SWIG_MODULE_INITIALIZE(${name} ${language})
- SET(swig_dot_i_sources)
- SET(swig_other_sources)
- FOREACH(it ${ARGN})
- IF(${it} MATCHES ".*\\.i$")
- SET(swig_dot_i_sources ${swig_dot_i_sources} "${it}")
- ELSE(${it} MATCHES ".*\\.i$")
- SET(swig_other_sources ${swig_other_sources} "${it}")
- ENDIF(${it} MATCHES ".*\\.i$")
- ENDFOREACH(it)
-
- SET(swig_generated_sources)
- FOREACH(it ${swig_dot_i_sources})
+ set(swig_dot_i_sources)
+ set(swig_other_sources)
+ foreach(it ${ARGN})
+ if(${it} MATCHES ".*\\.i$")
+ set(swig_dot_i_sources ${swig_dot_i_sources} "${it}")
+ else(${it} MATCHES ".*\\.i$")
+ set(swig_other_sources ${swig_other_sources} "${it}")
+ endif(${it} MATCHES ".*\\.i$")
+ endforeach(it)
+
+ set(swig_generated_sources)
+ foreach(it ${swig_dot_i_sources})
SWIG_ADD_SOURCE_TO_MODULE(${name} swig_generated_source ${it})
- SET(swig_generated_sources ${swig_generated_sources} "${swig_generated_source}")
- ENDFOREACH(it)
- GET_DIRECTORY_PROPERTY(swig_extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
- SET_DIRECTORY_PROPERTIES(PROPERTIES
+ set(swig_generated_sources ${swig_generated_sources} "${swig_generated_source}")
+ endforeach(it)
+ get_directory_property(swig_extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
+ set_directory_properties(PROPERTIES
ADDITIONAL_MAKE_CLEAN_FILES "${swig_extra_clean_files};${swig_generated_sources}")
- ADD_LIBRARY(${SWIG_MODULE_${name}_REAL_NAME}
+ add_library(${SWIG_MODULE_${name}_REAL_NAME}
MODULE
${swig_generated_sources}
${swig_other_sources})
- STRING(TOLOWER "${language}" swig_lowercase_language)
- IF ("${swig_lowercase_language}" STREQUAL "java")
- IF (APPLE)
+ string(TOLOWER "${language}" swig_lowercase_language)
+ if ("${swig_lowercase_language}" STREQUAL "java")
+ if (APPLE)
# In java you want:
# System.loadLibrary("LIBRARY");
# then JNI will look for a library whose name is platform dependent, namely
# MacOS : libLIBRARY.jnilib
# Windows: LIBRARY.dll
# Linux : libLIBRARY.so
- SET_TARGET_PROPERTIES (${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".jnilib")
- ENDIF (APPLE)
- ENDIF ("${swig_lowercase_language}" STREQUAL "java")
- IF ("${swig_lowercase_language}" STREQUAL "python")
+ set_target_properties (${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".jnilib")
+ endif (APPLE)
+ endif ("${swig_lowercase_language}" STREQUAL "java")
+ if ("${swig_lowercase_language}" STREQUAL "python")
# this is only needed for the python case where a _modulename.so is generated
- SET_TARGET_PROPERTIES(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "")
+ set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "")
# Python extension modules on Windows must have the extension ".pyd"
# instead of ".dll" as of Python 2.5. Older python versions do support
# this suffix.
@@ -234,20 +234,20 @@ MACRO(SWIG_ADD_MODULE name language)
# Windows: .dll is no longer supported as a filename extension for extension modules.
# .pyd is now the only filename extension that will be searched for.
# </quote>
- IF(WIN32 AND NOT CYGWIN)
- SET_TARGET_PROPERTIES(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".pyd")
- ENDIF(WIN32 AND NOT CYGWIN)
- ENDIF ("${swig_lowercase_language}" STREQUAL "python")
-ENDMACRO(SWIG_ADD_MODULE)
+ if(WIN32 AND NOT CYGWIN)
+ set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".pyd")
+ endif(WIN32 AND NOT CYGWIN)
+ endif ("${swig_lowercase_language}" STREQUAL "python")
+endmacro(SWIG_ADD_MODULE)
#
# Like TARGET_LINK_LIBRARIES but for swig modules
#
-MACRO(SWIG_LINK_LIBRARIES name)
- IF(SWIG_MODULE_${name}_REAL_NAME)
- TARGET_LINK_LIBRARIES(${SWIG_MODULE_${name}_REAL_NAME} ${ARGN})
- ELSE(SWIG_MODULE_${name}_REAL_NAME)
- MESSAGE(SEND_ERROR "Cannot find Swig library \"${name}\".")
- ENDIF(SWIG_MODULE_${name}_REAL_NAME)
-ENDMACRO(SWIG_LINK_LIBRARIES name)
+macro(SWIG_LINK_LIBRARIES name)
+ if(SWIG_MODULE_${name}_REAL_NAME)
+ target_link_libraries(${SWIG_MODULE_${name}_REAL_NAME} ${ARGN})
+ else(SWIG_MODULE_${name}_REAL_NAME)
+ message(SEND_ERROR "Cannot find Swig library \"${name}\".")
+ endif(SWIG_MODULE_${name}_REAL_NAME)
+endmacro(SWIG_LINK_LIBRARIES name)
diff --git a/Modules/UseVTK40.cmake b/Modules/UseVTK40.cmake
index c1157d6beb..d6bdaaa52b 100644
--- a/Modules/UseVTK40.cmake
+++ b/Modules/UseVTK40.cmake
@@ -19,11 +19,11 @@
# to point here.
# Add compiler flags needed to use VTK.
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VTK_REQUIRED_C_FLAGS}")
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${VTK_REQUIRED_CXX_FLAGS}")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VTK_REQUIRED_C_FLAGS}")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${VTK_REQUIRED_CXX_FLAGS}")
# Add include directories needed to use VTK.
-INCLUDE_DIRECTORIES(${VTK_INCLUDE_DIRS})
+include_directories(${VTK_INCLUDE_DIRS})
# Add link directories needed to use VTK.
-LINK_DIRECTORIES(${VTK_LIBRARY_DIRS})
+link_directories(${VTK_LIBRARY_DIRS})
diff --git a/Modules/UseVTKBuildSettings40.cmake b/Modules/UseVTKBuildSettings40.cmake
index 4df59b9dd6..474f67c9c3 100644
--- a/Modules/UseVTKBuildSettings40.cmake
+++ b/Modules/UseVTKBuildSettings40.cmake
@@ -16,23 +16,23 @@
# Implementation detail for FindVTK.cmake to let it provide a
# VTK_BUILD_SETTINGS_FILE for VTK 4.0.
-SET(CMAKE_BUILD_SETTING_CMAKE_MAJOR_VERSION "${VTK40_CMAKE_MAJOR_VERSION}")
-SET(CMAKE_BUILD_SETTING_CMAKE_MINOR_VERSION "${VTK40_CMAKE_MINOR_VERSION}")
-SET(CMAKE_BUILD_SETTING_PROJECT_NAME "VTK")
+set(CMAKE_BUILD_SETTING_CMAKE_MAJOR_VERSION "${VTK40_CMAKE_MAJOR_VERSION}")
+set(CMAKE_BUILD_SETTING_CMAKE_MINOR_VERSION "${VTK40_CMAKE_MINOR_VERSION}")
+set(CMAKE_BUILD_SETTING_PROJECT_NAME "VTK")
-SET(CMAKE_BUILD_SETTING_C_COMPILER "${VTK40_CMAKE_C_COMPILER}")
-SET(CMAKE_BUILD_SETTING_C_FLAGS "${VTK40_CMAKE_C_FLAGS}")
-SET(CMAKE_BUILD_SETTING_C_FLAGS_DEBUG "${VTK40_CMAKE_C_FLAGS_DEBUG}")
-SET(CMAKE_BUILD_SETTING_C_FLAGS_RELEASE "${VTK40_CMAKE_C_FLAGS_RELEASE}")
-SET(CMAKE_BUILD_SETTING_C_FLAGS_MINSIZEREL "${VTK40_CMAKE_C_FLAGS_MINSIZEREL}")
-SET(CMAKE_BUILD_SETTING_C_FLAGS_RELWITHDEBINFO "${VTK40_CMAKE_C_FLAGS_RELWITHDEBINFO}")
+set(CMAKE_BUILD_SETTING_C_COMPILER "${VTK40_CMAKE_C_COMPILER}")
+set(CMAKE_BUILD_SETTING_C_FLAGS "${VTK40_CMAKE_C_FLAGS}")
+set(CMAKE_BUILD_SETTING_C_FLAGS_DEBUG "${VTK40_CMAKE_C_FLAGS_DEBUG}")
+set(CMAKE_BUILD_SETTING_C_FLAGS_RELEASE "${VTK40_CMAKE_C_FLAGS_RELEASE}")
+set(CMAKE_BUILD_SETTING_C_FLAGS_MINSIZEREL "${VTK40_CMAKE_C_FLAGS_MINSIZEREL}")
+set(CMAKE_BUILD_SETTING_C_FLAGS_RELWITHDEBINFO "${VTK40_CMAKE_C_FLAGS_RELWITHDEBINFO}")
-SET(CMAKE_BUILD_SETTING_CXX_COMPILER "${VTK40_CMAKE_CXX_COMPILER}")
-SET(CMAKE_BUILD_SETTING_CXX_FLAGS "${VTK40_CMAKE_CXX_FLAGS}")
-SET(CMAKE_BUILD_SETTING_CXX_FLAGS_DEBUG "${VTK40_CMAKE_CXX_FLAGS_DEBUG}")
-SET(CMAKE_BUILD_SETTING_CXX_FLAGS_RELEASE "${VTK40_CMAKE_CXX_FLAGS_RELEASE}")
-SET(CMAKE_BUILD_SETTING_CXX_FLAGS_MINSIZEREL "${VTK40_CMAKE_CXX_FLAGS_MINSIZEREL}")
-SET(CMAKE_BUILD_SETTING_CXX_FLAGS_RELWITHDEBINFO "${VTK40_CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
+set(CMAKE_BUILD_SETTING_CXX_COMPILER "${VTK40_CMAKE_CXX_COMPILER}")
+set(CMAKE_BUILD_SETTING_CXX_FLAGS "${VTK40_CMAKE_CXX_FLAGS}")
+set(CMAKE_BUILD_SETTING_CXX_FLAGS_DEBUG "${VTK40_CMAKE_CXX_FLAGS_DEBUG}")
+set(CMAKE_BUILD_SETTING_CXX_FLAGS_RELEASE "${VTK40_CMAKE_CXX_FLAGS_RELEASE}")
+set(CMAKE_BUILD_SETTING_CXX_FLAGS_MINSIZEREL "${VTK40_CMAKE_CXX_FLAGS_MINSIZEREL}")
+set(CMAKE_BUILD_SETTING_CXX_FLAGS_RELWITHDEBINFO "${VTK40_CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
-SET(CMAKE_BUILD_SETTING_BUILD_TYPE "${VTK40_CMAKE_BUILD_TYPE}")
-SET(CMAKE_BUILD_SETTING_BUILD_TOOL "${VTK40_CMAKE_BUILD_TOOL}")
+set(CMAKE_BUILD_SETTING_BUILD_TYPE "${VTK40_CMAKE_BUILD_TYPE}")
+set(CMAKE_BUILD_SETTING_BUILD_TOOL "${VTK40_CMAKE_BUILD_TOOL}")
diff --git a/Modules/UseVTKConfig40.cmake b/Modules/UseVTKConfig40.cmake
index ca5e7aa3ce..549a792e3b 100644
--- a/Modules/UseVTKConfig40.cmake
+++ b/Modules/UseVTKConfig40.cmake
@@ -17,21 +17,21 @@
# FindVTK.cmake module. Do not include directly.
# Hard-code the version number since it isn't provided by VTK 4.0.
-SET(VTK_MAJOR_VERSION 4)
-SET(VTK_MINOR_VERSION 0)
-SET(VTK_BUILD_VERSION 2)
+set(VTK_MAJOR_VERSION 4)
+set(VTK_MINOR_VERSION 0)
+set(VTK_BUILD_VERSION 2)
# Provide a new UseVTK file that doesn't do a full LOAD_CACHE.
-SET(VTK_USE_FILE ${CMAKE_ROOT}/Modules/UseVTK40.cmake)
+set(VTK_USE_FILE ${CMAKE_ROOT}/Modules/UseVTK40.cmake)
# Provide a build settings file.
-SET(VTK_BUILD_SETTINGS_FILE ${CMAKE_ROOT}/Modules/UseVTKBuildSettings40.cmake)
+set(VTK_BUILD_SETTINGS_FILE ${CMAKE_ROOT}/Modules/UseVTKBuildSettings40.cmake)
# There are no CMake extensions for VTK 4.0.
-SET(VTK_CMAKE_EXTENSIONS_DIR "")
+set(VTK_CMAKE_EXTENSIONS_DIR "")
# grep "VTK40_" UseVTKConfig40.cmake |sed 's/.*VTK40_\([A-Za-z0-9_]*\).*/ \1/'
-LOAD_CACHE(${VTK_DIR} READ_WITH_PREFIX VTK40_
+load_cache(${VTK_DIR} READ_WITH_PREFIX VTK40_
BUILD_SHARED_LIBS
CMAKE_BUILD_TOOL
CMAKE_BUILD_TYPE
@@ -132,124 +132,124 @@ LOAD_CACHE(${VTK_DIR} READ_WITH_PREFIX VTK40_
)
# Copy needed settings from the VTK 4.0 cache.
-SET(VTK_BUILD_SHARED ${VTK40_BUILD_SHARED_LIBS})
-SET(VTK_DEBUG_LEAKS ${VTK40_VTK_DEBUG_LEAKS})
-SET(VTK_HAVE_VG500 ${VTK40_VTK_HAVE_VG500})
-SET(VTK_HAVE_VP1000 ${VTK40_VTK_HAVE_VP1000})
-SET(VTK_USE_MANGLED_MESA ${VTK40_VTK_MANGLE_MESA})
-SET(VTK_MPIRUN_EXE ${VTK40_MPIRUN})
-SET(VTK_MPI_POSTFLAGS ${VTK40_MPI_POSTFLAGS})
-SET(VTK_MPI_PREFLAGS ${VTK40_MPI_PREFLAGS})
-SET(VTK_OPENGL_HAS_OSMESA ${VTK40_VTK_OPENGL_HAS_OSMESA})
-SET(VTK_USE_64BIT_IDS ${VTK40_VTK_USE_64BIT_IDS})
-SET(VTK_USE_ANSI_STDLIB ${VTK40_VTK_USE_ANSI_STDLIB})
-SET(VTK_USE_HYBRID ${VTK40_VTK_USE_HYBRID})
-SET(VTK_USE_MATROX_IMAGING ${VTK40_VTK_USE_MATROX_IMAGING})
-SET(VTK_USE_MPI ${VTK40_VTK_USE_MPI})
-SET(VTK_USE_PARALLEL ${VTK40_VTK_USE_PARALLEL})
-SET(VTK_USE_PATENTED ${VTK40_VTK_USE_PATENTED})
-SET(VTK_USE_RENDERING ${VTK40_VTK_USE_RENDERING})
-SET(VTK_USE_VIDEO_FOR_WINDOWS ${VTK40_VTK_USE_VIDEO_FOR_WINDOWS})
-SET(VTK_USE_VOLUMEPRO ${VTK40_VTK_USE_VOLUMEPRO})
-SET(VTK_USE_X ${VTK40_VTK_USE_X})
-SET(VTK_WRAP_JAVA ${VTK40_VTK_WRAP_JAVA})
-SET(VTK_WRAP_PYTHON ${VTK40_VTK_WRAP_PYTHON})
-SET(VTK_WRAP_TCL ${VTK40_VTK_WRAP_TCL})
+set(VTK_BUILD_SHARED ${VTK40_BUILD_SHARED_LIBS})
+set(VTK_DEBUG_LEAKS ${VTK40_VTK_DEBUG_LEAKS})
+set(VTK_HAVE_VG500 ${VTK40_VTK_HAVE_VG500})
+set(VTK_HAVE_VP1000 ${VTK40_VTK_HAVE_VP1000})
+set(VTK_USE_MANGLED_MESA ${VTK40_VTK_MANGLE_MESA})
+set(VTK_MPIRUN_EXE ${VTK40_MPIRUN})
+set(VTK_MPI_POSTFLAGS ${VTK40_MPI_POSTFLAGS})
+set(VTK_MPI_PREFLAGS ${VTK40_MPI_PREFLAGS})
+set(VTK_OPENGL_HAS_OSMESA ${VTK40_VTK_OPENGL_HAS_OSMESA})
+set(VTK_USE_64BIT_IDS ${VTK40_VTK_USE_64BIT_IDS})
+set(VTK_USE_ANSI_STDLIB ${VTK40_VTK_USE_ANSI_STDLIB})
+set(VTK_USE_HYBRID ${VTK40_VTK_USE_HYBRID})
+set(VTK_USE_MATROX_IMAGING ${VTK40_VTK_USE_MATROX_IMAGING})
+set(VTK_USE_MPI ${VTK40_VTK_USE_MPI})
+set(VTK_USE_PARALLEL ${VTK40_VTK_USE_PARALLEL})
+set(VTK_USE_PATENTED ${VTK40_VTK_USE_PATENTED})
+set(VTK_USE_RENDERING ${VTK40_VTK_USE_RENDERING})
+set(VTK_USE_VIDEO_FOR_WINDOWS ${VTK40_VTK_USE_VIDEO_FOR_WINDOWS})
+set(VTK_USE_VOLUMEPRO ${VTK40_VTK_USE_VOLUMEPRO})
+set(VTK_USE_X ${VTK40_VTK_USE_X})
+set(VTK_WRAP_JAVA ${VTK40_VTK_WRAP_JAVA})
+set(VTK_WRAP_PYTHON ${VTK40_VTK_WRAP_PYTHON})
+set(VTK_WRAP_TCL ${VTK40_VTK_WRAP_TCL})
# Create the list of available kits.
-SET(VTK_KITS COMMON FILTERING GRAPHICS IMAGING IO)
-IF(VTK_USE_RENDERING)
- SET(VTK_KITS ${VTK_KITS} RENDERING)
-ENDIF(VTK_USE_RENDERING)
-IF(VTK_USE_HYBRID)
- SET(VTK_KITS ${VTK_KITS} HYBRID)
-ENDIF(VTK_USE_HYBRID)
-IF(VTK_USE_PARALLEL)
- SET(VTK_KITS ${VTK_KITS} PARALLEL)
-ENDIF(VTK_USE_PARALLEL)
-IF(VTK_USE_PATENTED)
- SET(VTK_KITS ${VTK_KITS} PATENTED)
-ENDIF(VTK_USE_PATENTED)
+set(VTK_KITS COMMON FILTERING GRAPHICS IMAGING IO)
+if(VTK_USE_RENDERING)
+ set(VTK_KITS ${VTK_KITS} RENDERING)
+endif(VTK_USE_RENDERING)
+if(VTK_USE_HYBRID)
+ set(VTK_KITS ${VTK_KITS} HYBRID)
+endif(VTK_USE_HYBRID)
+if(VTK_USE_PARALLEL)
+ set(VTK_KITS ${VTK_KITS} PARALLEL)
+endif(VTK_USE_PARALLEL)
+if(VTK_USE_PATENTED)
+ set(VTK_KITS ${VTK_KITS} PATENTED)
+endif(VTK_USE_PATENTED)
# Create the list of available languages.
-SET(VTK_LANGUAGES "")
-IF(VTK_WRAP_TCL)
- SET(VTK_LANGUAGES ${VTK_LANGUAGES} TCL)
-ENDIF(VTK_WRAP_TCL)
-IF(VTK_WRAP_PYTHON)
- SET(VTK_LANGUAGES ${VTK_LANGUAGES} PYTHON)
-ENDIF(VTK_WRAP_PYTHON)
-IF(VTK_WRAP_JAVA)
- SET(VTK_LANGUAGES ${VTK_LANGUAGES} JAVA)
-ENDIF(VTK_WRAP_JAVA)
+set(VTK_LANGUAGES "")
+if(VTK_WRAP_TCL)
+ set(VTK_LANGUAGES ${VTK_LANGUAGES} TCL)
+endif(VTK_WRAP_TCL)
+if(VTK_WRAP_PYTHON)
+ set(VTK_LANGUAGES ${VTK_LANGUAGES} PYTHON)
+endif(VTK_WRAP_PYTHON)
+if(VTK_WRAP_JAVA)
+ set(VTK_LANGUAGES ${VTK_LANGUAGES} JAVA)
+endif(VTK_WRAP_JAVA)
# Include directories for other projects installed on the system and
# used by VTK.
-SET(VTK_INCLUDE_DIRS_SYS "")
-IF(VTK_USE_RENDERING)
- SET(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS}
+set(VTK_INCLUDE_DIRS_SYS "")
+if(VTK_USE_RENDERING)
+ set(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS}
${VTK40_OPENGL_INCLUDE_PATH} ${VTK40_OPENGL_INCLUDE_DIR})
- IF(VTK_USE_X)
- SET(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS}
+ if(VTK_USE_X)
+ set(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS}
${VTK40_CMAKE_Xlib_INCLUDE_PATH} ${VTK40_CMAKE_Xutil_INCLUDE_PATH})
- ENDIF(VTK_USE_X)
-ENDIF(VTK_USE_RENDERING)
+ endif(VTK_USE_X)
+endif(VTK_USE_RENDERING)
-IF(VTK_OPENGL_HAS_OSMESA)
- SET(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS}
+if(VTK_OPENGL_HAS_OSMESA)
+ set(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS}
${VTK40_OSMESA_INCLUDE_PATH})
-ENDIF(VTK_OPENGL_HAS_OSMESA)
+endif(VTK_OPENGL_HAS_OSMESA)
-IF(VTK_USE_MPI)
- SET(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS} ${VTK40_MPI_INCLUDE_PATH})
-ENDIF(VTK_USE_MPI)
+if(VTK_USE_MPI)
+ set(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS} ${VTK40_MPI_INCLUDE_PATH})
+endif(VTK_USE_MPI)
-IF(VTK_WRAP_TCL)
- SET(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS} ${VTK40_TCL_INCLUDE_PATH})
-ENDIF(VTK_WRAP_TCL)
+if(VTK_WRAP_TCL)
+ set(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS} ${VTK40_TCL_INCLUDE_PATH})
+endif(VTK_WRAP_TCL)
-IF(VTK_WRAP_PYTHON)
- SET(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS} ${VTK40_PYTHON_INCLUDE_PATH})
-ENDIF(VTK_WRAP_PYTHON)
+if(VTK_WRAP_PYTHON)
+ set(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS} ${VTK40_PYTHON_INCLUDE_PATH})
+endif(VTK_WRAP_PYTHON)
-IF(VTK_WRAP_JAVA)
- SET(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS}
+if(VTK_WRAP_JAVA)
+ set(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS}
${VTK40_JAVA_INCLUDE_PATH} ${VTK40_JAVA_INCLUDE_PATH2})
-ENDIF(VTK_WRAP_JAVA)
+endif(VTK_WRAP_JAVA)
-IF(VTK_HAVE_VG500)
- SET(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS}
+if(VTK_HAVE_VG500)
+ set(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS}
${VTK40_VLI_INCLUDE_PATH_FOR_VG500})
-ENDIF(VTK_HAVE_VG500)
+endif(VTK_HAVE_VG500)
-IF(VTK_HAVE_VP1000)
- SET(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS}
+if(VTK_HAVE_VP1000)
+ set(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS}
${VTK40_VLI_INCLUDE_PATH_FOR_VP1000})
-ENDIF(VTK_HAVE_VP1000)
+endif(VTK_HAVE_VP1000)
# See if this is a build tree or install tree.
-IF(EXISTS ${VTK_DIR}/Common)
+if(EXISTS ${VTK_DIR}/Common)
# This is a VTK 4.0 build tree.
- SET(VTK_LIBRARY_DIRS ${VTK40_LIBRARY_OUTPUT_PATH})
+ set(VTK_LIBRARY_DIRS ${VTK40_LIBRARY_OUTPUT_PATH})
# Determine the include directories needed.
- SET(VTK_INCLUDE_DIRS ${VTK40_VTK_BINARY_DIR})
- IF(VTK_USE_PARALLEL)
- SET(VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS} ${VTK40_VTK_SOURCE_DIR}/Parallel)
- ENDIF(VTK_USE_PARALLEL)
- IF(VTK_USE_HYBRID)
- SET(VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS} ${VTK40_VTK_SOURCE_DIR}/Hybrid)
- ENDIF(VTK_USE_HYBRID)
- IF(VTK_USE_PATENTED)
- SET(VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS} ${VTK40_VTK_SOURCE_DIR}/Patented)
- ENDIF(VTK_USE_PATENTED)
- IF(VTK_USE_RENDERING)
- SET(VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS} ${VTK40_VTK_SOURCE_DIR}/Rendering)
- ENDIF(VTK_USE_RENDERING)
+ set(VTK_INCLUDE_DIRS ${VTK40_VTK_BINARY_DIR})
+ if(VTK_USE_PARALLEL)
+ set(VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS} ${VTK40_VTK_SOURCE_DIR}/Parallel)
+ endif(VTK_USE_PARALLEL)
+ if(VTK_USE_HYBRID)
+ set(VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS} ${VTK40_VTK_SOURCE_DIR}/Hybrid)
+ endif(VTK_USE_HYBRID)
+ if(VTK_USE_PATENTED)
+ set(VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS} ${VTK40_VTK_SOURCE_DIR}/Patented)
+ endif(VTK_USE_PATENTED)
+ if(VTK_USE_RENDERING)
+ set(VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS} ${VTK40_VTK_SOURCE_DIR}/Rendering)
+ endif(VTK_USE_RENDERING)
# These directories are always needed.
- SET(VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS}
+ set(VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS}
${VTK40_VTK_SOURCE_DIR}/IO
${VTK40_VTK_SOURCE_DIR}/Imaging
${VTK40_VTK_SOURCE_DIR}/Graphics
@@ -257,119 +257,119 @@ IF(EXISTS ${VTK_DIR}/Common)
${VTK40_VTK_SOURCE_DIR}/Common)
# Give access to a few utilities.
- SET(VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS}
+ set(VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS}
${VTK40_VTK_BINARY_DIR}/Utilities/png
${VTK40_VTK_SOURCE_DIR}/Utilities/png
${VTK40_VTK_BINARY_DIR}/Utilities/zlib
${VTK40_VTK_SOURCE_DIR}/Utilities/zlib)
# Executable locations.
- IF(VTK_WRAP_TCL)
- SET(VTK_TCL_EXE ${VTK40_EXECUTABLE_OUTPUT_PATH}/vtk)
- SET(VTK_WRAP_TCL_EXE ${VTK40_VTK_WRAP_TCL_EXE})
- SET(VTK_TCL_HOME ${VTK40_VTK_SOURCE_DIR}/Wrapping/Tcl)
- ENDIF(VTK_WRAP_TCL)
- IF(VTK_WRAP_PYTHON)
- SET(VTK_WRAP_PYTHON_EXE ${VTK40_VTK_WRAP_PYTHON_EXE})
- ENDIF(VTK_WRAP_PYTHON)
- IF(VTK_WRAP_JAVA)
- SET(VTK_PARSE_JAVA_EXE ${VTK40_VTK_PARSE_JAVA_EXE})
- SET(VTK_WRAP_JAVA_EXE ${VTK40_VTK_WRAP_JAVA_EXE})
- ENDIF(VTK_WRAP_JAVA)
-
-ELSE(EXISTS ${VTK_DIR}/Common)
+ if(VTK_WRAP_TCL)
+ set(VTK_TCL_EXE ${VTK40_EXECUTABLE_OUTPUT_PATH}/vtk)
+ set(VTK_WRAP_TCL_EXE ${VTK40_VTK_WRAP_TCL_EXE})
+ set(VTK_TCL_HOME ${VTK40_VTK_SOURCE_DIR}/Wrapping/Tcl)
+ endif(VTK_WRAP_TCL)
+ if(VTK_WRAP_PYTHON)
+ set(VTK_WRAP_PYTHON_EXE ${VTK40_VTK_WRAP_PYTHON_EXE})
+ endif(VTK_WRAP_PYTHON)
+ if(VTK_WRAP_JAVA)
+ set(VTK_PARSE_JAVA_EXE ${VTK40_VTK_PARSE_JAVA_EXE})
+ set(VTK_WRAP_JAVA_EXE ${VTK40_VTK_WRAP_JAVA_EXE})
+ endif(VTK_WRAP_JAVA)
+
+else(EXISTS ${VTK_DIR}/Common)
# This is a VTK 4.0 install tree.
- SET(VTK_INCLUDE_DIRS ${VTK_DIR})
- SET(VTK_LIBRARY_DIRS ${VTK40_CMAKE_INSTALL_PREFIX}/lib/vtk)
+ set(VTK_INCLUDE_DIRS ${VTK_DIR})
+ set(VTK_LIBRARY_DIRS ${VTK40_CMAKE_INSTALL_PREFIX}/lib/vtk)
# Executable locations.
- IF(VTK_WRAP_TCL)
- SET(VTK_TCL_EXE ${VTK40_CMAKE_INSTALL_PREFIX}/bin/vtk)
- SET(VTK_WRAP_TCL_EXE ${VTK40_CMAKE_INSTALL_PREFIX}/bin/vtkWrapTcl)
- SET(VTK_TCL_HOME ${VTK40_CMAKE_INSTALL_PREFIX}/lib/vtk/tcl)
- ENDIF(VTK_WRAP_TCL)
- IF(VTK_WRAP_PYTHON)
- SET(VTK_WRAP_PYTHON_EXE ${VTK40_CMAKE_INSTALL_PREFIX}/bin/vtkWrapPython)
- ENDIF(VTK_WRAP_PYTHON)
- IF(VTK_WRAP_JAVA)
- SET(VTK_PARSE_JAVA_EXE ${VTK40_CMAKE_INSTALL_PREFIX}/bin/vtkParseJava)
- SET(VTK_WRAP_JAVA_EXE ${VTK40_CMAKE_INSTALL_PREFIX}/bin/vtkWrapJava)
- ENDIF(VTK_WRAP_JAVA)
-ENDIF(EXISTS ${VTK_DIR}/Common)
+ if(VTK_WRAP_TCL)
+ set(VTK_TCL_EXE ${VTK40_CMAKE_INSTALL_PREFIX}/bin/vtk)
+ set(VTK_WRAP_TCL_EXE ${VTK40_CMAKE_INSTALL_PREFIX}/bin/vtkWrapTcl)
+ set(VTK_TCL_HOME ${VTK40_CMAKE_INSTALL_PREFIX}/lib/vtk/tcl)
+ endif(VTK_WRAP_TCL)
+ if(VTK_WRAP_PYTHON)
+ set(VTK_WRAP_PYTHON_EXE ${VTK40_CMAKE_INSTALL_PREFIX}/bin/vtkWrapPython)
+ endif(VTK_WRAP_PYTHON)
+ if(VTK_WRAP_JAVA)
+ set(VTK_PARSE_JAVA_EXE ${VTK40_CMAKE_INSTALL_PREFIX}/bin/vtkParseJava)
+ set(VTK_WRAP_JAVA_EXE ${VTK40_CMAKE_INSTALL_PREFIX}/bin/vtkWrapJava)
+ endif(VTK_WRAP_JAVA)
+endif(EXISTS ${VTK_DIR}/Common)
# Add the system include directories last.
-SET(VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS} ${VTK_INCLUDE_DIRS_SYS})
+set(VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS} ${VTK_INCLUDE_DIRS_SYS})
# Find the required C and C++ compiler flags.
-IF(CMAKE_COMPILER_IS_GNUCXX)
- IF(WIN32)
+if(CMAKE_COMPILER_IS_GNUCXX)
+ if(WIN32)
# The platform is gcc on cygwin.
- SET(VTK_REQUIRED_CXX_FLAGS "${VTK_REQUIRED_CXX_FLAGS} -mwin32")
- SET(VTK_REQUIRED_C_FLAGS "${VTK_REQUIRED_C_FLAGS} -mwin32")
- ENDIF(WIN32)
-ELSE(CMAKE_COMPILER_IS_GNUCXX)
- IF(CMAKE_ANSI_CFLAGS)
- SET(VTK_REQUIRED_C_FLAGS "${VTK_REQUIRED_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
- ENDIF(CMAKE_ANSI_CFLAGS)
- IF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
- SET(VTK_REQUIRED_CXX_FLAGS
+ set(VTK_REQUIRED_CXX_FLAGS "${VTK_REQUIRED_CXX_FLAGS} -mwin32")
+ set(VTK_REQUIRED_C_FLAGS "${VTK_REQUIRED_C_FLAGS} -mwin32")
+ endif(WIN32)
+else(CMAKE_COMPILER_IS_GNUCXX)
+ if(CMAKE_ANSI_CFLAGS)
+ set(VTK_REQUIRED_C_FLAGS "${VTK_REQUIRED_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
+ endif(CMAKE_ANSI_CFLAGS)
+ if(CMAKE_SYSTEM MATCHES "OSF1-V.*")
+ set(VTK_REQUIRED_CXX_FLAGS
"${VTK_REQUIRED_CXX_FLAGS} -timplicit_local -no_implicit_include")
- ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+ endif(CMAKE_SYSTEM MATCHES "OSF1-V.*")
+endif(CMAKE_COMPILER_IS_GNUCXX)
-IF(VTK_USE_X)
- IF(CMAKE_X_CFLAGS)
- SET(VTK_REQUIRED_C_FLAGS "${VTK_REQUIRED_C_FLAGS} ${CMAKE_X_CFLAGS}")
- SET(VTK_REQUIRED_CXX_FLAGS "${VTK_REQUIRED_CXX_FLAGS} ${CMAKE_X_CFLAGS}")
- ENDIF(CMAKE_X_CFLAGS)
-ENDIF(VTK_USE_X)
+if(VTK_USE_X)
+ if(CMAKE_X_CFLAGS)
+ set(VTK_REQUIRED_C_FLAGS "${VTK_REQUIRED_C_FLAGS} ${CMAKE_X_CFLAGS}")
+ set(VTK_REQUIRED_CXX_FLAGS "${VTK_REQUIRED_CXX_FLAGS} ${CMAKE_X_CFLAGS}")
+ endif(CMAKE_X_CFLAGS)
+endif(VTK_USE_X)
# Copy library dependencies.
-SET(vtkCommonJava_LIB_DEPENDS "${VTK40_vtkCommonJava_LIB_DEPENDS}")
-SET(vtkCommonPython_LIB_DEPENDS "${VTK40_vtkCommonPython_LIB_DEPENDS}")
-SET(vtkCommonTCL_LIB_DEPENDS "${VTK40_vtkCommonTCL_LIB_DEPENDS}")
-SET(vtkCommon_LIB_DEPENDS "${VTK40_vtkCommon_LIB_DEPENDS}")
-SET(vtkFilteringJava_LIB_DEPENDS "${VTK40_vtkFilteringJava_LIB_DEPENDS}")
-SET(vtkFilteringPython_LIB_DEPENDS "${VTK40_vtkFilteringPython_LIB_DEPENDS}")
-SET(vtkFilteringTCL_LIB_DEPENDS "${VTK40_vtkFilteringTCL_LIB_DEPENDS}")
-SET(vtkFiltering_LIB_DEPENDS "${VTK40_vtkFiltering_LIB_DEPENDS}")
-SET(vtkGraphicsJava_LIB_DEPENDS "${VTK40_vtkGraphicsJava_LIB_DEPENDS}")
-SET(vtkGraphicsPython_LIB_DEPENDS "${VTK40_vtkGraphicsPython_LIB_DEPENDS}")
-SET(vtkGraphicsTCL_LIB_DEPENDS "${VTK40_vtkGraphicsTCL_LIB_DEPENDS}")
-SET(vtkGraphics_LIB_DEPENDS "${VTK40_vtkGraphics_LIB_DEPENDS}")
-SET(vtkHybridJava_LIB_DEPENDS "${VTK40_vtkHybridJava_LIB_DEPENDS}")
-SET(vtkHybridPython_LIB_DEPENDS "${VTK40_vtkHybridPython_LIB_DEPENDS}")
-SET(vtkHybridTCL_LIB_DEPENDS "${VTK40_vtkHybridTCL_LIB_DEPENDS}")
-SET(vtkHybrid_LIB_DEPENDS "${VTK40_vtkHybrid_LIB_DEPENDS}")
-SET(vtkIOJava_LIB_DEPENDS "${VTK40_vtkIOJava_LIB_DEPENDS}")
-SET(vtkIOPython_LIB_DEPENDS "${VTK40_vtkIOPython_LIB_DEPENDS}")
-SET(vtkIOTCL_LIB_DEPENDS "${VTK40_vtkIOTCL_LIB_DEPENDS}")
-SET(vtkIO_LIB_DEPENDS "${VTK40_vtkIO_LIB_DEPENDS}")
-SET(vtkImagingJava_LIB_DEPENDS "${VTK40_vtkImagingJava_LIB_DEPENDS}")
-SET(vtkImagingPython_LIB_DEPENDS "${VTK40_vtkImagingPython_LIB_DEPENDS}")
-SET(vtkImagingTCL_LIB_DEPENDS "${VTK40_vtkImagingTCL_LIB_DEPENDS}")
-SET(vtkImaging_LIB_DEPENDS "${VTK40_vtkImaging_LIB_DEPENDS}")
-SET(vtkParallelJava_LIB_DEPENDS "${VTK40_vtkParallelJava_LIB_DEPENDS}")
-SET(vtkParallelPython_LIB_DEPENDS "${VTK40_vtkParallelPython_LIB_DEPENDS}")
-SET(vtkParallelTCL_LIB_DEPENDS "${VTK40_vtkParallelTCL_LIB_DEPENDS}")
-SET(vtkParallel_LIB_DEPENDS "${VTK40_vtkParallel_LIB_DEPENDS}")
-SET(vtkPatentedJava_LIB_DEPENDS "${VTK40_vtkPatentedJava_LIB_DEPENDS}")
-SET(vtkPatentedPython_LIB_DEPENDS "${VTK40_vtkPatentedPython_LIB_DEPENDS}")
-SET(vtkPatentedTCL_LIB_DEPENDS "${VTK40_vtkPatentedTCL_LIB_DEPENDS}")
-SET(vtkPatented_LIB_DEPENDS "${VTK40_vtkPatented_LIB_DEPENDS}")
-SET(vtkRenderingJava_LIB_DEPENDS "${VTK40_vtkRenderingJava_LIB_DEPENDS}")
-SET(vtkRenderingPythonTkWidgets_LIB_DEPENDS "${VTK40_vtkRenderingPythonTkWidgets_LIB_DEPENDS}")
-SET(vtkRenderingPython_LIB_DEPENDS "${VTK40_vtkRenderingPython_LIB_DEPENDS}")
-SET(vtkRenderingTCL_LIB_DEPENDS "${VTK40_vtkRenderingTCL_LIB_DEPENDS}")
-SET(vtkRendering_LIB_DEPENDS "${VTK40_vtkRendering_LIB_DEPENDS}")
-SET(vtkjpeg_LIB_DEPENDS "${VTK40_vtkjpeg_LIB_DEPENDS}")
-SET(vtkpng_LIB_DEPENDS "${VTK40_vtkpng_LIB_DEPENDS}")
-SET(vtkzlib_LIB_DEPENDS "${VTK40_vtkzlib_LIB_DEPENDS}")
+set(vtkCommonJava_LIB_DEPENDS "${VTK40_vtkCommonJava_LIB_DEPENDS}")
+set(vtkCommonPython_LIB_DEPENDS "${VTK40_vtkCommonPython_LIB_DEPENDS}")
+set(vtkCommonTCL_LIB_DEPENDS "${VTK40_vtkCommonTCL_LIB_DEPENDS}")
+set(vtkCommon_LIB_DEPENDS "${VTK40_vtkCommon_LIB_DEPENDS}")
+set(vtkFilteringJava_LIB_DEPENDS "${VTK40_vtkFilteringJava_LIB_DEPENDS}")
+set(vtkFilteringPython_LIB_DEPENDS "${VTK40_vtkFilteringPython_LIB_DEPENDS}")
+set(vtkFilteringTCL_LIB_DEPENDS "${VTK40_vtkFilteringTCL_LIB_DEPENDS}")
+set(vtkFiltering_LIB_DEPENDS "${VTK40_vtkFiltering_LIB_DEPENDS}")
+set(vtkGraphicsJava_LIB_DEPENDS "${VTK40_vtkGraphicsJava_LIB_DEPENDS}")
+set(vtkGraphicsPython_LIB_DEPENDS "${VTK40_vtkGraphicsPython_LIB_DEPENDS}")
+set(vtkGraphicsTCL_LIB_DEPENDS "${VTK40_vtkGraphicsTCL_LIB_DEPENDS}")
+set(vtkGraphics_LIB_DEPENDS "${VTK40_vtkGraphics_LIB_DEPENDS}")
+set(vtkHybridJava_LIB_DEPENDS "${VTK40_vtkHybridJava_LIB_DEPENDS}")
+set(vtkHybridPython_LIB_DEPENDS "${VTK40_vtkHybridPython_LIB_DEPENDS}")
+set(vtkHybridTCL_LIB_DEPENDS "${VTK40_vtkHybridTCL_LIB_DEPENDS}")
+set(vtkHybrid_LIB_DEPENDS "${VTK40_vtkHybrid_LIB_DEPENDS}")
+set(vtkIOJava_LIB_DEPENDS "${VTK40_vtkIOJava_LIB_DEPENDS}")
+set(vtkIOPython_LIB_DEPENDS "${VTK40_vtkIOPython_LIB_DEPENDS}")
+set(vtkIOTCL_LIB_DEPENDS "${VTK40_vtkIOTCL_LIB_DEPENDS}")
+set(vtkIO_LIB_DEPENDS "${VTK40_vtkIO_LIB_DEPENDS}")
+set(vtkImagingJava_LIB_DEPENDS "${VTK40_vtkImagingJava_LIB_DEPENDS}")
+set(vtkImagingPython_LIB_DEPENDS "${VTK40_vtkImagingPython_LIB_DEPENDS}")
+set(vtkImagingTCL_LIB_DEPENDS "${VTK40_vtkImagingTCL_LIB_DEPENDS}")
+set(vtkImaging_LIB_DEPENDS "${VTK40_vtkImaging_LIB_DEPENDS}")
+set(vtkParallelJava_LIB_DEPENDS "${VTK40_vtkParallelJava_LIB_DEPENDS}")
+set(vtkParallelPython_LIB_DEPENDS "${VTK40_vtkParallelPython_LIB_DEPENDS}")
+set(vtkParallelTCL_LIB_DEPENDS "${VTK40_vtkParallelTCL_LIB_DEPENDS}")
+set(vtkParallel_LIB_DEPENDS "${VTK40_vtkParallel_LIB_DEPENDS}")
+set(vtkPatentedJava_LIB_DEPENDS "${VTK40_vtkPatentedJava_LIB_DEPENDS}")
+set(vtkPatentedPython_LIB_DEPENDS "${VTK40_vtkPatentedPython_LIB_DEPENDS}")
+set(vtkPatentedTCL_LIB_DEPENDS "${VTK40_vtkPatentedTCL_LIB_DEPENDS}")
+set(vtkPatented_LIB_DEPENDS "${VTK40_vtkPatented_LIB_DEPENDS}")
+set(vtkRenderingJava_LIB_DEPENDS "${VTK40_vtkRenderingJava_LIB_DEPENDS}")
+set(vtkRenderingPythonTkWidgets_LIB_DEPENDS "${VTK40_vtkRenderingPythonTkWidgets_LIB_DEPENDS}")
+set(vtkRenderingPython_LIB_DEPENDS "${VTK40_vtkRenderingPython_LIB_DEPENDS}")
+set(vtkRenderingTCL_LIB_DEPENDS "${VTK40_vtkRenderingTCL_LIB_DEPENDS}")
+set(vtkRendering_LIB_DEPENDS "${VTK40_vtkRendering_LIB_DEPENDS}")
+set(vtkjpeg_LIB_DEPENDS "${VTK40_vtkjpeg_LIB_DEPENDS}")
+set(vtkpng_LIB_DEPENDS "${VTK40_vtkpng_LIB_DEPENDS}")
+set(vtkzlib_LIB_DEPENDS "${VTK40_vtkzlib_LIB_DEPENDS}")
# List of VTK configuration variables set above.
-# grep "^[ ]*SET(VTK" UseVTKConfig40.cmake |sed 's/[ ]*SET(\([^ ]*\) .*/ \1/'
-SET(VTK_SETTINGS
+# grep "^[ ]*set(VTK" UseVTKConfig40.cmake |sed 's/[ ]*set(\([^ ]*\) .*/ \1/'
+set(VTK_SETTINGS
VTK_BUILD_SHARED
VTK_BUILD_VERSION
VTK_DEBUG_LEAKS
diff --git a/Modules/Use_wxWindows.cmake b/Modules/Use_wxWindows.cmake
index 01a15168e5..681fe28e36 100644
--- a/Modules/Use_wxWindows.cmake
+++ b/Modules/Use_wxWindows.cmake
@@ -7,10 +7,10 @@
# USAGE:
# just include Use_wxWindows.cmake
# in your projects CMakeLists.txt
-# INCLUDE( ${CMAKE_MODULE_PATH}/Use_wxWindows.cmake)
+# include( ${CMAKE_MODULE_PATH}/Use_wxWindows.cmake)
##
# if you are sure you need GL then
-# SET(WXWINDOWS_USE_GL 1)
+# set(WXWINDOWS_USE_GL 1)
# *before* you include this file.
#=============================================================================
@@ -31,34 +31,34 @@
# 16.Feb.2004: changed INCLUDE to FIND_PACKAGE to read from users own non-system CMAKE_MODULE_PATH (Jan Woetzel JW)
# 07/2006: rewrite as FindwxWidgets.cmake, kept for backward compatibility JW
-MESSAGE(STATUS "Use_wxWindows.cmake is DEPRECATED. \n"
-"Please use FIND_PACKAGE(wxWidgets) and INCLUDE(${wxWidgets_USE_FILE}) instead. (JW)")
+message(STATUS "Use_wxWindows.cmake is DEPRECATED. \n"
+"Please use find_package(wxWidgets) and include(${wxWidgets_USE_FILE}) instead. (JW)")
# ------------------------
-FIND_PACKAGE( wxWindows )
+find_package( wxWindows )
-IF(WXWINDOWS_FOUND)
+if(WXWINDOWS_FOUND)
-#MESSAGE("DBG Use_wxWindows.cmake: WXWINDOWS_INCLUDE_DIR=${WXWINDOWS_INCLUDE_DIR} WXWINDOWS_LINK_DIRECTORIES=${WXWINDOWS_LINK_DIRECTORIES} WXWINDOWS_LIBRARIES=${WXWINDOWS_LIBRARIES} CMAKE_WXWINDOWS_CXX_FLAGS=${CMAKE_WXWINDOWS_CXX_FLAGS} WXWINDOWS_DEFINITIONS=${WXWINDOWS_DEFINITIONS}")
+#message("DBG Use_wxWindows.cmake: WXWINDOWS_INCLUDE_DIR=${WXWINDOWS_INCLUDE_DIR} WXWINDOWS_LINK_DIRECTORIES=${WXWINDOWS_LINK_DIRECTORIES} WXWINDOWS_LIBRARIES=${WXWINDOWS_LIBRARIES} CMAKE_WXWINDOWS_CXX_FLAGS=${CMAKE_WXWINDOWS_CXX_FLAGS} WXWINDOWS_DEFINITIONS=${WXWINDOWS_DEFINITIONS}")
- IF(WXWINDOWS_INCLUDE_DIR)
- INCLUDE_DIRECTORIES(${WXWINDOWS_INCLUDE_DIR})
- ENDIF(WXWINDOWS_INCLUDE_DIR)
- IF(WXWINDOWS_LINK_DIRECTORIES)
- LINK_DIRECTORIES(${WXWINDOWS_LINK_DIRECTORIES})
- ENDIF(WXWINDOWS_LINK_DIRECTORIES)
- IF(WXWINDOWS_LIBRARIES)
- LINK_LIBRARIES(${WXWINDOWS_LIBRARIES})
- ENDIF(WXWINDOWS_LIBRARIES)
- IF (CMAKE_WXWINDOWS_CXX_FLAGS)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_WXWINDOWS_CXX_FLAGS}")
- ENDIF(CMAKE_WXWINDOWS_CXX_FLAGS)
- IF(WXWINDOWS_DEFINITIONS)
- ADD_DEFINITIONS(${WXWINDOWS_DEFINITIONS})
- ENDIF(WXWINDOWS_DEFINITIONS)
-ELSE(WXWINDOWS_FOUND)
- MESSAGE(SEND_ERROR "wxWindows not found by Use_wxWindows.cmake")
-ENDIF(WXWINDOWS_FOUND)
+ if(WXWINDOWS_INCLUDE_DIR)
+ include_directories(${WXWINDOWS_INCLUDE_DIR})
+ endif(WXWINDOWS_INCLUDE_DIR)
+ if(WXWINDOWS_LINK_DIRECTORIES)
+ link_directories(${WXWINDOWS_LINK_DIRECTORIES})
+ endif(WXWINDOWS_LINK_DIRECTORIES)
+ if(WXWINDOWS_LIBRARIES)
+ link_libraries(${WXWINDOWS_LIBRARIES})
+ endif(WXWINDOWS_LIBRARIES)
+ if (CMAKE_WXWINDOWS_CXX_FLAGS)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_WXWINDOWS_CXX_FLAGS}")
+ endif(CMAKE_WXWINDOWS_CXX_FLAGS)
+ if(WXWINDOWS_DEFINITIONS)
+ add_definitions(${WXWINDOWS_DEFINITIONS})
+ endif(WXWINDOWS_DEFINITIONS)
+else(WXWINDOWS_FOUND)
+ message(SEND_ERROR "wxWindows not found by Use_wxWindows.cmake")
+endif(WXWINDOWS_FOUND)
diff --git a/Modules/UsewxWidgets.cmake b/Modules/UsewxWidgets.cmake
index a0f2e8632b..82a0085131 100644
--- a/Modules/UsewxWidgets.cmake
+++ b/Modules/UsewxWidgets.cmake
@@ -4,10 +4,10 @@
#
# USAGE
# # Note that for MinGW users the order of libs is important!
-# FIND_PACKAGE(wxWidgets REQUIRED net gl core base)
-# INCLUDE(${wxWidgets_USE_FILE})
+# find_package(wxWidgets REQUIRED net gl core base)
+# include(${wxWidgets_USE_FILE})
# # and for each of your dependent executable/library targets:
-# TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES})
+# target_link_libraries(<YourTarget> ${wxWidgets_LIBRARIES})
#
# DEPRECATED
# LINK_LIBRARIES is not called in favor of adding dependencies per target.
@@ -31,59 +31,59 @@
# debug message and logging.
# comment these out for distribution
-IF (NOT LOGFILE )
- # SET(LOGFILE "${PROJECT_BINARY_DIR}/CMakeOutput.log")
-ENDIF (NOT LOGFILE )
-MACRO(MSG _MSG)
- # FILE(APPEND ${LOGFILE} "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}\n")
- # MESSAGE(STATUS "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}")
-ENDMACRO(MSG)
+if (NOT LOGFILE )
+ # set(LOGFILE "${PROJECT_BINARY_DIR}/CMakeOutput.log")
+endif (NOT LOGFILE )
+macro(MSG _MSG)
+ # file(APPEND ${LOGFILE} "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}\n")
+ # message(STATUS "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}")
+endmacro(MSG)
MSG("wxWidgets_FOUND=${wxWidgets_FOUND}")
-IF (wxWidgets_FOUND)
- IF (wxWidgets_INCLUDE_DIRS)
- IF(wxWidgets_INCLUDE_DIRS_NO_SYSTEM)
- INCLUDE_DIRECTORIES(${wxWidgets_INCLUDE_DIRS})
- ELSE(wxWidgets_INCLUDE_DIRS_NO_SYSTEM)
- INCLUDE_DIRECTORIES(SYSTEM ${wxWidgets_INCLUDE_DIRS})
- ENDIF(wxWidgets_INCLUDE_DIRS_NO_SYSTEM)
+if (wxWidgets_FOUND)
+ if (wxWidgets_INCLUDE_DIRS)
+ if(wxWidgets_INCLUDE_DIRS_NO_SYSTEM)
+ include_directories(${wxWidgets_INCLUDE_DIRS})
+ else(wxWidgets_INCLUDE_DIRS_NO_SYSTEM)
+ include_directories(SYSTEM ${wxWidgets_INCLUDE_DIRS})
+ endif(wxWidgets_INCLUDE_DIRS_NO_SYSTEM)
MSG("wxWidgets_INCLUDE_DIRS=${wxWidgets_INCLUDE_DIRS}")
- ENDIF(wxWidgets_INCLUDE_DIRS)
+ endif(wxWidgets_INCLUDE_DIRS)
- IF (wxWidgets_LIBRARY_DIRS)
- LINK_DIRECTORIES(${wxWidgets_LIBRARY_DIRS})
+ if (wxWidgets_LIBRARY_DIRS)
+ link_directories(${wxWidgets_LIBRARY_DIRS})
MSG("wxWidgets_LIBRARY_DIRS=${wxWidgets_LIBRARY_DIRS}")
- ENDIF(wxWidgets_LIBRARY_DIRS)
+ endif(wxWidgets_LIBRARY_DIRS)
- IF (wxWidgets_DEFINITIONS)
- SET_PROPERTY(DIRECTORY APPEND
+ if (wxWidgets_DEFINITIONS)
+ set_property(DIRECTORY APPEND
PROPERTY COMPILE_DEFINITIONS ${wxWidgets_DEFINITIONS})
MSG("wxWidgets_DEFINITIONS=${wxWidgets_DEFINITIONS}")
- ENDIF(wxWidgets_DEFINITIONS)
+ endif(wxWidgets_DEFINITIONS)
- IF (wxWidgets_DEFINITIONS_DEBUG)
- SET_PROPERTY(DIRECTORY APPEND
+ if (wxWidgets_DEFINITIONS_DEBUG)
+ set_property(DIRECTORY APPEND
PROPERTY COMPILE_DEFINITIONS_DEBUG ${wxWidgets_DEFINITIONS_DEBUG})
MSG("wxWidgets_DEFINITIONS_DEBUG=${wxWidgets_DEFINITIONS_DEBUG}")
- ENDIF(wxWidgets_DEFINITIONS_DEBUG)
+ endif(wxWidgets_DEFINITIONS_DEBUG)
- IF (wxWidgets_CXX_FLAGS)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS}")
+ if (wxWidgets_CXX_FLAGS)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS}")
MSG("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}")
- ENDIF(wxWidgets_CXX_FLAGS)
+ endif(wxWidgets_CXX_FLAGS)
# DEPRECATED JW
# just for backward compatibility: add deps to all targets
- # library projects better use advanced FIND_PACKAGE(wxWidgets) directly.
- #IF(wxWidgets_LIBRARIES)
- # LINK_LIBRARIES(${wxWidgets_LIBRARIES})
+ # library projects better use advanced find_package(wxWidgets) directly.
+ #if(wxWidgets_LIBRARIES)
+ # link_libraries(${wxWidgets_LIBRARIES})
# # BUG: str too long: MSG("wxWidgets_LIBRARIES=${wxWidgets_LIBRARIES}")
- # IF(LOGFILE)
- # FILE(APPEND ${LOGFILE} "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${wxWidgets_LIBRARIES}\n")
- # ENDIF(LOGFILE)
- #ENDIF(wxWidgets_LIBRARIES)
+ # if(LOGFILE)
+ # file(APPEND ${LOGFILE} "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${wxWidgets_LIBRARIES}\n")
+ # endif(LOGFILE)
+ #endif(wxWidgets_LIBRARIES)
-ELSE (wxWidgets_FOUND)
- MESSAGE("wxWidgets requested but not found.")
-ENDIF(wxWidgets_FOUND)
+else (wxWidgets_FOUND)
+ message("wxWidgets requested but not found.")
+endif(wxWidgets_FOUND)
diff --git a/Modules/VTKCompatibility.cmake b/Modules/VTKCompatibility.cmake
index 802969f2fa..e1abfbb9f6 100644
--- a/Modules/VTKCompatibility.cmake
+++ b/Modules/VTKCompatibility.cmake
@@ -12,41 +12,41 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-IF(APPLE)
- SET(CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_C_CREATE_SHARED_LIBRARY}")
- SET(CMAKE_CXX_CREATE_SHARED_MODULE "${CMAKE_C_CREATE_SHARED_MODULE}")
- STRING( REGEX REPLACE "CMAKE_C_COMPILER"
+if(APPLE)
+ set(CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_C_CREATE_SHARED_LIBRARY}")
+ set(CMAKE_CXX_CREATE_SHARED_MODULE "${CMAKE_C_CREATE_SHARED_MODULE}")
+ string( REGEX REPLACE "CMAKE_C_COMPILER"
CMAKE_CXX_COMPILER CMAKE_CXX_CREATE_SHARED_MODULE
"${CMAKE_CXX_CREATE_SHARED_MODULE}")
- STRING( REGEX REPLACE "CMAKE_C_COMPILER"
+ string( REGEX REPLACE "CMAKE_C_COMPILER"
CMAKE_CXX_COMPILER CMAKE_CXX_CREATE_SHARED_LIBRARY
"${CMAKE_CXX_CREATE_SHARED_LIBRARY}")
-ENDIF(APPLE)
+endif(APPLE)
-SET(VTKFTGL_BINARY_DIR "${VTK_BINARY_DIR}/Utilities/ftgl"
+set(VTKFTGL_BINARY_DIR "${VTK_BINARY_DIR}/Utilities/ftgl"
CACHE INTERNAL "")
-SET(VTKFREETYPE_BINARY_DIR "${VTK_BINARY_DIR}/Utilities/freetype"
+set(VTKFREETYPE_BINARY_DIR "${VTK_BINARY_DIR}/Utilities/freetype"
CACHE INTERNAL "")
-SET(VTKFTGL_SOURCE_DIR "${VTK_SOURCE_DIR}/Utilities/ftgl"
+set(VTKFTGL_SOURCE_DIR "${VTK_SOURCE_DIR}/Utilities/ftgl"
CACHE INTERNAL "")
-SET(VTKFREETYPE_SOURCE_DIR "${VTK_SOURCE_DIR}/Utilities/freetype"
+set(VTKFREETYPE_SOURCE_DIR "${VTK_SOURCE_DIR}/Utilities/freetype"
CACHE INTERNAL "")
-SET(VTK_GLEXT_FILE "${VTK_SOURCE_DIR}/Utilities/ParseOGLExt/headers/glext.h"
+set(VTK_GLEXT_FILE "${VTK_SOURCE_DIR}/Utilities/ParseOGLExt/headers/glext.h"
CACHE FILEPATH
"Location of the OpenGL extensions header file (glext.h).")
-SET(VTK_GLXEXT_FILE
+set(VTK_GLXEXT_FILE
"${VTK_SOURCE_DIR}/Utilities/ParseOGLExt/headers/glxext.h" CACHE FILEPATH
"Location of the GLX extensions header file (glxext.h).")
-SET(VTK_WGLEXT_FILE "${VTK_SOURCE_DIR}/Utilities/ParseOGLExt/headers/wglext.h"
+set(VTK_WGLEXT_FILE "${VTK_SOURCE_DIR}/Utilities/ParseOGLExt/headers/wglext.h"
CACHE FILEPATH
"Location of the WGL extensions header file (wglext.h).")
# work around an old bug in VTK
-SET(TIFF_RIGHT_VERSION 1)
+set(TIFF_RIGHT_VERSION 1)
# for very old VTK (versions prior to 4.2)
-MACRO(SOURCE_FILES)
+macro(SOURCE_FILES)
message (FATAL_ERROR "You are trying to build a very old version of VTK (prior to VTK 4.2). To do this you need to use CMake 2.0 as it was the last version of CMake to support VTK 4.0.")
-ENDMACRO(SOURCE_FILES)
+endmacro(SOURCE_FILES)
diff --git a/Modules/kde3uic.cmake b/Modules/kde3uic.cmake
index 6f904ac925..4ad364b50f 100644
--- a/Modules/kde3uic.cmake
+++ b/Modules/kde3uic.cmake
@@ -17,7 +17,7 @@
# neundorf@kde.org
-EXECUTE_PROCESS(COMMAND ${KDE_UIC_EXECUTABLE}
+execute_process(COMMAND ${KDE_UIC_EXECUTABLE}
-L ${KDE_UIC_PLUGIN_DIR} -nounload -tr tr2i18n
-impl ${KDE_UIC_H_FILE}
${KDE_UIC_FILE}
@@ -25,9 +25,9 @@ EXECUTE_PROCESS(COMMAND ${KDE_UIC_EXECUTABLE}
ERROR_QUIET
)
-STRING(REGEX REPLACE "tr2i18n\\(\"\"\\)" "QString::null" _uic_CONTENTS "${_uic_CONTENTS}" )
-STRING(REGEX REPLACE "tr2i18n\\(\"\", \"\"\\)" "QString::null" _uic_CONTENTS "${_uic_CONTENTS}" )
+string(REGEX REPLACE "tr2i18n\\(\"\"\\)" "QString::null" _uic_CONTENTS "${_uic_CONTENTS}" )
+string(REGEX REPLACE "tr2i18n\\(\"\", \"\"\\)" "QString::null" _uic_CONTENTS "${_uic_CONTENTS}" )
-FILE(WRITE ${KDE_UIC_CPP_FILE} "#include <kdialog.h>\n#include <klocale.h>\n\n")
-FILE(APPEND ${KDE_UIC_CPP_FILE} "${_uic_CONTENTS}")
+file(WRITE ${KDE_UIC_CPP_FILE} "#include <kdialog.h>\n#include <klocale.h>\n\n")
+file(APPEND ${KDE_UIC_CPP_FILE} "${_uic_CONTENTS}")