summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeASMInformation.cmake35
-rw-r--r--Modules/CMakeCCompilerId.c.in3
-rw-r--r--Modules/CMakeCXXCompilerId.cpp.in3
-rw-r--r--Modules/CMakeCompilerABI.h10
-rw-r--r--Modules/CMakeDetermineCompilerABI.cmake2
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake1
-rw-r--r--Modules/CMakeDetermineFortranCompiler.cmake7
-rw-r--r--Modules/CMakeFortranCompiler.cmake.in4
-rw-r--r--Modules/CMakePrintSystemInformation.cmake2
-rw-r--r--Modules/CMakeTestCCompiler.cmake1
-rw-r--r--Modules/CMakeTestCXXCompiler.cmake1
-rw-r--r--Modules/CMakeTestFortranCompiler.cmake1
-rw-r--r--Modules/CMakeVS10FindMake.cmake32
-rw-r--r--Modules/CPackRPM.cmake32
-rw-r--r--Modules/Compiler/Clang-C.cmake1
-rw-r--r--Modules/Compiler/Clang-CXX.cmake1
-rw-r--r--Modules/Compiler/SunPro-C.cmake4
-rw-r--r--Modules/Compiler/SunPro-CXX.cmake4
-rw-r--r--Modules/Compiler/SunPro-Fortran.cmake3
-rw-r--r--Modules/Compiler/XL-Fortran.cmake1
-rw-r--r--Modules/DartConfiguration.tcl.in4
-rw-r--r--Modules/ExternalProject.cmake269
-rw-r--r--Modules/FindASPELL.cmake6
-rw-r--r--Modules/FindAVIFile.cmake20
-rw-r--r--Modules/FindBZip2.cmake5
-rw-r--r--Modules/FindCurses.cmake9
-rw-r--r--Modules/FindDart.cmake7
-rw-r--r--Modules/FindEXPAT.cmake3
-rw-r--r--Modules/FindGCCXML.cmake5
-rw-r--r--Modules/FindGLU.cmake4
-rw-r--r--Modules/FindGit.cmake46
-rw-r--r--Modules/FindHSPELL.cmake29
-rw-r--r--Modules/FindJasper.cmake11
-rw-r--r--Modules/FindJava.cmake57
-rw-r--r--Modules/FindKDE4.cmake2
-rw-r--r--Modules/FindLibXml2.cmake5
-rw-r--r--Modules/FindLibXslt.cmake7
-rw-r--r--Modules/FindMPEG.cmake4
-rw-r--r--Modules/FindMPI.cmake1
-rw-r--r--Modules/FindOpenAL.cmake9
-rw-r--r--Modules/FindPNG.cmake2
-rw-r--r--Modules/FindPhysFS.cmake8
-rw-r--r--Modules/FindPkgConfig.cmake27
-rw-r--r--Modules/FindQt4.cmake2
-rw-r--r--Modules/FindQuickTime.cmake10
-rw-r--r--Modules/FindSubversion.cmake13
-rw-r--r--Modules/FindX11.cmake10
-rw-r--r--Modules/FindZLIB.cmake43
-rw-r--r--Modules/FindwxWidgets.cmake7
-rw-r--r--Modules/GetPrerequisites.cmake11
-rw-r--r--Modules/Platform/CYGWIN-GNU.cmake1
-rw-r--r--Modules/Platform/Generic.cmake6
-rw-r--r--Modules/Platform/Linux-Clang-C.cmake1
-rw-r--r--Modules/Platform/Linux-Clang-CXX.cmake1
-rw-r--r--Modules/Platform/Linux-SunPro-CXX.cmake9
-rw-r--r--Modules/Platform/OpenBSD.cmake16
-rw-r--r--Modules/Platform/Windows-G95-Fortran.cmake1
-rw-r--r--Modules/Platform/Windows-cl.cmake27
-rw-r--r--Modules/Platform/Windows-cl.cmake.in1
-rw-r--r--Modules/Platform/Windows-wcl386.cmake6
-rw-r--r--Modules/Qt4ConfigDependentSettings.cmake100
-rw-r--r--Modules/UseQt4.cmake5
-rw-r--r--Modules/readme.txt24
63 files changed, 679 insertions, 303 deletions
diff --git a/Modules/CMakeASMInformation.cmake b/Modules/CMakeASMInformation.cmake
index c495810..0fad25d 100644
--- a/Modules/CMakeASMInformation.cmake
+++ b/Modules/CMakeASMInformation.cmake
@@ -42,10 +42,45 @@ IF(NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-ASM 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)
+
+# 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}")
+# 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
+ "Flags used by the assembler during all build types.")
+
+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
+ "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
+ "Flags used by the assembler during debug builds.")
+ 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
+ "Flags used by the assembler during release builds.")
+ 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)
+
+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
+ CMAKE_ASM${ASM_DIALECT}_FLAGS_RELWITHDEBINFO
+ )
+
+
IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> -o <OBJECT> <SOURCE>")
ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT)
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index 5d004c7..accda32 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -9,6 +9,9 @@
#if defined(__INTEL_COMPILER) || defined(__ICC)
# define COMPILER_ID "Intel"
+#elif defined(__clang__)
+# define COMPILER_ID "Clang"
+
#elif defined(__BORLANDC__)
# define COMPILER_ID "Borland"
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in
index 00ab8e2..4a32823 100644
--- a/Modules/CMakeCXXCompilerId.cpp.in
+++ b/Modules/CMakeCXXCompilerId.cpp.in
@@ -11,6 +11,9 @@
#elif defined(__INTEL_COMPILER) || defined(__ICC)
# define COMPILER_ID "Intel"
+#elif defined(__clang__)
+# define COMPILER_ID "Clang"
+
#elif defined(__BORLANDC__)
# define COMPILER_ID "Borland"
diff --git a/Modules/CMakeCompilerABI.h b/Modules/CMakeCompilerABI.h
index 8980abb..26ae4db 100644
--- a/Modules/CMakeCompilerABI.h
+++ b/Modules/CMakeCompilerABI.h
@@ -17,6 +17,16 @@ const char info_sizeof_dptr[] = {
# define ABI_ID "ELF N32"
#elif defined(__sgi) && defined(_ABI64)
# define ABI_ID "ELF 64"
+
+/* Check for (some) ARM ABIs.
+ * See e.g. http://wiki.debian.org/ArmEabiPort for some information on this. */
+#elif defined(__GNU__) && defined(__ELF__) && defined(__ARM_EABI__)
+# define ABI_ID "ELF ARMEABI"
+#elif defined(__GNU__) && defined(__ELF__) && defined(__ARMEB__)
+# define ABI_ID "ELF ARM"
+#elif defined(__GNU__) && defined(__ELF__) && defined(__ARMEL__)
+# define ABI_ID "ELF ARM"
+
#elif defined(__ELF__)
# define ABI_ID "ELF"
#endif
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake
index c8f4c99..aa4733b 100644
--- a/Modules/CMakeDetermineCompilerABI.cmake
+++ b/Modules/CMakeDetermineCompilerABI.cmake
@@ -49,12 +49,10 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ABI lang src)
IF(ABI_SIZEOF_DPTR)
SET(CMAKE_${lang}_SIZEOF_DATA_PTR "${ABI_SIZEOF_DPTR}" PARENT_SCOPE)
- SET(CMAKE_SIZEOF_VOID_P "${ABI_SIZEOF_DPTR}" PARENT_SCOPE)
ENDIF(ABI_SIZEOF_DPTR)
IF(ABI_NAME)
SET(CMAKE_${lang}_COMPILER_ABI "${ABI_NAME}" PARENT_SCOPE)
- SET(CMAKE_INTERNAL_PLATFORM_ABI "${ABI_NAME}" PARENT_SCOPE)
ENDIF(ABI_NAME)
# Parse implicit linker information for this language, if available.
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index bddd6a1..4a800a8 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -19,6 +19,7 @@
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}")
# Make sure user-specified compiler flags are used.
IF(CMAKE_${lang}_FLAGS)
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index 0637d20..34477a1 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -49,6 +49,7 @@ IF(NOT CMAKE_Fortran_COMPILER)
# gfortran: putative GNU Fortran 95+ compiler (in progress)
# fort77: native F77 compiler under HP-UX (and some older Crays)
# frt: Fujitsu F77 compiler
+ # pathf90/pathf95/pathf2003: PathScale Fortran compiler
# pgf77/pgf90/pgf95: Portland Group F77/F90/F95 compilers
# xlf/xlf90/xlf95: IBM (AIX) F77/F90/F95 compilers
# lf95: Lahey-Fujitsu F95 compiler
@@ -63,14 +64,16 @@ IF(NOT CMAKE_Fortran_COMPILER)
# 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
- ifort ifc efc f95 pgf95 lf95 xlf95 fort gfortran gfortran-4 g95 f90
- pgf90 xlf90 epcf90 fort77 frt pgf77 xlf fl32 af77 g77 f77
+ ifort ifc efc f95 pathf2003 pathf95 pgf95 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_PGI pgf95 pgf90 pgf77)
+ SET(_Fortran_COMPILER_NAMES_PathScale pathf2003 pathf95 pathf90)
SET(_Fortran_COMPILER_NAMES_XL xlf)
SET(_Fortran_COMPILER_NAMES_VisualAge xlf95 xlf90 xlf)
diff --git a/Modules/CMakeFortranCompiler.cmake.in b/Modules/CMakeFortranCompiler.cmake.in
index ba2b46d..5558651 100644
--- a/Modules/CMakeFortranCompiler.cmake.in
+++ b/Modules/CMakeFortranCompiler.cmake.in
@@ -34,9 +34,9 @@ ENDIF(UNIX)
SET(CMAKE_Fortran_SIZEOF_DATA_PTR "@CMAKE_Fortran_SIZEOF_DATA_PTR@")
SET(CMAKE_Fortran_COMPILER_ABI "@CMAKE_Fortran_COMPILER_ABI@")
-IF(CMAKE_Fortran_SIZEOF_DATA_PTR)
+IF(CMAKE_Fortran_SIZEOF_DATA_PTR AND NOT CMAKE_SIZEOF_VOID_P)
SET(CMAKE_SIZEOF_VOID_P "${CMAKE_Fortran_SIZEOF_DATA_PTR}")
-ENDIF(CMAKE_Fortran_SIZEOF_DATA_PTR)
+ENDIF()
IF(CMAKE_Fortran_COMPILER_ABI)
SET(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_Fortran_COMPILER_ABI}")
diff --git a/Modules/CMakePrintSystemInformation.cmake b/Modules/CMakePrintSystemInformation.cmake
index 1d3d805..3f33ce8 100644
--- a/Modules/CMakePrintSystemInformation.cmake
+++ b/Modules/CMakePrintSystemInformation.cmake
@@ -27,7 +27,7 @@ MESSAGE("CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS is ${CMAKE_SHARED_LIBRARY_CREATE_
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_GNUGCC = ${CMAKE_COMPILER_IS_GNUGCC}")
+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}")
diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake
index eeaff7d..bac9932 100644
--- a/Modules/CMakeTestCCompiler.cmake
+++ b/Modules/CMakeTestCCompiler.cmake
@@ -74,6 +74,7 @@ ELSE(NOT CMAKE_C_COMPILER_WORKS)
${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)
ENDIF(NOT CMAKE_C_COMPILER_WORKS)
diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake
index 72bb8f2..06ef301 100644
--- a/Modules/CMakeTestCXXCompiler.cmake
+++ b/Modules/CMakeTestCXXCompiler.cmake
@@ -67,5 +67,6 @@ ELSE(NOT CMAKE_CXX_COMPILER_WORKS)
${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)
ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)
diff --git a/Modules/CMakeTestFortranCompiler.cmake b/Modules/CMakeTestFortranCompiler.cmake
index 6f419c2..61d6336 100644
--- a/Modules/CMakeTestFortranCompiler.cmake
+++ b/Modules/CMakeTestFortranCompiler.cmake
@@ -90,5 +90,6 @@ ELSE(NOT CMAKE_Fortran_COMPILER_WORKS)
${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)
ENDIF(NOT CMAKE_Fortran_COMPILER_WORKS)
diff --git a/Modules/CMakeVS10FindMake.cmake b/Modules/CMakeVS10FindMake.cmake
index 8233e52..460de25 100644
--- a/Modules/CMakeVS10FindMake.cmake
+++ b/Modules/CMakeVS10FindMake.cmake
@@ -12,38 +12,14 @@
# (To distributed this file outside of CMake, substitute the full
# 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)
-
+# We use MSBuild as the build tool for VS 10
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES MSBuild
- HINTS
+ 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]/"
- )
-
-FIND_PROGRAM(CMAKE_MAKE_PROGRAM
- NAMES ${_CMAKE_MAKE_PROGRAM_NAMES}
- HINTS
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VS;EnvironmentDirectory]
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup;Dbghelp_path]
- "$ENV{ProgramFiles}/Microsoft Visual Studio 10.0/Common7/IDE"
- "$ENV{ProgramFiles}/Microsoft Visual Studio10.0/Common7/IDE"
- "$ENV{ProgramFiles}/Microsoft Visual Studio 10/Common7/IDE"
- "$ENV{ProgramFiles}/Microsoft Visual Studio10/Common7/IDE"
- "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 10.0/Common7/IDE"
- "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio10.0/Common7/IDE"
- "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 10/Common7/IDE"
- "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio10/Common7/IDE"
- "/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/"
- "/Program Files/Microsoft Visual Studio 10/Common7/IDE/"
- PATHS
- "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio .NET/Common7/IDE"
- "$ENV{ProgramFiles}/Microsoft Visual Studio .NET/Common7/IDE"
-
+ "$ENV{SYSTEMROOT}/Microsoft.NET/Framework/[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\10.0;CLR Version]/"
)
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 29a1218..3bf8e0e 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -49,6 +49,14 @@
# CPACK_RPM_PACKAGE_DESCRIPTION
# Mandatory : YES
# Default : CPACK_PACKAGE_DESCRIPTION_FILE if set or "no package description available"
+# CPACK_RPM_COMPRESSION_TYPE
+# Mandatory : NO
+# Default : -
+# May be used to override RPM compression type to be used
+# to build the RPM. For example some Linux distribution now default
+# to lzma or xz compression whereas older cannot use such RPM.
+# Using this one can enforce compression type to be used.
+# Possible value are: lzma, xz, bzip2 and gzip.
# CPACK_RPM_PACKAGE_REQUIRES
# Mandatory : NO
# Default : -
@@ -265,6 +273,27 @@ IF (NOT CPACK_RPM_PACKAGE_DESCRIPTION)
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)
# CPACK_RPM_PACKAGE_REQUIRES
# Placeholder used to specify binary RPM dependencies (if any)
# see http://www.rpm.org/max-rpm/s1-rpm-depend-manual-dependencies.html
@@ -419,6 +448,7 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@
%define _topdir \@CPACK_RPM_DIRECTORY\@
\@TMP_RPM_SPEC_INSTALL_POST\@
\@CPACK_RPM_SPEC_MORE_DEFINE\@
+\@CPACK_RPM_COMPRESSION_TYPE_TMP\@
%description
\@CPACK_RPM_PACKAGE_DESCRIPTION\@
@@ -459,6 +489,8 @@ fi
${CPACK_RPM_INSTALL_FILES}
%changelog
+* Sun Apr 4 2010 Erk <eric.noulard@gmail.com>
+ Add support for specifying RPM compression type
* Sat Nov 28 2009 Erk <eric.noulard@gmail.com>
Refix backup/restore install tree for OpenSuSE 11.2
* Sun Nov 22 2009 Erk <eric.noulard@gmail.com>
diff --git a/Modules/Compiler/Clang-C.cmake b/Modules/Compiler/Clang-C.cmake
new file mode 100644
index 0000000..f7baf68
--- /dev/null
+++ b/Modules/Compiler/Clang-C.cmake
@@ -0,0 +1 @@
+include(Compiler/GNU-C)
diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake
new file mode 100644
index 0000000..d3c403a
--- /dev/null
+++ b/Modules/Compiler/Clang-CXX.cmake
@@ -0,0 +1 @@
+include(Compiler/GNU-CXX)
diff --git a/Modules/Compiler/SunPro-C.cmake b/Modules/Compiler/SunPro-C.cmake
index 4ac918e..656eea6 100644
--- a/Modules/Compiler/SunPro-C.cmake
+++ b/Modules/Compiler/SunPro-C.cmake
@@ -1,11 +1,11 @@
+SET(CMAKE_C_VERBOSE_FLAG "-#")
+
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_VERBOSE_FLAG "-#")
-
SET(CMAKE_C_FLAGS_INIT "")
SET(CMAKE_C_FLAGS_DEBUG_INIT "-g")
SET(CMAKE_C_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
diff --git a/Modules/Compiler/SunPro-CXX.cmake b/Modules/Compiler/SunPro-CXX.cmake
index fe549d6..3e07e8e 100644
--- a/Modules/Compiler/SunPro-CXX.cmake
+++ b/Modules/Compiler/SunPro-CXX.cmake
@@ -1,11 +1,11 @@
+SET(CMAKE_CXX_VERBOSE_FLAG "-v")
+
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_VERBOSE_FLAG "-v")
-
SET(CMAKE_CXX_FLAGS_INIT "")
SET(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
SET(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
diff --git a/Modules/Compiler/SunPro-Fortran.cmake b/Modules/Compiler/SunPro-Fortran.cmake
index ae38f86..a41b454 100644
--- a/Modules/Compiler/SunPro-Fortran.cmake
+++ b/Modules/Compiler/SunPro-Fortran.cmake
@@ -1,3 +1,5 @@
+SET(CMAKE_Fortran_VERBOSE_FLAG "-v")
+
SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-KPIC")
SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-G")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG "-R")
@@ -12,4 +14,3 @@ 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_VERBOSE_FLAG "-v")
diff --git a/Modules/Compiler/XL-Fortran.cmake b/Modules/Compiler/XL-Fortran.cmake
index 6133f56..cf9b2b6 100644
--- a/Modules/Compiler/XL-Fortran.cmake
+++ b/Modules/Compiler/XL-Fortran.cmake
@@ -1,4 +1,5 @@
SET(CMAKE_Fortran_VERBOSE_FLAG "-V")
+
SET(CMAKE_Fortran_DEFINE_FLAG "-WF,-D")
SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
diff --git a/Modules/DartConfiguration.tcl.in b/Modules/DartConfiguration.tcl.in
index 0b05865..85b4138 100644
--- a/Modules/DartConfiguration.tcl.in
+++ b/Modules/DartConfiguration.tcl.in
@@ -46,6 +46,10 @@ CVSUpdateOptions: @CVS_UPDATE_OPTIONS@
SVNCommand: @SVNCOMMAND@
SVNUpdateOptions: @SVN_UPDATE_OPTIONS@
+# Git options
+GITCommand: @GITCOMMAND@
+GITUpdateOptions: @GIT_UPDATE_OPTIONS@
+
# Generic update command
UpdateCommand: @UPDATE_COMMAND@
UpdateOptions: @UPDATE_OPTIONS@
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 0302d5c..15749f2 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -16,7 +16,12 @@
# [CVS_TAG tag] # Tag to checkout from CVS repo
# [SVN_REPOSITORY url] # URL of Subversion repo
# [SVN_REVISION rev] # Revision to checkout from Subversion repo
+# [SVN_USERNAME john ] # Username for Subversion checkout and update
+# [SVN_PASSWORD doe ] # Password for Subversion checkout and update
+# [GIT_REPOSITORY url] # URL of git repo
+# [GIT_TAG tag] # Git branch name, commit id or tag
# [URL /.../src.tgz] # Full path or URL of source
+# [URL_MD5 md5] # MD5 checksum of file at URL
# [TIMEOUT seconds] # Time allowed for file download operations
# #--Update/Patch step----------
# [UPDATE_COMMAND cmd...] # Source work-tree update command
@@ -111,19 +116,19 @@
# License text for the above reference.)
# Pre-compute a regex to match documented keywords for each command.
-file(STRINGS "${CMAKE_CURRENT_LIST_FILE}" lines LIMIT_COUNT 100
- REGEX "^# ( \\[[A-Z_]+ [^]]*\\] +#.*$|[A-Za-z_]+\\()")
+file(STRINGS "${CMAKE_CURRENT_LIST_FILE}" lines LIMIT_COUNT 103
+ REGEX "^# ( \\[[A-Z0-9_]+ [^]]*\\] +#.*$|[A-Za-z0-9_]+\\()")
foreach(line IN LISTS lines)
- if("${line}" MATCHES "^# [A-Za-z_]+\\(")
+ if("${line}" MATCHES "^# [A-Za-z0-9_]+\\(")
if(_ep_func)
set(_ep_keywords_${_ep_func} "${_ep_keywords_${_ep_func}})$")
endif()
- string(REGEX REPLACE "^# ([A-Za-z_]+)\\(.*" "\\1" _ep_func "${line}")
+ string(REGEX REPLACE "^# ([A-Za-z0-9_]+)\\(.*" "\\1" _ep_func "${line}")
#message("function [${_ep_func}]")
set(_ep_keywords_${_ep_func} "^(")
set(_ep_keyword_sep)
else()
- string(REGEX REPLACE "^# \\[([A-Z_]+) .*" "\\1" _ep_key "${line}")
+ string(REGEX REPLACE "^# \\[([A-Z0-9_]+) .*" "\\1" _ep_key "${line}")
#message(" keyword [${_ep_key}]")
set(_ep_keywords_${_ep_func}
"${_ep_keywords_${_ep_func}}${_ep_keyword_sep}${_ep_key}")
@@ -148,7 +153,7 @@ function(_ep_parse_arguments f name ns args)
foreach(arg IN LISTS args)
set(is_value 1)
- if(arg MATCHES "^[A-Z][A-Z_][A-Z_]+$" AND
+ if(arg MATCHES "^[A-Z][A-Z0-9_][A-Z0-9_]+$" AND
NOT ((arg STREQUAL "${key}") AND (key STREQUAL "COMMAND")) AND
NOT arg MATCHES "^(TRUE|FALSE)$")
if(_ep_keywords_${f} AND arg MATCHES "${_ep_keywords_${f}}")
@@ -157,6 +162,7 @@ function(_ep_parse_arguments f name ns args)
if(NOT (key STREQUAL "COMMAND")
AND NOT (key STREQUAL "CVS_MODULE")
AND NOT (key STREQUAL "DEPENDS")
+ AND NOT (key STREQUAL "DOWNLOAD_COMMAND")
)
message(AUTHOR_WARNING "unknown ${f} keyword: ${arg}")
endif()
@@ -203,7 +209,63 @@ define_property(DIRECTORY PROPERTY "EP_PREFIX" INHERITED
)
-function(_ep_write_downloadfile_script script_filename remote local timeout)
+function(_ep_write_gitclone_script script_filename source_dir git_EXECUTABLE git_repository git_tag src_name work_dir)
+ file(WRITE ${script_filename}
+"if(\"${git_tag}\" STREQUAL \"\")
+ message(FATAL_ERROR \"Tag for git checkout should not be empty.\")
+endif()
+
+execute_process(
+ COMMAND \${CMAKE_COMMAND} -E remove_directory \"${source_dir}\"
+ RESULT_VARIABLE error_code
+ )
+if(error_code)
+ message(FATAL_ERROR \"Failed to remove directory: '${source_dir}'\")
+endif()
+
+execute_process(
+ COMMAND \"${git_EXECUTABLE}\" clone \"${git_repository}\" \"${src_name}\"
+ WORKING_DIRECTORY \"${work_dir}\"
+ RESULT_VARIABLE error_code
+ )
+if(error_code)
+ message(FATAL_ERROR \"Failed to clone repository: '${git_repository}'\")
+endif()
+
+execute_process(
+ COMMAND \"${git_EXECUTABLE}\" checkout ${git_tag}
+ WORKING_DIRECTORY \"${work_dir}/${src_name}\"
+ RESULT_VARIABLE error_code
+ )
+if(error_code)
+ message(FATAL_ERROR \"Failed to checkout tag: '${git_tag}'\")
+endif()
+
+execute_process(
+ COMMAND \"${git_EXECUTABLE}\" submodule init
+ WORKING_DIRECTORY \"${work_dir}/${src_name}\"
+ RESULT_VARIABLE error_code
+ )
+if(error_code)
+ message(FATAL_ERROR \"Failed to init submodules in: '${work_dir}/${src_name}'\")
+endif()
+
+execute_process(
+ COMMAND \"${git_EXECUTABLE}\" submodule update --recursive
+ WORKING_DIRECTORY \"${work_dir}/${src_name}\"
+ RESULT_VARIABLE error_code
+ )
+if(error_code)
+ message(FATAL_ERROR \"Failed to update submodules in: '${work_dir}/${src_name}'\")
+endif()
+
+"
+)
+
+endfunction(_ep_write_gitclone_script)
+
+
+function(_ep_write_downloadfile_script script_filename remote local timeout md5)
if(timeout)
set(timeout_args TIMEOUT ${timeout})
set(timeout_msg "${timeout} seconds")
@@ -212,6 +274,12 @@ function(_ep_write_downloadfile_script script_filename remote local timeout)
set(timeout_msg "none")
endif()
+ if(md5)
+ set(md5_args EXPECTED_MD5 ${md5})
+ else()
+ set(md5_args "# no EXPECTED_MD5")
+ endif()
+
file(WRITE ${script_filename}
"message(STATUS \"downloading...
src='${remote}'
@@ -221,6 +289,8 @@ function(_ep_write_downloadfile_script script_filename remote local timeout)
file(DOWNLOAD
\"${remote}\"
\"${local}\"
+ SHOW_PROGRESS
+ ${md5_args}
${timeout_args}
STATUS status
LOG log)
@@ -243,23 +313,64 @@ message(STATUS \"downloading... done\")
endfunction(_ep_write_downloadfile_script)
-function(_ep_write_extractfile_script script_filename filename tmp directory)
- set(args "")
+function(_ep_write_verifyfile_script script_filename local md5)
+ file(WRITE ${script_filename}
+"message(STATUS \"verifying file...
+ file='${local}'\")
- if(filename MATCHES ".tar$")
- set(args xf)
+set(verified 0)
+
+# If an expected md5 checksum exists, compare against it:
+#
+if(NOT \"${md5}\" STREQUAL \"\")
+ execute_process(COMMAND \${CMAKE_COMMAND} -E md5sum \"${local}\"
+ OUTPUT_VARIABLE ov
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ RESULT_VARIABLE rv)
+
+ if(NOT rv EQUAL 0)
+ message(FATAL_ERROR \"error: computing md5sum of '${local}' failed\")
endif()
- if(filename MATCHES ".tgz$")
- set(args xfz)
+ string(REGEX MATCH \"^([0-9A-Fa-f]+)\" md5_actual \"\${ov}\")
+
+ string(TOLOWER \"\${md5_actual}\" md5_actual)
+ string(TOLOWER \"${md5}\" md5)
+
+ if(NOT \"\${md5}\" STREQUAL \"\${md5_actual}\")
+ message(FATAL_ERROR \"error: md5sum of '${local}' does not match expected value
+ md5_expected: \${md5}
+ md5_actual: \${md5_actual}
+\")
endif()
- if(filename MATCHES ".tar.gz$")
+ set(verified 1)
+endif()
+
+if(verified)
+ message(STATUS \"verifying file... done\")
+else()
+ message(STATUS \"verifying file... warning: did not verify file - no URL_MD5 checksum argument? corrupt file?\")
+endif()
+"
+)
+
+endfunction(_ep_write_verifyfile_script)
+
+
+function(_ep_write_extractfile_script script_filename filename directory)
+ set(args "")
+
+ if(filename MATCHES "(\\.bz2|\\.tar\\.gz|\\.tgz|\\.zip)$")
set(args xfz)
endif()
+ if(filename MATCHES "\\.tar$")
+ set(args xf)
+ endif()
+
if(args STREQUAL "")
- message(SEND_ERROR "error: do not know how to extract '${filename}' -- known types are .tar, .tgz and .tar.gz")
+ message(SEND_ERROR "error: do not know how to extract '${filename}' -- known types are .bz2, .tar, .tar.gz, .tgz and .zip")
return()
endif()
@@ -267,20 +378,23 @@ function(_ep_write_extractfile_script script_filename filename tmp directory)
"# Make file names absolute:
#
get_filename_component(filename \"${filename}\" ABSOLUTE)
-get_filename_component(tmp \"${tmp}\" ABSOLUTE)
get_filename_component(directory \"${directory}\" ABSOLUTE)
message(STATUS \"extracting...
src='\${filename}'
dst='\${directory}'\")
+if(NOT EXISTS \"\${filename}\")
+ message(FATAL_ERROR \"error: file to extract does not exist: '\${filename}'\")
+endif()
+
# Prepare a space for extracting:
#
-set(i 1)
-while(EXISTS \"\${tmp}/extract\${i}\")
+set(i 1234)
+while(EXISTS \"\${directory}/../ex\${i}\")
math(EXPR i \"\${i} + 1\")
endwhile()
-set(ut_dir \"\${tmp}/extract\${i}\")
+set(ut_dir \"\${directory}/../ex\${i}\")
file(MAKE_DIRECTORY \"\${ut_dir}\")
# Extract it:
@@ -305,10 +419,12 @@ if(NOT n EQUAL 1 OR NOT IS_DIRECTORY \"\${contents}\")
set(contents \"\${ut_dir}\")
endif()
-# Copy \"the one\" directory to the final directory:
+# Move \"the one\" directory to the final directory:
#
-message(STATUS \"extracting... [copy]\")
-file(COPY \"\${contents}/\" DESTINATION \${directory})
+message(STATUS \"extracting... [rename]\")
+file(REMOVE_RECURSE \${directory})
+get_filename_component(contents \${contents} ABSOLUTE)
+file(RENAME \${contents} \${directory})
# Clean up:
#
@@ -609,6 +725,19 @@ function(_ep_add_mkdir_command name)
endfunction(_ep_add_mkdir_command)
+function(_ep_get_git_version git_EXECUTABLE git_version_var)
+ if(git_EXECUTABLE)
+ execute_process(
+ COMMAND "${git_EXECUTABLE}" --version
+ OUTPUT_VARIABLE ov
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ string(REGEX REPLACE "^git version (.+)$" "\\1" version "${ov}")
+ set(${git_version_var} "${version}" PARENT_SCOPE)
+ endif()
+endfunction()
+
+
function(_ep_add_download_command name)
ExternalProject_Get_Property(${name} source_dir stamp_dir download_dir tmp_dir)
@@ -616,6 +745,7 @@ function(_ep_add_download_command name)
get_property(cmd TARGET ${name} PROPERTY _EP_DOWNLOAD_COMMAND)
get_property(cvs_repository TARGET ${name} PROPERTY _EP_CVS_REPOSITORY)
get_property(svn_repository TARGET ${name} PROPERTY _EP_SVN_REPOSITORY)
+ get_property(git_repository TARGET ${name} PROPERTY _EP_GIT_REPOSITORY)
get_property(url TARGET ${name} PROPERTY _EP_URL)
# TODO: Perhaps file:// should be copied to download dir before extraction.
@@ -661,8 +791,10 @@ function(_ep_add_download_command name)
endif()
get_property(svn_revision TARGET ${name} PROPERTY _EP_SVN_REVISION)
+ get_property(svn_username TARGET ${name} PROPERTY _EP_SVN_USERNAME)
+ get_property(svn_password TARGET ${name} PROPERTY _EP_SVN_PASSWORD)
- set(repository ${svn_repository})
+ set(repository "${svn_repository} user=${svn_username} password=${svn_password}")
set(module)
set(tag ${svn_revision})
configure_file(
@@ -674,13 +806,55 @@ function(_ep_add_download_command name)
get_filename_component(src_name "${source_dir}" NAME)
get_filename_component(work_dir "${source_dir}" PATH)
set(comment "Performing download step (SVN checkout) for '${name}'")
- set(cmd ${Subversion_SVN_EXECUTABLE} co ${svn_repository} ${svn_revision} ${src_name})
+ set(cmd ${Subversion_SVN_EXECUTABLE} co ${svn_repository} ${svn_revision}
+ --username=${svn_username} --password=${svn_password} ${src_name})
list(APPEND depends ${stamp_dir}/${name}-svninfo.txt)
+ elseif(git_repository)
+ find_package(Git)
+ if(NOT GIT_EXECUTABLE)
+ message(FATAL_ERROR "error: could not find git for clone of ${name}")
+ endif()
+
+ # The git submodule update '--recursive' flag requires git >= v1.6.5
+ #
+ _ep_get_git_version("${GIT_EXECUTABLE}" git_version)
+ if(git_version VERSION_LESS 1.6.5)
+ message(FATAL_ERROR "error: git version 1.6.5 or later required for 'git submodule update --recursive': git_version='${git_version}'")
+ endif()
+
+ get_property(git_tag TARGET ${name} PROPERTY _EP_GIT_TAG)
+ if(NOT git_tag)
+ set(git_tag "master")
+ endif()
+
+ set(repository ${git_repository})
+ set(module)
+ set(tag ${git_tag})
+ configure_file(
+ "${CMAKE_ROOT}/Modules/RepositoryInfo.txt.in"
+ "${stamp_dir}/${name}-gitinfo.txt"
+ @ONLY
+ )
+
+ get_filename_component(src_name "${source_dir}" NAME)
+ get_filename_component(work_dir "${source_dir}" PATH)
+
+ # Since git clone doesn't succeed if the non-empty source_dir exists,
+ # create a cmake script to invoke as download command.
+ # The script will delete the source directory and then call git clone.
+ #
+ _ep_write_gitclone_script(${tmp_dir}/${name}-gitclone.cmake ${source_dir}
+ ${GIT_EXECUTABLE} ${git_repository} ${git_tag} ${src_name} ${work_dir}
+ )
+ set(comment "Performing download step (git clone) for '${name}'")
+ set(cmd ${CMAKE_COMMAND} -P ${tmp_dir}/${name}-gitclone.cmake)
+ list(APPEND depends ${stamp_dir}/${name}-gitinfo.txt)
elseif(url)
get_filename_component(work_dir "${source_dir}" PATH)
+ get_property(md5 TARGET ${name} PROPERTY _EP_URL_MD5)
set(repository "external project URL")
set(module "${url}")
- set(tag "")
+ set(tag "${md5}")
configure_file(
"${CMAKE_ROOT}/Modules/RepositoryInfo.txt.in"
"${stamp_dir}/${name}-urlinfo.txt"
@@ -696,21 +870,23 @@ function(_ep_add_download_command name)
if("${url}" MATCHES "^[a-z]+://")
# TODO: Should download and extraction be different steps?
string(REGEX MATCH "[^/]*$" fname "${url}")
- if(NOT "${fname}" MATCHES "\\.(tar|tgz|tar\\.gz)$")
+ if(NOT "${fname}" MATCHES "\\.(bz2|tar|tgz|tar\\.gz|zip)$")
message(FATAL_ERROR "Could not extract tarball filename from url:\n ${url}")
endif()
set(file ${download_dir}/${fname})
get_property(timeout TARGET ${name} PROPERTY _EP_TIMEOUT)
- _ep_write_downloadfile_script("${stamp_dir}/download-${name}.cmake" "${url}" "${file}" "${timeout}")
+ _ep_write_downloadfile_script("${stamp_dir}/download-${name}.cmake" "${url}" "${file}" "${timeout}" "${md5}")
set(cmd ${CMAKE_COMMAND} -P ${stamp_dir}/download-${name}.cmake
COMMAND)
- set(comment "Performing download step (download and extract) for '${name}'")
+ set(comment "Performing download step (download, verify and extract) for '${name}'")
else()
set(file "${url}")
- set(comment "Performing download step (extract) for '${name}'")
+ set(comment "Performing download step (verify and extract) for '${name}'")
endif()
+ _ep_write_verifyfile_script("${stamp_dir}/verify-${name}.cmake" "${file}" "${md5}")
+ list(APPEND cmd ${CMAKE_COMMAND} -P ${stamp_dir}/verify-${name}.cmake)
# TODO: Support other archive formats.
- _ep_write_extractfile_script("${stamp_dir}/extract-${name}.cmake" "${file}" "${tmp_dir}" "${source_dir}")
+ _ep_write_extractfile_script("${stamp_dir}/extract-${name}.cmake" "${file}" "${source_dir}")
list(APPEND cmd ${CMAKE_COMMAND} -P ${stamp_dir}/extract-${name}.cmake)
endif()
else()
@@ -734,6 +910,7 @@ function(_ep_add_update_command name)
get_property(cmd TARGET ${name} PROPERTY _EP_UPDATE_COMMAND)
get_property(cvs_repository TARGET ${name} PROPERTY _EP_CVS_REPOSITORY)
get_property(svn_repository TARGET ${name} PROPERTY _EP_SVN_REPOSITORY)
+ get_property(git_repository TARGET ${name} PROPERTY _EP_GIT_REPOSITORY)
set(work_dir)
set(comment)
@@ -757,7 +934,25 @@ function(_ep_add_update_command name)
set(work_dir ${source_dir})
set(comment "Performing update step (SVN update) for '${name}'")
get_property(svn_revision TARGET ${name} PROPERTY _EP_SVN_REVISION)
- set(cmd ${Subversion_SVN_EXECUTABLE} up ${svn_revision})
+ get_property(svn_username TARGET ${name} PROPERTY _EP_SVN_USERNAME)
+ get_property(svn_password TARGET ${name} PROPERTY _EP_SVN_PASSWORD)
+ set(cmd ${Subversion_SVN_EXECUTABLE} up ${svn_revision}
+ --username=${svn_username} --password=${svn_password})
+ set(always 1)
+ elseif(git_repository)
+ if(NOT GIT_EXECUTABLE)
+ message(FATAL_ERROR "error: could not find git for fetch of ${name}")
+ endif()
+ set(work_dir ${source_dir})
+ set(comment "Performing update step (git fetch) for '${name}'")
+ get_property(git_tag TARGET ${name} PROPERTY _EP_GIT_TAG)
+ if(NOT git_tag)
+ set(git_tag "master")
+ endif()
+ set(cmd ${GIT_EXECUTABLE} fetch
+ COMMAND ${GIT_EXECUTABLE} checkout ${git_tag}
+ COMMAND ${GIT_EXECUTABLE} submodule update --recursive
+ )
set(always 1)
endif()
@@ -793,7 +988,7 @@ endfunction(_ep_add_patch_command)
# TODO: Make sure external projects use the proper compiler
function(_ep_add_configure_command name)
- ExternalProject_Get_Property(${name} source_dir binary_dir)
+ ExternalProject_Get_Property(${name} source_dir binary_dir tmp_dir)
_ep_get_configuration_subdir_suffix(cfgdir)
@@ -827,6 +1022,16 @@ function(_ep_add_configure_command name)
endif()
endif()
+ # If anything about the configure command changes, (command itself, cmake
+ # used, cmake args or cmake generator) then re-run the configure step.
+ # Fixes issue http://public.kitware.com/Bug/view.php?id=10258
+ #
+ if(NOT EXISTS ${tmp_dir}/${name}-cfgcmd.txt.in)
+ file(WRITE ${tmp_dir}/${name}-cfgcmd.txt.in "cmd='@cmd@'\n")
+ endif()
+ configure_file(${tmp_dir}/${name}-cfgcmd.txt.in ${tmp_dir}/${name}-cfgcmd.txt)
+ list(APPEND file_deps ${tmp_dir}/${name}-cfgcmd.txt)
+
ExternalProject_Add_Step(${name} configure
COMMAND ${cmd}
WORKING_DIRECTORY ${binary_dir}
diff --git a/Modules/FindASPELL.cmake b/Modules/FindASPELL.cmake
index c11c2e3..a211ab0 100644
--- a/Modules/FindASPELL.cmake
+++ b/Modules/FindASPELL.cmake
@@ -20,11 +20,6 @@
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
-IF (ASPELL_INCLUDE_DIR AND ASPELL_LIBRARIES)
- # Already in cache, be silent
- SET(ASPELL_FIND_QUIETLY TRUE)
-ENDIF (ASPELL_INCLUDE_DIR AND ASPELL_LIBRARIES)
-
FIND_PATH(ASPELL_INCLUDE_DIR aspell.h )
FIND_LIBRARY(ASPELL_LIBRARIES NAMES aspell aspell-15 libaspell-15 libaspell)
@@ -34,5 +29,4 @@ FIND_LIBRARY(ASPELL_LIBRARIES NAMES aspell aspell-15 libaspell-15 libaspell)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ASPELL DEFAULT_MSG ASPELL_LIBRARIES ASPELL_INCLUDE_DIR)
-
MARK_AS_ADVANCED(ASPELL_INCLUDE_DIR ASPELL_LIBRARIES)
diff --git a/Modules/FindAVIFile.cmake b/Modules/FindAVIFile.cmake
index ff140f6..7272ba6 100644
--- a/Modules/FindAVIFile.cmake
+++ b/Modules/FindAVIFile.cmake
@@ -35,16 +35,14 @@ IF (UNIX)
ENDIF (UNIX)
-SET (AVIFILE_FOUND "NO")
-
-IF(AVIFILE_INCLUDE_DIR)
- IF(AVIFILE_AVIPLAY_LIBRARY)
- SET( AVIFILE_LIBRARIES ${AVIFILE_AVIPLAY_LIBRARY} )
- SET( AVIFILE_FOUND "YES" )
- SET( AVIFILE_DEFINITIONS "")
-
- ENDIF(AVIFILE_AVIPLAY_LIBRARY)
-ENDIF(AVIFILE_INCLUDE_DIR)
-
+# handle the QUIETLY and REQUIRED arguments and set AVIFILE_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+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()
MARK_AS_ADVANCED(AVIFILE_INCLUDE_DIR AVIFILE_AVIPLAY_LIBRARY)
diff --git a/Modules/FindBZip2.cmake b/Modules/FindBZip2.cmake
index c969e43..2dcc9b4 100644
--- a/Modules/FindBZip2.cmake
+++ b/Modules/FindBZip2.cmake
@@ -4,7 +4,6 @@
# BZIP2_FOUND - system has BZip2
# BZIP2_INCLUDE_DIR - the BZip2 include directory
# BZIP2_LIBRARIES - Link these to use BZip2
-# BZIP2_DEFINITIONS - Compiler switches required for using BZip2
# BZIP2_NEED_PREFIX - this is set if the functions are prefixed with BZ2_
#=============================================================================
@@ -21,10 +20,6 @@
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
-IF (BZIP2_INCLUDE_DIR AND BZIP2_LIBRARIES)
- SET(BZip2_FIND_QUIETLY TRUE)
-ENDIF (BZIP2_INCLUDE_DIR AND BZIP2_LIBRARIES)
-
FIND_PATH(BZIP2_INCLUDE_DIR bzlib.h )
FIND_LIBRARY(BZIP2_LIBRARIES NAMES bz2 bzip2 )
diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake
index fa68190..791e6a9 100644
--- a/Modules/FindCurses.cmake
+++ b/Modules/FindCurses.cmake
@@ -33,6 +33,15 @@ 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)
+# 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()
# Not sure the logic is correct here.
diff --git a/Modules/FindDart.cmake b/Modules/FindDart.cmake
index f8c2747..65da21a 100644
--- a/Modules/FindDart.cmake
+++ b/Modules/FindDart.cmake
@@ -27,3 +27,10 @@ FIND_PATH(DART_ROOT README.INSTALL
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Dart\\InstallPath]
DOC "If you have Dart installed, where is it located?"
)
+
+# handle the QUIETLY and REQUIRED arguments and set DART_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Dart DEFAULT_MSG DART_ROOT)
+
+MARK_AS_ADVANCED(DART_ROOT)
diff --git a/Modules/FindEXPAT.cmake b/Modules/FindEXPAT.cmake
index 1c4c163..22743b1 100644
--- a/Modules/FindEXPAT.cmake
+++ b/Modules/FindEXPAT.cmake
@@ -33,9 +33,6 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(EXPAT DEFAULT_MSG EXPAT_LIBRARY EXPAT_INCLUDE_
IF(EXPAT_FOUND)
SET(EXPAT_LIBRARIES ${EXPAT_LIBRARY})
SET(EXPAT_INCLUDE_DIRS ${EXPAT_INCLUDE_DIR})
-ELSE(EXPAT_FOUND)
- SET(EXPAT_LIBRARIES)
- SET(EXPAT_INCLUDE_DIRS)
ENDIF(EXPAT_FOUND)
MARK_AS_ADVANCED(EXPAT_INCLUDE_DIR EXPAT_LIBRARY)
diff --git a/Modules/FindGCCXML.cmake b/Modules/FindGCCXML.cmake
index d618487..52390c3 100644
--- a/Modules/FindGCCXML.cmake
+++ b/Modules/FindGCCXML.cmake
@@ -1,4 +1,7 @@
# - Find the GCC-XML front-end executable.
+#
+# This module will define the following variables:
+# GCCXML - the GCC-XML front-end executable.
#=============================================================================
# Copyright 2001-2009 Kitware, Inc.
@@ -20,3 +23,5 @@ FIND_PROGRAM(GCCXML
"$ENV{ProgramFiles}/GCC_XML"
"C:/Program Files/GCC_XML"
)
+
+MARK_AS_ADVANCED(GCCXML)
diff --git a/Modules/FindGLU.cmake b/Modules/FindGLU.cmake
index 96b6dc9..81b3364 100644
--- a/Modules/FindGLU.cmake
+++ b/Modules/FindGLU.cmake
@@ -15,7 +15,9 @@
# Use of this file is deprecated, and is here for backwards compatibility with CMake 1.4
# GLU library is now found by FindOpenGL.cmake
#
-#
+
+MESSAGE(STATUS
+ "WARNING: you are using the obsolete 'GLU' package, please use 'OpenGL' instead")
INCLUDE(FindOpenGL)
diff --git a/Modules/FindGit.cmake b/Modules/FindGit.cmake
new file mode 100644
index 0000000..2d82142
--- /dev/null
+++ b/Modules/FindGit.cmake
@@ -0,0 +1,46 @@
+# The module defines the following variables:
+# GIT_EXECUTABLE - path to git command line client
+# GIT_FOUND - true if the command line client was found
+# Example usage:
+# find_package(Git)
+# if(GIT_FOUND)
+# message("git found: ${GIT_EXECUTABLE}")
+# endif()
+
+#=============================================================================
+# Copyright 2010 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+# Look for 'git' or 'eg' (easy git)
+#
+set(git_names git eg)
+
+# Prefer .cmd variants on Windows unless running in a Makefile
+# in the MSYS shell.
+#
+if(WIN32)
+ if(NOT CMAKE_GENERATOR MATCHES "MSYS")
+ set(git_names git.cmd git eg.cmd eg)
+ endif()
+endif()
+
+find_program(GIT_EXECUTABLE
+ NAMES ${git_names}
+ DOC "git command line client"
+ )
+mark_as_advanced(GIT_EXECUTABLE)
+
+# Handle the QUIETLY and REQUIRED arguments and set GIT_FOUND to TRUE if
+# all listed variables are TRUE
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Git DEFAULT_MSG GIT_EXECUTABLE)
diff --git a/Modules/FindHSPELL.cmake b/Modules/FindHSPELL.cmake
index 9ae4a52..21bc5fd 100644
--- a/Modules/FindHSPELL.cmake
+++ b/Modules/FindHSPELL.cmake
@@ -1,10 +1,14 @@
-# - Try to find HSPELL
+# - Try to find Hspell
# Once done this will define
#
-# HSPELL_FOUND - system has HSPELL
-# HSPELL_INCLUDE_DIR - the HSPELL include directory
-# HSPELL_LIBRARIES - The libraries needed to use HSPELL
-# HSPELL_DEFINITIONS - Compiler switches required for using HSPELL
+# HSPELL_FOUND - system has Hspell
+# HSPELL_INCLUDE_DIR - the Hspell include directory
+# HSPELL_LIBRARIES - The libraries needed to use Hspell
+# HSPELL_DEFINITIONS - Compiler switches required for using Hspell
+#
+# HSPELL_VERSION_STRING - The version of Hspell found (x.y)
+# HSPELL_MAJOR_VERSION - the major version of Hspell
+# HSPELL_MINOR_VERSION - The minor version of Hspell
#=============================================================================
# Copyright 2006-2009 Kitware, Inc.
@@ -20,21 +24,20 @@
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
-IF (HSPELL_INCLUDE_DIR AND HSPELL_LIBRARIES)
- # Already in cache, be silent
- SET(HSPELL_FIND_QUIETLY TRUE)
-ENDIF (HSPELL_INCLUDE_DIR AND HSPELL_LIBRARIES)
-
+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}")
+ENDIF()
# handle the QUIETLY and REQUIRED arguments and set HSPELL_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(HSPELL DEFAULT_MSG HSPELL_LIBRARIES HSPELL_INCLUDE_DIR)
-
MARK_AS_ADVANCED(HSPELL_INCLUDE_DIR HSPELL_LIBRARIES)
diff --git a/Modules/FindJasper.cmake b/Modules/FindJasper.cmake
index 553654e..4f8ccb7 100644
--- a/Modules/FindJasper.cmake
+++ b/Modules/FindJasper.cmake
@@ -21,19 +21,10 @@
FIND_PACKAGE(JPEG)
-IF (JASPER_INCLUDE_DIR AND JASPER_LIBRARIES AND JPEG_LIBRARIES)
- # Already in cache, be silent
- SET(Jasper_FIND_QUIETLY TRUE)
-ENDIF (JASPER_INCLUDE_DIR AND JASPER_LIBRARIES AND JPEG_LIBRARIES)
-
FIND_PATH(JASPER_INCLUDE_DIR jasper/jasper.h)
FIND_LIBRARY(JASPER_LIBRARY NAMES jasper libjasper)
-IF (JASPER_INCLUDE_DIR AND JASPER_LIBRARY AND JPEG_LIBRARIES)
- SET(JASPER_LIBRARIES ${JASPER_LIBRARY} ${JPEG_LIBRARIES} )
-ENDIF (JASPER_INCLUDE_DIR AND JASPER_LIBRARY AND JPEG_LIBRARIES)
-
# handle the QUIETLY and REQUIRED arguments and set JASPER_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
@@ -43,4 +34,4 @@ IF (JASPER_FOUND)
SET(JASPER_LIBRARIES ${JASPER_LIBRARY} ${JPEG_LIBRARIES} )
ENDIF (JASPER_FOUND)
-MARK_AS_ADVANCED(JASPER_INCLUDE_DIR JASPER_LIBRARIES JASPER_LIBRARY)
+MARK_AS_ADVANCED(JASPER_INCLUDE_DIR JASPER_LIBRARY)
diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake
index 7eb6d900c..4cd4389 100644
--- a/Modules/FindJava.cmake
+++ b/Modules/FindJava.cmake
@@ -24,9 +24,18 @@
# and
# Java_VERSION = 1.6.0
#
-# NOTE: At the moment this script will look for javac and jar component,
-# which means it will fail if javac or jar is not found.:w
-# See Bug #9840
+# For these components the following variables are set:
+#
+# Java_FOUND - TRUE if all components are found.
+# Java_INCLUDE_DIRS - Full paths to all include dirs.
+# Java_LIBRARIES - Full paths to all libraries.
+# Java_<component>_FOUND - TRUE if <component> is found.
+#
+# Example Usages:
+# FIND_PACKAGE(Java)
+# FIND_PACKAGE(Java COMPONENTS Runtime)
+# FIND_PACKAGE(Java COMPONENTS Development)
+#
#=============================================================================
# Copyright 2002-2009 Kitware, Inc.
@@ -82,7 +91,11 @@ IF(Java_JAVA_EXECUTABLE)
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE)
IF( res )
- MESSAGE( FATAL_ERROR "Error executing java -version" )
+ 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
@@ -148,12 +161,36 @@ FIND_PROGRAM(Java_JAVAC_EXECUTABLE
)
include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Java DEFAULT_MSG
- Java_JAVA_EXECUTABLE
- Java_JAR_EXECUTABLE
- Java_JAVAC_EXECUTABLE
- _java_version_acceptable
-)
+if(Java_FIND_COMPONENTS)
+ foreach(component ${Java_FIND_COMPONENTS})
+ # User just want to execute some Java byte-compiled
+ if(component STREQUAL "Runtime")
+ find_package_handle_standard_args(Java DEFAULT_MSG
+ Java_JAVA_EXECUTABLE
+ _java_version_acceptable
+ )
+ elseif(component STREQUAL "Development")
+ find_package_handle_standard_args(Java DEFAULT_MSG
+ Java_JAVA_EXECUTABLE
+ Java_JAR_EXECUTABLE
+ Java_JAVAC_EXECUTABLE
+ _java_version_acceptable
+ )
+ else()
+ message(FATAL_ERROR "Comp: ${component} is not handled")
+ endif()
+ set(Java_${component}_FOUND TRUE)
+ endforeach(component)
+else()
+ # Check for everything
+ find_package_handle_standard_args(Java DEFAULT_MSG
+ Java_JAVA_EXECUTABLE
+ Java_JAR_EXECUTABLE
+ Java_JAVAC_EXECUTABLE
+ _java_version_acceptable
+ )
+endif()
+
MARK_AS_ADVANCED(
Java_JAVA_EXECUTABLE
diff --git a/Modules/FindKDE4.cmake b/Modules/FindKDE4.cmake
index 12fd304..42a1530 100644
--- a/Modules/FindKDE4.cmake
+++ b/Modules/FindKDE4.cmake
@@ -73,7 +73,7 @@ IF(NOT KDE4_DATA_DIR)
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 ${_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)
diff --git a/Modules/FindLibXml2.cmake b/Modules/FindLibXml2.cmake
index 9139aad..67db321 100644
--- a/Modules/FindLibXml2.cmake
+++ b/Modules/FindLibXml2.cmake
@@ -24,7 +24,7 @@
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
FIND_PACKAGE(PkgConfig)
-PKG_CHECK_MODULES(PC_LIBXML libxml-2.0)
+PKG_CHECK_MODULES(PC_LIBXML libxml-2.0 QUIET)
SET(LIBXML2_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER})
FIND_PATH(LIBXML2_INCLUDE_DIR NAMES libxml/xpath.h
@@ -44,10 +44,9 @@ FIND_PROGRAM(LIBXML2_XMLLINT_EXECUTABLE xmllint)
# for backwards compat. with KDE 4.0.x:
SET(XMLLINT_EXECUTABLE "${LIBXML2_XMLLINT_EXECUTABLE}")
-INCLUDE(FindPackageHandleStandardArgs)
-
# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if
# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES LIBXML2_XMLLINT_EXECUTABLE)
diff --git a/Modules/FindLibXslt.cmake b/Modules/FindLibXslt.cmake
index d16d1ff..a03aa7c 100644
--- a/Modules/FindLibXslt.cmake
+++ b/Modules/FindLibXslt.cmake
@@ -26,9 +26,8 @@ FIND_PACKAGE(PkgConfig)
PKG_CHECK_MODULES(PC_LIBXSLT libxslt)
SET(LIBXSLT_DEFINITIONS ${PC_LIBXSLT_CFLAGS_OTHER})
-
FIND_PATH(LIBXSLT_INCLUDE_DIR NAMES libxslt/xslt.h
- HINTS
+ HINTS
${PC_LIBXSLT_INCLUDEDIR}
${PC_LIBXSLT_INCLUDE_DIRS}
)
@@ -39,12 +38,10 @@ FIND_LIBRARY(LIBXSLT_LIBRARIES NAMES xslt libxslt
${PC_LIBXSLT_LIBRARY_DIRS}
)
-INCLUDE(FindPackageHandleStandardArgs)
-
# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if
# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXslt DEFAULT_MSG LIBXSLT_LIBRARIES LIBXSLT_INCLUDE_DIR)
-
MARK_AS_ADVANCED(LIBXSLT_INCLUDE_DIR LIBXSLT_LIBRARIES)
diff --git a/Modules/FindMPEG.cmake b/Modules/FindMPEG.cmake
index a19f73e..0c06c94 100644
--- a/Modules/FindMPEG.cmake
+++ b/Modules/FindMPEG.cmake
@@ -35,8 +35,10 @@ FIND_LIBRARY( MPEG_vo_LIBRARY vo
# handle the QUIETLY and REQUIRED arguments and set MPEG2_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG DEFAULT_MSG MPEG_INCLUDE_DIR MPEG_mpeg2_LIBRARY)
+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)
+
+MARK_AS_ADVANCED(MPEG_INCLUDE_DIR MPEG_mpeg2_LIBRARY MPEG_vo_LIBRARY)
diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake
index 094f9e6..481b0e9 100644
--- a/Modules/FindMPI.cmake
+++ b/Modules/FindMPI.cmake
@@ -86,6 +86,7 @@ set(_MPI_PACKAGE_DIR
set(_MPI_PREFIX_PATH)
if(WIN32)
list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH\\SMPD;binary]/..")
+ list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH2;Path]")
endif()
foreach(SystemPrefixDir ${CMAKE_SYSTEM_PREFIX_PATH})
diff --git a/Modules/FindOpenAL.cmake b/Modules/FindOpenAL.cmake
index b9b7078..f42a69a 100644
--- a/Modules/FindOpenAL.cmake
+++ b/Modules/FindOpenAL.cmake
@@ -95,8 +95,9 @@ FIND_LIBRARY(OPENAL_LIBRARY
)
-SET(OPENAL_FOUND "NO")
-IF(OPENAL_LIBRARY AND OPENAL_INCLUDE_DIR)
- SET(OPENAL_FOUND "YES")
-ENDIF(OPENAL_LIBRARY AND OPENAL_INCLUDE_DIR)
+# handle the QUIETLY and REQUIRED arguments and set OPENAL_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenAL DEFAULT_MSG OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
+MARK_AS_ADVANCED(OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
diff --git a/Modules/FindPNG.cmake b/Modules/FindPNG.cmake
index 8df3573..bfc5d4a 100644
--- a/Modules/FindPNG.cmake
+++ b/Modules/FindPNG.cmake
@@ -33,7 +33,7 @@ if(ZLIB_FOUND)
/usr/local/include/libpng # OpenBSD
)
- set(PNG_NAMES ${PNG_NAMES} png libpng png12 libpng12)
+ set(PNG_NAMES ${PNG_NAMES} png libpng png14 libpng14 png14d libpng14d png12 libpng12 png12d libpng12d)
find_library(PNG_LIBRARY NAMES ${PNG_NAMES} )
if (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR)
diff --git a/Modules/FindPhysFS.cmake b/Modules/FindPhysFS.cmake
index 4775a8e..98bebe6 100644
--- a/Modules/FindPhysFS.cmake
+++ b/Modules/FindPhysFS.cmake
@@ -54,8 +54,8 @@ FIND_LIBRARY(PHYSFS_LIBRARY
/opt
)
-SET(PHYSFS_FOUND "NO")
-IF(PHYSFS_LIBRARY AND PHYSFS_INCLUDE_DIR)
- SET(PHYSFS_FOUND "YES")
-ENDIF(PHYSFS_LIBRARY AND PHYSFS_INCLUDE_DIR)
+# handle the QUIETLY and REQUIRED arguments and set PHYSFS_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(PhysFS DEFAULT_MSG PHYSFS_LIBRARY PHYSFS_INCLUDE_DIR)
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index 6e6b802..3cbb7af 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -1,15 +1,17 @@
# - a pkg-config module for CMake
#
# Usage:
-# pkg_check_modules(<PREFIX> [REQUIRED] <MODULE> [<MODULE>]*)
+# pkg_check_modules(<PREFIX> [REQUIRED] [QUIET] <MODULE> [<MODULE>]*)
# checks for all the given modules
#
-# pkg_search_module(<PREFIX> [REQUIRED] <MODULE> [<MODULE>]*)
+# pkg_search_module(<PREFIX> [REQUIRED] [QUIET] <MODULE> [<MODULE>]*)
# checks for given modules and uses the first working one
#
# When the 'REQUIRED' argument was set, macros will fail with an error
# when module(s) could not be found
#
+# When the 'QUIET' argument is set, no status messages will be printed.
+#
# It sets the following variables:
# PKG_CONFIG_FOUND ... true if pkg-config works on the system
# PKG_CONFIG_EXECUTABLE ... pathname of the pkg-config program
@@ -138,17 +140,22 @@ macro(_pkgconfig_invoke_dyn _pkglist _prefix _varname cleanup_regexp)
endmacro(_pkgconfig_invoke_dyn)
# Splits given arguments into options and a package list
-macro(_pkgconfig_parse_options _result _is_req)
+macro(_pkgconfig_parse_options _result _is_req _is_silent)
set(${_is_req} 0)
+ set(${_is_silent} 0)
foreach(_pkg ${ARGN})
if (_pkg STREQUAL "REQUIRED")
set(${_is_req} 1)
endif (_pkg STREQUAL "REQUIRED")
+ if (_pkg STREQUAL "QUIET")
+ set(${_is_silent} 1)
+ endif (_pkg STREQUAL "QUIET")
endforeach(_pkg ${ARGN})
set(${_result} ${ARGN})
list(REMOVE_ITEM ${_result} "REQUIRED")
+ list(REMOVE_ITEM ${_result} "QUIET")
endmacro(_pkgconfig_parse_options)
###
@@ -279,7 +286,9 @@ macro(_pkg_check_modules_internal _is_required _is_silent _prefix)
_pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" INCLUDEDIR "" --variable=includedir )
_pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" LIBDIR "" --variable=libdir )
- message(STATUS " found ${_pkg_check_modules_pkg}, version ${_pkgconfig_VERSION}")
+ if (NOT ${_is_silent})
+ message(STATUS " found ${_pkg_check_modules_pkg}, version ${_pkgconfig_VERSION}")
+ endif (NOT ${_is_silent})
endforeach(_pkg_check_modules_pkg)
# set variables which are combined for multiple modules
@@ -307,8 +316,8 @@ endmacro(_pkg_check_modules_internal)
macro(pkg_check_modules _prefix _module0)
# check cached value
if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND)
- _pkgconfig_parse_options (_pkg_modules _pkg_is_required "${_module0}" ${ARGN})
- _pkg_check_modules_internal("${_pkg_is_required}" 0 "${_prefix}" ${_pkg_modules})
+ _pkgconfig_parse_options (_pkg_modules _pkg_is_required _pkg_is_silent "${_module0}" ${ARGN})
+ _pkg_check_modules_internal("${_pkg_is_required}" "${_pkg_is_silent}" "${_prefix}" ${_pkg_modules})
_pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION})
endif(NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND)
@@ -319,9 +328,11 @@ macro(pkg_search_module _prefix _module0)
# check cached value
if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND)
set(_pkg_modules_found 0)
- _pkgconfig_parse_options(_pkg_modules_alt _pkg_is_required "${_module0}" ${ARGN})
+ _pkgconfig_parse_options(_pkg_modules_alt _pkg_is_required _pkg_is_silent "${_module0}" ${ARGN})
- message(STATUS "checking for one of the modules '${_pkg_modules_alt}'")
+ if (NOT ${_pkg_is_silent})
+ message(STATUS "checking for one of the modules '${_pkg_modules_alt}'")
+ endif (NOT ${_pkg_is_silent})
# iterate through all modules and stop at the first working one.
foreach(_pkg_alt ${_pkg_modules_alt})
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 76d7950..f2de4c9 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -397,6 +397,7 @@ FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 qmake-mac PATHS
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]/bin"
$ENV{QTDIR}/bin
+ DOC "The qmake executable for the Qt installation to use"
)
IF (QT_QMAKE_EXECUTABLE)
@@ -418,6 +419,7 @@ IF (QT_QMAKE_EXECUTABLE)
"[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)
EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE}
diff --git a/Modules/FindQuickTime.cmake b/Modules/FindQuickTime.cmake
index aa13ae9..f693543 100644
--- a/Modules/FindQuickTime.cmake
+++ b/Modules/FindQuickTime.cmake
@@ -41,9 +41,7 @@ ELSE(APPLE)
)
ENDIF(APPLE)
-SET(QUICKTIME_FOUND "NO")
-IF(QUICKTIME_LIBRARY AND QUICKTIME_INCLUDE_DIR)
- SET(QUICKTIME_FOUND "YES")
-ENDIF(QUICKTIME_LIBRARY AND QUICKTIME_INCLUDE_DIR)
-
-
+# handle the QUIETLY and REQUIRED arguments and set QUICKTIME_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(QuickTime DEFAULT_MSG QUICKTIME_LIBRARY QUICKTIME_INCLUDE_DIR)
diff --git a/Modules/FindSubversion.cmake b/Modules/FindSubversion.cmake
index c33df1d..58a179d 100644
--- a/Modules/FindSubversion.cmake
+++ b/Modules/FindSubversion.cmake
@@ -109,14 +109,5 @@ IF(Subversion_SVN_EXECUTABLE)
ENDIF(Subversion_SVN_EXECUTABLE)
-IF(NOT Subversion_FOUND)
- IF(NOT Subversion_FIND_QUIETLY)
- MESSAGE(STATUS "Subversion was not found.")
- ELSE(NOT Subversion_FIND_QUIETLY)
- IF(Subversion_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Subversion was not found.")
- ENDIF(Subversion_FIND_REQUIRED)
- ENDIF(NOT Subversion_FIND_QUIETLY)
-ENDIF(NOT Subversion_FOUND)
-
-# FindSubversion.cmake ends here.
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Subversion DEFAULT_MSG Subversion_SVN_EXECUTABLE)
diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake
index c084df0..f056413 100644
--- a/Modules/FindX11.cmake
+++ b/Modules/FindX11.cmake
@@ -22,6 +22,7 @@
# X11_xf86vmode_INCLUDE_PATH, X11_xf86vmode_FOUND
# X11_Xfixes_INCLUDE_PATH, X11_Xfixes_LIB, X11_Xfixes_FOUND
# X11_Xft_INCLUDE_PATH, X11_Xft_LIB, X11_Xft_FOUND
+# X11_Xi_INCLUDE_PATH, X11_Xi_LIB, X11_Xi_FOUND
# X11_Xinerama_INCLUDE_PATH, X11_Xinerama_LIB, X11_Xinerama_FOUND
# X11_Xinput_INCLUDE_PATH, X11_Xinput_LIB, X11_Xinput_FOUND
# X11_Xkb_INCLUDE_PATH, X11_Xkb_FOUND
@@ -91,6 +92,7 @@ IF (UNIX)
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})
@@ -120,6 +122,7 @@ IF (UNIX)
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_Xpm_LIB Xpm ${X11_LIB_SEARCH_PATH})
@@ -219,6 +222,11 @@ IF (UNIX)
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})
@@ -396,6 +404,8 @@ IF (UNIX)
X11_Xxf86misc_LIB
X11_xf86misc_INCLUDE_PATH
X11_xf86vmode_INCLUDE_PATH
+ X11_Xi_LIB
+ X11_Xi_INCLUDE_PATH
X11_Xinerama_LIB
X11_Xinerama_INCLUDE_PATH
X11_XTest_LIB
diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake
index 8066343..b437e6b 100644
--- a/Modules/FindZLIB.cmake
+++ b/Modules/FindZLIB.cmake
@@ -1,9 +1,14 @@
# - Find zlib
# Find the native ZLIB includes and library
#
-# ZLIB_INCLUDE_DIRS - where to find zlib.h, etc.
-# ZLIB_LIBRARIES - List of libraries when using zlib.
-# ZLIB_FOUND - True if zlib found.
+# ZLIB_INCLUDE_DIRS - where to find zlib.h, etc.
+# ZLIB_LIBRARIES - List of libraries when using zlib.
+# ZLIB_FOUND - True if zlib found.
+#
+# ZLIB_VERSION_STRING - The version of zlib found (x.y.z)
+# ZLIB_MAJOR_VERSION - the major version of zlib
+# ZLIB_MINOR_VERSION - The minor version of zlib
+# ZLIB_PATCH_VERSION - The patch version of zlib
#=============================================================================
# Copyright 2001-2009 Kitware, Inc.
@@ -18,23 +23,31 @@
# (To distributed this file outside of CMake, substitute the full
# License text for the above reference.)
-IF (ZLIB_INCLUDE_DIR)
- # Already in cache, be silent
- SET(ZLIB_FIND_QUIETLY TRUE)
-ENDIF (ZLIB_INCLUDE_DIR)
-
-FIND_PATH(ZLIB_INCLUDE_DIR zlib.h)
+FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]/include"
+)
SET(ZLIB_NAMES z zlib zdll)
-FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} )
-MARK_AS_ADVANCED( ZLIB_LIBRARY ZLIB_INCLUDE_DIR )
+FIND_LIBRARY(ZLIB_LIBRARY
+ NAMES
+ ${ZLIB_NAMES}
+ PATHS
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]/lib"
+)
+MARK_AS_ADVANCED(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-# Per-recommendation
-SET(ZLIB_INCLUDE_DIRS "${ZLIB_INCLUDE_DIR}")
-SET(ZLIB_LIBRARIES "${ZLIB_LIBRARY}")
+IF (ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h")
+ FILE(READ "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_H)
+ STRING(REGEX REPLACE ".*#define ZLIB_VERSION \"([0-9]+)\\.([0-9]+)\\.([0-9]+)\".*" "\\1.\\2.\\3" ZLIB_VERSION_STRING "${ZLIB_H}")
+ENDIF()
# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_LIBRARIES ZLIB_INCLUDE_DIRS)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_INCLUDE_DIR ZLIB_LIBRARY)
+
+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 05c6625..85c6568 100644
--- a/Modules/FindwxWidgets.cmake
+++ b/Modules/FindwxWidgets.cmake
@@ -723,10 +723,13 @@ ELSE(wxWidgets_FIND_STYLE STREQUAL "win32")
DBG_MSG_V("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}")
- # parse definitions from cxxflags; drop -D* from CXXFLAGS and the -D prefix
+ # parse definitions from cxxflags;
+ # drop -D* from CXXFLAGS and the -D prefix
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 ";$" ""
wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}")
STRING(REPLACE "-D" ""
wxWidgets_DEFINITIONS "${wxWidgets_DEFINITIONS}")
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake
index 123b433..24cee55 100644
--- a/Modules/GetPrerequisites.cmake
+++ b/Modules/GetPrerequisites.cmake
@@ -16,6 +16,7 @@
# gp_resolve_item
# (projects can override with gp_resolve_item_override)
# gp_resolved_file_type
+# (projects can override with gp_resolved_file_type_override)
# gp_file_type
# get_prerequisites
# list_prerequisites
@@ -345,6 +346,9 @@ endfunction(gp_resolve_item)
# embedded
# other
#
+# Override on a per-project basis by providing a project-specific
+# gp_resolved_file_type_override function.
+#
function(gp_resolved_file_type original_file file exepath dirs type_var)
#message(STATUS "**")
@@ -428,6 +432,13 @@ function(gp_resolved_file_type original_file file exepath dirs type_var)
endif()
endif()
+ # Provide a hook so that projects can override the decision on whether a
+ # library belongs to the system or not by whatever logic they choose:
+ #
+ if(COMMAND gp_resolved_file_type_override)
+ gp_resolved_file_type_override("${resolved_file}" type)
+ endif()
+
set(${type_var} "${type}" PARENT_SCOPE)
#message(STATUS "**")
diff --git a/Modules/Platform/CYGWIN-GNU.cmake b/Modules/Platform/CYGWIN-GNU.cmake
index 6a80f62..24bb92a 100644
--- a/Modules/Platform/CYGWIN-GNU.cmake
+++ b/Modules/Platform/CYGWIN-GNU.cmake
@@ -45,6 +45,7 @@ macro(__cygwin_compiler_gnu lang)
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?
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS} -Wl,--enable-auto-import")
set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS}")
diff --git a/Modules/Platform/Generic.cmake b/Modules/Platform/Generic.cmake
index 00508b2..a4e2ec6 100644
--- a/Modules/Platform/Generic.cmake
+++ b/Modules/Platform/Generic.cmake
@@ -9,3 +9,9 @@
# (embedded) targets without operating system usually don't support shared libraries
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 )
diff --git a/Modules/Platform/Linux-Clang-C.cmake b/Modules/Platform/Linux-Clang-C.cmake
new file mode 100644
index 0000000..dbf8956
--- /dev/null
+++ b/Modules/Platform/Linux-Clang-C.cmake
@@ -0,0 +1 @@
+INCLUDE(Platform/Linux-GNU-C)
diff --git a/Modules/Platform/Linux-Clang-CXX.cmake b/Modules/Platform/Linux-Clang-CXX.cmake
new file mode 100644
index 0000000..8fe251c
--- /dev/null
+++ b/Modules/Platform/Linux-Clang-CXX.cmake
@@ -0,0 +1 @@
+INCLUDE(Platform/Linux-GNU-CXX)
diff --git a/Modules/Platform/Linux-SunPro-CXX.cmake b/Modules/Platform/Linux-SunPro-CXX.cmake
index 5490473..8ee9658 100644
--- a/Modules/Platform/Linux-SunPro-CXX.cmake
+++ b/Modules/Platform/Linux-SunPro-CXX.cmake
@@ -1,2 +1,9 @@
-SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG "-rpath-link ")
+# Sun C++ 5.9 does not support -Wl, but Sun C++ 5.11 does not work without it.
+# Query the compiler flags to detect whether to use -Wl.
+execute_process(COMMAND ${CMAKE_CXX_COMPILER} -flags OUTPUT_VARIABLE _cxx_flags ERROR_VARIABLE _cxx_error)
+if("${_cxx_flags}" MATCHES "\n-W[^\n]*component")
+ set(CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG "-Wl,-rpath-link,")
+else()
+ set(CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG "-rpath-link ")
+endif()
SET(CMAKE_EXE_EXPORTS_CXX_FLAG "--export-dynamic")
diff --git a/Modules/Platform/OpenBSD.cmake b/Modules/Platform/OpenBSD.cmake
index e7df46d..b4ed66f 100644
--- a/Modules/Platform/OpenBSD.cmake
+++ b/Modules/Platform/OpenBSD.cmake
@@ -1,2 +1,18 @@
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
+ OUTPUT_VARIABLE LDCONFIG_HINTS
+ ERROR_QUIET)
+ STRING(REGEX REPLACE ".*search\\ directories:\\ ([^\n]*).*" "\\1"
+ LDCONFIG_HINTS "${LDCONFIG_HINTS}")
+ STRING(REGEX REPLACE ":" ";"
+ CMAKE_PLATFORM_RUNTIME_PATH
+ "${LDCONFIG_HINTS}")
+ENDIF()
+
SET_PROPERTY(GLOBAL PROPERTY FIND_LIBRARY_USE_OPENBSD_VERSIONING 1)
diff --git a/Modules/Platform/Windows-G95-Fortran.cmake b/Modules/Platform/Windows-G95-Fortran.cmake
new file mode 100644
index 0000000..af08008
--- /dev/null
+++ b/Modules/Platform/Windows-G95-Fortran.cmake
@@ -0,0 +1 @@
+include(Platform/Windows-GNU-Fortran)
diff --git a/Modules/Platform/Windows-cl.cmake b/Modules/Platform/Windows-cl.cmake
index e369ac1..7463c62 100644
--- a/Modules/Platform/Windows-cl.cmake
+++ b/Modules/Platform/Windows-cl.cmake
@@ -23,19 +23,15 @@ ENDIF(NOT CMAKE_NO_BUILD_TYPE AND CMAKE_GENERATOR MATCHES "Visual Studio")
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 9")
- SET(CMAKE_COMPILER_2005 1)
-ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 9")
-
# make sure to enable languages after setting configuration types
ENABLE_LANGUAGE(RC)
SET(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>")
-# for nmake we need to compute some information about the compiler
+# for nmake we need to compute some information about the compiler
# that is being used.
# the compiler may be free command line, 6, 7, or 71, and
-# each have properties that must be determined.
+# each have properties that must be determined.
# to avoid running these tests with each cmake run, the
# test results are saved in CMakeCPlatform.cmake, a file
# that is automatically copied into try_compile directories
@@ -87,25 +83,12 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles")
SET(MSVC80 1)
SET(CMAKE_COMPILER_2005 1)
ENDIF("${compilerVersion}" EQUAL 1400)
- IF("${compilerVersion}" GREATER 1400)
- SET(MSVC80 1)
- SET(CMAKE_COMPILER_2005 1)
- ENDIF("${compilerVersion}" GREATER 1400)
- IF("${compilerVersion}" GREATER 1400)
- SET(MSVC80 1)
- SET(CMAKE_COMPILER_2005 1)
- ENDIF("${compilerVersion}" GREATER 1400)
IF("${compilerVersion}" EQUAL 1500)
SET(MSVC90 1)
- SET(MSVC80 0)
ENDIF("${compilerVersion}" EQUAL 1500)
- IF("${compilerVersion}" GREATER 1500)
- SET(MSVC90 1)
- SET(MSVC80 0)
- ENDIF("${compilerVersion}" GREATER 1500)
IF("${compilerVersion}" EQUAL 1600)
SET(MSVC10 1)
- ENDIF()
+ ENDIF("${compilerVersion}" EQUAL 1600)
SET(MSVC_VERSION "${compilerVersion}")
ELSE(NOT CMAKE_COMPILER_RETURN)
MESSAGE(STATUS "Check for CL compiler version - failed")
@@ -224,7 +207,7 @@ 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 pdbtyp
+# 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)
@@ -256,7 +239,6 @@ SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELW
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
@@ -267,4 +249,3 @@ 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")
-
diff --git a/Modules/Platform/Windows-cl.cmake.in b/Modules/Platform/Windows-cl.cmake.in
index 1a889f2..82a0e59 100644
--- a/Modules/Platform/Windows-cl.cmake.in
+++ b/Modules/Platform/Windows-cl.cmake.in
@@ -8,6 +8,7 @@ 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-wcl386.cmake b/Modules/Platform/Windows-wcl386.cmake
index b260489..7fc345f 100644
--- a/Modules/Platform/Windows-wcl386.cmake
+++ b/Modules/Platform/Windows-wcl386.cmake
@@ -31,7 +31,7 @@ SET(CMAKE_C_CREATE_IMPORT_LIBRARY
SET(CMAKE_CXX_CREATE_IMPORT_LIBRARY ${CMAKE_C_CREATE_IMPORT_LIBRARY})
SET(CMAKE_C_LINK_EXECUTABLE
- "wlink ${CMAKE_START_TEMP_FILE} ${CMAKE_WLINK_QUIET} name '<TARGET_UNQUOTED>' option caseexact file {<OBJECTS>} <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
+ "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})
@@ -52,7 +52,7 @@ 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
- "wlink ${CMAKE_START_TEMP_FILE} system nt_dll ${CMAKE_WLINK_QUIET} name '<TARGET_UNQUOTED>' option caseexact file {<OBJECTS>} <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}")
+ "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
${CMAKE_CXX_CREATE_SHARED_MODULE}
${CMAKE_CXX_CREATE_IMPORT_LIBRARY})
@@ -64,7 +64,7 @@ SET(CMAKE_C_CREATE_SHARED_LIBRARY ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
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} -n -b '<TARGET_UNQUOTED>' <OBJECTS> ")
+SET(CMAKE_CXX_CREATE_STATIC_LIBRARY "wlib ${CMAKE_LIB_QUIET} -n -b '<TARGET_UNQUOTED>' <LINK_FLAGS> <OBJECTS> ")
# create a C static library
SET(CMAKE_C_CREATE_STATIC_LIBRARY ${CMAKE_CXX_CREATE_STATIC_LIBRARY})
diff --git a/Modules/Qt4ConfigDependentSettings.cmake b/Modules/Qt4ConfigDependentSettings.cmake
index 1c5293d..ccbc828 100644
--- a/Modules/Qt4ConfigDependentSettings.cmake
+++ b/Modules/Qt4ConfigDependentSettings.cmake
@@ -60,25 +60,13 @@ IF(WIN32 AND NOT QT_IS_STATIC)
SET(QT_DEFINITIONS ${QT_DEFINITIONS} -DQT_DLL)
ENDIF(WIN32 AND NOT QT_IS_STATIC)
+IF(NOT QT_IS_STATIC)
+ RETURN()
+ENDIF(NOT QT_IS_STATIC)
# QtOpenGL dependencies
-QT_QUERY_QMAKE(QMAKE_LIBS_OPENGL "QMAKE_LIBS_OPENGL")
-IF(Q_WS_MAC)
-# On the Mac OpenGL is probably frameworks and QMAKE_LIBS_OPENGL can be
-# e.g. "-framework OpenGL -framework AGL". The separate_arguments() call in
-# the other branch makes "-framework;-OpenGL;-framework;-lAGL" appear in the
-# linker command. So we need to protect the "-framework foo" as
-# non-separatable strings. We do this by replacing the space after
-# "-framework" with an underscore, then calling separate_arguments(), and
-# then we replace the underscores again with spaces. So we get proper linker
-# commands. Alex
- STRING(REGEX REPLACE "-framework +" "-framework_" QMAKE_LIBS_OPENGL "${QMAKE_LIBS_OPENGL}")
- SEPARATE_ARGUMENTS(QMAKE_LIBS_OPENGL)
- STRING(REGEX REPLACE "-framework_" "-framework " QMAKE_LIBS_OPENGL "${QMAKE_LIBS_OPENGL}")
-ELSE(Q_WS_MAC)
- SEPARATE_ARGUMENTS(QMAKE_LIBS_OPENGL)
-ENDIF(Q_WS_MAC)
-SET (QT_QTOPENGL_LIB_DEPENDENCIES ${QT_QTOPENGL_LIB_DEPENDENCIES} ${QMAKE_LIBS_OPENGL})
+find_package(OpenGL)
+SET (QT_QTOPENGL_LIB_DEPENDENCIES ${OPENGL_glu_LIBRARY} ${OPENGL_gl_LIBRARY})
## system png
@@ -93,80 +81,63 @@ ENDIF(QT_QCONFIG MATCHES "system-png")
# for X11, get X11 library directory
IF(Q_WS_X11)
- QT_QUERY_QMAKE(QMAKE_LIBDIR_X11 "QMAKE_LIBDIR_X11")
+ FIND_PACKAGE(X11)
ENDIF(Q_WS_X11)
## X11 SM
IF(QT_QCONFIG MATCHES "x11sm")
- # ask qmake where the x11 libs are
- FIND_LIBRARY(QT_X11_SM_LIBRARY NAMES SM PATHS ${QMAKE_LIBDIR_X11})
- FIND_LIBRARY(QT_X11_ICE_LIBRARY NAMES ICE PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(QT_X11_SM_LIBRARY)
- MARK_AS_ADVANCED(QT_X11_ICE_LIBRARY)
- IF(QT_X11_SM_LIBRARY AND QT_X11_ICE_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_X11_SM_LIBRARY} ${QT_X11_ICE_LIBRARY})
- ENDIF(QT_X11_SM_LIBRARY AND QT_X11_ICE_LIBRARY)
+ 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")
- FIND_LIBRARY(QT_XI_LIBRARY NAMES Xi PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(QT_XI_LIBRARY)
- IF(QT_XI_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XI_LIBRARY})
- ENDIF(QT_XI_LIBRARY)
+ 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")
- FIND_LIBRARY(QT_XRENDER_LIBRARY NAMES Xrender PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(QT_XRENDER_LIBRARY)
- IF(QT_XRENDER_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XRENDER_LIBRARY})
- ENDIF(QT_XRENDER_LIBRARY)
+ 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")
- FIND_LIBRARY(QT_XRANDR_LIBRARY NAMES Xrandr PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(QT_XRANDR_LIBRARY)
- IF(QT_XRANDR_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XRANDR_LIBRARY})
- ENDIF(QT_XRANDR_LIBRARY)
+ 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")
- FIND_LIBRARY(QT_XCURSOR_LIBRARY NAMES Xcursor PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(QT_XCURSOR_LIBRARY)
- IF(QT_XCURSOR_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XCURSOR_LIBRARY})
- ENDIF(QT_XCURSOR_LIBRARY)
+ 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")
- FIND_LIBRARY(QT_XINERAMA_LIBRARY NAMES Xinerama PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(QT_XINERAMA_LIBRARY)
- IF(QT_XINERAMA_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XINERAMA_LIBRARY})
- ENDIF(QT_XINERAMA_LIBRARY)
+ 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")
- FIND_LIBRARY(QT_XFIXES_LIBRARY NAMES Xfixes PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(QT_XFIXES_LIBRARY)
- IF(QT_XFIXES_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XFIXES_LIBRARY})
- ENDIF(QT_XFIXES_LIBRARY)
+ 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")
@@ -327,24 +298,13 @@ ENDIF(QT_QCONFIG MATCHES "clock-monotonic")
IF(Q_WS_X11)
- # X11 libraries Qt absolutely depends on
- QT_QUERY_QMAKE(QT_LIBS_X11 "QMAKE_LIBS_X11")
- SEPARATE_ARGUMENTS(QT_LIBS_X11)
- FOREACH(QT_X11_LIB ${QT_LIBS_X11})
- STRING(REGEX REPLACE "-l" "" QT_X11_LIB "${QT_X11_LIB}")
- SET(QT_TMP_STR "QT_X11_${QT_X11_LIB}_LIBRARY")
- FIND_LIBRARY(${QT_TMP_STR} NAMES "${QT_X11_LIB}" PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(${QT_TMP_STR})
- IF(${QT_TMP_STR})
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${${QT_TMP_STR}})
- ENDIF(${QT_TMP_STR})
- ENDFOREACH(QT_X11_LIB)
+ # X11 libraries Qt always depends on
+ SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${X11_Xext_LIB} ${X11_X11_LIB})
QT_QUERY_QMAKE(QT_LIBS_THREAD "QMAKE_LIBS_THREAD")
SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_LIBS_THREAD})
- QT_QUERY_QMAKE(QMAKE_LIBS_DYNLOAD "QMAKE_LIBS_DYNLOAD")
- SET (QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QMAKE_LIBS_DYNLOAD})
+ SET (QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${CMAKE_DL_LIBS})
ENDIF(Q_WS_X11)
diff --git a/Modules/UseQt4.cmake b/Modules/UseQt4.cmake
index baa0571..63a0919 100644
--- a/Modules/UseQt4.cmake
+++ b/Modules/UseQt4.cmake
@@ -65,11 +65,12 @@ 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 QTWEBKIT QTSCRIPT QTSVG QTSQL QTXMLPATTERNS QTXML QTOPENGL QTGUI QTNETWORK QTCORE)
+SET(QT_QTMULTIMEDIA_MODULE_DEPENDS QTGUI QTCORE)
# Qt modules (in order of dependence)
FOREACH(module QT3SUPPORT QTOPENGL QTASSISTANT QTDESIGNER QTMOTIF QTNSPLUGIN
- QAXSERVER QAXCONTAINER QTDECLARATIVE QTSCRIPT QTSVG QTUITOOLS QTHELP
- QTWEBKIT PHONON QTSCRIPTTOOLS QTGUI QTTEST QTDBUS QTXML QTSQL
+ QAXSERVER QAXCONTAINER QTDECLARATIVE QTSCRIPT QTSVG QTUITOOLS QTHELP
+ QTWEBKIT PHONON QTSCRIPTTOOLS QTMULTIMEDIA QTGUI QTTEST QTDBUS QTXML QTSQL
QTXMLPATTERNS QTNETWORK QTCORE)
IF (QT_USE_${module} OR QT_USE_${module}_DEPENDS)
diff --git a/Modules/readme.txt b/Modules/readme.txt
index a292e20..dd52000 100644
--- a/Modules/readme.txt
+++ b/Modules/readme.txt
@@ -8,16 +8,16 @@ We would like all FindXXX.cmake files to produce consistent variable names.
Please use the following consistent variable names for general use.
XXX_INCLUDE_DIRS The final set of include directories listed in one variable for use by client code. This should not be a cache entry.
-XXX_LIBRARIES The libraries to link against to use XXX. These should include full paths. This should not be a cache entry.
-XXX_DEFINITIONS Definitions to use when compiling code that uses XXX. This really shouldn't include options such as (-DHAS_JPEG)that a client source-code file uses to decide whether to #include <jpeg.h>
-XXX_EXECUTABLE Where to find the XXX tool.
-XXX_YYY_EXECUTABLE Where to find the YYY tool that comes with XXX.
+XXX_LIBRARIES The libraries to link against to use XXX. These should include full paths. This should not be a cache entry.
+XXX_DEFINITIONS Definitions to use when compiling code that uses XXX. This really shouldn't include options such as (-DHAS_JPEG)that a client source-code file uses to decide whether to #include <jpeg.h>
+XXX_EXECUTABLE Where to find the XXX tool.
+XXX_YYY_EXECUTABLE Where to find the YYY tool that comes with XXX.
XXX_LIBRARY_DIRS Optionally, the final set of library directories listed in one variable for use by client code. This should not be a cache entry.
-XXX_ROOT_DIR Where to find the base directory of XXX.
-XXX_VERSION_YY Expect Version YY if true. Make sure at most one of these is ever true.
-XXX_WRAP_YY If False, do not try to use the relevent CMake wrapping command.
-XXX_YY_FOUND If False, optional YY part of XXX sytem is not available.
-XXX_FOUND Set to false, or undefined, if we haven't found, or don't want to use XXX.
+XXX_ROOT_DIR Where to find the base directory of XXX.
+XXX_VERSION_YY Expect Version YY if true. Make sure at most one of these is ever true.
+XXX_WRAP_YY If False, do not try to use the relevent CMake wrapping command.
+XXX_YY_FOUND If False, optional YY part of XXX sytem is not available.
+XXX_FOUND Set to false, or undefined, if we haven't found, or don't want to use XXX.
XXX_RUNTIME_LIBRARY_DIRS Optionally, the runtime library search path for use when running an executable linked to shared libraries.
The list should be used by user code to create the PATH on windows or LD_LIBRARY_PATH on unix.
This should not be a cache entry.
@@ -30,9 +30,9 @@ You do not have to provide all of the above variables. You should provide XXX_FO
The following names should not usually be used in CMakeLists.txt files, but they may be usefully modified in users' CMake Caches to control stuff.
-XXX_LIBRARY Name of XXX Library. A User may set this and XXX_INCLUDE_DIR to ignore to force non-use of XXX.
-XXX_YY_LIBRARY Name of YY library that is part of the XXX system. It may or may not be required to use XXX.
-XXX_INCLUDE_DIR Where to find xxx.h, etc. (XXX_INCLUDE_PATH was considered bad because a path includes an actual filename.)
+XXX_LIBRARY Name of XXX Library. A User may set this and XXX_INCLUDE_DIR to ignore to force non-use of XXX.
+XXX_YY_LIBRARY Name of YY library that is part of the XXX system. It may or may not be required to use XXX.
+XXX_INCLUDE_DIR Where to find xxx.h, etc. (XXX_INCLUDE_PATH was considered bad because a path includes an actual filename.)
XXX_YY_INCLUDE_DIR Where to find xxx_yy.h, etc.
For tidiness's sake, try to keep as many options as possible out of the cache, leaving at least one option which can be used to disable use of the module, or locate a not-found library (e.g. XXX_ROOT_DIR). For the same reason, mark most cache options as advanced.