summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineASMCompiler.cmake40
-rw-r--r--Modules/CMakeDetermineCCompiler.cmake29
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake28
-rw-r--r--Modules/CMakeDetermineCompiler.cmake72
-rw-r--r--Modules/CMakeDetermineFortranCompiler.cmake47
-rw-r--r--Modules/CMakeFindEclipseCDT4.cmake8
-rw-r--r--Modules/CPackComponent.cmake386
-rw-r--r--Modules/CPackRPM.cmake21
-rw-r--r--Modules/FindBLAS.cmake4
-rw-r--r--Modules/FindGTK2.cmake2
-rw-r--r--Modules/FindKDE3.cmake2
-rw-r--r--Modules/FindLAPACK.cmake4
-rw-r--r--Modules/FindOpenSSL.cmake78
-rw-r--r--Modules/FindQt4.cmake2
-rw-r--r--Modules/FindSelfPackers.cmake2
-rw-r--r--Modules/Platform/CYGWIN-CXX.cmake7
-rw-r--r--Modules/Platform/Darwin-CXX.cmake7
-rw-r--r--Modules/Platform/Linux-CXX.cmake3
-rw-r--r--Modules/Platform/Windows-CXX.cmake7
-rw-r--r--Modules/SelectLibraryConfigurations.cmake18
20 files changed, 427 insertions, 340 deletions
diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake
index 0a70d0a..7da6ac0 100644
--- a/Modules/CMakeDetermineASMCompiler.cmake
+++ b/Modules/CMakeDetermineASMCompiler.cmake
@@ -14,6 +14,8 @@
# determine the compiler to use for ASM programs
+INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompiler.cmake)
+
IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
# prefer the environment variable ASM
IF($ENV{ASM${ASM_DIALECT}} MATCHES ".+")
@@ -22,42 +24,28 @@ IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
# finally list compilers to try
IF("ASM${ASM_DIALECT}" STREQUAL "ASM") # the generic assembler support
-
- IF(CMAKE_ASM_COMPILER_INIT)
- SET(CMAKE_ASM_COMPILER_LIST ${CMAKE_ASM_COMPILER_INIT})
- ELSE(CMAKE_ASM_COMPILER_INIT)
-
+ 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(CMAKE_CXX_COMPILER)
+ ELSE()
# List all default C and CXX compilers
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}gcc ${_CMAKE_TOOLCHAIN_PREFIX}cc cl bcc xlc
- ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ CC aCC cl bcc xlC)
- ENDIF(CMAKE_C_COMPILER)
-
- ENDIF(CMAKE_ASM_COMPILER_INIT)
-
-
- ELSE("ASM${ASM_DIALECT}" STREQUAL "ASM") # some specific assembler "dialect"
-
- IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
- SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST ${CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT})
- ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
+ 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(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT)
-
- ENDIF("ASM${ASM_DIALECT}" STREQUAL "ASM")
-
+ ENDIF()
+ ENDIF()
# Find the compiler.
- IF (_CMAKE_USER_CXX_COMPILER_PATH OR _CMAKE_USER_C_COMPILER_PATH)
- FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST} PATHS ${_CMAKE_USER_C_COMPILER_PATH} ${_CMAKE_USER_CXX_COMPILER_PATH} DOC "Assembler" NO_DEFAULT_PATH)
- ENDIF (_CMAKE_USER_CXX_COMPILER_PATH OR _CMAKE_USER_C_COMPILER_PATH)
- FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST} PATHS ${_CMAKE_TOOLCHAIN_LOCATION} DOC "Assembler")
+ _cmake_find_compiler(ASM${ASM_DIALECT})
ELSE(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index 9028e8e..3ce968c 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -31,6 +31,14 @@
# If not already set before, it also sets
# _CMAKE_TOOLCHAIN_PREFIX
+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()
+
IF(NOT CMAKE_C_COMPILER)
SET(CMAKE_C_COMPILER_INIT NOTFOUND)
@@ -53,21 +61,12 @@ IF(NOT CMAKE_C_COMPILER)
ENDIF(CMAKE_GENERATOR_CC)
# finally list compilers to try
- IF(CMAKE_C_COMPILER_INIT)
- SET(CMAKE_C_COMPILER_LIST ${CMAKE_C_COMPILER_INIT})
- ELSE(CMAKE_C_COMPILER_INIT)
- SET(CMAKE_C_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}gcc ${_CMAKE_TOOLCHAIN_PREFIX}cc cl bcc xlc)
- ENDIF(CMAKE_C_COMPILER_INIT)
-
- # Find the compiler.
- IF (_CMAKE_USER_CXX_COMPILER_PATH)
- FIND_PROGRAM(CMAKE_C_COMPILER NAMES ${CMAKE_C_COMPILER_LIST} PATHS ${_CMAKE_USER_CXX_COMPILER_PATH} DOC "C compiler" NO_DEFAULT_PATH)
- ENDIF (_CMAKE_USER_CXX_COMPILER_PATH)
- FIND_PROGRAM(CMAKE_C_COMPILER NAMES ${CMAKE_C_COMPILER_LIST} DOC "C compiler")
-
- IF(CMAKE_C_COMPILER_INIT AND NOT CMAKE_C_COMPILER)
- SET(CMAKE_C_COMPILER "${CMAKE_C_COMPILER_INIT}" CACHE FILEPATH "C compiler" FORCE)
- ENDIF(CMAKE_C_COMPILER_INIT AND NOT CMAKE_C_COMPILER)
+ 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)
# we only get here if CMAKE_C_COMPILER was specified using -D or a pre-made CMakeCache.txt
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 7f8f3ec..0116d34 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -30,6 +30,14 @@
# If not already set before, it also sets
# _CMAKE_TOOLCHAIN_PREFIX
+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()
+
IF(NOT CMAKE_CXX_COMPILER)
SET(CMAKE_CXX_COMPILER_INIT NOTFOUND)
@@ -52,21 +60,11 @@ IF(NOT CMAKE_CXX_COMPILER)
ENDIF(CMAKE_GENERATOR_CXX)
# finally list compilers to try
- IF(CMAKE_CXX_COMPILER_INIT)
- SET(CMAKE_CXX_COMPILER_LIST ${CMAKE_CXX_COMPILER_INIT})
- ELSE(CMAKE_CXX_COMPILER_INIT)
- SET(CMAKE_CXX_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ CC aCC cl bcc xlC)
- ENDIF(CMAKE_CXX_COMPILER_INIT)
-
- # Find the compiler.
- IF (_CMAKE_USER_C_COMPILER_PATH)
- FIND_PROGRAM(CMAKE_CXX_COMPILER NAMES ${CMAKE_CXX_COMPILER_LIST} PATHS ${_CMAKE_USER_C_COMPILER_PATH} DOC "C++ compiler" NO_DEFAULT_PATH)
- ENDIF (_CMAKE_USER_C_COMPILER_PATH)
- FIND_PROGRAM(CMAKE_CXX_COMPILER NAMES ${CMAKE_CXX_COMPILER_LIST} DOC "C++ compiler")
-
- IF(CMAKE_CXX_COMPILER_INIT AND NOT CMAKE_CXX_COMPILER)
- SET(CMAKE_CXX_COMPILER "${CMAKE_CXX_COMPILER_INIT}" CACHE FILEPATH "C++ compiler" FORCE)
- ENDIF(CMAKE_CXX_COMPILER_INIT AND NOT CMAKE_CXX_COMPILER)
+ 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)
# we only get here if CMAKE_CXX_COMPILER was specified using -D or a pre-made CMakeCache.txt
diff --git a/Modules/CMakeDetermineCompiler.cmake b/Modules/CMakeDetermineCompiler.cmake
new file mode 100644
index 0000000..2d12c07
--- /dev/null
+++ b/Modules/CMakeDetermineCompiler.cmake
@@ -0,0 +1,72 @@
+
+#=============================================================================
+# Copyright 2004-2012 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 distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+macro(_cmake_find_compiler lang)
+ # Use already-enabled languages for reference.
+ get_property(_languages GLOBAL PROPERTY ENABLED_LANGUAGES)
+ list(REMOVE_ITEM _languages "${lang}")
+
+ if(CMAKE_${lang}_COMPILER_INIT)
+ # Search only for the specified compiler.
+ set(CMAKE_${lang}_COMPILER_LIST "${CMAKE_${lang}_COMPILER_INIT}")
+ else()
+ # Re-order the compiler list with preferred vendors first.
+ set(_${lang}_COMPILER_LIST "${CMAKE_${lang}_COMPILER_LIST}")
+ set(CMAKE_${lang}_COMPILER_LIST "")
+ # Prefer vendors of compilers from reference languages.
+ foreach(l ${_languages})
+ list(APPEND CMAKE_${lang}_COMPILER_LIST
+ ${_${lang}_COMPILER_NAMES_${CMAKE_${l}_COMPILER_ID}})
+ endforeach()
+ # Prefer vendors based on the platform.
+ list(APPEND CMAKE_${lang}_COMPILER_LIST ${CMAKE_${lang}_COMPILER_NAMES})
+ # Append the rest of the list and remove duplicates.
+ list(APPEND CMAKE_${lang}_COMPILER_LIST ${_${lang}_COMPILER_LIST})
+ unset(_${lang}_COMPILER_LIST)
+ list(REMOVE_DUPLICATES CMAKE_${lang}_COMPILER_LIST)
+ if(CMAKE_${lang}_COMPILER_EXCLUDE)
+ list(REMOVE_ITEM CMAKE_${lang}_COMPILER_LIST
+ ${CMAKE_${lang}_COMPILER_EXCLUDE})
+ endif()
+ endif()
+
+ # Look for directories containing compilers of reference languages.
+ set(_${lang}_COMPILER_HINTS)
+ foreach(l ${_languages})
+ if(CMAKE_${l}_COMPILER AND IS_ABSOLUTE "${CMAKE_${l}_COMPILER}")
+ get_filename_component(_hint "${CMAKE_${l}_COMPILER}" PATH)
+ if(IS_DIRECTORY "${_hint}")
+ list(APPEND _${lang}_COMPILER_HINTS "${_hint}")
+ endif()
+ unset(_hint)
+ endif()
+ endforeach()
+
+ # Find the compiler.
+ if(_${lang}_COMPILER_HINTS)
+ # Prefer directories containing compilers of reference languages.
+ list(REMOVE_DUPLICATES _${lang}_COMPILER_HINTS)
+ find_program(CMAKE_${lang}_COMPILER
+ NAMES ${CMAKE_${lang}_COMPILER_LIST}
+ PATHS ${_${lang}_COMPILER_HINTS}
+ NO_DEFAULT_PATH
+ DOC "${lang} compiler")
+ endif()
+ find_program(CMAKE_${lang}_COMPILER NAMES ${CMAKE_${lang}_COMPILER_LIST} DOC "${lang} compiler")
+ if(CMAKE_${lang}_COMPILER_INIT AND NOT CMAKE_${lang}_COMPILER)
+ set(CMAKE_${lang}_COMPILER "${CMAKE_${lang}_COMPILER_INIT}" CACHE FILEPATH "${lang} compiler" FORCE)
+ endif()
+ unset(_${lang}_COMPILER_HINTS)
+ unset(_languages)
+endmacro()
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index ade6d58..45033c2 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -19,6 +19,12 @@
# 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()
+
IF(NOT CMAKE_Fortran_COMPILER)
# prefer the environment variable CC
IF($ENV{FC} MATCHES ".+")
@@ -40,9 +46,7 @@ IF(NOT CMAKE_Fortran_COMPILER)
ENDIF(CMAKE_GENERATOR_FC)
# finally list compilers to try
- IF(CMAKE_Fortran_COMPILER_INIT)
- SET(CMAKE_Fortran_COMPILER_LIST ${CMAKE_Fortran_COMPILER_INIT})
- ELSE(CMAKE_Fortran_COMPILER_INIT)
+ IF(NOT CMAKE_Fortran_COMPILER_INIT)
# Known compilers:
# f77/f90/f95: generic compiler names
# g77: GNU Fortran 77 compiler
@@ -77,41 +81,10 @@ IF(NOT CMAKE_Fortran_COMPILER)
SET(_Fortran_COMPILER_NAMES_PathScale pathf2003 pathf95 pathf90)
SET(_Fortran_COMPILER_NAMES_XL xlf)
SET(_Fortran_COMPILER_NAMES_VisualAge xlf95 xlf90 xlf)
-
- # Prefer vendors matching the C and C++ compilers.
- SET(CMAKE_Fortran_COMPILER_LIST
- ${_Fortran_COMPILER_NAMES_${CMAKE_C_COMPILER_ID}}
- ${_Fortran_COMPILER_NAMES_${CMAKE_CXX_COMPILER_ID}}
- ${CMAKE_Fortran_COMPILER_LIST})
- LIST(REMOVE_DUPLICATES CMAKE_Fortran_COMPILER_LIST)
- ENDIF(CMAKE_Fortran_COMPILER_INIT)
-
- # Look for directories containing the C and C++ compilers.
- SET(_Fortran_COMPILER_HINTS)
- FOREACH(lang C CXX)
- IF(CMAKE_${lang}_COMPILER AND IS_ABSOLUTE "${CMAKE_${lang}_COMPILER}")
- GET_FILENAME_COMPONENT(_hint "${CMAKE_${lang}_COMPILER}" PATH)
- IF(IS_DIRECTORY "${_hint}")
- LIST(APPEND _Fortran_COMPILER_HINTS "${_hint}")
- ENDIF()
- SET(_hint)
- ENDIF()
- ENDFOREACH()
-
- # Find the compiler.
- IF(_Fortran_COMPILER_HINTS)
- # Prefer directories containing C and C++ compilers.
- LIST(REMOVE_DUPLICATES _Fortran_COMPILER_HINTS)
- FIND_PROGRAM(CMAKE_Fortran_COMPILER
- NAMES ${CMAKE_Fortran_COMPILER_LIST}
- PATHS ${_Fortran_COMPILER_HINTS}
- NO_DEFAULT_PATH
- DOC "Fortran compiler")
ENDIF()
- FIND_PROGRAM(CMAKE_Fortran_COMPILER NAMES ${CMAKE_Fortran_COMPILER_LIST} DOC "Fortran compiler")
- IF(CMAKE_Fortran_COMPILER_INIT AND NOT CMAKE_Fortran_COMPILER)
- SET(CMAKE_Fortran_COMPILER "${CMAKE_Fortran_COMPILER_INIT}" CACHE FILEPATH "Fortran compiler" FORCE)
- ENDIF(CMAKE_Fortran_COMPILER_INIT AND NOT CMAKE_Fortran_COMPILER)
+
+ _cmake_find_compiler(Fortran)
+
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
diff --git a/Modules/CMakeFindEclipseCDT4.cmake b/Modules/CMakeFindEclipseCDT4.cmake
index a4264e7..86c1a1b 100644
--- a/Modules/CMakeFindEclipseCDT4.cmake
+++ b/Modules/CMakeFindEclipseCDT4.cmake
@@ -24,6 +24,9 @@ FUNCTION(_FIND_ECLIPSE_VERSION)
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()
@@ -37,6 +40,7 @@ FUNCTION(_FIND_ECLIPSE_VERSION)
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}})")
@@ -51,7 +55,9 @@ FUNCTION(_FIND_ECLIPSE_VERSION)
"3.4 (${_ECLIPSE_VERSION_NAME_3.4})"
"3.5 (${_ECLIPSE_VERSION_NAME_3.5})"
"3.6 (${_ECLIPSE_VERSION_NAME_3.6})"
- "3.7 (${_ECLIPSE_VERSION_NAME_3.7})")
+ "3.7 (${_ECLIPSE_VERSION_NAME_3.7})"
+ "4.2 (${_ECLIPSE_VERSION_NAME_4.2})"
+ )
ENDFUNCTION()
_FIND_ECLIPSE_VERSION()
diff --git a/Modules/CPackComponent.cmake b/Modules/CPackComponent.cmake
index 1598703..dce34bf 100644
--- a/Modules/CPackComponent.cmake
+++ b/Modules/CPackComponent.cmake
@@ -28,31 +28,31 @@
##variable
# CPACK_COMPONENTS_ALL - The list of component to install.
#
-# The default value of this variable is computed by CPack
-# and contains all components defined by the project. The
-# user may set it to only include the specified components.
+#The default value of this variable is computed by CPack
+#and contains all components defined by the project. The
+#user may set it to only include the specified components.
##end
#
##variable
# CPACK_<GENNAME>_COMPONENT_INSTALL - Enable/Disable component install for
# CPack generator <GENNAME>.
#
-# Each CPack Generator (RPM, DEB, ARCHIVE, NSIS, DMG, etc...) has a legacy
-# default behavior. e.g. RPM builds monolithic whereas NSIS builds component.
-# One can change the default behavior by setting this variable to 0/1 or OFF/ON.
+#Each CPack Generator (RPM, DEB, ARCHIVE, NSIS, DMG, etc...) has a legacy
+#default behavior. e.g. RPM builds monolithic whereas NSIS builds component.
+#One can change the default behavior by setting this variable to 0/1 or OFF/ON.
##end
##variable
# CPACK_COMPONENTS_GROUPING - Specify how components are grouped for multi-package
# component-aware CPack generators.
#
-# Some generators like RPM or ARCHIVE family (TGZ, ZIP, ...) generates several
-# packages files when asked for component packaging. They group the component
-# differently depending on the value of this variable:
-# - ONE_PER_GROUP (default): creates one package file per component group
-# - ALL_COMPONENTS_IN_ONE : creates a single package with all (requested) component
-# - IGNORE : creates one package per component, i.e. IGNORE component group
-# One can specify different grouping for different CPack generator by using
-# a CPACK_PROJECT_CONFIG_FILE.
+#Some generators like RPM or ARCHIVE family (TGZ, ZIP, ...) generates several
+#packages files when asked for component packaging. They group the component
+#differently depending on the value of this variable:
+# - ONE_PER_GROUP (default): creates one package file per component group
+# - ALL_COMPONENTS_IN_ONE : creates a single package with all (requested) component
+# - IGNORE : creates one package per component, i.e. IGNORE component group
+#One can specify different grouping for different CPack generator by using
+#a CPACK_PROJECT_CONFIG_FILE.
##end
##variable
# CPACK_COMPONENT_<compName>_DISPLAY_NAME - The name to be displayed for a component.
@@ -71,194 +71,194 @@
# CPACK_COMPONENT_<compName>_REQUIRED - True is this component is required.
##end
##macro
-# cpack_add_component - Describes a CPack installation component
-# named by the COMPONENT argument to a CMake INSTALL command.
-#
-# cpack_add_component(compname
-# [DISPLAY_NAME name]
-# [DESCRIPTION description]
-# [HIDDEN | REQUIRED | DISABLED ]
-# [GROUP group]
-# [DEPENDS comp1 comp2 ... ]
-# [INSTALL_TYPES type1 type2 ... ]
-# [DOWNLOADED]
-# [ARCHIVE_FILE filename])
-#
-# The cmake_add_component command describes an installation
-# component, which the user can opt to install or remove as part of
-# the graphical installation process. compname is the name of the
-# component, as provided to the COMPONENT argument of one or more
-# CMake INSTALL commands.
-#
-# DISPLAY_NAME is the displayed name of the component, used in
-# graphical installers to display the component name. This value can
-# be any string.
-#
-# DESCRIPTION is an extended description of the component, used in
-# graphical installers to give the user additional information about
-# the component. Descriptions can span multiple lines using "\n" as
-# the line separator. Typically, these descriptions should be no
-# more than a few lines long.
-#
-# HIDDEN indicates that this component will be hidden in the
-# graphical installer, so that the user cannot directly change
-# whether it is installed or not.
-#
-# REQUIRED indicates that this component is required, and therefore
-# will always be installed. It will be visible in the graphical
-# installer, but it cannot be unselected. (Typically, required
-# components are shown greyed out).
-#
-# DISABLED indicates that this component should be disabled
-# (unselected) by default. The user is free to select this component
-# for installation, unless it is also HIDDEN.
-#
-# DEPENDS lists the components on which this component depends. If
-# this component is selected, then each of the components listed
-# must also be selected. The dependency information is encoded
-# within the installer itself, so that users cannot install
-# inconsitent sets of components.
-#
-# GROUP names the component group of which this component is a
-# part. If not provided, the component will be a standalone
-# component, not part of any component group. Component groups are
-# described with the cpack_add_component_group command, detailed
-# below.
-#
-# INSTALL_TYPES lists the installation types of which this component
-# is a part. When one of these installations types is selected, this
-# component will automatically be selected. Installation types are
-# described with the cpack_add_install_type command, detailed below.
-#
-# DOWNLOADED indicates that this component should be downloaded
-# on-the-fly by the installer, rather than packaged in with the
-# installer itself. For more information, see the cpack_configure_downloads
-# command.
-#
-# ARCHIVE_FILE provides a name for the archive file created by CPack
-# to be used for downloaded components. If not supplied, CPack will
-# create a file with some name based on CPACK_PACKAGE_FILE_NAME and
-# the name of the component. See cpack_configure_downloads for more
-# information.
+#cpack_add_component - Describes a CPack installation component
+#named by the COMPONENT argument to a CMake INSTALL command.
+#
+# cpack_add_component(compname
+# [DISPLAY_NAME name]
+# [DESCRIPTION description]
+# [HIDDEN | REQUIRED | DISABLED ]
+# [GROUP group]
+# [DEPENDS comp1 comp2 ... ]
+# [INSTALL_TYPES type1 type2 ... ]
+# [DOWNLOADED]
+# [ARCHIVE_FILE filename])
+#
+#The cmake_add_component command describes an installation
+#component, which the user can opt to install or remove as part of
+#the graphical installation process. compname is the name of the
+#component, as provided to the COMPONENT argument of one or more
+#CMake INSTALL commands.
+#
+#DISPLAY_NAME is the displayed name of the component, used in
+#graphical installers to display the component name. This value can
+#be any string.
+#
+#DESCRIPTION is an extended description of the component, used in
+#graphical installers to give the user additional information about
+#the component. Descriptions can span multiple lines using "\n" as
+#the line separator. Typically, these descriptions should be no
+#more than a few lines long.
+#
+#HIDDEN indicates that this component will be hidden in the
+#graphical installer, so that the user cannot directly change
+#whether it is installed or not.
+#
+#REQUIRED indicates that this component is required, and therefore
+#will always be installed. It will be visible in the graphical
+#installer, but it cannot be unselected. (Typically, required
+#components are shown greyed out).
+#
+#DISABLED indicates that this component should be disabled
+#(unselected) by default. The user is free to select this component
+#for installation, unless it is also HIDDEN.
+#
+#DEPENDS lists the components on which this component depends. If
+#this component is selected, then each of the components listed
+#must also be selected. The dependency information is encoded
+#within the installer itself, so that users cannot install
+#inconsistent sets of components.
+#
+#GROUP names the component group of which this component is a
+#part. If not provided, the component will be a standalone
+#component, not part of any component group. Component groups are
+#described with the cpack_add_component_group command, detailed
+#below.
+#
+#INSTALL_TYPES lists the installation types of which this component
+#is a part. When one of these installations types is selected, this
+#component will automatically be selected. Installation types are
+#described with the cpack_add_install_type command, detailed below.
+#
+#DOWNLOADED indicates that this component should be downloaded
+#on-the-fly by the installer, rather than packaged in with the
+#installer itself. For more information, see the cpack_configure_downloads
+# command.
+#
+#ARCHIVE_FILE provides a name for the archive file created by CPack
+#to be used for downloaded components. If not supplied, CPack will
+#create a file with some name based on CPACK_PACKAGE_FILE_NAME and
+#the name of the component. See cpack_configure_downloads for more
+#information.
##end
#
##macro
-# cpack_add_component_group - Describes a group of related CPack
-# installation components.
-#
-# cpack_add_component_group(groupname
-# [DISPLAY_NAME name]
-# [DESCRIPTION description]
-# [PARENT_GROUP parent]
-# [EXPANDED]
-# [BOLD_TITLE])
-#
-# The cpack_add_component_group describes a group of installation
-# components, which will be placed together within the listing of
-# options. Typically, component groups allow the user to
-# select/deselect all of the components within a single group via a
-# single group-level option. Use component groups to reduce the
-# complexity of installers with many options. groupname is an
-# arbitrary name used to identify the group in the GROUP argument of
-# the cpack_add_component command, which is used to place a
-# component in a group. The name of the group must not conflict with
-# the name of any component.
-#
-# DISPLAY_NAME is the displayed name of the component group, used in
-# graphical installers to display the component group name. This
-# value can be any string.
-#
-# DESCRIPTION is an extended description of the component group,
-# used in graphical installers to give the user additional
-# information about the components within that group. Descriptions
-# can span multiple lines using "\n" as the line
-# separator. Typically, these descriptions should be no more than a
-# few lines long.
-#
-# PARENT_GROUP, if supplied, names the parent group of this group.
-# Parent groups are used to establish a hierarchy of groups,
-# providing an arbitrary hierarchy of groups.
-#
-# EXPANDED indicates that, by default, the group should show up as
-# "expanded", so that the user immediately sees all of the
-# components within the group. Otherwise, the group will initially
-# show up as a single entry.
-#
-# BOLD_TITLE indicates that the group title should appear in bold,
-# to call the user's attention to the group.
+#cpack_add_component_group - Describes a group of related CPack
+#installation components.
+#
+# cpack_add_component_group(groupname
+# [DISPLAY_NAME name]
+# [DESCRIPTION description]
+# [PARENT_GROUP parent]
+# [EXPANDED]
+# [BOLD_TITLE])
+#
+#The cpack_add_component_group describes a group of installation
+#components, which will be placed together within the listing of
+#options. Typically, component groups allow the user to
+#select/deselect all of the components within a single group via a
+#single group-level option. Use component groups to reduce the
+#complexity of installers with many options. groupname is an
+#arbitrary name used to identify the group in the GROUP argument of
+#the cpack_add_component command, which is used to place a
+#component in a group. The name of the group must not conflict with
+#the name of any component.
+#
+#DISPLAY_NAME is the displayed name of the component group, used in
+#graphical installers to display the component group name. This
+#value can be any string.
+#
+#DESCRIPTION is an extended description of the component group,
+#used in graphical installers to give the user additional
+#information about the components within that group. Descriptions
+#can span multiple lines using "\n" as the line
+#separator. Typically, these descriptions should be no more than a
+#few lines long.
+#
+#PARENT_GROUP, if supplied, names the parent group of this group.
+#Parent groups are used to establish a hierarchy of groups,
+#providing an arbitrary hierarchy of groups.
+#
+#EXPANDED indicates that, by default, the group should show up as
+#"expanded", so that the user immediately sees all of the
+#components within the group. Otherwise, the group will initially
+#show up as a single entry.
+#
+#BOLD_TITLE indicates that the group title should appear in bold,
+#to call the user's attention to the group.
##end
#
##macro
-# cpack_add_install_type - Add a new installation type containing a
-# set of predefined component selections to the graphical installer.
-#
-# cpack_add_install_type(typename
-# [DISPLAY_NAME name])
-#
-# The cpack_add_install_type command identifies a set of preselected
-# components that represents a common use case for an
-# application. For example, a "Developer" install type might include
-# an application along with its header and library files, while an
-# "End user" install type might just include the application's
-# executable. Each component identifies itself with one or more
-# install types via the INSTALL_TYPES argument to
-# cpack_add_component.
-#
-# DISPLAY_NAME is the displayed name of the install type, which will
-# typically show up in a drop-down box within a graphical
-# installer. This value can be any string.
+#cpack_add_install_type - Add a new installation type containing a
+#set of predefined component selections to the graphical installer.
+#
+# cpack_add_install_type(typename
+# [DISPLAY_NAME name])
+#
+#The cpack_add_install_type command identifies a set of preselected
+#components that represents a common use case for an
+#application. For example, a "Developer" install type might include
+#an application along with its header and library files, while an
+#"End user" install type might just include the application's
+#executable. Each component identifies itself with one or more
+#install types via the INSTALL_TYPES argument to
+#cpack_add_component.
+#
+#DISPLAY_NAME is the displayed name of the install type, which will
+#typically show up in a drop-down box within a graphical
+#installer. This value can be any string.
##end
#
##macro
-# cpack_configure_downloads - Configure CPack to download selected
-# components on-the-fly as part of the installation process.
-#
-# cpack_configure_downloads(site
-# [UPLOAD_DIRECTORY dirname]
-# [ALL]
-# [ADD_REMOVE|NO_ADD_REMOVE])
-#
-# The cpack_configure_downloads command configures installation-time
-# downloads of selected components. For each downloadable component,
-# CPack will create an archive containing the contents of that
-# component, which should be uploaded to the given site. When the
-# user selects that component for installation, the installer will
-# download and extract the component in place. This feature is
-# useful for creating small installers that only download the
-# requested components, saving bandwidth. Additionally, the
-# installers are small enough that they will be installed as part of
-# the normal installation process, and the "Change" button in
-# Windows Add/Remove Programs control panel will allow one to add or
-# remove parts of the application after the original
-# installation. On Windows, the downloaded-components functionality
-# requires the ZipDLL plug-in for NSIS, available at:
-#
-# http://nsis.sourceforge.net/ZipDLL_plug-in
-#
-# On Mac OS X, installers that download components on-the-fly can
-# only be built and installed on system using Mac OS X 10.5 or
-# later.
-#
-# The site argument is a URL where the archives for downloadable
-# components will reside, e.g., http://www.cmake.org/files/2.6.1/installer/
-# All of the archives produced by CPack should be uploaded to that location.
-#
-# UPLOAD_DIRECTORY is the local directory where CPack will create the
-# various archives for each of the components. The contents of this
-# directory should be uploaded to a location accessible by the URL given
-# in the site argument. If omitted, CPack will use the directory
-# CPackUploads inside the CMake binary directory to store the generated
-# archives.
-#
-# The ALL flag indicates that all components be downloaded. Otherwise, only
-# those components explicitly marked as DOWNLOADED or that have a specified
-# ARCHIVE_FILE will be downloaded. Additionally, the ALL option implies
-# ADD_REMOVE (unless NO_ADD_REMOVE is specified).
-#
-# ADD_REMOVE indicates that CPack should install a copy of the installer
-# that can be called from Windows' Add/Remove Programs dialog (via the
-# "Modify" button) to change the set of installed components. NO_ADD_REMOVE
-# turns off this behavior. This option is ignored on Mac OS X.
+#cpack_configure_downloads - Configure CPack to download selected
+#components on-the-fly as part of the installation process.
+#
+# cpack_configure_downloads(site
+# [UPLOAD_DIRECTORY dirname]
+# [ALL]
+# [ADD_REMOVE|NO_ADD_REMOVE])
+#
+#The cpack_configure_downloads command configures installation-time
+#downloads of selected components. For each downloadable component,
+#CPack will create an archive containing the contents of that
+#component, which should be uploaded to the given site. When the
+#user selects that component for installation, the installer will
+#download and extract the component in place. This feature is
+#useful for creating small installers that only download the
+#requested components, saving bandwidth. Additionally, the
+#installers are small enough that they will be installed as part of
+#the normal installation process, and the "Change" button in
+#Windows Add/Remove Programs control panel will allow one to add or
+#remove parts of the application after the original
+#installation. On Windows, the downloaded-components functionality
+#requires the ZipDLL plug-in for NSIS, available at:
+#
+# http://nsis.sourceforge.net/ZipDLL_plug-in
+#
+#On Mac OS X, installers that download components on-the-fly can
+#only be built and installed on system using Mac OS X 10.5 or
+#later.
+#
+#The site argument is a URL where the archives for downloadable
+#components will reside, e.g., http://www.cmake.org/files/2.6.1/installer/
+#All of the archives produced by CPack should be uploaded to that location.
+#
+#UPLOAD_DIRECTORY is the local directory where CPack will create the
+#various archives for each of the components. The contents of this
+#directory should be uploaded to a location accessible by the URL given
+#in the site argument. If omitted, CPack will use the directory
+#CPackUploads inside the CMake binary directory to store the generated
+#archives.
+#
+#The ALL flag indicates that all components be downloaded. Otherwise, only
+#those components explicitly marked as DOWNLOADED or that have a specified
+#ARCHIVE_FILE will be downloaded. Additionally, the ALL option implies
+#ADD_REMOVE (unless NO_ADD_REMOVE is specified).
+#
+#ADD_REMOVE indicates that CPack should install a copy of the installer
+#that can be called from Windows' Add/Remove Programs dialog (via the
+#"Modify" button) to change the set of installed components. NO_ADD_REMOVE
+#turns off this behavior. This option is ignored on Mac OS X.
##endmacro
#=============================================================================
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index ae93512..0ac6e17 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -639,6 +639,25 @@ SET(CPACK_RPM_FILE_NAME "${CPACK_OUTPUT_FILE_NAME}")
#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"
+# which is passed to the find command that generates the content-list
+if(CPACK_RPM_PACKAGE_RELOCATABLE)
+ # get a list of the elements in CPACK_RPM_PACKAGE_PREFIX and remove
+ # the final element (so the install-prefix dir itself is not omitted
+ # from the RPM's content-list)
+ string(REPLACE "/" ";" _CPACK_RPM_PACKAGE_PREFIX_ELEMS ".${CPACK_RPM_PACKAGE_PREFIX}")
+ list(REMOVE_AT _CPACK_RPM_PACKAGE_PREFIX_ELEMS -1)
+ # Now generate all of the parent dirs of CPACK_RPM_PACKAGE_PREFIX
+ foreach(_ELEM ${_CPACK_RPM_PACKAGE_PREFIX_ELEMS})
+ list(APPEND _TMP_LIST "${_ELEM}")
+ string(REPLACE ";" "/" _OMIT_DIR "${_TMP_LIST}")
+ set(_OMIT_DIR "-o -path ${_OMIT_DIR}")
+ separate_arguments(_OMIT_DIR)
+ list(APPEND _RPM_DIRS_TO_OMIT ${_OMIT_DIR})
+ endforeach()
+endif()
+
# Use files tree to construct files command (spec file)
# We should not forget to include symlinks (thus -o -type l)
# We should include directory as well (thus -type d)
@@ -647,7 +666,7 @@ SET(CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}")
# 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 ".")
+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}"
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index 1cf31c4..84bc7bb 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -81,9 +81,9 @@ if (NOT _libdir)
if (WIN32)
set(_libdir ENV LIB)
elseif (APPLE)
- set(_libdir /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH)
+ set(_libdir ENV DYLD_LIBRARY_PATH)
else ()
- set(_libdir /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH)
+ set(_libdir ENV LD_LIBRARY_PATH)
endif ()
endif ()
diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake
index a03c023..5fe5213 100644
--- a/Modules/FindGTK2.cmake
+++ b/Modules/FindGTK2.cmake
@@ -305,9 +305,7 @@ function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version)
NAMES ${_lib_list}
PATHS
/opt/gnome/lib
- /opt/gnome/lib64
/usr/openwin/lib
- /usr/openwin/lib64
/sw/lib
$ENV{GTKMM_BASEPATH}/lib
[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/lib
diff --git a/Modules/FindKDE3.cmake b/Modules/FindKDE3.cmake
index 9d10814..ca3dae6 100644
--- a/Modules/FindKDE3.cmake
+++ b/Modules/FindKDE3.cmake
@@ -131,7 +131,7 @@ ENDIF(KDECONFIG_EXECUTABLE)
-# at first the KDE include direcory
+# 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
HINTS
diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake
index 0ae98df..b867f21 100644
--- a/Modules/FindLAPACK.cmake
+++ b/Modules/FindLAPACK.cmake
@@ -69,9 +69,9 @@ if (NOT _libdir)
if (WIN32)
set(_libdir ENV LIB)
elseif (APPLE)
- set(_libdir /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH)
+ set(_libdir ENV DYLD_LIBRARY_PATH)
else ()
- set(_libdir /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH)
+ set(_libdir ENV LD_LIBRARY_PATH)
endif ()
endif ()
foreach(_library ${_list})
diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake
index d1fc2d2..6642915 100644
--- a/Modules/FindOpenSSL.cmake
+++ b/Modules/FindOpenSSL.cmake
@@ -29,25 +29,34 @@ if (UNIX)
pkg_check_modules(_OPENSSL QUIET openssl)
endif (UNIX)
-# http://www.slproweb.com/products/Win32OpenSSL.html
-SET(_OPENSSL_ROOT_HINTS
- $ENV{OPENSSL_ROOT_DIR}
- ${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]"
- )
-SET(_OPENSSL_ROOT_PATHS
- "$ENV{PROGRAMFILES}/OpenSSL"
- "$ENV{PROGRAMFILES}/OpenSSL-Win32"
- "$ENV{PROGRAMFILES}/OpenSSL-Win64"
- "C:/OpenSSL/"
- "C:/OpenSSL-Win32/"
- "C:/OpenSSL-Win64/"
- )
-SET(_OPENSSL_ROOT_HINTS_AND_PATHS
- HINTS ${_OPENSSL_ROOT_HINTS}
- PATHS ${_OPENSSL_ROOT_PATHS}
- )
+IF (WIN32)
+ # http://www.slproweb.com/products/Win32OpenSSL.html
+ 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
+ "${_programfiles}/OpenSSL"
+ "${_programfiles}/OpenSSL-Win32"
+ "${_programfiles}/OpenSSL-Win64"
+ "C:/OpenSSL/"
+ "C:/OpenSSL-Win32/"
+ "C:/OpenSSL-Win64/"
+ )
+ UNSET(_programfiles)
+ SET(_OPENSSL_ROOT_HINTS_AND_PATHS
+ HINTS ${_OPENSSL_ROOT_HINTS}
+ PATHS ${_OPENSSL_ROOT_PATHS}
+ )
+ELSE ()
+ SET(_OPENSSL_ROOT_HINTS
+ ${OPENSSL_ROOT_DIR}
+ ENV OPENSSL_ROOT_DIR
+ )
+ENDIF ()
FIND_PATH(OPENSSL_INCLUDE_DIR
NAMES
@@ -60,7 +69,6 @@ FIND_PATH(OPENSSL_INCLUDE_DIR
)
IF(WIN32 AND NOT CYGWIN)
- # MINGW should go here too
IF(MSVC)
# /MD and /MDd are the standard values - if someone wants to use
# others, the libnames have to change here too
@@ -79,7 +87,6 @@ IF(WIN32 AND NOT CYGWIN)
FIND_LIBRARY(LIB_EAY_DEBUG
NAMES
libeay32MDd
- libeay32
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
"lib"
@@ -101,8 +108,6 @@ IF(WIN32 AND NOT CYGWIN)
FIND_LIBRARY(SSL_EAY_DEBUG
NAMES
ssleay32MDd
- ssleay32
- ssl
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
"lib"
@@ -122,21 +127,22 @@ IF(WIN32 AND NOT CYGWIN)
"lib/VC"
)
- if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
- set( OPENSSL_LIBRARIES
- optimized ${SSL_EAY_RELEASE} debug ${SSL_EAY_DEBUG}
- optimized ${LIB_EAY_RELEASE} debug ${LIB_EAY_DEBUG}
- )
- else()
- set( OPENSSL_LIBRARIES ${SSL_EAY_RELEASE} ${LIB_EAY_RELEASE} )
- endif()
- MARK_AS_ADVANCED(SSL_EAY_DEBUG SSL_EAY_RELEASE)
- MARK_AS_ADVANCED(LIB_EAY_DEBUG LIB_EAY_RELEASE)
+ include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
+ select_library_configurations(LIB_EAY)
+ select_library_configurations(SSL_EAY)
+
+ set( OPENSSL_LIBRARIES ${SSL_EAY_LIBRARY} ${LIB_EAY_LIBRARY} )
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
NAMES
- libeay32
+ ${LIB_EAY_NAMES}
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
"lib"
@@ -145,7 +151,7 @@ IF(WIN32 AND NOT CYGWIN)
FIND_LIBRARY(SSL_EAY
NAMES
- ssleay32
+ ${SSL_EAY_NAMES}
${_OPENSSL_ROOT_HINTS_AND_PATHS}
PATH_SUFFIXES
"lib"
@@ -154,6 +160,8 @@ IF(WIN32 AND NOT CYGWIN)
MARK_AS_ADVANCED(SSL_EAY LIB_EAY)
set( OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} )
+ unset(LIB_EAY_NAMES)
+ unset(SSL_EAY_NAMES)
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
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 2f1708d..d157dab 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -70,7 +70,7 @@
#
# macro QT4_WRAP_CPP(outfiles inputfile ... OPTIONS ...)
# create moc code from a list of files containing Qt class with
-# the Q_OBJECT declaration. Per-direcotry preprocessor definitions
+# the Q_OBJECT declaration. Per-directory preprocessor definitions
# are also added. Options may be given to moc, such as those found
# when executing "moc -help".
#
diff --git a/Modules/FindSelfPackers.cmake b/Modules/FindSelfPackers.cmake
index ffca842..d9dc25c 100644
--- a/Modules/FindSelfPackers.cmake
+++ b/Modules/FindSelfPackers.cmake
@@ -1,5 +1,5 @@
# - Find upx
-# This module looks for some executable packers (i.e. softwares that
+# This module looks for some executable packers (i.e. software that
# compress executables or shared libs into on-the-fly self-extracting
# executables or shared libs.
# Examples:
diff --git a/Modules/Platform/CYGWIN-CXX.cmake b/Modules/Platform/CYGWIN-CXX.cmake
new file mode 100644
index 0000000..bf37f79
--- /dev/null
+++ b/Modules/Platform/CYGWIN-CXX.cmake
@@ -0,0 +1,7 @@
+if(NOT CMAKE_CXX_COMPILER_NAMES)
+ set(CMAKE_CXX_COMPILER_NAMES c++)
+endif()
+
+# Exclude C++ compilers differing from C compiler only by case
+# because this platform may have a case-insensitive filesystem.
+set(CMAKE_CXX_COMPILER_EXCLUDE CC aCC xlC)
diff --git a/Modules/Platform/Darwin-CXX.cmake b/Modules/Platform/Darwin-CXX.cmake
new file mode 100644
index 0000000..bf37f79
--- /dev/null
+++ b/Modules/Platform/Darwin-CXX.cmake
@@ -0,0 +1,7 @@
+if(NOT CMAKE_CXX_COMPILER_NAMES)
+ set(CMAKE_CXX_COMPILER_NAMES c++)
+endif()
+
+# Exclude C++ compilers differing from C compiler only by case
+# because this platform may have a case-insensitive filesystem.
+set(CMAKE_CXX_COMPILER_EXCLUDE CC aCC xlC)
diff --git a/Modules/Platform/Linux-CXX.cmake b/Modules/Platform/Linux-CXX.cmake
new file mode 100644
index 0000000..b594dae
--- /dev/null
+++ b/Modules/Platform/Linux-CXX.cmake
@@ -0,0 +1,3 @@
+if(NOT CMAKE_CXX_COMPILER_NAMES)
+ set(CMAKE_CXX_COMPILER_NAMES c++)
+endif()
diff --git a/Modules/Platform/Windows-CXX.cmake b/Modules/Platform/Windows-CXX.cmake
new file mode 100644
index 0000000..bf37f79
--- /dev/null
+++ b/Modules/Platform/Windows-CXX.cmake
@@ -0,0 +1,7 @@
+if(NOT CMAKE_CXX_COMPILER_NAMES)
+ set(CMAKE_CXX_COMPILER_NAMES c++)
+endif()
+
+# Exclude C++ compilers differing from C compiler only by case
+# because this platform may have a case-insensitive filesystem.
+set(CMAKE_CXX_COMPILER_EXCLUDE CC aCC xlC)
diff --git a/Modules/SelectLibraryConfigurations.cmake b/Modules/SelectLibraryConfigurations.cmake
index 2e8ade0..dbff487 100644
--- a/Modules/SelectLibraryConfigurations.cmake
+++ b/Modules/SelectLibraryConfigurations.cmake
@@ -48,17 +48,19 @@ macro( select_library_configurations basename )
# if only the debug version was found, set the release value to be the
# debug value.
_set_library_name( ${basename} DEBUG RELEASE )
- if (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE AND
- NOT ${basename}_LIBRARY_DEBUG STREQUAL ${basename}_LIBRARY_RELEASE)
+ if( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE AND
+ NOT ${basename}_LIBRARY_DEBUG STREQUAL ${basename}_LIBRARY_RELEASE )
# if the generator supports configuration types or CMAKE_BUILD_TYPE
# is set, then set optimized and debug options.
if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
- set( ${basename}_LIBRARY
- optimized ${${basename}_LIBRARY_RELEASE}
- debug ${${basename}_LIBRARY_DEBUG} )
- set( ${basename}_LIBRARIES
- optimized ${${basename}_LIBRARY_RELEASE}
- debug ${${basename}_LIBRARY_DEBUG} )
+ set( ${basename}_LIBRARY )
+ foreach( _libname LISTS ${basename}_LIBRARY_RELEASE )
+ list( APPEND ${basename}_LIBRARY optimized "${_libname}" )
+ endforeach()
+ foreach( _libname LISTS ${basename}_LIBRARY_DEBUG )
+ list( APPEND ${basename}_LIBRARY debug "${_libname}" )
+ endforeach()
+ set( ${basename}_LIBRARIES "${${basename}_LIBRARY}" )
else( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
# If there are no configuration types or build type, just use
# the release version