diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/AutogenInfo.cmake.in | 1 | ||||
-rw-r--r-- | Modules/CPackRPM.cmake | 13 | ||||
-rw-r--r-- | Modules/Compiler/Intel.cmake | 2 | ||||
-rw-r--r-- | Modules/FindwxWidgets.cmake | 22 | ||||
-rw-r--r-- | Modules/GNUInstallDirs.cmake | 44 | ||||
-rw-r--r-- | Modules/Platform/Linux-GNU.cmake | 1 |
6 files changed, 65 insertions, 18 deletions
diff --git a/Modules/AutogenInfo.cmake.in b/Modules/AutogenInfo.cmake.in index fcecb6c..5e945bc 100644 --- a/Modules/AutogenInfo.cmake.in +++ b/Modules/AutogenInfo.cmake.in @@ -21,6 +21,7 @@ set(AM_MOC_INCLUDES @_moc_incs@) set(AM_MOC_OPTIONS @_moc_options@) set(AM_MOC_RELAXED_MODE @_moc_relaxed_mode@) set(AM_MOC_DEPEND_FILTERS @_moc_depend_filters@) +set(AM_MOC_PREDEFS_CMD @_moc_predefs_cmd@) # UIC settings set(AM_UIC_SKIP @_uic_skip@) set(AM_UIC_TARGET_OPTIONS @_uic_target_options@) diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index cc54032..fa2a6e4 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -911,6 +911,19 @@ # # * Mandatory : YES # * Default : "/" +# +# .. VARIABLE:: CPACK_RPM_BUILDREQUIRES +# +# List of source rpm build dependencies. +# +# * Mandatory : NO +# * Default : - +# +# May be used to set source RPM build dependencies (BuildRequires). Note that +# you must enclose the complete build requirements string between quotes, for +# example:: +# +# set(CPACK_RPM_BUILDREQUIRES "python >= 2.5.0, cmake >= 2.8") # Author: Eric Noulard with the help of Alexander Neundorf. diff --git a/Modules/Compiler/Intel.cmake b/Modules/Compiler/Intel.cmake index 02968b4..06d01f1 100644 --- a/Modules/Compiler/Intel.cmake +++ b/Modules/Compiler/Intel.cmake @@ -22,5 +22,7 @@ else() string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os") string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3") string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g") + + set(CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "${CMAKE_${lang}_COMPILER}" "-QdM" "-P" "-Za" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp") endmacro() endif() diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake index bc906e5..af4daf0 100644 --- a/Modules/FindwxWidgets.cmake +++ b/Modules/FindwxWidgets.cmake @@ -893,6 +893,28 @@ else() endif() endif() +# Check that all libraries are present, as wx-config does not check it +set(_wx_lib_missing "") +foreach(_wx_lib_ ${wxWidgets_LIBRARIES}) + if("${_wx_lib_}" MATCHES "^-l(.*)") + set(_wx_lib_name "${CMAKE_MATCH_1}") + unset(_wx_lib_found CACHE) + find_library(_wx_lib_found NAMES ${_wx_lib_name} HINTS ${wxWidgets_LIBRARY_DIRS}) + if(_wx_lib_found STREQUAL _wx_lib_found-NOTFOUND) + list(APPEND _wx_lib_missing ${_wx_lib_name}) + endif() + unset(_wx_lib_found CACHE) + endif() +endforeach() + +if (_wx_lib_missing) + string(REPLACE ";" " " _wx_lib_missing "${_wx_lib_missing}") + DBG_MSG_V("wxWidgets not found due to following missing libraries: ${_wx_lib_missing}") + set(wxWidgets_FOUND FALSE) + unset(wxWidgets_LIBRARIES) +endif() +unset(_wx_lib_missing) + # Check if a specfic version was requested by find_package(). if(wxWidgets_FOUND) find_file(_filename wx/version.h PATHS ${wxWidgets_INCLUDE_DIRS} NO_DEFAULT_PATH) diff --git a/Modules/GNUInstallDirs.cmake b/Modules/GNUInstallDirs.cmake index 9599f27..64bd09e 100644 --- a/Modules/GNUInstallDirs.cmake +++ b/Modules/GNUInstallDirs.cmake @@ -45,6 +45,8 @@ # modifiable architecture-independent data (``com``) # ``LOCALSTATEDIR`` # modifiable single-machine data (``var``) +# ``RUNSTATEDIR`` +# run-time variable data (``LOCALSTATEDIR/run``) # ``LIBDIR`` # object code libraries (``lib`` or ``lib64`` # or ``lib/<multiarch-tuple>`` on Debian) @@ -75,10 +77,10 @@ # # ``/`` # -# For ``<dir>`` other than the ``SYSCONFDIR`` and ``LOCALSTATEDIR``, -# the value of ``CMAKE_INSTALL_<dir>`` is prefixed with ``usr/`` if -# it is not user-specified as an absolute path. For example, the -# ``INCLUDEDIR`` value ``include`` becomes ``usr/include``. +# For ``<dir>`` other than the ``SYSCONFDIR``, ``LOCALSTATEDIR`` and +# ``RUNSTATEDIR``, the value of ``CMAKE_INSTALL_<dir>`` is prefixed +# with ``usr/`` if it is not user-specified as an absolute path. +# For example, the ``INCLUDEDIR`` value ``include`` becomes ``usr/include``. # This is required by the `GNU Coding Standards`_, which state: # # When building the complete GNU system, the prefix will be empty @@ -86,20 +88,21 @@ # # ``/usr`` # -# For ``<dir>`` equal to ``SYSCONFDIR`` or ``LOCALSTATEDIR``, the -# ``CMAKE_INSTALL_FULL_<dir>`` is computed by prepending just ``/`` -# to the value of ``CMAKE_INSTALL_<dir>`` if it is not user-specified -# as an absolute path. For example, the ``SYSCONFDIR`` value ``etc`` -# becomes ``/etc``. This is required by the `GNU Coding Standards`_. +# For ``<dir>`` equal to ``SYSCONFDIR``, ``LOCALSTATEDIR`` or +# ``RUNSTATEDIR``, the ``CMAKE_INSTALL_FULL_<dir>`` is computed by +# prepending just ``/`` to the value of ``CMAKE_INSTALL_<dir>`` +# if it is not user-specified as an absolute path. +# For example, the ``SYSCONFDIR`` value ``etc`` becomes ``/etc``. +# This is required by the `GNU Coding Standards`_. # # ``/opt/...`` # -# For ``<dir>`` equal to ``SYSCONFDIR`` or ``LOCALSTATEDIR``, the -# ``CMAKE_INSTALL_FULL_<dir>`` is computed by *appending* the prefix -# to the value of ``CMAKE_INSTALL_<dir>`` if it is not user-specified -# as an absolute path. For example, the ``SYSCONFDIR`` value ``etc`` -# becomes ``/etc/opt/...``. This is defined by the -# `Filesystem Hierarchy Standard`_. +# For ``<dir>`` equal to ``SYSCONFDIR``, ``LOCALSTATEDIR`` or +# ``RUNSTATEDIR``, the ``CMAKE_INSTALL_FULL_<dir>`` is computed by +# *appending* the prefix to the value of ``CMAKE_INSTALL_<dir>`` +# if it is not user-specified as an absolute path. +# For example, the ``SYSCONFDIR`` value ``etc`` becomes ``/etc/opt/...``. +# This is defined by the `Filesystem Hierarchy Standard`_. # # .. _`Filesystem Hierarchy Standard`: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html # @@ -287,6 +290,9 @@ _GNUInstallDirs_cache_path_fallback(CMAKE_INSTALL_LOCALEDIR "${CMAKE_INSTALL_DAT _GNUInstallDirs_cache_path_fallback(CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}" "Documentation root (DATAROOTDIR/doc/PROJECT_NAME)") +_GNUInstallDirs_cache_path_fallback(CMAKE_INSTALL_RUNSTATEDIR "${CMAKE_INSTALL_LOCALSTATEDIR}/run" + "Run-time variable data (LOCALSTATEDIR/run)") + #----------------------------------------------------------------------------- mark_as_advanced( @@ -296,6 +302,7 @@ mark_as_advanced( CMAKE_INSTALL_SYSCONFDIR CMAKE_INSTALL_SHAREDSTATEDIR CMAKE_INSTALL_LOCALSTATEDIR + CMAKE_INSTALL_RUNSTATEDIR CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_INCLUDEDIR CMAKE_INSTALL_OLDINCLUDEDIR @@ -314,7 +321,7 @@ macro(GNUInstallDirs_get_absolute_install_dir absvar var) # - CMAKE_INSTALL_PREFIX == /usr # - CMAKE_INSTALL_PREFIX == /opt/... if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/") - if("${dir}" STREQUAL "SYSCONFDIR" OR "${dir}" STREQUAL "LOCALSTATEDIR") + if("${dir}" STREQUAL "SYSCONFDIR" OR "${dir}" STREQUAL "LOCALSTATEDIR" OR "${dir}" STREQUAL "RUNSTATEDIR") set(${absvar} "/${${var}}") else() if (NOT "${${var}}" MATCHES "^usr/") @@ -323,13 +330,13 @@ macro(GNUInstallDirs_get_absolute_install_dir absvar var) set(${absvar} "/${${var}}") endif() elseif("${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/?$") - if("${dir}" STREQUAL "SYSCONFDIR" OR "${dir}" STREQUAL "LOCALSTATEDIR") + if("${dir}" STREQUAL "SYSCONFDIR" OR "${dir}" STREQUAL "LOCALSTATEDIR" OR "${dir}" STREQUAL "RUNSTATEDIR") set(${absvar} "/${${var}}") else() set(${absvar} "${CMAKE_INSTALL_PREFIX}/${${var}}") endif() elseif("${CMAKE_INSTALL_PREFIX}" MATCHES "^/opt/.*") - if("${dir}" STREQUAL "SYSCONFDIR" OR "${dir}" STREQUAL "LOCALSTATEDIR") + if("${dir}" STREQUAL "SYSCONFDIR" OR "${dir}" STREQUAL "LOCALSTATEDIR" OR "${dir}" STREQUAL "RUNSTATEDIR") set(${absvar} "/${${var}}${CMAKE_INSTALL_PREFIX}") else() set(${absvar} "${CMAKE_INSTALL_PREFIX}/${${var}}") @@ -351,6 +358,7 @@ foreach(dir SYSCONFDIR SHAREDSTATEDIR LOCALSTATEDIR + RUNSTATEDIR LIBDIR INCLUDEDIR OLDINCLUDEDIR diff --git a/Modules/Platform/Linux-GNU.cmake b/Modules/Platform/Linux-GNU.cmake index 6878254..ce30a26 100644 --- a/Modules/Platform/Linux-GNU.cmake +++ b/Modules/Platform/Linux-GNU.cmake @@ -12,4 +12,5 @@ macro(__linux_compiler_gnu lang) # We pass this for historical reasons. Projects may have # executables that use dlopen but do not set ENABLE_EXPORTS. set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-rdynamic") + set(CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "${CMAKE_${lang}_COMPILER}" "-dM" "-E" "-c" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp") endmacro() |