diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeDetermineCCompiler.cmake | 7 | ||||
-rw-r--r-- | Modules/CMakeDetermineCXXCompiler.cmake | 7 | ||||
-rw-r--r-- | Modules/Compiler/GNU-DetermineCompiler.cmake | 4 | ||||
-rw-r--r-- | Modules/DartConfiguration.tcl.in | 1 | ||||
-rw-r--r-- | Modules/ExternalProject.cmake | 2 | ||||
-rw-r--r-- | Modules/FindBoost.cmake | 6 | ||||
-rw-r--r-- | Modules/FindOpenSSL.cmake | 101 | ||||
-rw-r--r-- | Modules/FindPkgConfig.cmake | 12 | ||||
-rw-r--r-- | Modules/FindProtobuf.cmake | 17 | ||||
-rw-r--r-- | Modules/FindTIFF.cmake | 14 | ||||
-rw-r--r-- | Modules/FindXercesC.cmake | 16 | ||||
-rw-r--r-- | Modules/Platform/ARTOS-GNU-C.cmake | 9 | ||||
-rw-r--r-- | Modules/Platform/ARTOS.cmake | 17 | ||||
-rw-r--r-- | Modules/Platform/HP-UX.cmake | 17 |
14 files changed, 179 insertions, 51 deletions
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake index 492c3ea..9bd1d67 100644 --- a/Modules/CMakeDetermineCCompiler.cmake +++ b/Modules/CMakeDetermineCCompiler.cmake @@ -96,6 +96,7 @@ if(NOT CMAKE_C_COMPILER_ID_RUN) # Try to identify the compiler. set(CMAKE_C_COMPILER_ID) + set(CMAKE_C_PLATFORM_ID) file(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in CMAKE_C_COMPILER_ID_PLATFORM_CONTENT) @@ -117,12 +118,12 @@ if(NOT CMAKE_C_COMPILER_ID_RUN) CMAKE_DETERMINE_COMPILER_ID(C CFLAGS CMakeCCompilerId.c) # Set old compiler and platform id variables. - if(CMAKE_C_COMPILER_ID MATCHES "GNU") + if(CMAKE_C_COMPILER_ID STREQUAL "GNU") set(CMAKE_COMPILER_IS_GNUCC 1) endif() - if("${CMAKE_C_PLATFORM_ID}" MATCHES "MinGW") + if(CMAKE_C_PLATFORM_ID MATCHES "MinGW") set(CMAKE_COMPILER_IS_MINGW 1) - elseif("${CMAKE_C_PLATFORM_ID}" MATCHES "Cygwin") + elseif(CMAKE_C_PLATFORM_ID MATCHES "Cygwin") set(CMAKE_COMPILER_IS_CYGWIN 1) endif() endif() diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake index 2032015..f25a2db 100644 --- a/Modules/CMakeDetermineCXXCompiler.cmake +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -91,6 +91,7 @@ if(NOT CMAKE_CXX_COMPILER_ID_RUN) # Try to identify the compiler. set(CMAKE_CXX_COMPILER_ID) + set(CMAKE_CXX_PLATFORM_ID) file(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT) @@ -112,12 +113,12 @@ if(NOT CMAKE_CXX_COMPILER_ID_RUN) CMAKE_DETERMINE_COMPILER_ID(CXX CXXFLAGS CMakeCXXCompilerId.cpp) # Set old compiler and platform id variables. - if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") + if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(CMAKE_COMPILER_IS_GNUCXX 1) endif() - if("${CMAKE_CXX_PLATFORM_ID}" MATCHES "MinGW") + if(CMAKE_CXX_PLATFORM_ID MATCHES "MinGW") set(CMAKE_COMPILER_IS_MINGW 1) - elseif("${CMAKE_CXX_PLATFORM_ID}" MATCHES "Cygwin") + elseif(CMAKE_CXX_PLATFORM_ID MATCHES "Cygwin") set(CMAKE_COMPILER_IS_CYGWIN 1) endif() endif() diff --git a/Modules/Compiler/GNU-DetermineCompiler.cmake b/Modules/Compiler/GNU-DetermineCompiler.cmake index 261f148..6ddc566 100644 --- a/Modules/Compiler/GNU-DetermineCompiler.cmake +++ b/Modules/Compiler/GNU-DetermineCompiler.cmake @@ -3,7 +3,9 @@ set(_compiler_id_pp_test "defined(__GNUC__)") set(_compiler_id_version_compute " # define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__GNUC__) -# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__GNUC_MINOR__) +# if defined(__GNUC_MINOR__) +# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__GNUC_MINOR__) +# endif # if defined(__GNUC_PATCHLEVEL__) # define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__GNUC_PATCHLEVEL__) # endif") diff --git a/Modules/DartConfiguration.tcl.in b/Modules/DartConfiguration.tcl.in index 918b407..2da8354 100644 --- a/Modules/DartConfiguration.tcl.in +++ b/Modules/DartConfiguration.tcl.in @@ -69,6 +69,7 @@ UpdateType: @UPDATE_TYPE@ # Compiler info Compiler: @CMAKE_CXX_COMPILER@ +CompilerVersion: @CMAKE_CXX_COMPILER_VERSION@ # Dynamic analysis (MemCheck) PurifyCommand: @PURIFYCOMMAND@ diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index fdb146a..0fbf7c3 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -609,7 +609,7 @@ if(error_code) endif() execute_process( - COMMAND \"${hg_EXECUTABLE}\" clone \"${hg_repository}\" \"${src_name}\" + COMMAND \"${hg_EXECUTABLE}\" clone -U \"${hg_repository}\" \"${src_name}\" WORKING_DIRECTORY \"${work_dir}\" RESULT_VARIABLE error_code ) diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 05b552a..33e6a49 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -512,13 +512,15 @@ else() # The user has not requested an exact version. Among known # versions, find those that are acceptable to the user request. set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS} - "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55" "1.54.0" "1.54" - "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51" + + "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55" + "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51" "1.50.0" "1.50" "1.49.0" "1.49" "1.48.0" "1.48" "1.47.0" "1.47" "1.46.1" "1.46.0" "1.46" "1.45.0" "1.45" "1.44.0" "1.44" "1.43.0" "1.43" "1.42.0" "1.42" "1.41.0" "1.41" "1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37" "1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0" "1.34" "1.33.1" "1.33.0" "1.33") + set(_boost_TEST_VERSIONS) if(Boost_FIND_VERSION) set(_Boost_FIND_VERSION_SHORT "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake index 7545d94..434ef58 100644 --- a/Modules/FindOpenSSL.cmake +++ b/Modules/FindOpenSSL.cmake @@ -2,26 +2,40 @@ # FindOpenSSL # ----------- # -# Try to find the OpenSSL encryption library +# Find the OpenSSL encryption library. # -# Once done this will define +# Imported Targets +# ^^^^^^^^^^^^^^^^ # -# :: +# This module defines the following :prop_tgt:`IMPORTED` targets: # -# OPENSSL_ROOT_DIR - Set this variable to the root installation of OpenSSL +# ``OpenSSL::SSL`` +# The OpenSSL ``ssl`` library, if found. +# ``OpenSSL::Crypto`` +# The OpenSSL ``crypto`` library, if found. # +# Result Variables +# ^^^^^^^^^^^^^^^^ # +# This module will set the following variables in your project: # -# Read-Only variables: +# ``OPENSSL_FOUND`` +# System has the OpenSSL library. +# ``OPENSSL_INCLUDE_DIR`` +# The OpenSSL include directory. +# ``OPENSSL_CRYPTO_LIBRARY`` +# The OpenSSL crypto library. +# ``OPENSSL_SSL_LIBRARY`` +# The OpenSSL SSL library. +# ``OPENSSL_LIBRARIES`` +# All OpenSSL libraries. +# ``OPENSSL_VERSION`` +# This is set to ``$major.$minor.$revision$patch`` (e.g. ``0.9.8s``). # -# :: +# Hints +# ^^^^^ # -# OPENSSL_FOUND - System has the OpenSSL library -# OPENSSL_INCLUDE_DIR - The OpenSSL include directory -# OPENSSL_CRYPTO_LIBRARY - The OpenSSL crypto library -# OPENSSL_SSL_LIBRARY - The OpenSSL SSL library -# OPENSSL_LIBRARIES - All OpenSSL libraries -# OPENSSL_VERSION - This is set to $major.$minor.$revision$patch (eg. 0.9.8s) +# Set ``OPENSSL_ROOT_DIR`` to the root directory of an OpenSSL installation. #============================================================================= # Copyright 2006-2009 Kitware, Inc. @@ -337,3 +351,66 @@ else () endif () mark_as_advanced(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES) + +if(OPENSSL_FOUND) + if(NOT TARGET OpenSSL::Crypto AND + (EXISTS "${OPENSSL_CRYPTO_LIBRARY}" OR + EXISTS "${LIB_EAY_LIBRARY_DEBUG}" OR + EXISTS "${LIB_EAY_LIBRARY_RELEASE}") + ) + add_library(OpenSSL::Crypto UNKNOWN IMPORTED) + set_target_properties(OpenSSL::Crypto PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${OPENSSL_INCLUDE_DIR}") + if(EXISTS "${OPENSSL_CRYPTO_LIBRARY}") + set_target_properties(OpenSSL::Crypto PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${OPENSSL_CRYPTO_LIBRARY}") + endif() + if(EXISTS "${LIB_EAY_LIBRARY_DEBUG}") + set_property(TARGET OpenSSL::Crypto APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(OpenSSL::Crypto PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C" + IMPORTED_LOCATION_DEBUG "${LIB_EAY_LIBRARY_DEBUG}") + endif() + if(EXISTS "${LIB_EAY_LIBRARY_RELEASE}") + set_property(TARGET OpenSSL::Crypto APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(OpenSSL::Crypto PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" + IMPORTED_LOCATION_RELEASE "${LIB_EAY_LIBRARY_RELEASE}") + endif() + endif() + if(NOT TARGET OpenSSL::SSL AND + (EXISTS "${OPENSSL_SSL_LIBRARY}" OR + EXISTS "${SSL_EAY_LIBRARY_DEBUG}" OR + EXISTS "${SSL_EAY_LIBRARY_RELEASE}") + ) + add_library(OpenSSL::SSL UNKNOWN IMPORTED) + set_target_properties(OpenSSL::SSL PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${OPENSSL_INCLUDE_DIR}") + if(EXISTS "${OPENSSL_SSL_LIBRARY}") + set_target_properties(OpenSSL::SSL PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${OPENSSL_SSL_LIBRARY}") + endif() + if(EXISTS "${SSL_EAY_LIBRARY_DEBUG}") + set_property(TARGET OpenSSL::SSL APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(OpenSSL::SSL PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C" + IMPORTED_LOCATION_DEBUG "${SSL_EAY_LIBRARY_DEBUG}") + endif() + if(EXISTS "${SSL_EAY_LIBRARY_RELEASE}") + set_property(TARGET OpenSSL::SSL APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(OpenSSL::SSL PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" + IMPORTED_LOCATION_RELEASE "${SSL_EAY_LIBRARY_RELEASE}") + endif() + if(TARGET OpenSSL::Crypto) + set_target_properties(OpenSSL::SSL PROPERTIES + INTERFACE_LINK_LIBRARIES OpenSSL::Crypto) + endif() + endif() +endif() diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake index 53c17f1..ae6903e 100644 --- a/Modules/FindPkgConfig.cmake +++ b/Modules/FindPkgConfig.cmake @@ -109,7 +109,7 @@ macro(_pkgconfig_parse_options _result _is_req _is_silent _no_cmake_path _no_cma set(${_no_cmake_path} 1) set(${_no_cmake_environment_path} 1) endif() - elseif(${CMAKE_MINIMUM_REQUIRED_VERSION} VERSION_LESS 3.1) + elseif(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 3.1) set(${_no_cmake_path} 1) set(${_no_cmake_environment_path} 1) endif() @@ -192,9 +192,9 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma # give out status message telling checked module if (NOT ${_is_silent}) if (_pkg_check_modules_cnt EQUAL 1) - message(STATUS "checking for module '${_pkg_check_modules_list}'") + message(STATUS "Checking for module '${_pkg_check_modules_list}'") else() - message(STATUS "checking for modules '${_pkg_check_modules_list}'") + message(STATUS "Checking for modules '${_pkg_check_modules_list}'") endif() endif() @@ -327,7 +327,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma # evaluate result and tell failures if (_pkgconfig_retval) if(NOT ${_is_silent}) - message(STATUS " package '${_pkg_check_modules_pkg}' not found") + message(STATUS " Package '${_pkg_check_modules_pkg}' not found") endif() set(_pkg_check_modules_failed 1) @@ -361,7 +361,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" LIBDIR "" --variable=libdir ) if (NOT ${_is_silent}) - message(STATUS " found ${_pkg_check_modules_pkg}, version ${_pkgconfig_VERSION}") + message(STATUS " Found ${_pkg_check_modules_pkg}, version ${_pkgconfig_VERSION}") endif () endforeach() @@ -529,7 +529,7 @@ macro(pkg_search_module _prefix _module0) _pkgconfig_parse_options(_pkg_modules_alt _pkg_is_required _pkg_is_silent _no_cmake_path _no_cmake_environment_path "${_module0}" ${ARGN}) if (NOT ${_pkg_is_silent}) - message(STATUS "checking for one of the modules '${_pkg_modules_alt}'") + message(STATUS "Checking for one of the modules '${_pkg_modules_alt}'") endif () # iterate through all modules and stop at the first working one. diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake index f01bd41..335c408 100644 --- a/Modules/FindProtobuf.cmake +++ b/Modules/FindProtobuf.cmake @@ -9,8 +9,9 @@ # ``PROTOBUF_SRC_ROOT_FOLDER`` # When compiling with MSVC, if this cache variable is set # the protobuf-default VS project build locations -# (vsprojects/Debug & vsprojects/Release) will be searched -# for libraries and binaries. +# (vsprojects/Debug and vsprojects/Release +# or vsprojects/x64/Debug and vsprojects/x64/Release) +# will be searched for libraries and binaries. # ``PROTOBUF_IMPORT_DIRS`` # List of additional directories to be searched for # imported .proto files. @@ -146,18 +147,22 @@ function(PROTOBUF_GENERATE_CPP SRCS HDRS) set(${HDRS} ${${HDRS}} PARENT_SCOPE) endfunction() +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(_PROTOBUF_ARCH_DIR x64/) +endif() + # Internal function: search for normal library as well as a debug one # if the debug one is specified also include debug/optimized keywords # in *_LIBRARIES variable function(_protobuf_find_libraries name filename) find_library(${name}_LIBRARY NAMES ${filename} - PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Release) + PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/${_PROTOBUF_ARCH_DIR}Release) mark_as_advanced(${name}_LIBRARY) find_library(${name}_LIBRARY_DEBUG NAMES ${filename} - PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Debug) + PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/${_PROTOBUF_ARCH_DIR}Debug) mark_as_advanced(${name}_LIBRARY_DEBUG) if(NOT ${name}_LIBRARY_DEBUG) @@ -234,8 +239,8 @@ find_program(PROTOBUF_PROTOC_EXECUTABLE NAMES protoc DOC "The Google Protocol Buffers Compiler" PATHS - ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Release - ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Debug + ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/${_PROTOBUF_ARCH_DIR}Release + ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/${_PROTOBUF_ARCH_DIR}Debug ) mark_as_advanced(PROTOBUF_PROTOC_EXECUTABLE) diff --git a/Modules/FindTIFF.cmake b/Modules/FindTIFF.cmake index a67d24d..ed092ea 100644 --- a/Modules/FindTIFF.cmake +++ b/Modules/FindTIFF.cmake @@ -34,7 +34,19 @@ find_path(TIFF_INCLUDE_DIR tiff.h) set(TIFF_NAMES ${TIFF_NAMES} tiff libtiff tiff3 libtiff3) -find_library(TIFF_LIBRARY NAMES ${TIFF_NAMES} ) +foreach(name ${TIFF_NAMES}) + list(APPEND TIFF_NAMES_DEBUG "${name}d") +endforeach() + +if(NOT TIFF_LIBRARY) + find_library(TIFF_LIBRARY_RELEASE NAMES ${TIFF_NAMES}) + find_library(TIFF_LIBRARY_DEBUG NAMES ${TIFF_NAMES_DEBUG}) + include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) + select_library_configurations(TIFF) + mark_as_advanced(TIFF_LIBRARY_RELEASE TIFF_LIBRARY_DEBUG) +endif() +unset(TIFF_NAMES) +unset(TIFF_NAMES_DEBUG) if(TIFF_INCLUDE_DIR AND EXISTS "${TIFF_INCLUDE_DIR}/tiffvers.h") file(STRINGS "${TIFF_INCLUDE_DIR}/tiffvers.h" tiff_version_str diff --git a/Modules/FindXercesC.cmake b/Modules/FindXercesC.cmake index fd0b992..cf84826 100644 --- a/Modules/FindXercesC.cmake +++ b/Modules/FindXercesC.cmake @@ -61,10 +61,18 @@ find_path(XercesC_INCLUDE_DIR DOC "Xerces-C++ include directory") mark_as_advanced(XercesC_INCLUDE_DIR) -# Find all XercesC libraries -find_library(XercesC_LIBRARY NAMES "xerces-c" "xerces-c_3" "xerces-c_2" - DOC "Xerces-C++ libraries") -mark_as_advanced(XercesC_LIBRARY) +if(NOT XercesC_LIBRARY) + # Find all XercesC libraries + find_library(XercesC_LIBRARY_RELEASE + NAMES "xerces-c" "xerces-c_3" + DOC "Xerces-C++ libraries (release)") + find_library(XercesC_LIBRARY_DEBUG + NAMES "xerces-cd" "xerces-c_3D" "xerces-c_3_1D" + DOC "Xerces-C++ libraries (debug)") + include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) + select_library_configurations(XercesC) + mark_as_advanced(XercesC_LIBRARY_RELEASE XercesC_LIBRARY_DEBUG) +endif() if(XercesC_INCLUDE_DIR) _XercesC_GET_VERSION("${XercesC_INCLUDE_DIR}/xercesc/util/XercesVersion.hpp") diff --git a/Modules/Platform/ARTOS-GNU-C.cmake b/Modules/Platform/ARTOS-GNU-C.cmake new file mode 100644 index 0000000..967d0e7 --- /dev/null +++ b/Modules/Platform/ARTOS-GNU-C.cmake @@ -0,0 +1,9 @@ +# Define ARTOS to select proper behaviour and tell preprocessor to accept C++ style comments. +set(CMAKE_C_FLAGS_INIT "-DARTOS -Xp -+") +# ac doesn't support -g properly and doesn't support the normal gcc optimization options. Just use the defaults set by ac. +set(CMAKE_C_FLAGS_DEBUG_INIT "") +set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-DNDEBUG") +set(CMAKE_C_FLAGS_RELEASE_INIT "-DNDEBUG") +set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-DNDEBUG") +# Most projects expect the stdio functions to be available. +set(CMAKE_C_STANDARD_LIBRARIES_INIT "stdio.a") diff --git a/Modules/Platform/ARTOS.cmake b/Modules/Platform/ARTOS.cmake new file mode 100644 index 0000000..f9365d6 --- /dev/null +++ b/Modules/Platform/ARTOS.cmake @@ -0,0 +1,17 @@ +# Support for ARTOS RTOS (locamation.com) +set(CMAKE_LINK_LIBRARY_SUFFIX "") +set(CMAKE_STATIC_LIBRARY_PREFIX "") +set(CMAKE_STATIC_LIBRARY_SUFFIX ".a") +set(CMAKE_SHARED_LIBRARY_PREFIX "") +set(CMAKE_SHARED_LIBRARY_SUFFIX ".a") +set(CMAKE_EXECUTABLE_SUFFIX ".x") +set(CMAKE_DL_LIBS "") + +set(CMAKE_FIND_LIBRARY_PREFIXES "") +set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") + +# ARTOS does not support shared libs +set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) + +set(CMAKE_C_LINK_SHARED_LIBRARY ) +set(CMAKE_C_LINK_MODULE_LIBRARY ) diff --git a/Modules/Platform/HP-UX.cmake b/Modules/Platform/HP-UX.cmake index df042cd..88932ad 100644 --- a/Modules/Platform/HP-UX.cmake +++ b/Modules/Platform/HP-UX.cmake @@ -35,18 +35,11 @@ list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES # Initialize C and CXX link type selection flags. These flags are # used when building a shared library, shared module, or executable # that links to other libraries to select whether to use the static or -# shared versions of the libraries. Note that C modules and shared -# libs are built using ld directly so we leave off the "-Wl," portion. -foreach(type SHARED_LIBRARY SHARED_MODULE) - set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-a archive") - set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-a default") -endforeach() -foreach(type EXE) - set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-a,archive") - set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-a,default") -endforeach() +# shared versions of the libraries. foreach(type SHARED_LIBRARY SHARED_MODULE EXE) - set(CMAKE_${type}_LINK_STATIC_CXX_FLAGS "-Wl,-a,archive") - set(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS "-Wl,-a,default") + foreach(lang C CXX) + set(CMAKE_${type}_LINK_STATIC_${lang}_FLAGS "-Wl,-a,archive") + set(CMAKE_${type}_LINK_DYNAMIC_${lang}_FLAGS "-Wl,-a,default") + endforeach() endforeach() |