Merge branch 'empty-compiler-crash' into compiler-change-cleanup
This commit is contained in:
commit
2963c9828c
|
@ -51,3 +51,27 @@ if("${CPACK_GENERATOR}" STREQUAL "PackageMaker")
|
|||
set(CPACK_PACKAGE_DEFAULT_LOCATION "/usr")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if("${CPACK_GENERATOR}" STREQUAL "WIX")
|
||||
# Reset CPACK_PACKAGE_VERSION to deal with WiX restriction.
|
||||
# But the file names still use the full CMake_VERSION value:
|
||||
set(CPACK_PACKAGE_FILE_NAME
|
||||
"${CPACK_PACKAGE_NAME}-@CMake_VERSION@-${CPACK_SYSTEM_NAME}")
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME
|
||||
"${CPACK_PACKAGE_NAME}-@CMake_VERSION@-Source")
|
||||
|
||||
if(NOT CPACK_WIX_SIZEOF_VOID_P)
|
||||
set(CPACK_WIX_SIZEOF_VOID_P "@CMAKE_SIZEOF_VOID_P@")
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_VERSION
|
||||
"@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@.@CMake_VERSION_PATCH@")
|
||||
# WIX installers require at most a 4 component version number, where
|
||||
# each component is an integer between 0 and 65534 inclusive
|
||||
set(tweak "@CMake_VERSION_TWEAK@")
|
||||
if(tweak MATCHES "^[0-9]+$")
|
||||
if(tweak GREATER 0 AND tweak LESS 65535)
|
||||
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}.${tweak}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -122,9 +122,11 @@ macro(CMAKE_SETUP_TESTING)
|
|||
"Generator used when running tests")
|
||||
if(NOT CMAKE_TEST_GENERATOR)
|
||||
set(CMAKE_TEST_GENERATOR "${CMAKE_GENERATOR}")
|
||||
set(CMAKE_TEST_GENERATOR_TOOLSET "${CMAKE_GENERATOR_TOOLSET}")
|
||||
set(CMAKE_TEST_MAKEPROGRAM "${MAKEPROGRAM}")
|
||||
else()
|
||||
set(CMAKE_TEST_DIFFERENT_GENERATOR TRUE)
|
||||
set(CMAKE_TEST_GENERATOR_TOOLSET "")
|
||||
endif()
|
||||
|
||||
# Are we testing with the MSVC compiler?
|
||||
|
@ -234,8 +236,6 @@ macro (CMAKE_BUILD_UTILITIES)
|
|||
set(kwsys_folder "Utilities/KWSys")
|
||||
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE} "${kwsys_folder}")
|
||||
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}_c "${kwsys_folder}")
|
||||
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}EncodeExecutable "${kwsys_folder}")
|
||||
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}ProcessFwd9x "${kwsys_folder}")
|
||||
if(BUILD_TESTING)
|
||||
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestDynload "${kwsys_folder}")
|
||||
CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestProcess "${kwsys_folder}")
|
||||
|
@ -585,6 +585,29 @@ option(CMAKE_STRICT
|
|||
"Perform strict testing to record property and variable access. Can be used to report any undefined properties or variables" OFF)
|
||||
mark_as_advanced(CMAKE_STRICT)
|
||||
|
||||
if(NOT CMake_VERSION_IS_RELEASE)
|
||||
if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" AND
|
||||
NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS 4.2)
|
||||
set(C_FLAGS_LIST -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts
|
||||
-Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security
|
||||
-Wmissing-format-attribute -fno-common -Wundef
|
||||
)
|
||||
set(CXX_FLAGS_LIST -Wnon-virtual-dtor -Wcast-align -Wchar-subscripts -Wall -W
|
||||
-Wshadow -Wpointer-arith -Wformat-security -Wundef
|
||||
)
|
||||
|
||||
foreach(FLAG_LANG C CXX)
|
||||
foreach(FLAG ${${FLAG_LANG}_FLAGS_LIST})
|
||||
if(NOT " ${CMAKE_${FLAG_LANG}_FLAGS} " MATCHES " ${FLAG} ")
|
||||
set(CMAKE_${FLAG_LANG}_FLAGS "${CMAKE_${FLAG_LANG}_FLAGS} ${FLAG}")
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
unset(C_FLAGS_LIST)
|
||||
unset(CXX_FLAGS_LIST)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# build the remaining subdirectories
|
||||
add_subdirectory(Source)
|
||||
|
|
|
@ -31,6 +31,7 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
|
|||
"remark: .*LOOP WAS VECTORIZED"
|
||||
"warning .980: wrong number of actual arguments to intrinsic function .std::basic_"
|
||||
"LINK : warning LNK4089: all references to.*ADVAPI32.dll.*discarded by /OPT:REF"
|
||||
"LINK : warning LNK4089: all references to.*PSAPI.DLL.*discarded by /OPT:REF"
|
||||
"LINK : warning LNK4089: all references to.*USER32.dll.*discarded by /OPT:REF"
|
||||
"Warning: library was too large for page size.*"
|
||||
"Warning: public.*_archive_.*in module.*archive_*clashes with prior module.*archive_.*"
|
||||
|
|
|
@ -1,3 +1,37 @@
|
|||
Changes in CMake 2.8.10.2 (since 2.8.10.1)
|
||||
----------------------------------------------
|
||||
Alex Neundorf (1):
|
||||
Automoc: fix regression #13667, broken build in phonon
|
||||
|
||||
Brad King (1):
|
||||
Initialize IMPORTED GLOBAL targets on reconfigure (#13702)
|
||||
|
||||
David Cole (1):
|
||||
CMake: Fix infinite loop untarring corrupt tar file
|
||||
|
||||
Rolf Eike Beer (1):
|
||||
FindGettext: fix overwriting result with empty variable (#13691)
|
||||
|
||||
Changes in CMake 2.8.10.1 (since 2.8.10)
|
||||
----------------------------------------------
|
||||
Brad King (5):
|
||||
Fix default PDB output directory (#13644)
|
||||
Fix PathScale compiler id for Clang-based upstream
|
||||
Update programmatically-reported copyright year (#13638)
|
||||
FindSDL: Restore accidentally dropped search paths (#13651)
|
||||
OS X: Fix default CMAKE_OSX_SYSROOT with deployment target
|
||||
|
||||
Rolf Eike Beer (2):
|
||||
FindOpenSSL: fix library selection on Windows (#13645)
|
||||
FindOpenSSL: also find the non-MD debug libraries for MSVC
|
||||
|
||||
Stephen Kelly (1):
|
||||
GenEx: Use case insensitive comparison for $<CONFIG:...>
|
||||
|
||||
Changes in CMake 2.8.10 (since 2.8.10-rc3)
|
||||
----------------------------------------------
|
||||
None
|
||||
|
||||
Changes in CMake 2.8.10-rc3 (since 2.8.10-rc2)
|
||||
----------------------------------------------
|
||||
Rolf Eike Beer (2):
|
||||
|
|
|
@ -62,3 +62,9 @@ endif ()
|
|||
if (CMAKE_ANSI_CFLAGS)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
|
||||
endif ()
|
||||
|
||||
# avoid binutils problem with large binaries, e.g. when building CMake in debug mode
|
||||
# See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50230
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL Linux AND CMAKE_SYSTEM_PROCESSOR STREQUAL parisc)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--unique=.text.*")
|
||||
endif ()
|
||||
|
|
|
@ -369,7 +369,7 @@ function(set_bundle_key_values keys_var context item exepath dirs copyflag)
|
|||
# For frameworks, construct the name under the embedded path from the
|
||||
# opening "${item_name}.framework/" to the closing "/${item_name}":
|
||||
#
|
||||
string(REGEX REPLACE "^.*(${item_name}.framework/.*/${item_name}).*$" "${default_embedded_path}/\\1" embedded_item "${item}")
|
||||
string(REGEX REPLACE "^.*(${item_name}.framework/.*/?${item_name}).*$" "${default_embedded_path}/\\1" embedded_item "${item}")
|
||||
else()
|
||||
# For other items, just use the same name as the original, but in the
|
||||
# embedded path:
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
This file provides a few notes to CMake developers about how to add
|
||||
support for a new language to CMake. It is also possible to place
|
||||
these files in CMAKE_MODULE_PATH within an outside project to add
|
||||
languages not supported by upstream CMake. However, this is not
|
||||
a fully supported use case.
|
||||
|
||||
The implementation behind the scenes of project/enable_language,
|
||||
including the compiler/platform modules, is an *internal* API that
|
||||
does not make any compatibility guarantees. It is not covered in the
|
||||
official reference documentation that is versioned with the source code.
|
||||
Maintainers of external language support are responsible for porting
|
||||
it to each version of CMake as upstream changes are made. Since
|
||||
the API is internal we will not necessarily include notice of any
|
||||
changes in release notes.
|
||||
|
||||
|
||||
CMakeDetermine(LANG)Compiler.cmake -> this should find the compiler for LANG and configure CMake(LANG)Compiler.cmake.in
|
||||
|
||||
CMake(LANG)Compiler.cmake.in -> used by CMakeDetermine(LANG)Compiler.cmake
|
||||
|
|
|
@ -50,6 +50,7 @@ endif()
|
|||
|
||||
set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "@CMAKE_C_IMPLICIT_LINK_LIBRARIES@")
|
||||
set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "@CMAKE_C_IMPLICIT_LINK_DIRECTORIES@")
|
||||
set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "@CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES@")
|
||||
|
||||
@SET_CMAKE_CMCLDEPS_EXECUTABLE@
|
||||
@SET_CMAKE_CL_SHOWINCLUDE_PREFIX@
|
||||
|
|
|
@ -20,6 +20,14 @@
|
|||
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
|
||||
# endif
|
||||
|
||||
#elif defined(__PATHCC__)
|
||||
# define COMPILER_ID "PathScale"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
|
||||
# if defined(__PATHCC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(__clang__)
|
||||
# define COMPILER_ID "Clang"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
||||
|
@ -95,14 +103,6 @@
|
|||
# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(__PATHCC__)
|
||||
# define COMPILER_ID "PathScale"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
|
||||
# if defined(__PATHCC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(_CRAYC)
|
||||
# define COMPILER_ID "Cray"
|
||||
# define COMPILER_VERSION_MAJOR DEC(_RELEASE)
|
||||
|
|
|
@ -51,6 +51,7 @@ endif()
|
|||
|
||||
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "@CMAKE_CXX_IMPLICIT_LINK_LIBRARIES@")
|
||||
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "@CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES@")
|
||||
set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "@CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES@")
|
||||
|
||||
@SET_CMAKE_CMCLDEPS_EXECUTABLE@
|
||||
@SET_CMAKE_CL_SHOWINCLUDE_PREFIX@
|
||||
|
|
|
@ -25,6 +25,14 @@
|
|||
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
|
||||
# endif
|
||||
|
||||
#elif defined(__PATHCC__)
|
||||
# define COMPILER_ID "PathScale"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
|
||||
# if defined(__PATHCC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(__clang__)
|
||||
# define COMPILER_ID "Clang"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
||||
|
@ -100,14 +108,6 @@
|
|||
# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(__PATHCC__)
|
||||
# define COMPILER_ID "PathScale"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
|
||||
# if defined(__PATHCC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(_CRAYC)
|
||||
# define COMPILER_ID "Cray"
|
||||
# define COMPILER_VERSION_MAJOR DEC(_RELEASE)
|
||||
|
|
|
@ -72,19 +72,9 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
|
|||
# Parse implicit linker information for this language, if available.
|
||||
set(implicit_dirs "")
|
||||
set(implicit_libs "")
|
||||
set(MULTI_ARCH FALSE)
|
||||
if(DEFINED CMAKE_OSX_ARCHITECTURES)
|
||||
if( "${CMAKE_OSX_ARCHITECTURES}" MATCHES ";" )
|
||||
set(MULTI_ARCH TRUE)
|
||||
endif()
|
||||
endif()
|
||||
if(CMAKE_${lang}_VERBOSE_FLAG
|
||||
# Implicit link information cannot be used explicitly for
|
||||
# multiple OS X architectures, so we skip it.
|
||||
AND NOT MULTI_ARCH
|
||||
# Skip this with Xcode for now.
|
||||
AND NOT "${CMAKE_GENERATOR}" MATCHES Xcode)
|
||||
CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs log
|
||||
set(implicit_fwks "")
|
||||
if(CMAKE_${lang}_VERBOSE_FLAG)
|
||||
CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs implicit_fwks log
|
||||
"${CMAKE_${lang}_IMPLICIT_OBJECT_REGEX}")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Parsed ${lang} implicit link information from above output:\n${log}\n\n")
|
||||
|
@ -112,8 +102,17 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
|
|||
message(STATUS "${_desc}")
|
||||
endif()
|
||||
|
||||
# Implicit link libraries cannot be used explicitly for multiple
|
||||
# OS X architectures, so we skip it.
|
||||
if(DEFINED CMAKE_OSX_ARCHITECTURES)
|
||||
if("${CMAKE_OSX_ARCHITECTURES}" MATCHES ";")
|
||||
set(implicit_libs "")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CMAKE_${lang}_IMPLICIT_LINK_LIBRARIES "${implicit_libs}" PARENT_SCOPE)
|
||||
set(CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES "${implicit_dirs}" PARENT_SCOPE)
|
||||
set(CMAKE_${lang}_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "${implicit_fwks}" PARENT_SCOPE)
|
||||
|
||||
# Detect library architecture directory name.
|
||||
if(CMAKE_LIBRARY_ARCHITECTURE_REGEX)
|
||||
|
|
|
@ -107,11 +107,14 @@ Id flags: ${testflags}
|
|||
")
|
||||
|
||||
# Compile the compiler identification source.
|
||||
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([0-9]+)( .NET)?( 200[358])? *((Win64|IA64|ARM))?")
|
||||
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([0-9]+)")
|
||||
set(vs_version ${CMAKE_MATCH_1})
|
||||
set(vs_arch ${CMAKE_MATCH_4})
|
||||
set(id_arch ${CMAKE_VS_PLATFORM_NAME})
|
||||
set(id_lang "${lang}")
|
||||
set(id_cl cl.exe)
|
||||
if(NOT id_arch)
|
||||
set(id_arch Win32)
|
||||
endif()
|
||||
if(NOT "${vs_version}" VERSION_LESS 10)
|
||||
set(v 10)
|
||||
set(ext vcxproj)
|
||||
|
@ -123,25 +126,26 @@ Id flags: ${testflags}
|
|||
set(v 6)
|
||||
set(ext dsp)
|
||||
endif()
|
||||
if("${vs_arch}" STREQUAL "Win64")
|
||||
set(id_machine_7 17)
|
||||
if("${id_arch}" STREQUAL "x64")
|
||||
set(id_machine_10 MachineX64)
|
||||
set(id_arch x64)
|
||||
elseif("${vs_arch}" STREQUAL "IA64")
|
||||
set(id_machine_7 5)
|
||||
elseif("${id_arch}" STREQUAL "Itanium")
|
||||
set(id_machine_10 MachineIA64)
|
||||
set(id_arch ia64)
|
||||
else()
|
||||
set(id_machine_6 x86)
|
||||
set(id_machine_7 1)
|
||||
set(id_machine_10 MachineX86)
|
||||
set(id_arch Win32)
|
||||
endif()
|
||||
if(CMAKE_VS_PLATFORM_TOOLSET)
|
||||
set(id_toolset "<PlatformToolset>${CMAKE_VS_PLATFORM_TOOLSET}</PlatformToolset>")
|
||||
else()
|
||||
set(id_toolset "")
|
||||
endif()
|
||||
if(CMAKE_VS_WINCE_VERSION)
|
||||
set(id_entrypoint "mainACRTStartup")
|
||||
set(id_subsystem 9)
|
||||
else()
|
||||
set(id_subsystem 1)
|
||||
endif()
|
||||
if("${CMAKE_MAKE_PROGRAM}" MATCHES "[Mm][Ss][Bb][Uu][Ii][Ll][Dd]")
|
||||
set(build /p:Configuration=Debug /p:Platform=@id_arch@ /p:VisualStudioVersion=${vs_version}.0)
|
||||
elseif("${CMAKE_MAKE_PROGRAM}" MATCHES "[Mm][Ss][Dd][Ee][Vv]")
|
||||
|
@ -173,6 +177,11 @@ Id flags: ${testflags}
|
|||
set(id_type ${CMAKE_${lang}_COMPILER_XCODE_TYPE})
|
||||
set(id_dir ${CMAKE_${lang}_COMPILER_ID_DIR})
|
||||
get_filename_component(id_src "${src}" NAME)
|
||||
if(CMAKE_XCODE_PLATFORM_TOOLSET)
|
||||
set(id_toolset "GCC_VERSION = ${CMAKE_XCODE_PLATFORM_TOOLSET};")
|
||||
else()
|
||||
set(id_toolset "")
|
||||
endif()
|
||||
if(NOT ${XCODE_VERSION} VERSION_LESS 3)
|
||||
set(v 3)
|
||||
set(ext xcodeproj)
|
||||
|
|
|
@ -63,6 +63,8 @@ if(NOT CMAKE_Java_COMPILER)
|
|||
/usr/java/j2sdk1.4.2_09/bin
|
||||
/usr/lib/j2sdk1.5-sun/bin
|
||||
/opt/sun-jdk-1.5.0.04/bin
|
||||
/usr/local/jdk-1.7.0/bin
|
||||
/usr/local/jdk-1.6.0/bin
|
||||
)
|
||||
# if no compiler has been specified yet, then look for one
|
||||
if(CMAKE_Java_COMPILER_INIT)
|
||||
|
|
|
@ -106,6 +106,12 @@ if(CMAKE_SYSTEM_NAME)
|
|||
set(CMAKE_CROSSCOMPILING TRUE)
|
||||
endif()
|
||||
set(PRESET_CMAKE_SYSTEM_NAME TRUE)
|
||||
elseif(CMAKE_VS_WINCE_VERSION)
|
||||
set(CMAKE_SYSTEM_NAME "WindowsCE")
|
||||
set(CMAKE_SYSTEM_VERSION "${CMAKE_VS_WINCE_VERSION}")
|
||||
set(CMAKE_SYSTEM_PROCESSOR "${MSVC_C_ARCHITECTURE_ID}")
|
||||
set(CMAKE_CROSSCOMPILING TRUE)
|
||||
set(PRESET_CMAKE_SYSTEM_NAME TRUE)
|
||||
else()
|
||||
set(CMAKE_SYSTEM_NAME "${CMAKE_HOST_SYSTEM_NAME}")
|
||||
set(CMAKE_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
include(CMakeParseArguments)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake)
|
||||
|
||||
function(CMAKE_EXPAND_IMPORTED_TARGETS _RESULT )
|
||||
|
||||
|
|
|
@ -77,6 +77,8 @@ endif()
|
|||
# This variable is used by the Eclipse generator and appended to the make invocation commands.
|
||||
set(CMAKE_ECLIPSE_MAKE_ARGUMENTS "${_CMAKE_ECLIPSE_INITIAL_MAKE_ARGS}" CACHE STRING "Additional command line arguments when Eclipse invokes make. Enter e.g. -j<some_number> to get parallel builds")
|
||||
|
||||
set(CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES TRUE CACHE BOOL "If disabled, CMake will not generate linked resource to the subprojects and to the source files within targets")
|
||||
|
||||
# This variable is used by the Eclipse generator in out-of-source builds only.
|
||||
set(CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT FALSE CACHE BOOL "If enabled, CMake will generate a source project for Eclipse in CMAKE_SOURCE_DIR")
|
||||
mark_as_advanced(CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT)
|
||||
|
|
|
@ -52,3 +52,4 @@ endif()
|
|||
|
||||
set(CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "@CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES@")
|
||||
set(CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES "@CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES@")
|
||||
set(CMAKE_Fortran_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "@CMAKE_Fortran_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES@")
|
||||
|
|
|
@ -74,12 +74,8 @@
|
|||
PRINT *, 'INFO:platform[IRIX]'
|
||||
#elif defined(__hpux) || defined(__hpux__)
|
||||
PRINT *, 'INFO:platform[HP-UX]'
|
||||
#elif defined(__HAIKU) || defined(__HAIKU__) || defined(_HAIKU)
|
||||
#elif defined(__HAIKU__)
|
||||
PRINT *, 'INFO:platform[Haiku]'
|
||||
# if 0
|
||||
! Haiku also defines __BEOS__ so we must
|
||||
! put it prior to the check for __BEOS__
|
||||
# endif
|
||||
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
|
||||
PRINT *, 'INFO:platform[BeOS]'
|
||||
#elif defined(__QNX__) || defined(__QNXNTO__)
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
# configure_file() command when creating the <Name>Config.cmake or <Name>-config.cmake
|
||||
# file for installing a project or library. It helps making the resulting package
|
||||
# relocatable by avoiding hardcoded paths in the installed Config.cmake file.
|
||||
# <Name>Config.cmake files installed under UNIX into /lib(64) or /usr/lib(64) are
|
||||
# considered system packages and are not relocatable.
|
||||
#
|
||||
# In a FooConfig.cmake file there may be code like this to make the
|
||||
# install destinations know to the using project:
|
||||
|
@ -173,11 +175,26 @@ function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile)
|
|||
else()
|
||||
set(absInstallDir "${CMAKE_INSTALL_PREFIX}/${CCF_INSTALL_DESTINATION}")
|
||||
endif()
|
||||
|
||||
# with the /usr-move, /lib(64) is a symlink to /usr/lib on Fedora, ArchLinux, Mageira and others.
|
||||
# If we are installed to such a location, force using absolute paths.
|
||||
set(forceAbsolutePaths FALSE)
|
||||
if("${absInstallDir}" MATCHES "^(/usr)?/lib(64)?/.+")
|
||||
set(forceAbsolutePaths TRUE)
|
||||
endif()
|
||||
|
||||
file(RELATIVE_PATH PACKAGE_RELATIVE_PATH "${absInstallDir}" "${CMAKE_INSTALL_PREFIX}" )
|
||||
|
||||
foreach(var ${CCF_PATH_VARS})
|
||||
if(NOT DEFINED ${var})
|
||||
message(FATAL_ERROR "Variable ${var} does not exist")
|
||||
else()
|
||||
if(forceAbsolutePaths)
|
||||
if(IS_ABSOLUTE "${${var}}")
|
||||
set(PACKAGE_${var} "${${var}}")
|
||||
else()
|
||||
set(PACKAGE_${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
|
||||
endif()
|
||||
else()
|
||||
if(IS_ABSOLUTE "${${var}}")
|
||||
string(REPLACE "${CMAKE_INSTALL_PREFIX}" "\${PACKAGE_PREFIX_DIR}"
|
||||
|
@ -186,10 +203,16 @@ function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile)
|
|||
set(PACKAGE_${var} "\${PACKAGE_PREFIX_DIR}/${${var}}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
get_filename_component(inputFileName "${_inputFile}" NAME)
|
||||
|
||||
set(PACKAGE_INIT "
|
||||
####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
|
||||
####### Any changes to this file will be overwritten by the next CMake run ####
|
||||
####### The input file was ${inputFileName} ########
|
||||
|
||||
get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/${PACKAGE_RELATIVE_PATH}\" ABSOLUTE)
|
||||
")
|
||||
|
||||
|
|
|
@ -16,9 +16,10 @@
|
|||
# This is used internally by CMake and should not be included by user
|
||||
# code.
|
||||
|
||||
function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var obj_regex)
|
||||
function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj_regex)
|
||||
set(implicit_libs_tmp "")
|
||||
set(implicit_dirs_tmp)
|
||||
set(implicit_fwks_tmp)
|
||||
set(log "")
|
||||
|
||||
# Parse implicit linker arguments.
|
||||
|
@ -36,6 +37,16 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var obj_regex)
|
|||
set(cmd)
|
||||
if("${line}" MATCHES "${linker_regex}" AND
|
||||
NOT "${line}" MATCHES "${linker_exclude_regex}")
|
||||
if(XCODE)
|
||||
# Xcode unconditionally adds a path under the project build tree and
|
||||
# on older versions it is not reported with proper quotes. Remove it.
|
||||
string(REGEX REPLACE "([][+.*()^])" "\\\\\\1" _dir_regex "${CMAKE_BINARY_DIR}")
|
||||
string(REGEX REPLACE " -[FL]${_dir_regex}/([^ ]| [^-])+( |$)" " " xline "${line}")
|
||||
if(NOT "x${xline}" STREQUAL "x${line}")
|
||||
set(log "${log} reduced line: [${line}]\n to: [${xline}]\n")
|
||||
set(line "${xline}")
|
||||
endif()
|
||||
endif()
|
||||
if(UNIX)
|
||||
separate_arguments(args UNIX_COMMAND "${line}")
|
||||
else()
|
||||
|
@ -97,32 +108,62 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var obj_regex)
|
|||
endif()
|
||||
endforeach()
|
||||
|
||||
# Look for library search paths reported by linker.
|
||||
if("${output_lines}" MATCHES ";Library search paths:((;\t[^;]+)+)")
|
||||
string(REPLACE ";\t" ";" implicit_dirs_match "${CMAKE_MATCH_1}")
|
||||
set(log "${log} Library search paths: [${implicit_dirs_match}]\n")
|
||||
list(APPEND implicit_dirs_tmp ${implicit_dirs_match})
|
||||
endif()
|
||||
if("${output_lines}" MATCHES ";Framework search paths:((;\t[^;]+)+)")
|
||||
string(REPLACE ";\t" ";" implicit_fwks_match "${CMAKE_MATCH_1}")
|
||||
set(log "${log} Framework search paths: [${implicit_fwks_match}]\n")
|
||||
list(APPEND implicit_fwks_tmp ${implicit_fwks_match})
|
||||
endif()
|
||||
|
||||
# Cleanup list of libraries and flags.
|
||||
# We remove items that are not language-specific.
|
||||
set(implicit_libs "")
|
||||
foreach(lib IN LISTS implicit_libs_tmp)
|
||||
if("${lib}" MATCHES "^(crt.*\\.o|gcc.*|System.*)$")
|
||||
set(log "${log} remove lib [${lib}]\n")
|
||||
elseif(IS_ABSOLUTE "${lib}")
|
||||
get_filename_component(abs "${lib}" ABSOLUTE)
|
||||
if(NOT "x${lib}" STREQUAL "x${abs}")
|
||||
set(log "${log} collapse lib [${lib}] ==> [${abs}]\n")
|
||||
endif()
|
||||
list(APPEND implicit_libs "${abs}")
|
||||
else()
|
||||
list(APPEND implicit_libs "${lib}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Cleanup list of directories.
|
||||
set(implicit_dirs "")
|
||||
foreach(d IN LISTS implicit_dirs_tmp)
|
||||
# Cleanup list of library and framework directories.
|
||||
set(desc_dirs "library")
|
||||
set(desc_fwks "framework")
|
||||
foreach(t dirs fwks)
|
||||
set(implicit_${t} "")
|
||||
foreach(d IN LISTS implicit_${t}_tmp)
|
||||
get_filename_component(dir "${d}" ABSOLUTE)
|
||||
list(APPEND implicit_dirs "${dir}")
|
||||
set(log "${log} collapse dir [${d}] ==> [${dir}]\n")
|
||||
string(FIND "${dir}" "${CMAKE_FILES_DIRECTORY}/" pos)
|
||||
if(NOT pos LESS 0)
|
||||
set(msg ", skipping non-system directory")
|
||||
else()
|
||||
set(msg "")
|
||||
list(APPEND implicit_${t} "${dir}")
|
||||
endif()
|
||||
set(log "${log} collapse ${desc_${t}} dir [${d}] ==> [${dir}]${msg}\n")
|
||||
endforeach()
|
||||
list(REMOVE_DUPLICATES implicit_${t})
|
||||
endforeach()
|
||||
list(REMOVE_DUPLICATES implicit_dirs)
|
||||
|
||||
# Log results.
|
||||
set(log "${log} implicit libs: [${implicit_libs}]\n")
|
||||
set(log "${log} implicit dirs: [${implicit_dirs}]\n")
|
||||
set(log "${log} implicit fwks: [${implicit_fwks}]\n")
|
||||
|
||||
# Return results.
|
||||
set(${lib_var} "${implicit_libs}" PARENT_SCOPE)
|
||||
set(${dir_var} "${implicit_dirs}" PARENT_SCOPE)
|
||||
set(${fwk_var} "${implicit_fwks}" PARENT_SCOPE)
|
||||
set(${log_var} "${log}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
|
|
@ -35,11 +35,8 @@
|
|||
#elif defined(__hpux) || defined(__hpux__)
|
||||
# define PLATFORM_ID "HP-UX"
|
||||
|
||||
#elif defined(__HAIKU) || defined(__HAIKU__) || defined(_HAIKU)
|
||||
#elif defined(__HAIKU__)
|
||||
# define PLATFORM_ID "Haiku"
|
||||
/* Haiku also defines __BEOS__ so we must
|
||||
put it prior to the check for __BEOS__
|
||||
*/
|
||||
|
||||
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
|
||||
# define PLATFORM_ID "BeOS"
|
||||
|
|
|
@ -438,6 +438,7 @@ if(NOT CPACK_GENERATOR)
|
|||
endif()
|
||||
else()
|
||||
option(CPACK_BINARY_NSIS "Enable to build NSIS packages" ON)
|
||||
option(CPACK_BINARY_WIX "Enable to build WiX packages" OFF)
|
||||
option(CPACK_BINARY_ZIP "Enable to build ZIP packages" OFF)
|
||||
endif()
|
||||
|
||||
|
@ -453,6 +454,7 @@ if(NOT CPACK_GENERATOR)
|
|||
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TGZ TGZ)
|
||||
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TBZ2 TBZ2)
|
||||
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TZ TZ)
|
||||
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_WIX WIX)
|
||||
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_ZIP ZIP)
|
||||
|
||||
endif()
|
||||
|
@ -483,7 +485,7 @@ endif()
|
|||
mark_as_advanced(CPACK_BINARY_CYGWIN CPACK_BINARY_PACKAGEMAKER CPACK_BINARY_OSXX11
|
||||
CPACK_BINARY_STGZ CPACK_BINARY_TGZ CPACK_BINARY_TBZ2
|
||||
CPACK_BINARY_DEB CPACK_BINARY_RPM CPACK_BINARY_TZ
|
||||
CPACK_BINARY_NSIS CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE
|
||||
CPACK_BINARY_NSIS CPACK_BINARY_WIX CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE
|
||||
CPACK_SOURCE_CYGWIN CPACK_SOURCE_TBZ2 CPACK_SOURCE_TGZ
|
||||
CPACK_SOURCE_TZ CPACK_SOURCE_ZIP CPACK_BINARY_DRAGNDROP)
|
||||
|
||||
|
@ -522,6 +524,9 @@ cpack_set_if_not_set(CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
|||
cpack_set_if_not_set(CPACK_NSIS_INSTALLER_ICON_CODE "")
|
||||
cpack_set_if_not_set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "")
|
||||
|
||||
# WiX specific variables
|
||||
cpack_set_if_not_set(CPACK_WIX_SIZEOF_VOID_P "${CMAKE_SIZEOF_VOID_P}")
|
||||
|
||||
if(DEFINED CPACK_COMPONENTS_ALL)
|
||||
if(CPACK_MONOLITHIC_INSTALL)
|
||||
message("CPack warning: both CPACK_COMPONENTS_ALL and CPACK_MONOLITHIC_INSTALL have been set.\nDefaulting to a monolithic installation.")
|
||||
|
|
|
@ -385,15 +385,13 @@ endif()
|
|||
# Are we packaging components ?
|
||||
if(CPACK_DEB_PACKAGE_COMPONENT)
|
||||
set(CPACK_DEB_PACKAGE_COMPONENT_PART_NAME "-${CPACK_DEB_PACKAGE_COMPONENT}")
|
||||
set(CPACK_DEB_PACKAGE_COMPONENT_PART_PATH "/${CPACK_DEB_PACKAGE_COMPONENT}")
|
||||
set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${CPACK_DEB_PACKAGE_COMPONENT}")
|
||||
string(TOLOWER "${CPACK_PACKAGE_NAME}${CPACK_DEB_PACKAGE_COMPONENT_PART_NAME}" CPACK_DEBIAN_PACKAGE_NAME)
|
||||
else()
|
||||
set(CPACK_DEB_PACKAGE_COMPONENT_PART_NAME "")
|
||||
set(CPACK_DEB_PACKAGE_COMPONENT_PART_PATH "")
|
||||
set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}")
|
||||
endif()
|
||||
|
||||
set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_DEB_PACKAGE_COMPONENT_PART_PATH}")
|
||||
|
||||
# Print out some debug information if we were asked for that
|
||||
if(CPACK_DEBIAN_PACKAGE_DEBUG)
|
||||
message("CPackDeb:Debug: CPACK_TOPLEVEL_DIRECTORY = ${CPACK_TOPLEVEL_DIRECTORY}")
|
||||
|
|
|
@ -311,14 +311,12 @@ endif()
|
|||
# Are we packaging components ?
|
||||
if(CPACK_RPM_PACKAGE_COMPONENT)
|
||||
set(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "-${CPACK_RPM_PACKAGE_COMPONENT}")
|
||||
set(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "/${CPACK_RPM_PACKAGE_COMPONENT}")
|
||||
set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}/${CPACK_RPM_PACKAGE_COMPONENT}")
|
||||
else()
|
||||
set(CPACK_RPM_PACKAGE_COMPONENT_PART_NAME "")
|
||||
set(CPACK_RPM_PACKAGE_COMPONENT_PART_PATH "")
|
||||
set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}")
|
||||
endif()
|
||||
|
||||
set(WDIR "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}")
|
||||
|
||||
#
|
||||
# Use user-defined RPM specific variables value
|
||||
# or generate reasonable default value from
|
||||
|
|
|
@ -0,0 +1,109 @@
|
|||
##section Variables specific to CPack WiX generator
|
||||
##end
|
||||
##module
|
||||
# - CPack WiX generator specific options
|
||||
#
|
||||
# The following variables are specific to the installers built
|
||||
# on Windows using WiX.
|
||||
##end
|
||||
##variable
|
||||
# CPACK_WIX_UPGRADE_GUID - Upgrade GUID (Product/@UpgradeCode)
|
||||
#
|
||||
# Will be automatically generated unless explicitly provided.
|
||||
#
|
||||
# It should be explicitly set to a constant generated
|
||||
# gloabally unique identifier (GUID) to allow your installers
|
||||
# to replace existing installations that use the same GUID.
|
||||
#
|
||||
# You may for example explicitly set this variable in
|
||||
# your CMakeLists.txt to the value that has been generated per default.
|
||||
# You should not use GUIDs that you did not generate yourself or which may
|
||||
# belong to other projects.
|
||||
#
|
||||
# A GUID shall have the following fixed length syntax:
|
||||
# XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
||||
# (each X represents an uppercase hexadecimal digit)
|
||||
##end
|
||||
##variable
|
||||
# CPACK_WIX_PRODUCT_GUID - Product GUID (Product/@Id)
|
||||
#
|
||||
# Will be automatically generated unless explicitly provided.
|
||||
#
|
||||
# If explicitly provided this will set the Product Id of your installer.
|
||||
#
|
||||
# The installer will abort if it detects a pre-existing installation that uses
|
||||
# the same GUID.
|
||||
#
|
||||
# The GUID shall use the syntax described for CPACK_WIX_UPGRADE_GUID.
|
||||
##end
|
||||
##variable
|
||||
# CPACK_WIX_LICENSE_RTF - RTF License File
|
||||
#
|
||||
# If CPACK_RESOURCE_FILE_LICENSE has an .rtf extension
|
||||
# it is used as-is.
|
||||
#
|
||||
# If CPACK_RESOURCE_FILE_LICENSE has an .txt extension
|
||||
# it is implicitly converted to RTF by the WiX Generator.
|
||||
#
|
||||
# With CPACK_WIX_LICENSE_RTF you can override the license file used
|
||||
# by the WiX Generator in case CPACK_RESOURCE_FILE_LICENSE
|
||||
# is in an unsupported format or the .txt -> .rtf
|
||||
# conversion does not work as expected.
|
||||
#
|
||||
##end
|
||||
#
|
||||
##variable
|
||||
# CPACK_WIX_PRODUCT_ICON - The Icon shown next to the program name in Add/Remove programs.
|
||||
#
|
||||
# If set, this icon is used in place of the default icon.
|
||||
#
|
||||
##end
|
||||
#
|
||||
##variable
|
||||
# CPACK_WIX_UI_BANNER - The bitmap will appear at the top of all installer pages other than the welcome and completion dialogs.
|
||||
#
|
||||
# If set, this image will replace the default banner image.
|
||||
#
|
||||
# This image must be 493 by 58 pixels.
|
||||
#
|
||||
##end
|
||||
#
|
||||
##variable
|
||||
# CPACK_WIX_UI_DIALOG - Background bitmap used on the welcome and completion dialogs.
|
||||
#
|
||||
# If this variable is set, the installer will replace the default dialog image.
|
||||
#
|
||||
# This image must be 493 by 312 pixels.
|
||||
#
|
||||
##end
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 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.)
|
||||
|
||||
if(NOT CPACK_WIX_ROOT)
|
||||
file(TO_CMAKE_PATH "$ENV{WIX}" CPACK_WIX_ROOT)
|
||||
endif()
|
||||
|
||||
find_program(CPACK_WIX_CANDLE_EXECUTABLE candle
|
||||
PATHS "${CPACK_WIX_ROOT}/bin")
|
||||
|
||||
if(NOT CPACK_WIX_CANDLE_EXECUTABLE)
|
||||
message(FATAL_ERROR "Could not find the WiX candle executable.")
|
||||
endif()
|
||||
|
||||
find_program(CPACK_WIX_LIGHT_EXECUTABLE light
|
||||
PATHS "${CPACK_WIX_ROOT}/bin")
|
||||
|
||||
if(NOT CPACK_WIX_LIGHT_EXECUTABLE)
|
||||
message(FATAL_ERROR "Could not find the WiX light executable.")
|
||||
endif()
|
|
@ -35,7 +35,7 @@ if(NOT DEFINED CTEST_USE_LAUNCHERS AND DEFINED ENV{CTEST_USE_LAUNCHERS_DEFAULT})
|
|||
CACHE INTERNAL "CTEST_USE_LAUNCHERS initial value from ENV")
|
||||
endif()
|
||||
|
||||
if(NOT "${CMAKE_GENERATOR}" MATCHES "Make")
|
||||
if(NOT "${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
|
||||
set(CTEST_USE_LAUNCHERS 0)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ int main(int ac, char*av[]){
|
|||
pthread_create(&tid[0], 0, runner, (void*)1);
|
||||
pthread_create(&tid[1], 0, runner, (void*)2);
|
||||
|
||||
#if defined(__BEOS__) && !defined(__ZETA__) && !defined(__HAIKU__) // (no usleep on BeOS 5.)
|
||||
#if defined(__BEOS__) && !defined(__ZETA__) // (no usleep on BeOS 5.)
|
||||
usleep(1); // for strange behavior on single-processor sun
|
||||
#endif
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
set(CMAKE_LIBRARY_PATH_FLAG "--search_path=")
|
||||
set(CMAKE_LINK_LIBRARY_FLAG "--library=")
|
||||
set(CMAKE_INCLUDE_FLAG_ASM "--include_path=")
|
||||
|
||||
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> --compile_only --asm_file=<SOURCE> <DEFINES> <FLAGS> --output_file=<OBJECT>")
|
||||
set(CMAKE_ASM_LINK_EXECUTABLE "<CMAKE_ASM_COMPILER> <OBJECTS> --run_linker --output_file=<TARGET> <CMAKE_ASM_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>")
|
||||
|
||||
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS asm;s;abs)
|
|
@ -0,0 +1,10 @@
|
|||
set(CMAKE_LIBRARY_PATH_FLAG "--search_path=")
|
||||
set(CMAKE_LINK_LIBRARY_FLAG "--library=")
|
||||
set(CMAKE_INCLUDE_FLAG_C "--include_path=")
|
||||
|
||||
set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> --compile_only --skip_assembler --c_file=<SOURCE> <DEFINES> <FLAGS> --output_file=<ASSEMBLY_SOURCE>")
|
||||
set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> --preproc_only --c_file=<SOURCE> <DEFINES> <FLAGS> --output_file=<PREPROCESSED_SOURCE>")
|
||||
|
||||
set(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> --compile_only --c_file=<SOURCE> <DEFINES> <FLAGS> --output_file=<OBJECT>")
|
||||
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> -r <TARGET> <OBJECTS>")
|
||||
set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> --run_linker --output_file=<TARGET> --map_file=<TARGET>.map <CMAKE_C_LINK_FLAGS> <LINK_LIBRARIES> <LINK_FLAGS> <OBJECTS>")
|
|
@ -0,0 +1,10 @@
|
|||
set(CMAKE_LIBRARY_PATH_FLAG "--search_path=")
|
||||
set(CMAKE_LINK_LIBRARY_FLAG "--library=")
|
||||
set(CMAKE_INCLUDE_FLAG_CXX "--include_path=")
|
||||
|
||||
set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> --compile_only --skip_assembler --cpp_file=<SOURCE> <DEFINES> <FLAGS> --output_file=<ASSEMBLY_SOURCE>")
|
||||
set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> --preproc_only --cpp_file=<SOURCE> <DEFINES> <FLAGS> --output_file=<PREPROCESSED_SOURCE>")
|
||||
|
||||
set(CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> --compile_only --cpp_file=<SOURCE> <DEFINES> <FLAGS> --output_file=<OBJECT>")
|
||||
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> -r <TARGET> <OBJECTS>")
|
||||
set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER> --run_linker --output_file=<TARGET> --map_file=<TARGET>.map <CMAKE_CXX_LINK_FLAGS> <LINK_LIBRARIES> <LINK_FLAGS> <OBJECTS>")
|
|
@ -24,7 +24,6 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions=""
|
||||
MinimalRebuild="false"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
|
@ -35,9 +34,10 @@
|
|||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
IgnoreDefaultLibraryNames="libc"
|
||||
GenerateDebugInformation="false"
|
||||
SubSystem="1"
|
||||
TargetMachine="@id_machine_7@"
|
||||
SubSystem="@id_subsystem@"
|
||||
EntryPointSymbol="@id_entrypoint@"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
|
|
|
@ -83,6 +83,7 @@
|
|||
ONLY_ACTIVE_ARCH = YES;
|
||||
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
|
||||
SYMROOT = .;
|
||||
@id_toolset@
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
# The functions defined in this file depend on the fixup_bundle function
|
||||
# (and others) found in BundleUtilities.cmake
|
||||
|
||||
include(BundleUtilities)
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/BundleUtilities.cmake")
|
||||
set(DeployQt4_cmake_dir "${CMAKE_CURRENT_LIST_DIR}")
|
||||
set(DeployQt4_apple_plugins_dir "PlugIns")
|
||||
|
||||
|
|
|
@ -0,0 +1,761 @@
|
|||
# - Manage data files stored outside source tree
|
||||
# Use this module to unambiguously reference data files stored outside the
|
||||
# source tree and fetch them at build time from arbitrary local and remote
|
||||
# content-addressed locations. Functions provided by this module recognize
|
||||
# arguments with the syntax "DATA{<name>}" as references to external data,
|
||||
# replace them with full paths to local copies of those data, and create build
|
||||
# rules to fetch and update the local copies.
|
||||
#
|
||||
# The DATA{} syntax is literal and the <name> is a full or relative path
|
||||
# within the source tree. The source tree must contain either a real data
|
||||
# file at <name> or a "content link" at <name><ext> containing a hash of the
|
||||
# real file using a hash algorithm corresponding to <ext>. For example, the
|
||||
# argument "DATA{img.png}" may be satisfied by either a real "img.png" file in
|
||||
# the current source directory or a "img.png.md5" file containing its MD5 sum.
|
||||
#
|
||||
# The 'ExternalData_Expand_Arguments' function evaluates DATA{} references
|
||||
# in its arguments and constructs a new list of arguments:
|
||||
# ExternalData_Expand_Arguments(
|
||||
# <target> # Name of data management target
|
||||
# <outVar> # Output variable
|
||||
# [args...] # Input arguments, DATA{} allowed
|
||||
# )
|
||||
# It replaces each DATA{} reference in an argument with the full path of a
|
||||
# real data file on disk that will exist after the <target> builds.
|
||||
#
|
||||
# The 'ExternalData_Add_Test' function wraps around the CMake add_test()
|
||||
# command but supports DATA{} references in its arguments:
|
||||
# ExternalData_Add_Test(
|
||||
# <target> # Name of data management target
|
||||
# ... # Arguments of add_test(), DATA{} allowed
|
||||
# )
|
||||
# It passes its arguments through ExternalData_Expand_Arguments and then
|
||||
# invokes add_test() using the results.
|
||||
#
|
||||
# The 'ExternalData_Add_Target' function creates a custom target to manage
|
||||
# local instances of data files stored externally:
|
||||
# ExternalData_Add_Target(
|
||||
# <target> # Name of data management target
|
||||
# )
|
||||
# It creates custom commands in the target as necessary to make data files
|
||||
# available for each DATA{} reference previously evaluated by other functions
|
||||
# provided by this module. A list of URL templates must be provided in the
|
||||
# variable ExternalData_URL_TEMPLATES using the placeholders "%(algo)" and
|
||||
# "%(hash)" in each template. Data fetch rules try each URL template in order
|
||||
# by substituting the hash algorithm name for "%(algo)" and the hash value for
|
||||
# "%(hash)".
|
||||
#
|
||||
# The following hash algorithms are supported:
|
||||
# %(algo) <ext> Description
|
||||
# ------- ----- -----------
|
||||
# MD5 .md5 Message-Digest Algorithm 5, RFC 1321
|
||||
# SHA1 .sha1 US Secure Hash Algorithm 1, RFC 3174
|
||||
# SHA224 .sha224 US Secure Hash Algorithms, RFC 4634
|
||||
# SHA256 .sha256 US Secure Hash Algorithms, RFC 4634
|
||||
# SHA384 .sha384 US Secure Hash Algorithms, RFC 4634
|
||||
# SHA512 .sha512 US Secure Hash Algorithms, RFC 4634
|
||||
# Note that the hashes are used only for unique data identification and
|
||||
# download verification. This is not security software.
|
||||
#
|
||||
# Example usage:
|
||||
# include(ExternalData)
|
||||
# set(ExternalData_URL_TEMPLATES "file:///local/%(algo)/%(hash)"
|
||||
# "http://data.org/%(algo)/%(hash)")
|
||||
# ExternalData_Add_Test(MyData
|
||||
# NAME MyTest
|
||||
# COMMAND MyExe DATA{MyInput.png}
|
||||
# )
|
||||
# ExternalData_Add_Target(MyData)
|
||||
# When test "MyTest" runs the "DATA{MyInput.png}" argument will be replaced by
|
||||
# the full path to a real instance of the data file "MyInput.png" on disk. If
|
||||
# the source tree contains a content link such as "MyInput.png.md5" then the
|
||||
# "MyData" target creates a real "MyInput.png" in the build tree.
|
||||
#
|
||||
# The DATA{} syntax can be told to fetch a file series using the form
|
||||
# "DATA{<name>,:}", where the ":" is literal. If the source tree contains a
|
||||
# group of files or content links named like a series then a reference to one
|
||||
# member adds rules to fetch all of them. Although all members of a series
|
||||
# are fetched, only the file originally named by the DATA{} argument is
|
||||
# substituted for it. The default configuration recognizes file series names
|
||||
# ending with "#.ext", "_#.ext", ".#.ext", or "-#.ext" where "#" is a sequence
|
||||
# of decimal digits and ".ext" is any single extension. Configure it with a
|
||||
# regex that parses <number> and <suffix> parts from the end of <name>:
|
||||
# ExternalData_SERIES_PARSE = regex of the form (<number>)(<suffix>)$
|
||||
# For more complicated cases set:
|
||||
# ExternalData_SERIES_PARSE = regex with at least two () groups
|
||||
# ExternalData_SERIES_PARSE_PREFIX = <prefix> regex group number, if any
|
||||
# ExternalData_SERIES_PARSE_NUMBER = <number> regex group number
|
||||
# ExternalData_SERIES_PARSE_SUFFIX = <suffix> regex group number
|
||||
# Configure series number matching with a regex that matches the
|
||||
# <number> part of series members named <prefix><number><suffix>:
|
||||
# ExternalData_SERIES_MATCH = regex matching <number> in all series members
|
||||
# Note that the <suffix> of a series does not include a hash-algorithm
|
||||
# extension.
|
||||
#
|
||||
# The DATA{} syntax can alternatively match files associated with the named
|
||||
# file and contained in the same directory. Associated files may be specified
|
||||
# by options using the syntax DATA{<name>,<opt1>,<opt2>,...}. Each option may
|
||||
# specify one file by name or specify a regular expression to match file names
|
||||
# using the syntax REGEX:<regex>. For example, the arguments
|
||||
# DATA{MyData/MyInput.mhd,MyInput.img} # File pair
|
||||
# DATA{MyData/MyFrames00.png,REGEX:MyFrames[0-9]+\\.png} # Series
|
||||
# will pass MyInput.mha and MyFrames00.png on the command line but ensure
|
||||
# that the associated files are present next to them.
|
||||
#
|
||||
# The DATA{} syntax may reference a directory using a trailing slash and a
|
||||
# list of associated files. The form DATA{<name>/,<opt1>,<opt2>,...} adds
|
||||
# rules to fetch any files in the directory that match one of the associated
|
||||
# file options. For example, the argument DATA{MyDataDir/,REGEX:.*} will pass
|
||||
# the full path to a MyDataDir directory on the command line and ensure that
|
||||
# the directory contains files corresponding to every file or content link in
|
||||
# the MyDataDir source directory.
|
||||
#
|
||||
# The variable ExternalData_LINK_CONTENT may be set to the name of a supported
|
||||
# hash algorithm to enable automatic conversion of real data files referenced
|
||||
# by the DATA{} syntax into content links. For each such <file> a content
|
||||
# link named "<file><ext>" is created. The original file is renamed to the
|
||||
# form ".ExternalData_<algo>_<hash>" to stage it for future transmission to
|
||||
# one of the locations in the list of URL templates (by means outside the
|
||||
# scope of this module). The data fetch rule created for the content link
|
||||
# will use the staged object if it cannot be found using any URL template.
|
||||
#
|
||||
# The variable ExternalData_OBJECT_STORES may be set to a list of local
|
||||
# directories that store objects using the layout <dir>/%(algo)/%(hash).
|
||||
# These directories will be searched first for a needed object. If the object
|
||||
# is not available in any store then it will be fetched remotely using the URL
|
||||
# templates and added to the first local store listed. If no stores are
|
||||
# specified the default is a location inside the build tree.
|
||||
#
|
||||
# The variable ExternalData_SOURCE_ROOT may be set to the highest source
|
||||
# directory containing any path named by a DATA{} reference. The default is
|
||||
# CMAKE_SOURCE_DIR. ExternalData_SOURCE_ROOT and CMAKE_SOURCE_DIR must refer
|
||||
# to directories within a single source distribution (e.g. they come together
|
||||
# in one tarball).
|
||||
#
|
||||
# The variable ExternalData_BINARY_ROOT may be set to the directory to hold
|
||||
# the real data files named by expanded DATA{} references. The default is
|
||||
# CMAKE_BINARY_DIR. The directory layout will mirror that of content links
|
||||
# under ExternalData_SOURCE_ROOT.
|
||||
#
|
||||
# Variables ExternalData_TIMEOUT_INACTIVITY and ExternalData_TIMEOUT_ABSOLUTE
|
||||
# set the download inactivity and absolute timeouts, in seconds. The defaults
|
||||
# are 60 seconds and 300 seconds, respectively. Set either timeout to 0
|
||||
# seconds to disable enforcement.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2010-2013 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.)
|
||||
|
||||
function(ExternalData_add_test target)
|
||||
ExternalData_expand_arguments("${target}" testArgs ${ARGN})
|
||||
add_test(${testArgs})
|
||||
endfunction()
|
||||
|
||||
function(ExternalData_add_target target)
|
||||
if(NOT ExternalData_URL_TEMPLATES)
|
||||
message(FATAL_ERROR "ExternalData_URL_TEMPLATES is not set!")
|
||||
endif()
|
||||
if(NOT ExternalData_OBJECT_STORES)
|
||||
set(ExternalData_OBJECT_STORES ${CMAKE_BINARY_DIR}/ExternalData/Objects)
|
||||
endif()
|
||||
set(config ${CMAKE_CURRENT_BINARY_DIR}/${target}_config.cmake)
|
||||
configure_file(${_ExternalData_SELF_DIR}/ExternalData_config.cmake.in ${config} @ONLY)
|
||||
|
||||
set(files "")
|
||||
|
||||
# Set "_ExternalData_FILE_${file}" for each output file to avoid duplicate
|
||||
# rules. Use local data first to prefer real files over content links.
|
||||
|
||||
# Custom commands to copy or link local data.
|
||||
get_property(data_local GLOBAL PROPERTY _ExternalData_${target}_LOCAL)
|
||||
foreach(entry IN LISTS data_local)
|
||||
string(REPLACE "|" ";" tuple "${entry}")
|
||||
list(GET tuple 0 file)
|
||||
list(GET tuple 1 name)
|
||||
if(NOT DEFINED "_ExternalData_FILE_${file}")
|
||||
set("_ExternalData_FILE_${file}" 1)
|
||||
add_custom_command(
|
||||
COMMENT "Generating ${file}"
|
||||
OUTPUT "${file}"
|
||||
COMMAND ${CMAKE_COMMAND} -Drelative_top=${CMAKE_BINARY_DIR}
|
||||
-Dfile=${file} -Dname=${name}
|
||||
-DExternalData_ACTION=local
|
||||
-DExternalData_CONFIG=${config}
|
||||
-P ${_ExternalData_SELF}
|
||||
MAIN_DEPENDENCY "${name}"
|
||||
)
|
||||
list(APPEND files "${file}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Custom commands to fetch remote data.
|
||||
get_property(data_fetch GLOBAL PROPERTY _ExternalData_${target}_FETCH)
|
||||
foreach(entry IN LISTS data_fetch)
|
||||
string(REPLACE "|" ";" tuple "${entry}")
|
||||
list(GET tuple 0 file)
|
||||
list(GET tuple 1 name)
|
||||
list(GET tuple 2 ext)
|
||||
set(stamp "${ext}-stamp")
|
||||
if(NOT DEFINED "_ExternalData_FILE_${file}")
|
||||
set("_ExternalData_FILE_${file}" 1)
|
||||
add_custom_command(
|
||||
# Users care about the data file, so hide the hash/timestamp file.
|
||||
COMMENT "Generating ${file}"
|
||||
# The hash/timestamp file is the output from the build perspective.
|
||||
# List the real file as a second output in case it is a broken link.
|
||||
# The files must be listed in this order so CMake can hide from the
|
||||
# make tool that a symlink target may not be newer than the input.
|
||||
OUTPUT "${file}${stamp}" "${file}"
|
||||
# Run the data fetch/update script.
|
||||
COMMAND ${CMAKE_COMMAND} -Drelative_top=${CMAKE_BINARY_DIR}
|
||||
-Dfile=${file} -Dname=${name} -Dext=${ext}
|
||||
-DExternalData_ACTION=fetch
|
||||
-DExternalData_CONFIG=${config}
|
||||
-P ${_ExternalData_SELF}
|
||||
# Update whenever the object hash changes.
|
||||
MAIN_DEPENDENCY "${name}${ext}"
|
||||
)
|
||||
list(APPEND files "${file}${stamp}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Custom target to drive all update commands.
|
||||
add_custom_target(${target} ALL DEPENDS ${files})
|
||||
endfunction()
|
||||
|
||||
function(ExternalData_expand_arguments target outArgsVar)
|
||||
# Replace DATA{} references with real arguments.
|
||||
set(data_regex "DATA{([^{}\r\n]*)}")
|
||||
set(other_regex "([^D]|D[^A]|DA[^T]|DAT[^A]|DATA[^{])+|.")
|
||||
set(outArgs "")
|
||||
foreach(arg IN LISTS ARGN)
|
||||
if("x${arg}" MATCHES "${data_regex}")
|
||||
# Split argument into DATA{}-pieces and other pieces.
|
||||
string(REGEX MATCHALL "${data_regex}|${other_regex}" pieces "${arg}")
|
||||
# Compose output argument with DATA{}-pieces replaced.
|
||||
set(outArg "")
|
||||
foreach(piece IN LISTS pieces)
|
||||
if("x${piece}" MATCHES "^x${data_regex}$")
|
||||
# Replace this DATA{}-piece with a file path.
|
||||
string(REGEX REPLACE "${data_regex}" "\\1" data "${piece}")
|
||||
_ExternalData_arg("${target}" "${piece}" "${data}" file)
|
||||
set(outArg "${outArg}${file}")
|
||||
else()
|
||||
# No replacement needed for this piece.
|
||||
set(outArg "${outArg}${piece}")
|
||||
endif()
|
||||
endforeach()
|
||||
list(APPEND outArgs "${outArg}")
|
||||
else()
|
||||
# No replacements needed in this argument.
|
||||
list(APPEND outArgs "${arg}")
|
||||
endif()
|
||||
endforeach()
|
||||
set("${outArgsVar}" "${outArgs}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Private helper interface
|
||||
|
||||
set(_ExternalData_REGEX_ALGO "MD5|SHA1|SHA224|SHA256|SHA384|SHA512")
|
||||
set(_ExternalData_REGEX_EXT "md5|sha1|sha224|sha256|sha384|sha512")
|
||||
set(_ExternalData_SELF "${CMAKE_CURRENT_LIST_FILE}")
|
||||
get_filename_component(_ExternalData_SELF_DIR "${_ExternalData_SELF}" PATH)
|
||||
|
||||
function(_ExternalData_compute_hash var_hash algo file)
|
||||
if("${algo}" MATCHES "^${_ExternalData_REGEX_ALGO}$")
|
||||
file("${algo}" "${file}" hash)
|
||||
set("${var_hash}" "${hash}" PARENT_SCOPE)
|
||||
else()
|
||||
message(FATAL_ERROR "Hash algorithm ${algo} unimplemented.")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(_ExternalData_random var)
|
||||
string(RANDOM LENGTH 6 random)
|
||||
set("${var}" "${random}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(_ExternalData_exact_regex regex_var string)
|
||||
string(REGEX REPLACE "([][+.*()^])" "\\\\\\1" regex "${string}")
|
||||
set("${regex_var}" "${regex}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(_ExternalData_atomic_write file content)
|
||||
_ExternalData_random(random)
|
||||
set(tmp "${file}.tmp${random}")
|
||||
file(WRITE "${tmp}" "${content}")
|
||||
file(RENAME "${tmp}" "${file}")
|
||||
endfunction()
|
||||
|
||||
function(_ExternalData_link_content name var_ext)
|
||||
if("${ExternalData_LINK_CONTENT}" MATCHES "^(${_ExternalData_REGEX_ALGO})$")
|
||||
set(algo "${ExternalData_LINK_CONTENT}")
|
||||
else()
|
||||
message(FATAL_ERROR
|
||||
"Unknown hash algorithm specified by ExternalData_LINK_CONTENT:\n"
|
||||
" ${ExternalData_LINK_CONTENT}")
|
||||
endif()
|
||||
_ExternalData_compute_hash(hash "${algo}" "${name}")
|
||||
get_filename_component(dir "${name}" PATH)
|
||||
set(staged "${dir}/.ExternalData_${algo}_${hash}")
|
||||
string(TOLOWER ".${algo}" ext)
|
||||
_ExternalData_atomic_write("${name}${ext}" "${hash}\n")
|
||||
file(RENAME "${name}" "${staged}")
|
||||
set("${var_ext}" "${ext}" PARENT_SCOPE)
|
||||
|
||||
file(RELATIVE_PATH relname "${ExternalData_SOURCE_ROOT}" "${name}${ext}")
|
||||
message(STATUS "Linked ${relname} to ExternalData ${algo}/${hash}")
|
||||
endfunction()
|
||||
|
||||
function(_ExternalData_arg target arg options var_file)
|
||||
# Separate data path from the options.
|
||||
string(REPLACE "," ";" options "${options}")
|
||||
list(GET options 0 data)
|
||||
list(REMOVE_AT options 0)
|
||||
|
||||
# Interpret trailing slashes as directories.
|
||||
set(data_is_directory 0)
|
||||
if("x${data}" MATCHES "^x(.*)([/\\])$")
|
||||
set(data_is_directory 1)
|
||||
set(data "${CMAKE_MATCH_1}")
|
||||
endif()
|
||||
|
||||
# Convert to full path.
|
||||
if(IS_ABSOLUTE "${data}")
|
||||
set(absdata "${data}")
|
||||
else()
|
||||
set(absdata "${CMAKE_CURRENT_SOURCE_DIR}/${data}")
|
||||
endif()
|
||||
get_filename_component(absdata "${absdata}" ABSOLUTE)
|
||||
|
||||
# Convert to relative path under the source tree.
|
||||
if(NOT ExternalData_SOURCE_ROOT)
|
||||
set(ExternalData_SOURCE_ROOT "${CMAKE_SOURCE_DIR}")
|
||||
endif()
|
||||
set(top_src "${ExternalData_SOURCE_ROOT}")
|
||||
file(RELATIVE_PATH reldata "${top_src}" "${absdata}")
|
||||
if(IS_ABSOLUTE "${reldata}" OR "${reldata}" MATCHES "^\\.\\./")
|
||||
message(FATAL_ERROR "Data file referenced by argument\n"
|
||||
" ${arg}\n"
|
||||
"does not lie under the top-level source directory\n"
|
||||
" ${top_src}\n")
|
||||
endif()
|
||||
if(data_is_directory AND NOT IS_DIRECTORY "${top_src}/${reldata}")
|
||||
message(FATAL_ERROR "Data directory referenced by argument\n"
|
||||
" ${arg}\n"
|
||||
"corresponds to source tree path\n"
|
||||
" ${reldata}\n"
|
||||
"that does not exist as a directory!")
|
||||
endif()
|
||||
if(NOT ExternalData_BINARY_ROOT)
|
||||
set(ExternalData_BINARY_ROOT "${CMAKE_BINARY_DIR}")
|
||||
endif()
|
||||
set(top_bin "${ExternalData_BINARY_ROOT}")
|
||||
|
||||
# Handle in-source builds gracefully.
|
||||
if("${top_src}" STREQUAL "${top_bin}")
|
||||
if(ExternalData_LINK_CONTENT)
|
||||
message(WARNING "ExternalData_LINK_CONTENT cannot be used in-source")
|
||||
set(ExternalData_LINK_CONTENT 0)
|
||||
endif()
|
||||
set(top_same 1)
|
||||
endif()
|
||||
|
||||
set(external "") # Entries external to the source tree.
|
||||
set(internal "") # Entries internal to the source tree.
|
||||
set(have_original ${data_is_directory})
|
||||
|
||||
# Process options.
|
||||
set(series_option "")
|
||||
set(associated_files "")
|
||||
set(associated_regex "")
|
||||
foreach(opt ${options})
|
||||
if("x${opt}" MATCHES "^xREGEX:[^:/]+$")
|
||||
# Regular expression to match associated files.
|
||||
string(REGEX REPLACE "^REGEX:" "" regex "${opt}")
|
||||
list(APPEND associated_regex "${regex}")
|
||||
elseif("x${opt}" MATCHES "^x:$")
|
||||
# Activate series matching.
|
||||
set(series_option "${opt}")
|
||||
elseif("x${opt}" MATCHES "^[^][:/*?]+$")
|
||||
# Specific associated file.
|
||||
list(APPEND associated_files "${opt}")
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown option \"${opt}\" in argument\n"
|
||||
" ${arg}\n")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(series_option)
|
||||
if(data_is_directory)
|
||||
message(FATAL_ERROR "Series option \"${series_option}\" not allowed with directories.")
|
||||
endif()
|
||||
if(associated_files OR associated_regex)
|
||||
message(FATAL_ERROR "Series option \"${series_option}\" not allowed with associated files.")
|
||||
endif()
|
||||
# Load a whole file series.
|
||||
_ExternalData_arg_series()
|
||||
elseif(data_is_directory)
|
||||
if(associated_files OR associated_regex)
|
||||
# Load listed/matching associated files in the directory.
|
||||
_ExternalData_arg_associated()
|
||||
else()
|
||||
message(FATAL_ERROR "Data directory referenced by argument\n"
|
||||
" ${arg}\n"
|
||||
"must list associated files.")
|
||||
endif()
|
||||
else()
|
||||
# Load the named data file.
|
||||
_ExternalData_arg_single()
|
||||
if(associated_files OR associated_regex)
|
||||
# Load listed/matching associated files.
|
||||
_ExternalData_arg_associated()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT have_original)
|
||||
message(FATAL_ERROR "Data file referenced by argument\n"
|
||||
" ${arg}\n"
|
||||
"corresponds to source tree path\n"
|
||||
" ${reldata}\n"
|
||||
"that does not exist as a file (with or without an extension)!")
|
||||
endif()
|
||||
|
||||
if(external)
|
||||
# Make the series available in the build tree.
|
||||
set_property(GLOBAL APPEND PROPERTY
|
||||
_ExternalData_${target}_FETCH "${external}")
|
||||
set_property(GLOBAL APPEND PROPERTY
|
||||
_ExternalData_${target}_LOCAL "${internal}")
|
||||
set("${var_file}" "${top_bin}/${reldata}" PARENT_SCOPE)
|
||||
else()
|
||||
# The whole series is in the source tree.
|
||||
set("${var_file}" "${top_src}/${reldata}" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
macro(_ExternalData_arg_associated)
|
||||
# Associated files lie in the same directory.
|
||||
if(data_is_directory)
|
||||
set(reldir "${reldata}")
|
||||
else()
|
||||
get_filename_component(reldir "${reldata}" PATH)
|
||||
endif()
|
||||
if(reldir)
|
||||
set(reldir "${reldir}/")
|
||||
endif()
|
||||
_ExternalData_exact_regex(reldir_regex "${reldir}")
|
||||
|
||||
# Find files named explicitly.
|
||||
foreach(file ${associated_files})
|
||||
_ExternalData_exact_regex(file_regex "${file}")
|
||||
_ExternalData_arg_find_files("${reldir}${file}" "${reldir_regex}${file_regex}")
|
||||
endforeach()
|
||||
|
||||
# Find files matching the given regular expressions.
|
||||
set(all "")
|
||||
set(sep "")
|
||||
foreach(regex ${associated_regex})
|
||||
set(all "${all}${sep}${reldir_regex}${regex}")
|
||||
set(sep "|")
|
||||
endforeach()
|
||||
_ExternalData_arg_find_files("${reldir}" "${all}")
|
||||
endmacro()
|
||||
|
||||
macro(_ExternalData_arg_single)
|
||||
# Match only the named data by itself.
|
||||
_ExternalData_exact_regex(data_regex "${reldata}")
|
||||
_ExternalData_arg_find_files("${reldata}" "${data_regex}")
|
||||
endmacro()
|
||||
|
||||
macro(_ExternalData_arg_series)
|
||||
# Configure series parsing and matching.
|
||||
set(series_parse_prefix "")
|
||||
set(series_parse_number "\\1")
|
||||
set(series_parse_suffix "\\2")
|
||||
if(ExternalData_SERIES_PARSE)
|
||||
if(ExternalData_SERIES_PARSE_NUMBER AND ExternalData_SERIES_PARSE_SUFFIX)
|
||||
if(ExternalData_SERIES_PARSE_PREFIX)
|
||||
set(series_parse_prefix "\\${ExternalData_SERIES_PARSE_PREFIX}")
|
||||
endif()
|
||||
set(series_parse_number "\\${ExternalData_SERIES_PARSE_NUMBER}")
|
||||
set(series_parse_suffix "\\${ExternalData_SERIES_PARSE_SUFFIX}")
|
||||
elseif(NOT "x${ExternalData_SERIES_PARSE}" MATCHES "^x\\([^()]*\\)\\([^()]*\\)\\$$")
|
||||
message(FATAL_ERROR
|
||||
"ExternalData_SERIES_PARSE is set to\n"
|
||||
" ${ExternalData_SERIES_PARSE}\n"
|
||||
"which is not of the form\n"
|
||||
" (<number>)(<suffix>)$\n"
|
||||
"Fix the regular expression or set variables\n"
|
||||
" ExternalData_SERIES_PARSE_PREFIX = <prefix> regex group number, if any\n"
|
||||
" ExternalData_SERIES_PARSE_NUMBER = <number> regex group number\n"
|
||||
" ExternalData_SERIES_PARSE_SUFFIX = <suffix> regex group number\n"
|
||||
)
|
||||
endif()
|
||||
set(series_parse "${ExternalData_SERIES_PARSE}")
|
||||
else()
|
||||
set(series_parse "([0-9]*)(\\.[^./]*)$")
|
||||
endif()
|
||||
if(ExternalData_SERIES_MATCH)
|
||||
set(series_match "${ExternalData_SERIES_MATCH}")
|
||||
else()
|
||||
set(series_match "[_.-]?[0-9]*")
|
||||
endif()
|
||||
|
||||
# Parse the base, number, and extension components of the series.
|
||||
string(REGEX REPLACE "${series_parse}" "${series_parse_prefix};${series_parse_number};${series_parse_suffix}" tuple "${reldata}")
|
||||
list(LENGTH tuple len)
|
||||
if(NOT "${len}" EQUAL 3)
|
||||
message(FATAL_ERROR "Data file referenced by argument\n"
|
||||
" ${arg}\n"
|
||||
"corresponds to path\n"
|
||||
" ${reldata}\n"
|
||||
"that does not match regular expression\n"
|
||||
" ${series_parse}")
|
||||
endif()
|
||||
list(GET tuple 0 relbase)
|
||||
list(GET tuple 2 ext)
|
||||
|
||||
# Glob files that might match the series.
|
||||
# Then match base, number, and extension.
|
||||
_ExternalData_exact_regex(series_base "${relbase}")
|
||||
_ExternalData_exact_regex(series_ext "${ext}")
|
||||
_ExternalData_arg_find_files("${relbase}*${ext}"
|
||||
"${series_base}${series_match}${series_ext}")
|
||||
endmacro()
|
||||
|
||||
function(_ExternalData_arg_find_files pattern regex)
|
||||
file(GLOB globbed RELATIVE "${top_src}" "${top_src}/${pattern}*")
|
||||
foreach(entry IN LISTS globbed)
|
||||
if("x${entry}" MATCHES "^x(.*)(\\.(${_ExternalData_REGEX_EXT}))$")
|
||||
set(relname "${CMAKE_MATCH_1}")
|
||||
set(alg "${CMAKE_MATCH_2}")
|
||||
else()
|
||||
set(relname "${entry}")
|
||||
set(alg "")
|
||||
endif()
|
||||
if("x${relname}" MATCHES "^x${regex}$" AND NOT IS_DIRECTORY "${top_src}/${entry}")
|
||||
set(name "${top_src}/${relname}")
|
||||
set(file "${top_bin}/${relname}")
|
||||
if(alg)
|
||||
list(APPEND external "${file}|${name}|${alg}")
|
||||
elseif(ExternalData_LINK_CONTENT)
|
||||
_ExternalData_link_content("${name}" alg)
|
||||
list(APPEND external "${file}|${name}|${alg}")
|
||||
elseif(NOT top_same)
|
||||
list(APPEND internal "${file}|${name}")
|
||||
endif()
|
||||
if("${relname}" STREQUAL "${reldata}")
|
||||
set(have_original 1)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
set(external "${external}" PARENT_SCOPE)
|
||||
set(internal "${internal}" PARENT_SCOPE)
|
||||
set(have_original "${have_original}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Private script mode interface
|
||||
|
||||
if(CMAKE_GENERATOR OR NOT ExternalData_ACTION)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(ExternalData_CONFIG)
|
||||
include(${ExternalData_CONFIG})
|
||||
endif()
|
||||
if(NOT ExternalData_URL_TEMPLATES)
|
||||
message(FATAL_ERROR "No ExternalData_URL_TEMPLATES set!")
|
||||
endif()
|
||||
|
||||
function(_ExternalData_link_or_copy src dst)
|
||||
# Create a temporary file first.
|
||||
get_filename_component(dst_dir "${dst}" PATH)
|
||||
file(MAKE_DIRECTORY "${dst_dir}")
|
||||
_ExternalData_random(random)
|
||||
set(tmp "${dst}.tmp${random}")
|
||||
if(UNIX)
|
||||
# Create a symbolic link.
|
||||
set(tgt "${src}")
|
||||
if(relative_top)
|
||||
# Use relative path if files are close enough.
|
||||
file(RELATIVE_PATH relsrc "${relative_top}" "${src}")
|
||||
file(RELATIVE_PATH relfile "${relative_top}" "${dst}")
|
||||
if(NOT IS_ABSOLUTE "${relsrc}" AND NOT "${relsrc}" MATCHES "^\\.\\./" AND
|
||||
NOT IS_ABSOLUTE "${reldst}" AND NOT "${reldst}" MATCHES "^\\.\\./")
|
||||
file(RELATIVE_PATH tgt "${dst_dir}" "${src}")
|
||||
endif()
|
||||
endif()
|
||||
execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${tgt}" "${tmp}" RESULT_VARIABLE result)
|
||||
else()
|
||||
# Create a copy.
|
||||
execute_process(COMMAND "${CMAKE_COMMAND}" -E copy "${src}" "${tmp}" RESULT_VARIABLE result)
|
||||
endif()
|
||||
if(result)
|
||||
file(REMOVE "${tmp}")
|
||||
message(FATAL_ERROR "Failed to create\n ${tmp}\nfrom\n ${obj}")
|
||||
endif()
|
||||
|
||||
# Atomically create/replace the real destination.
|
||||
file(RENAME "${tmp}" "${dst}")
|
||||
endfunction()
|
||||
|
||||
function(_ExternalData_download_file url file err_var msg_var)
|
||||
set(retry 3)
|
||||
while(retry)
|
||||
math(EXPR retry "${retry} - 1")
|
||||
if(ExternalData_TIMEOUT_INACTIVITY)
|
||||
set(inactivity_timeout INACTIVITY_TIMEOUT ${ExternalData_TIMEOUT_INACTIVITY})
|
||||
elseif(NOT "${ExternalData_TIMEOUT_INACTIVITY}" EQUAL 0)
|
||||
set(inactivity_timeout INACTIVITY_TIMEOUT 60)
|
||||
else()
|
||||
set(inactivity_timeout "")
|
||||
endif()
|
||||
if(ExternalData_TIMEOUT_ABSOLUTE)
|
||||
set(absolute_timeout TIMEOUT ${ExternalData_TIMEOUT_ABSOLUTE})
|
||||
elseif(NOT "${ExternalData_TIMEOUT_ABSOLUTE}" EQUAL 0)
|
||||
set(absolute_timeout TIMEOUT 300)
|
||||
else()
|
||||
set(absolute_timeout "")
|
||||
endif()
|
||||
file(DOWNLOAD "${url}" "${file}" STATUS status LOG log ${inactivity_timeout} ${absolute_timeout} SHOW_PROGRESS)
|
||||
list(GET status 0 err)
|
||||
list(GET status 1 msg)
|
||||
if(err)
|
||||
if("${msg}" MATCHES "HTTP response code said error" AND
|
||||
"${log}" MATCHES "error: 503")
|
||||
set(msg "temporarily unavailable")
|
||||
endif()
|
||||
elseif("${log}" MATCHES "\nHTTP[^\n]* 503")
|
||||
set(err TRUE)
|
||||
set(msg "temporarily unavailable")
|
||||
endif()
|
||||
if(NOT err OR NOT "${msg}" MATCHES "partial|timeout|temporarily")
|
||||
break()
|
||||
elseif(retry)
|
||||
message(STATUS "[download terminated: ${msg}, retries left: ${retry}]")
|
||||
endif()
|
||||
endwhile()
|
||||
set("${err_var}" "${err}" PARENT_SCOPE)
|
||||
set("${msg_var}" "${msg}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(_ExternalData_download_object name hash algo var_obj)
|
||||
# Search all object stores for an existing object.
|
||||
foreach(dir ${ExternalData_OBJECT_STORES})
|
||||
set(obj "${dir}/${algo}/${hash}")
|
||||
if(EXISTS "${obj}")
|
||||
message(STATUS "Found object: \"${obj}\"")
|
||||
set("${var_obj}" "${obj}" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Download object to the first store.
|
||||
list(GET ExternalData_OBJECT_STORES 0 store)
|
||||
set(obj "${store}/${algo}/${hash}")
|
||||
|
||||
_ExternalData_random(random)
|
||||
set(tmp "${obj}.tmp${random}")
|
||||
set(found 0)
|
||||
set(tried "")
|
||||
foreach(url_template IN LISTS ExternalData_URL_TEMPLATES)
|
||||
string(REPLACE "%(hash)" "${hash}" url_tmp "${url_template}")
|
||||
string(REPLACE "%(algo)" "${algo}" url "${url_tmp}")
|
||||
message(STATUS "Fetching \"${url}\"")
|
||||
_ExternalData_download_file("${url}" "${tmp}" err errMsg)
|
||||
set(tried "${tried}\n ${url}")
|
||||
if(err)
|
||||
set(tried "${tried} (${errMsg})")
|
||||
else()
|
||||
# Verify downloaded object.
|
||||
_ExternalData_compute_hash(dl_hash "${algo}" "${tmp}")
|
||||
if("${dl_hash}" STREQUAL "${hash}")
|
||||
set(found 1)
|
||||
break()
|
||||
else()
|
||||
set(tried "${tried} (wrong hash ${algo}=${dl_hash})")
|
||||
if("$ENV{ExternalData_DEBUG_DOWNLOAD}" MATCHES ".")
|
||||
file(RENAME "${tmp}" "${store}/${algo}/${dl_hash}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
file(REMOVE "${tmp}")
|
||||
endforeach()
|
||||
|
||||
get_filename_component(dir "${name}" PATH)
|
||||
set(staged "${dir}/.ExternalData_${algo}_${hash}")
|
||||
|
||||
if(found)
|
||||
file(RENAME "${tmp}" "${obj}")
|
||||
message(STATUS "Downloaded object: \"${obj}\"")
|
||||
elseif(EXISTS "${staged}")
|
||||
set(obj "${staged}")
|
||||
message(STATUS "Staged object: \"${obj}\"")
|
||||
else()
|
||||
message(FATAL_ERROR "Object ${algo}=${hash} not found at:${tried}")
|
||||
endif()
|
||||
|
||||
set("${var_obj}" "${obj}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
if("${ExternalData_ACTION}" STREQUAL "fetch")
|
||||
foreach(v ExternalData_OBJECT_STORES file name ext)
|
||||
if(NOT DEFINED "${v}")
|
||||
message(FATAL_ERROR "No \"-D${v}=\" value provided!")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
file(READ "${name}${ext}" hash)
|
||||
string(STRIP "${hash}" hash)
|
||||
|
||||
if("${ext}" MATCHES "^\\.(${_ExternalData_REGEX_EXT})$")
|
||||
string(TOUPPER "${CMAKE_MATCH_1}" algo)
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown hash algorithm extension \"${ext}\"")
|
||||
endif()
|
||||
|
||||
_ExternalData_download_object("${name}" "${hash}" "${algo}" obj)
|
||||
|
||||
# Check if file already corresponds to the object.
|
||||
set(stamp "${ext}-stamp")
|
||||
set(file_up_to_date 0)
|
||||
if(EXISTS "${file}" AND EXISTS "${file}${stamp}")
|
||||
file(READ "${file}${stamp}" f_hash)
|
||||
string(STRIP "${f_hash}" f_hash)
|
||||
if("${f_hash}" STREQUAL "${hash}")
|
||||
#message(STATUS "File already corresponds to object")
|
||||
set(file_up_to_date 1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(file_up_to_date)
|
||||
# Touch the file to convince the build system it is up to date.
|
||||
execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${file}")
|
||||
else()
|
||||
_ExternalData_link_or_copy("${obj}" "${file}")
|
||||
endif()
|
||||
|
||||
# Atomically update the hash/timestamp file to record the object referenced.
|
||||
_ExternalData_atomic_write("${file}${stamp}" "${hash}\n")
|
||||
elseif("${ExternalData_ACTION}" STREQUAL "local")
|
||||
foreach(v file name)
|
||||
if(NOT DEFINED "${v}")
|
||||
message(FATAL_ERROR "No \"-D${v}=\" value provided!")
|
||||
endif()
|
||||
endforeach()
|
||||
_ExternalData_link_or_copy("${name}" "${file}")
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown ExternalData_ACTION=[${ExternalData_ACTION}]")
|
||||
endif()
|
|
@ -0,0 +1,4 @@
|
|||
set(ExternalData_OBJECT_STORES "@ExternalData_OBJECT_STORES@")
|
||||
set(ExternalData_URL_TEMPLATES "@ExternalData_URL_TEMPLATES@")
|
||||
set(ExternalData_TIMEOUT_INACTIVITY "@ExternalData_TIMEOUT_INACTIVITY@")
|
||||
set(ExternalData_TIMEOUT_ABSOLUTE "@ExternalData_TIMEOUT_ABSOLUTE@")
|
|
@ -38,6 +38,7 @@
|
|||
# [CONFIGURE_COMMAND cmd...] # Build tree configuration command
|
||||
# [CMAKE_COMMAND /.../cmake] # Specify alternative cmake executable
|
||||
# [CMAKE_GENERATOR gen] # Specify generator for native build
|
||||
# [CMAKE_GENERATOR_TOOLSET t] # Generator-specific toolset name
|
||||
# [CMAKE_ARGS args...] # Arguments to CMake command line
|
||||
# [CMAKE_CACHE_ARGS args...] # Initial cache arguments, of the form -Dvar:string=on
|
||||
# #--Build step-----------------
|
||||
|
@ -402,6 +403,79 @@ endif()
|
|||
endfunction()
|
||||
|
||||
|
||||
function(_ep_write_gitupdate_script script_filename git_EXECUTABLE git_tag git_repository 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 \"${git_EXECUTABLE}\" rev-list --max-count=1 HEAD
|
||||
WORKING_DIRECTORY \"${work_dir}\"
|
||||
RESULT_VARIABLE error_code
|
||||
OUTPUT_VARIABLE head_sha
|
||||
)
|
||||
if(error_code)
|
||||
message(FATAL_ERROR \"Failed to get the hash for HEAD\")
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND \"${git_EXECUTABLE}\" show-ref ${git_tag}
|
||||
WORKING_DIRECTORY \"${work_dir}\"
|
||||
OUTPUT_VARIABLE show_ref_output
|
||||
)
|
||||
# If a remote ref is asked for, which can possibly move around,
|
||||
# we must always do a fetch and checkout.
|
||||
if(\"\${show_ref_output}\" MATCHES \"remotes\")
|
||||
set(is_remote_ref 1)
|
||||
else()
|
||||
set(is_remote_ref 0)
|
||||
endif()
|
||||
|
||||
# This will fail if the tag does not exist (it probably has not been fetched
|
||||
# yet).
|
||||
execute_process(
|
||||
COMMAND \"${git_EXECUTABLE}\" rev-list --max-count=1 ${git_tag}
|
||||
WORKING_DIRECTORY \"${work_dir}\"
|
||||
RESULT_VARIABLE error_code
|
||||
OUTPUT_VARIABLE tag_sha
|
||||
)
|
||||
|
||||
# Is the hash checkout out that we want?
|
||||
if(error_code OR is_remote_ref OR NOT (\"\${tag_sha}\" STREQUAL \"\${head_sha}\"))
|
||||
execute_process(
|
||||
COMMAND \"${git_EXECUTABLE}\" fetch
|
||||
WORKING_DIRECTORY \"${work_dir}\"
|
||||
RESULT_VARIABLE error_code
|
||||
)
|
||||
if(error_code)
|
||||
message(FATAL_ERROR \"Failed to fetch repository '${git_repository}'\")
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND \"${git_EXECUTABLE}\" checkout ${git_tag}
|
||||
WORKING_DIRECTORY \"${work_dir}\"
|
||||
RESULT_VARIABLE error_code
|
||||
)
|
||||
if(error_code)
|
||||
message(FATAL_ERROR \"Failed to checkout tag: '${git_tag}'\")
|
||||
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()
|
||||
endif()
|
||||
|
||||
"
|
||||
)
|
||||
|
||||
endfunction(_ep_write_gitupdate_script)
|
||||
|
||||
function(_ep_write_downloadfile_script script_filename remote local timeout hash tls_verify tls_cainfo)
|
||||
if(timeout)
|
||||
set(timeout_args TIMEOUT ${timeout})
|
||||
|
@ -1354,7 +1428,7 @@ endfunction()
|
|||
|
||||
|
||||
function(_ep_add_update_command name)
|
||||
ExternalProject_Get_Property(${name} source_dir)
|
||||
ExternalProject_Get_Property(${name} source_dir tmp_dir)
|
||||
|
||||
get_property(cmd_set TARGET ${name} PROPERTY _EP_UPDATE_COMMAND SET)
|
||||
get_property(cmd TARGET ${name} PROPERTY _EP_UPDATE_COMMAND)
|
||||
|
@ -1406,15 +1480,15 @@ function(_ep_add_update_command name)
|
|||
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}'")
|
||||
set(comment "Performing update step 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
|
||||
_ep_write_gitupdate_script(${tmp_dir}/${name}-gitupdate.cmake
|
||||
${GIT_EXECUTABLE} ${git_tag} ${git_repository} ${work_dir}
|
||||
)
|
||||
set(cmd ${CMAKE_COMMAND} -P ${tmp_dir}/${name}-gitupdate.cmake)
|
||||
set(always 1)
|
||||
elseif(hg_repository)
|
||||
if(NOT HG_EXECUTABLE)
|
||||
|
@ -1485,8 +1559,11 @@ function(_ep_add_configure_command name)
|
|||
set(file_deps)
|
||||
get_property(deps TARGET ${name} PROPERTY _EP_DEPENDS)
|
||||
foreach(dep IN LISTS deps)
|
||||
get_property(is_ep TARGET ${dep} PROPERTY _EP_IS_EXTERNAL_PROJECT)
|
||||
if(is_ep)
|
||||
_ep_get_step_stampfile(${dep} "done" done_stamp_file)
|
||||
list(APPEND file_deps ${done_stamp_file})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
get_property(cmd_set TARGET ${name} PROPERTY _EP_CONFIGURE_COMMAND SET)
|
||||
|
@ -1512,16 +1589,27 @@ function(_ep_add_configure_command name)
|
|||
endif()
|
||||
|
||||
get_target_property(cmake_generator ${name} _EP_CMAKE_GENERATOR)
|
||||
get_target_property(cmake_generator_toolset ${name} _EP_CMAKE_GENERATOR_TOOLSET)
|
||||
if(cmake_generator)
|
||||
list(APPEND cmd "-G${cmake_generator}" "${source_dir}")
|
||||
list(APPEND cmd "-G${cmake_generator}")
|
||||
if(cmake_generator_toolset)
|
||||
list(APPEND cmd "-T${cmake_generator_toolset}")
|
||||
endif()
|
||||
else()
|
||||
if(CMAKE_EXTRA_GENERATOR)
|
||||
list(APPEND cmd "-G${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}"
|
||||
"${source_dir}")
|
||||
list(APPEND cmd "-G${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}")
|
||||
else()
|
||||
list(APPEND cmd "-G${CMAKE_GENERATOR}" "${source_dir}")
|
||||
list(APPEND cmd "-G${CMAKE_GENERATOR}")
|
||||
endif()
|
||||
if(cmake_generator_toolset)
|
||||
message(FATAL_ERROR "Option CMAKE_GENERATOR_TOOLSET not allowed without CMAKE_GENERATOR.")
|
||||
endif()
|
||||
if(CMAKE_GENERATOR_TOOLSET)
|
||||
list(APPEND cmd "-T${CMAKE_GENERATOR_TOOLSET}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(APPEND cmd "${source_dir}")
|
||||
endif()
|
||||
|
||||
# If anything about the configure command changes, (command itself, cmake
|
||||
|
|
|
@ -177,7 +177,7 @@
|
|||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
include(CMakeParseArguments)
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake")
|
||||
|
||||
|
||||
function(ADD_FEATURE_INFO _name _enabled _desc)
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
find_program(BISON_EXECUTABLE bison DOC "path to the bison executable")
|
||||
find_program(BISON_EXECUTABLE NAMES bison win_bison DOC "path to the bison executable")
|
||||
mark_as_advanced(BISON_EXECUTABLE)
|
||||
|
||||
if(BISON_EXECUTABLE)
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
include(CheckFunctionExists)
|
||||
include(CheckFortranFunctionExists)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CheckFunctionExists.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CheckFortranFunctionExists.cmake)
|
||||
|
||||
set(_blas_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(BZip2
|
|||
VERSION_VAR BZIP2_VERSION_STRING)
|
||||
|
||||
if (BZIP2_FOUND)
|
||||
include(CheckLibraryExists)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CheckLibraryExists.cmake)
|
||||
CHECK_LIBRARY_EXISTS("${BZIP2_LIBRARIES}" BZ2_bzCompressInit "" BZIP2_NEED_PREFIX)
|
||||
endif ()
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -33,6 +33,8 @@ macro(_FIND_BULLET_LIBRARY _var)
|
|||
${ARGN}
|
||||
HINTS
|
||||
${BULLET_ROOT}
|
||||
${BULLET_ROOT}/lib/Release
|
||||
${BULLET_ROOT}/lib/Debug
|
||||
${BULLET_ROOT}/out/release8/libs
|
||||
${BULLET_ROOT}/out/debug8/libs
|
||||
PATH_SUFFIXES lib
|
||||
|
|
|
@ -28,7 +28,7 @@ find_path(CUPS_INCLUDE_DIR cups/cups.h )
|
|||
find_library(CUPS_LIBRARIES NAMES cups )
|
||||
|
||||
if (CUPS_INCLUDE_DIR AND CUPS_LIBRARIES AND CUPS_REQUIRE_IPP_DELETE_ATTRIBUTE)
|
||||
include(CheckLibraryExists)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CheckLibraryExists.cmake)
|
||||
|
||||
# ippDeleteAttribute is new in cups-1.1.19 (and used by kdeprint)
|
||||
CHECK_LIBRARY_EXISTS(cups ippDeleteAttribute "" CUPS_HAS_IPP_DELETE_ATTRIBUTE)
|
||||
|
|
|
@ -56,7 +56,7 @@ endif()
|
|||
# prefix as the library was found, if still not found, try curses.h with the
|
||||
# default search paths.
|
||||
if(CURSES_CURSES_LIBRARY AND CURSES_NEED_NCURSES)
|
||||
include(CheckLibraryExists)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CheckLibraryExists.cmake)
|
||||
CHECK_LIBRARY_EXISTS("${CURSES_CURSES_LIBRARY}"
|
||||
wsyncup "" CURSES_CURSES_HAS_WSYNCUP)
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
find_program(FLEX_EXECUTABLE flex DOC "path to the flex executable")
|
||||
find_program(FLEX_EXECUTABLE NAMES flex win_flex DOC "path to the flex executable")
|
||||
mark_as_advanced(FLEX_EXECUTABLE)
|
||||
|
||||
find_library(FL_LIBRARY NAMES fl
|
||||
|
@ -93,10 +93,12 @@ if(FLEX_EXECUTABLE)
|
|||
else()
|
||||
# older versions of flex printed "/full/path/to/executable version X.Y"
|
||||
# newer versions use "basename(executable) X.Y"
|
||||
get_filename_component(FLEX_EXE_NAME "${FLEX_EXECUTABLE}" NAME)
|
||||
string(REGEX REPLACE "^.*${FLEX_EXE_NAME}\"? (version )?([0-9]+[^ ]*)( .*)?$" "\\2"
|
||||
get_filename_component(FLEX_EXE_NAME_WE "${FLEX_EXECUTABLE}" NAME_WE)
|
||||
get_filename_component(FLEX_EXE_EXT "${FLEX_EXECUTABLE}" EXT)
|
||||
string(REGEX REPLACE "^.*${FLEX_EXE_NAME_WE}(${FLEX_EXE_EXT})?\"? (version )?([0-9]+[^ ]*)( .*)?$" "\\3"
|
||||
FLEX_VERSION "${FLEX_version_output}")
|
||||
unset(FLEX_EXE_NAME)
|
||||
unset(FLEX_EXE_EXT)
|
||||
unset(FLEX_EXE_NAME_WE)
|
||||
endif()
|
||||
|
||||
#============================================================
|
||||
|
|
|
@ -58,7 +58,7 @@ if(WIN32)
|
|||
endif()
|
||||
|
||||
if(UNIX)
|
||||
include(FindX11)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindX11.cmake)
|
||||
find_library(FLTK_MATH_LIBRARY m)
|
||||
set( FLTK_PLATFORM_DEPENDENT_LIBS ${X11_LIBRARIES} ${FLTK_MATH_LIBRARY})
|
||||
endif()
|
||||
|
|
|
@ -46,6 +46,7 @@ find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
|
|||
HINTS
|
||||
ENV FREETYPE_DIR
|
||||
PATHS
|
||||
/usr/X11R6
|
||||
/usr/local/X11R6
|
||||
/usr/local/X11
|
||||
/usr/freeware
|
||||
|
@ -56,6 +57,7 @@ find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
|
|||
HINTS
|
||||
ENV FREETYPE_DIR
|
||||
PATHS
|
||||
/usr/X11R6
|
||||
/usr/local/X11R6
|
||||
/usr/local/X11
|
||||
/usr/freeware
|
||||
|
@ -68,6 +70,7 @@ find_library(FREETYPE_LIBRARY
|
|||
ENV FREETYPE_DIR
|
||||
PATH_SUFFIXES lib
|
||||
PATHS
|
||||
/usr/X11R6
|
||||
/usr/local/X11R6
|
||||
/usr/local/X11
|
||||
/usr/freeware
|
||||
|
|
|
@ -58,8 +58,8 @@ set(GIF_LIBRARIES ${GIF_LIBRARY})
|
|||
# one.
|
||||
# http://giflib.sourcearchive.com/documentation/4.1.4/files.html
|
||||
if(GIF_INCLUDE_DIR)
|
||||
include(CMakePushCheckState)
|
||||
include(CheckStructHasMember)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CMakePushCheckState.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CheckStructHasMember.cmake)
|
||||
CMAKE_PUSH_CHECK_STATE()
|
||||
set(GIF_VERSION 3)
|
||||
set(CMAKE_REQUIRED_INCLUDES "${GIF_INCLUDE_DIR}")
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
message(STATUS
|
||||
"WARNING: you are using the obsolete 'GLU' package, please use 'OpenGL' instead")
|
||||
|
||||
include(FindOpenGL)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindOpenGL.cmake)
|
||||
|
||||
if (OPENGL_GLU_FOUND)
|
||||
set (GLU_LIBRARY ${OPENGL_LIBRARIES})
|
||||
|
|
|
@ -40,17 +40,12 @@ else ()
|
|||
set(GLUT_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX")
|
||||
else ()
|
||||
|
||||
find_path( GLUT_INCLUDE_DIR GL/glut.h
|
||||
/usr/include/GL
|
||||
/usr/openwin/share/include
|
||||
/usr/openwin/include
|
||||
/opt/graphics/OpenGL/include
|
||||
/opt/graphics/OpenGL/contrib/libglut
|
||||
)
|
||||
if (BEOS)
|
||||
|
||||
find_library( GLUT_glut_LIBRARY glut
|
||||
/usr/openwin/lib
|
||||
)
|
||||
set(_GLUT_INC_DIR /boot/develop/headers/os/opengl)
|
||||
set(_GLUT_glut_LIB_DIR /boot/develop/lib/x86)
|
||||
|
||||
else()
|
||||
|
||||
find_library( GLUT_Xi_LIBRARY Xi
|
||||
/usr/openwin/lib
|
||||
|
@ -62,6 +57,25 @@ else ()
|
|||
|
||||
endif ()
|
||||
|
||||
find_path( GLUT_INCLUDE_DIR GL/glut.h
|
||||
/usr/include/GL
|
||||
/usr/openwin/share/include
|
||||
/usr/openwin/include
|
||||
/opt/graphics/OpenGL/include
|
||||
/opt/graphics/OpenGL/contrib/libglut
|
||||
${_GLUT_INC_DIR}
|
||||
)
|
||||
|
||||
find_library( GLUT_glut_LIBRARY glut
|
||||
/usr/openwin/lib
|
||||
${_GLUT_glut_LIB_DIR}
|
||||
)
|
||||
|
||||
unset(_GLUT_INC_DIR)
|
||||
unset(_GLUT_glut_LIB_DIR)
|
||||
|
||||
endif ()
|
||||
|
||||
endif ()
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
||||
|
|
|
@ -439,28 +439,19 @@ list(APPEND GTK2_LIBRARIES ${FREETYPE_LIBRARIES})
|
|||
|
||||
foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
|
||||
if(_GTK2_component STREQUAL "gtk")
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GLIB_INCLUDE_DIR glib.h)
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GLIBCONFIG_INCLUDE_DIR glibconfig.h)
|
||||
_GTK2_FIND_LIBRARY (GTK2_GLIB_LIBRARY glib false true)
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GOBJECT_INCLUDE_DIR gobject/gobject.h)
|
||||
_GTK2_FIND_LIBRARY (GTK2_GOBJECT_LIBRARY gobject false true)
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GDK_PIXBUF_INCLUDE_DIR gdk-pixbuf/gdk-pixbuf.h)
|
||||
_GTK2_FIND_LIBRARY (GTK2_GDK_PIXBUF_LIBRARY gdk_pixbuf false true)
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GDK_INCLUDE_DIR gdk/gdk.h)
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GDKCONFIG_INCLUDE_DIR gdkconfig.h)
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GTK_INCLUDE_DIR gtk/gtk.h)
|
||||
|
||||
if(UNIX)
|
||||
_GTK2_FIND_LIBRARY (GTK2_GDK_LIBRARY gdk-x11 false true)
|
||||
_GTK2_FIND_LIBRARY (GTK2_GTK_LIBRARY gtk-x11 false true)
|
||||
_GTK2_FIND_LIBRARY (GTK2_GDK_LIBRARY gdk-x11 false true)
|
||||
else()
|
||||
_GTK2_FIND_LIBRARY (GTK2_GDK_LIBRARY gdk-win32 false true)
|
||||
_GTK2_FIND_LIBRARY (GTK2_GTK_LIBRARY gtk-win32 false true)
|
||||
_GTK2_FIND_LIBRARY (GTK2_GDK_LIBRARY gdk-win32 false true)
|
||||
endif()
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GDK_INCLUDE_DIR gdk/gdk.h)
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GDKCONFIG_INCLUDE_DIR gdkconfig.h)
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_CAIRO_INCLUDE_DIR cairo.h)
|
||||
_GTK2_FIND_LIBRARY (GTK2_CAIRO_LIBRARY cairo false false)
|
||||
|
||||
|
@ -469,35 +460,40 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
|
|||
_GTK2_FIND_INCLUDE_DIR(GTK2_PANGO_INCLUDE_DIR pango/pango.h)
|
||||
_GTK2_FIND_LIBRARY (GTK2_PANGO_LIBRARY pango false true)
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GDK_PIXBUF_INCLUDE_DIR gdk-pixbuf/gdk-pixbuf.h)
|
||||
_GTK2_FIND_LIBRARY (GTK2_GDK_PIXBUF_LIBRARY gdk_pixbuf false true)
|
||||
|
||||
_GTK2_FIND_LIBRARY (GTK2_GIO_LIBRARY gio false true)
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_ATK_INCLUDE_DIR atk/atk.h)
|
||||
_GTK2_FIND_LIBRARY (GTK2_ATK_LIBRARY atk false true)
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GOBJECT_INCLUDE_DIR gobject/gobject.h)
|
||||
_GTK2_FIND_LIBRARY (GTK2_GOBJECT_LIBRARY gobject false true)
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GLIB_INCLUDE_DIR glib.h)
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GLIBCONFIG_INCLUDE_DIR glibconfig.h)
|
||||
_GTK2_FIND_LIBRARY (GTK2_GLIB_LIBRARY glib false true)
|
||||
|
||||
elseif(_GTK2_component STREQUAL "gtkmm")
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GLIBMM_INCLUDE_DIR glibmm.h)
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GLIBMMCONFIG_INCLUDE_DIR glibmmconfig.h)
|
||||
_GTK2_FIND_LIBRARY (GTK2_GLIBMM_LIBRARY glibmm true true)
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GDKMM_INCLUDE_DIR gdkmm.h)
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GDKMMCONFIG_INCLUDE_DIR gdkmmconfig.h)
|
||||
_GTK2_FIND_LIBRARY (GTK2_GDKMM_LIBRARY gdkmm true true)
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GTKMM_INCLUDE_DIR gtkmm.h)
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GTKMMCONFIG_INCLUDE_DIR gtkmmconfig.h)
|
||||
_GTK2_FIND_LIBRARY (GTK2_GTKMM_LIBRARY gtkmm true true)
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_CAIROMM_INCLUDE_DIR cairomm/cairomm.h)
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_CAIROMMCONFIG_INCLUDE_DIR cairommconfig.h)
|
||||
_GTK2_FIND_LIBRARY (GTK2_CAIROMM_LIBRARY cairomm true true)
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GDKMM_INCLUDE_DIR gdkmm.h)
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GDKMMCONFIG_INCLUDE_DIR gdkmmconfig.h)
|
||||
_GTK2_FIND_LIBRARY (GTK2_GDKMM_LIBRARY gdkmm true true)
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_PANGOMM_INCLUDE_DIR pangomm.h)
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_PANGOMMCONFIG_INCLUDE_DIR pangommconfig.h)
|
||||
_GTK2_FIND_LIBRARY (GTK2_PANGOMM_LIBRARY pangomm true true)
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_SIGC++_INCLUDE_DIR sigc++/sigc++.h)
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_SIGC++CONFIG_INCLUDE_DIR sigc++config.h)
|
||||
_GTK2_FIND_LIBRARY (GTK2_SIGC++_LIBRARY sigc true true)
|
||||
_GTK2_FIND_LIBRARY (GTK2_PANGOCAIRO_LIBRARY pangocairo true true)
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_CAIROMM_INCLUDE_DIR cairomm/cairomm.h)
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_CAIROMMCONFIG_INCLUDE_DIR cairommconfig.h)
|
||||
_GTK2_FIND_LIBRARY (GTK2_CAIROMM_LIBRARY cairomm true true)
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GIOMM_INCLUDE_DIR giomm.h)
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GIOMMCONFIG_INCLUDE_DIR giommconfig.h)
|
||||
|
@ -506,6 +502,15 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
|
|||
_GTK2_FIND_INCLUDE_DIR(GTK2_ATKMM_INCLUDE_DIR atkmm.h)
|
||||
_GTK2_FIND_LIBRARY (GTK2_ATKMM_LIBRARY atkmm true true)
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GLIBMM_INCLUDE_DIR glibmm.h)
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GLIBMMCONFIG_INCLUDE_DIR glibmmconfig.h)
|
||||
_GTK2_FIND_LIBRARY (GTK2_GLIBMM_LIBRARY glibmm true true)
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_SIGC++_INCLUDE_DIR sigc++/sigc++.h)
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_SIGC++CONFIG_INCLUDE_DIR sigc++config.h)
|
||||
_GTK2_FIND_LIBRARY (GTK2_SIGC++_LIBRARY sigc true true)
|
||||
|
||||
|
||||
elseif(_GTK2_component STREQUAL "glade")
|
||||
|
||||
_GTK2_FIND_INCLUDE_DIR(GTK2_GLADE_INCLUDE_DIR glade/glade.h)
|
||||
|
@ -549,13 +554,13 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
|
|||
GTK2_GTK_LIBRARY
|
||||
GTK2_GTK_INCLUDE_DIR
|
||||
|
||||
GTK2_GLIB_INCLUDE_DIR
|
||||
GTK2_GLIBCONFIG_INCLUDE_DIR
|
||||
GTK2_GLIB_LIBRARY
|
||||
|
||||
GTK2_GDK_INCLUDE_DIR
|
||||
GTK2_GDKCONFIG_INCLUDE_DIR
|
||||
GTK2_GDK_LIBRARY
|
||||
|
||||
GTK2_GLIB_INCLUDE_DIR
|
||||
GTK2_GLIBCONFIG_INCLUDE_DIR
|
||||
GTK2_GLIB_LIBRARY
|
||||
)
|
||||
elseif(_GTK2_component STREQUAL "gtkmm")
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK2_${_COMPONENT_UPPER} "Some or all of the gtkmm libraries were not found."
|
||||
|
@ -563,13 +568,14 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
|
|||
GTK2_GTKMM_INCLUDE_DIR
|
||||
GTK2_GTKMMCONFIG_INCLUDE_DIR
|
||||
|
||||
GTK2_GDKMM_INCLUDE_DIR
|
||||
GTK2_GDKMMCONFIG_INCLUDE_DIR
|
||||
GTK2_GDKMM_LIBRARY
|
||||
|
||||
GTK2_GLIBMM_INCLUDE_DIR
|
||||
GTK2_GLIBMMCONFIG_INCLUDE_DIR
|
||||
GTK2_GLIBMM_LIBRARY
|
||||
|
||||
GTK2_GDKMM_INCLUDE_DIR
|
||||
GTK2_GDKMMCONFIG_INCLUDE_DIR
|
||||
GTK2_GDKMM_LIBRARY
|
||||
)
|
||||
elseif(_GTK2_component STREQUAL "glade")
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK2_${_COMPONENT_UPPER} "The glade library was not found."
|
||||
|
|
|
@ -209,5 +209,3 @@ function(GETTEXT_PROCESS_PO_FILES _lang)
|
|||
add_dependencies(pofiles ${uniqueTargetName})
|
||||
|
||||
endfunction()
|
||||
|
||||
set(GETTEXT_FOUND ${Gettext_FOUND})
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
include(FindCygwin)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake)
|
||||
|
||||
find_program(GNUPLOT_EXECUTABLE
|
||||
NAMES
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
|
||||
# This module is maintained by Will Dicharry <wdicharry@stellarscience.com>.
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
||||
|
||||
# List of the valid HDF5 components
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
# - Find icotool
|
||||
# This module looks for icotool. This module defines the
|
||||
# following values:
|
||||
# ICOTOOL_EXECUTABLE: the full path to the icotool tool.
|
||||
# ICOTOOL_FOUND: True if icotool has been found.
|
||||
# ICOTOOL_VERSION_STRING: the version of icotool found.
|
||||
#
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2012 Aleksey Avdeev <solo@altlinux.ru>
|
||||
#
|
||||
# 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.)
|
||||
|
||||
find_program(ICOTOOL_EXECUTABLE
|
||||
icotool
|
||||
)
|
||||
|
||||
if(ICOTOOL_EXECUTABLE)
|
||||
execute_process(
|
||||
COMMAND ${ICOTOOL_EXECUTABLE} --version
|
||||
OUTPUT_VARIABLE _icotool_version
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if("${_icotool_version}" MATCHES "^icotool \\([^\\)]*\\) ([0-9\\.]+[^ \n]*).*")
|
||||
set( ICOTOOL_VERSION_STRING
|
||||
"${CMAKE_MATCH_1}"
|
||||
)
|
||||
else()
|
||||
set( ICOTOOL_VERSION_STRING
|
||||
""
|
||||
)
|
||||
endif()
|
||||
unset(_icotool_version)
|
||||
endif()
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set ICOTOOL_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
|
||||
Icotool
|
||||
REQUIRED_VARS ICOTOOL_EXECUTABLE
|
||||
VERSION_VAR ICOTOOL_VERSION_STRING
|
||||
)
|
||||
|
||||
mark_as_advanced(
|
||||
ICOTOOL_EXECUTABLE
|
||||
)
|
|
@ -120,6 +120,11 @@ JAVA_APPEND_LIBRARY_DIRECTORIES(JAVA_AWT_LIBRARY_DIRECTORIES
|
|||
/usr/lib/jvm/default-java/jre/lib/{libarch}
|
||||
/usr/lib/jvm/default-java/jre/lib
|
||||
/usr/lib/jvm/default-java/lib
|
||||
# OpenBSD specific paths for default JVM
|
||||
/usr/local/jdk-1.7.0/jre/lib/{libarch}
|
||||
/usr/local/jre-1.7.0/lib/{libarch}
|
||||
/usr/local/jdk-1.6.0/jre/lib/{libarch}
|
||||
/usr/local/jre-1.6.0/lib/{libarch}
|
||||
)
|
||||
|
||||
set(JAVA_JVM_LIBRARY_DIRECTORIES)
|
||||
|
@ -153,6 +158,9 @@ set(JAVA_AWT_INCLUDE_DIRECTORIES
|
|||
/opt/sun-jdk-1.5.0.04/include
|
||||
# Debian specific path for default JVM
|
||||
/usr/lib/jvm/default-java/include
|
||||
# OpenBSD specific path for default JVM
|
||||
/usr/local/jdk-1.7.0/include
|
||||
/usr/local/jdk-1.6.0/include
|
||||
)
|
||||
|
||||
foreach(JAVA_PROG "${JAVA_RUNTIME}" "${JAVA_COMPILE}" "${JAVA_ARCHIVE}")
|
||||
|
@ -227,6 +235,7 @@ find_path(JAVA_INCLUDE_PATH2 jni_md.h
|
|||
${JAVA_INCLUDE_PATH}/win32
|
||||
${JAVA_INCLUDE_PATH}/linux
|
||||
${JAVA_INCLUDE_PATH}/freebsd
|
||||
${JAVA_INCLUDE_PATH}/openbsd
|
||||
${JAVA_INCLUDE_PATH}/solaris
|
||||
${JAVA_INCLUDE_PATH}/hp-ux
|
||||
${JAVA_INCLUDE_PATH}/alpha
|
||||
|
|
|
@ -80,6 +80,8 @@ set(_JAVA_PATHS
|
|||
/usr/java/j2sdk1.4.2_09/bin
|
||||
/usr/lib/j2sdk1.5-sun/bin
|
||||
/opt/sun-jdk-1.5.0.04/bin
|
||||
/usr/local/jdk-1.7.0/bin
|
||||
/usr/local/jdk-1.6.0/bin
|
||||
)
|
||||
find_program(Java_JAVA_EXECUTABLE
|
||||
NAMES java
|
||||
|
@ -107,6 +109,7 @@ if(Java_JAVA_EXECUTABLE)
|
|||
# 2. OpenJDK 1.6
|
||||
# 3. GCJ 1.5
|
||||
# 4. Kaffe 1.4.2
|
||||
# 5. OpenJDK 1.7.x on OpenBSD
|
||||
if(var MATCHES "java version \"[0-9]+\\.[0-9]+\\.[0-9_.]+.*\".*")
|
||||
# This is most likely Sun / OpenJDK, or maybe GCJ-java compat layer
|
||||
string( REGEX REPLACE ".* version \"([0-9]+\\.[0-9]+\\.[0-9_.]+.*)\".*"
|
||||
|
@ -115,6 +118,10 @@ if(Java_JAVA_EXECUTABLE)
|
|||
# Kaffe style
|
||||
string( REGEX REPLACE "java full version \"kaffe-([0-9]+\\.[0-9]+\\.[0-9_]+).*"
|
||||
"\\1" Java_VERSION_STRING "${var}" )
|
||||
elseif(var MATCHES "openjdk version \"[0-9]+\\.[0-9]+\\.[0-9_]+\".*")
|
||||
# OpenJDK ver 1.7.x on OpenBSD
|
||||
string( REGEX REPLACE "openjdk version \"([0-9]+\\.[0-9]+\\.[0-9_]+).*"
|
||||
"\\1" Java_VERSION_STRING "${var}" )
|
||||
else()
|
||||
if(NOT Java_FIND_QUIETLY)
|
||||
message(WARNING "regex not supported: ${var}. Please report")
|
||||
|
|
|
@ -245,7 +245,7 @@ endif()
|
|||
|
||||
|
||||
# KDE3Macros.cmake contains all the KDE specific macros
|
||||
include(KDE3Macros)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/KDE3Macros.cmake)
|
||||
|
||||
|
||||
macro (KDE3_PRINT_RESULTS)
|
||||
|
|
|
@ -40,9 +40,9 @@ set(_lapack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
|||
|
||||
get_property(_LANGUAGES_ GLOBAL PROPERTY ENABLED_LANGUAGES)
|
||||
if (NOT _LANGUAGES_ MATCHES Fortran)
|
||||
include(CheckFunctionExists)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CheckFunctionExists.cmake)
|
||||
else ()
|
||||
include(CheckFortranFunctionExists)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CheckFortranFunctionExists.cmake)
|
||||
endif ()
|
||||
|
||||
set(LAPACK_FOUND FALSE)
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
find_path(LUA_INCLUDE_DIR lua.h
|
||||
HINTS
|
||||
ENV LUA_DIR
|
||||
PATH_SUFFIXES include/lua51 include/lua5.1 include/lua include
|
||||
PATH_SUFFIXES include/lua51 include/lua5.1 include/lua-5.1 include/lua include
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
|
@ -54,7 +54,7 @@ find_library(LUA_LIBRARY
|
|||
|
||||
if(LUA_LIBRARY)
|
||||
# include the math library for Unix
|
||||
if(UNIX AND NOT APPLE)
|
||||
if(UNIX AND NOT APPLE AND NOT BEOS)
|
||||
find_library(LUA_MATH_LIBRARY m)
|
||||
set( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
|
||||
# For Windows and Mac, don't need to explicitly include the math library
|
||||
|
|
|
@ -45,7 +45,7 @@ if(MPEG2_FOUND)
|
|||
|
||||
#some native mpeg2 installations will depend
|
||||
#on libSDL, if found, add it in.
|
||||
include( FindSDL )
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindSDL.cmake)
|
||||
if(SDL_FOUND)
|
||||
set( MPEG2_LIBRARIES ${MPEG2_LIBRARIES} ${SDL_LIBRARY})
|
||||
endif()
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
|
||||
# include this to handle the QUIETLY and REQUIRED arguments
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
||||
include(GetPrerequisites)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/GetPrerequisites.cmake)
|
||||
|
||||
#
|
||||
# This part detects MPI compilers, attempting to wade through the mess of compiler names in
|
||||
|
|
|
@ -58,15 +58,23 @@ else ()
|
|||
find_path(OPENGL_INCLUDE_DIR OpenGL/gl.h DOC "Include for OpenGL on OSX")
|
||||
|
||||
else()
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "HP-UX")
|
||||
# Handle HP-UX cases where we only want to find OpenGL in either hpux64
|
||||
# or hpux32 depending on if we're doing a 64 bit build.
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
set(HPUX_IA_OPENGL_LIB_PATH /opt/graphics/OpenGL/lib/hpux32/)
|
||||
set(_OPENGL_LIB_PATH
|
||||
/opt/graphics/OpenGL/lib/hpux32/)
|
||||
else()
|
||||
set(HPUX_IA_OPENGL_LIB_PATH
|
||||
set(_OPENGL_LIB_PATH
|
||||
/opt/graphics/OpenGL/lib/hpux64/
|
||||
/opt/graphics/OpenGL/lib/pa20_64)
|
||||
endif()
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL Haiku)
|
||||
set(_OPENGL_LIB_PATH
|
||||
/boot/develop/lib/x86)
|
||||
set(_OPENGL_INCLUDE_PATH
|
||||
/boot/develop/headers/os/opengl)
|
||||
endif()
|
||||
|
||||
# The first line below is to make sure that the proper headers
|
||||
# are used on a Linux machine with the NVidia drivers installed.
|
||||
|
@ -80,6 +88,7 @@ else ()
|
|||
/usr/share/doc/NVIDIA_GLX-1.0/include
|
||||
/usr/openwin/share/include
|
||||
/opt/graphics/OpenGL/include /usr/X11R6/include
|
||||
${_OPENGL_INCLUDE_PATH}
|
||||
)
|
||||
|
||||
find_path(OPENGL_xmesa_INCLUDE_DIR GL/xmesa.h
|
||||
|
@ -93,9 +102,12 @@ else ()
|
|||
PATHS /opt/graphics/OpenGL/lib
|
||||
/usr/openwin/lib
|
||||
/usr/shlib /usr/X11R6/lib
|
||||
${HPUX_IA_OPENGL_LIB_PATH}
|
||||
${_OPENGL_LIB_PATH}
|
||||
)
|
||||
|
||||
unset(_OPENGL_INCLUDE_PATH)
|
||||
unset(_OPENGL_LIB_PATH)
|
||||
|
||||
# On Unix OpenGL most certainly always requires X11.
|
||||
# Feel free to tighten up these conditions if you don't
|
||||
# think this is always true.
|
||||
|
@ -103,7 +115,7 @@ else ()
|
|||
|
||||
if (OPENGL_gl_LIBRARY)
|
||||
if(NOT X11_FOUND)
|
||||
include(FindX11)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindX11.cmake)
|
||||
endif()
|
||||
if (X11_FOUND)
|
||||
if (NOT APPLE)
|
||||
|
|
|
@ -95,7 +95,7 @@ if(CMAKE_C_COMPILER_LOADED)
|
|||
unset(OpenMP_C_FLAG_CANDIDATES)
|
||||
else()
|
||||
_OPENMP_FLAG_CANDIDATES("C")
|
||||
include(CheckCSourceCompiles)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CheckCSourceCompiles.cmake)
|
||||
endif()
|
||||
|
||||
foreach(FLAG ${OpenMP_C_FLAG_CANDIDATES})
|
||||
|
@ -126,7 +126,7 @@ if(CMAKE_CXX_COMPILER_LOADED)
|
|||
unset(OpenMP_CXX_FLAG_CANDIDATES)
|
||||
else()
|
||||
_OPENMP_FLAG_CANDIDATES("CXX")
|
||||
include(CheckCXXSourceCompiles)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CheckCXXSourceCompiles.cmake)
|
||||
|
||||
# use the same source for CXX as C for now
|
||||
set(OpenMP_CXX_TEST_SOURCE ${OpenMP_C_TEST_SOURCE})
|
||||
|
|
|
@ -87,6 +87,7 @@ if(WIN32 AND NOT CYGWIN)
|
|||
find_library(LIB_EAY_DEBUG
|
||||
NAMES
|
||||
libeay32MDd
|
||||
libeay32d
|
||||
${_OPENSSL_ROOT_HINTS_AND_PATHS}
|
||||
PATH_SUFFIXES
|
||||
"lib"
|
||||
|
@ -108,6 +109,7 @@ if(WIN32 AND NOT CYGWIN)
|
|||
find_library(SSL_EAY_DEBUG
|
||||
NAMES
|
||||
ssleay32MDd
|
||||
ssleay32d
|
||||
${_OPENSSL_ROOT_HINTS_AND_PATHS}
|
||||
PATH_SUFFIXES
|
||||
"lib"
|
||||
|
@ -127,6 +129,11 @@ if(WIN32 AND NOT CYGWIN)
|
|||
"lib/VC"
|
||||
)
|
||||
|
||||
set(LIB_EAY_LIBRARY_DEBUG "${LIB_EAY_DEBUG}")
|
||||
set(LIB_EAY_LIBRARY_RELEASE "${LIB_EAY_RELEASE}")
|
||||
set(SSL_EAY_LIBRARY_DEBUG "${SSL_EAY_DEBUG}")
|
||||
set(SSL_EAY_LIBRARY_RELEASE "${SSL_EAY_RELEASE}")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
|
||||
select_library_configurations(LIB_EAY)
|
||||
select_library_configurations(SSL_EAY)
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
# Output variables of the form OPENSCENEGRAPH_FOO
|
||||
#
|
||||
|
||||
include(Findosg_functions)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
|
||||
|
||||
set(_osg_modules_to_process)
|
||||
foreach(_osg_component ${OpenSceneGraph_FIND_COMPONENTS})
|
||||
|
|
|
@ -88,8 +88,8 @@
|
|||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
include(FindPackageMessage)
|
||||
include(CMakeParseArguments)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageMessage.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake)
|
||||
|
||||
# internal helper macro
|
||||
macro(_FPHSA_FAILURE_MESSAGE _msg)
|
||||
|
@ -187,8 +187,8 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
|
|||
# user knows better what went wrong (#6375)
|
||||
set(MISSING_VARS "")
|
||||
set(DETAILS "")
|
||||
set(${_NAME_UPPER}_FOUND TRUE)
|
||||
# check if all passed variables are valid
|
||||
unset(${_NAME_UPPER}_FOUND)
|
||||
foreach(_CURRENT_VAR ${FPHSA_REQUIRED_VARS})
|
||||
if(NOT ${_CURRENT_VAR})
|
||||
set(${_NAME_UPPER}_FOUND FALSE)
|
||||
|
@ -197,6 +197,9 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
|
|||
set(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]")
|
||||
endif()
|
||||
endforeach()
|
||||
if(NOT "${${_NAME_UPPER}_FOUND}" STREQUAL "FALSE")
|
||||
set(${_NAME_UPPER}_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
# component handling
|
||||
unset(FOUND_COMPONENTS_MSG)
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
include(FindCygwin)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake)
|
||||
|
||||
set(PERL_POSSIBLE_BIN_PATHS
|
||||
${CYGWIN_INSTALL_PATH}/bin
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
# License text for the above reference.)
|
||||
|
||||
# find the perl executable
|
||||
include(FindPerl)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindPerl.cmake)
|
||||
|
||||
if (PERL_EXECUTABLE)
|
||||
### PERL_PREFIX
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
include(CMakeFindFrameworks)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CMakeFindFrameworks.cmake)
|
||||
# Search for the python framework on Apple.
|
||||
CMAKE_FIND_FRAMEWORKS(Python)
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
# License text for the above reference.)
|
||||
|
||||
# look for signs of qt3 installations
|
||||
file(GLOB GLOB_TEMP_VAR /usr/lib/qt-3*/bin/qmake)
|
||||
file(GLOB GLOB_TEMP_VAR /usr/lib*/qt-3*/bin/qmake /usr/lib*/qt3*/bin/qmake)
|
||||
if(GLOB_TEMP_VAR)
|
||||
set(QT3_INSTALLED TRUE)
|
||||
endif()
|
||||
|
@ -43,6 +43,12 @@ if(GLOB_TEMP_VAR)
|
|||
endif()
|
||||
set(GLOB_TEMP_VAR)
|
||||
|
||||
file(GLOB GLOB_TEMP_VAR /usr/local/lib/qt3/bin/qmake)
|
||||
if(GLOB_TEMP_VAR)
|
||||
set(QT3_INSTALLED TRUE)
|
||||
endif()
|
||||
set(GLOB_TEMP_VAR)
|
||||
|
||||
# look for qt4 installations
|
||||
file(GLOB GLOB_TEMP_VAR /usr/local/qt-x11-commercial-4*/bin/qmake)
|
||||
if(GLOB_TEMP_VAR)
|
||||
|
@ -56,6 +62,16 @@ if(GLOB_TEMP_VAR)
|
|||
endif()
|
||||
set(GLOB_TEMP_VAR)
|
||||
|
||||
file(GLOB GLOB_TEMP_VAR /usr/local/lib/qt4/bin/qmake)
|
||||
if(GLOB_TEMP_VAR)
|
||||
set(QT4_INSTALLED TRUE)
|
||||
endif()
|
||||
set(GLOB_TEMP_VAR)
|
||||
|
||||
if (Qt_FIND_VERSION)
|
||||
set(DESIRED_QT_VERSION "${Qt_FIND_VERSION}")
|
||||
endif ()
|
||||
|
||||
# now find qmake
|
||||
find_program(QT_QMAKE_EXECUTABLE_FINDQT NAMES qmake PATHS "${QT_SEARCH_PATH}/bin" "$ENV{QTDIR}/bin")
|
||||
if(QT_QMAKE_EXECUTABLE_FINDQT)
|
||||
|
@ -87,6 +103,7 @@ find_file( QT4_QGLOBAL_H_FILE qglobal.h
|
|||
/usr/lib/qt/include/Qt
|
||||
/usr/include/Qt
|
||||
/usr/share/qt4/include/Qt
|
||||
/usr/local/include/X11/qt4/Qt
|
||||
C:/Progra~1/qt/include/Qt )
|
||||
|
||||
if(QT4_QGLOBAL_H_FILE)
|
||||
|
@ -106,6 +123,7 @@ find_file( QT3_QGLOBAL_H_FILE qglobal.h
|
|||
/usr/lib/qt/include
|
||||
/usr/include
|
||||
/usr/share/qt3/include
|
||||
/usr/local/include/X11/qt3
|
||||
C:/Progra~1/qt/include
|
||||
/usr/include/qt3 )
|
||||
|
||||
|
@ -113,15 +131,15 @@ if(QT3_QGLOBAL_H_FILE)
|
|||
set(QT3_INSTALLED TRUE)
|
||||
endif()
|
||||
|
||||
if(QT3_INSTALLED AND QT4_INSTALLED )
|
||||
if(QT3_INSTALLED AND QT4_INSTALLED AND NOT DESIRED_QT_VERSION)
|
||||
# force user to pick if we have both
|
||||
set(DESIRED_QT_VERSION 0 CACHE STRING "Pick a version of Qt to use: 3 or 4")
|
||||
else()
|
||||
# if only one found then pick that one
|
||||
if(QT3_INSTALLED)
|
||||
if(QT3_INSTALLED AND NOT DESIRED_QT_VERSION EQUAL 4)
|
||||
set(DESIRED_QT_VERSION 3 CACHE STRING "Pick a version of Qt to use: 3 or 4")
|
||||
endif()
|
||||
if(QT4_INSTALLED)
|
||||
if(QT4_INSTALLED AND NOT DESIRED_QT_VERSION EQUAL 3)
|
||||
set(DESIRED_QT_VERSION 4 CACHE STRING "Pick a version of Qt to use: 3 or 4")
|
||||
endif()
|
||||
endif()
|
||||
|
@ -129,12 +147,12 @@ endif()
|
|||
if(DESIRED_QT_VERSION MATCHES 3)
|
||||
set(Qt3_FIND_REQUIRED ${Qt_FIND_REQUIRED})
|
||||
set(Qt3_FIND_QUIETLY ${Qt_FIND_QUIETLY})
|
||||
include(FindQt3)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindQt3.cmake)
|
||||
endif()
|
||||
if(DESIRED_QT_VERSION MATCHES 4)
|
||||
set(Qt4_FIND_REQUIRED ${Qt_FIND_REQUIRED})
|
||||
set(Qt4_FIND_QUIETLY ${Qt_FIND_QUIETLY})
|
||||
include(FindQt4)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindQt4.cmake)
|
||||
endif()
|
||||
|
||||
if(NOT QT3_INSTALLED AND NOT QT4_INSTALLED)
|
||||
|
|
|
@ -64,6 +64,7 @@ find_path(QT_INCLUDE_DIR qt.h
|
|||
/usr/share/qt3/include
|
||||
C:/Progra~1/qt/include
|
||||
/usr/include/qt3
|
||||
/usr/local/include/X11/qt3
|
||||
)
|
||||
|
||||
# if qglobal.h is not in the qt_include_dir then set
|
||||
|
@ -146,7 +147,7 @@ find_library(QT_QASSISTANTCLIENT_LIBRARY
|
|||
|
||||
# Qt 3 should prefer QTDIR over the PATH
|
||||
find_program(QT_MOC_EXECUTABLE
|
||||
NAMES moc-qt3 moc
|
||||
NAMES moc-qt3 moc moc3 moc3-mt
|
||||
HINTS
|
||||
ENV QTDIR
|
||||
PATHS
|
||||
|
@ -154,6 +155,7 @@ find_program(QT_MOC_EXECUTABLE
|
|||
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt"
|
||||
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt"
|
||||
${GLOB_PATHS_BIN}
|
||||
/usr/local/lib/qt3
|
||||
/usr/local/qt
|
||||
/usr/lib/qt
|
||||
/usr/lib/qt3
|
||||
|
@ -170,7 +172,7 @@ endif()
|
|||
|
||||
# Qt 3 should prefer QTDIR over the PATH
|
||||
find_program(QT_UIC_EXECUTABLE
|
||||
NAMES uic-qt3 uic
|
||||
NAMES uic-qt3 uic uic3 uic3-mt
|
||||
HINTS
|
||||
ENV QTDIR
|
||||
PATHS
|
||||
|
|
|
@ -65,6 +65,16 @@
|
|||
# is much more flexible, but requires that FindQt4.cmake is executed before
|
||||
# such an exported dependency file is processed.
|
||||
#
|
||||
# Note that if using IMPORTED targets, the qtmain.lib static library is
|
||||
# automatically linked on Windows. To disable that globally, set the
|
||||
# QT4_NO_LINK_QTMAIN variable before finding Qt4. To disable that for a
|
||||
# particular executable, set the QT4_NO_LINK_QTMAIN target property to
|
||||
# True on the executable.
|
||||
#
|
||||
# QT_INCLUDE_DIRS_NO_SYSTEM
|
||||
# If this variable is set to TRUE, the Qt include directories
|
||||
# in the QT_USE_FILE will NOT have the SYSTEM keyword set.
|
||||
#
|
||||
# There are also some files that need processing by some Qt tools such as moc
|
||||
# and uic. Listed below are macros that may be used to process those files.
|
||||
#
|
||||
|
@ -376,8 +386,8 @@ if(QT_QT_LIBRARY)
|
|||
endif()
|
||||
|
||||
|
||||
include(CheckCXXSymbolExists)
|
||||
include(MacroAddFileDependencies)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CheckCXXSymbolExists.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/MacroAddFileDependencies.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
||||
|
||||
set(QT_USE_FILE ${CMAKE_ROOT}/Modules/UseQt4.cmake)
|
||||
|
@ -414,6 +424,15 @@ macro (_QT4_ADJUST_LIB_VARS _camelCaseBasename)
|
|||
set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_DEBUG "${QT_${basename}_LIBRARY_DEBUG}" )
|
||||
endif()
|
||||
endif ()
|
||||
set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
"${QT_${basename}_INCLUDE_DIR}"
|
||||
)
|
||||
string(REGEX REPLACE "^QT" "" _stemname ${basename})
|
||||
set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY
|
||||
INTERFACE_COMPILE_DEFINITIONS
|
||||
"QT_${_stemname}_LIB"
|
||||
)
|
||||
endif()
|
||||
|
||||
# If QT_USE_IMPORTED_TARGETS is enabled, the QT_QTFOO_LIBRARY variables are set to point at these
|
||||
|
@ -534,6 +553,11 @@ endif ()
|
|||
|
||||
if (QT_QMAKE_EXECUTABLE AND QTVERSION)
|
||||
|
||||
# set version variables
|
||||
string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}")
|
||||
string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}")
|
||||
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}")
|
||||
|
||||
# ask qmake for the mkspecs directory
|
||||
# we do this first because QT_LIBINFIX might be set
|
||||
if (NOT QT_MKSPECS_DIR OR QT_QMAKE_CHANGED)
|
||||
|
@ -938,12 +962,49 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
|
|||
############################################
|
||||
|
||||
|
||||
macro(_qt4_add_target_depends_internal _QT_MODULE _PROPERTY)
|
||||
if (TARGET Qt4::${_QT_MODULE})
|
||||
foreach(_DEPEND ${ARGN})
|
||||
if (NOT TARGET Qt4::Qt${_DEPEND})
|
||||
message(FATAL_ERROR "_qt4_add_target_depends invoked with invalid arguments")
|
||||
endif()
|
||||
set_property(TARGET Qt4::${_QT_MODULE} APPEND PROPERTY
|
||||
${_PROPERTY}
|
||||
"Qt4::Qt${_DEPEND}"
|
||||
)
|
||||
set_property(TARGET Qt4::${_QT_MODULE} APPEND PROPERTY
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
"$<TARGET_PROPERTY:Qt4::Qt${_DEPEND},INTERFACE_INCLUDE_DIRECTORIES>"
|
||||
)
|
||||
set_property(TARGET Qt4::${_QT_MODULE} APPEND PROPERTY
|
||||
INTERFACE_COMPILE_DEFINITIONS
|
||||
"$<TARGET_PROPERTY:Qt4::Qt${_DEPEND},INTERFACE_COMPILE_DEFINITIONS>"
|
||||
)
|
||||
endforeach()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(_qt4_add_target_depends _QT_MODULE)
|
||||
_qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_INTERFACE_LIBRARIES ${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(_qt4_add_target_private_depends _QT_MODULE)
|
||||
_qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_DEPENDENT_LIBRARIES ${ARGN})
|
||||
endmacro()
|
||||
|
||||
|
||||
# Set QT_xyz_LIBRARY variable and add
|
||||
# library include path to QT_INCLUDES
|
||||
_QT4_ADJUST_LIB_VARS(QtCore)
|
||||
set_property(TARGET Qt4::QtCore APPEND PROPERTY
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
"${QT_MKSPECS_DIR}/default"
|
||||
${QT_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
foreach(QT_MODULE ${QT_MODULES})
|
||||
_QT4_ADJUST_LIB_VARS(${QT_MODULE})
|
||||
_qt4_add_target_depends(${QT_MODULE} Core)
|
||||
endforeach()
|
||||
|
||||
_QT4_ADJUST_LIB_VARS(QtAssistant)
|
||||
|
@ -954,10 +1015,67 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
|
|||
# platform dependent libraries
|
||||
if(Q_WS_WIN)
|
||||
_QT4_ADJUST_LIB_VARS(qtmain)
|
||||
|
||||
_QT4_ADJUST_LIB_VARS(QAxServer)
|
||||
set_property(TARGET Qt4::QAxServer PROPERTY
|
||||
INTERFACE_QT4_NO_LINK_QTMAIN ON
|
||||
)
|
||||
set_property(TARGET Qt4::QAxServer APPEND PROPERTY
|
||||
COMPATIBLE_INTERFACE_BOOL QT4_NO_LINK_QTMAIN)
|
||||
|
||||
_QT4_ADJUST_LIB_VARS(QAxContainer)
|
||||
endif()
|
||||
|
||||
# Only public dependencies are listed here.
|
||||
# Eg, QtDBus links to QtXml, but users of QtDBus do not need to
|
||||
# link to QtXml because QtDBus only uses it internally, not in public
|
||||
# headers.
|
||||
# Everything depends on QtCore, but that is covered above already
|
||||
_qt4_add_target_depends(Qt3Support Sql Gui Network)
|
||||
if (TARGET Qt4::Qt3Support)
|
||||
# An additional define is required for QT3_SUPPORT
|
||||
set_property(TARGET Qt4::Qt3Support APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS QT3_SUPPORT)
|
||||
endif()
|
||||
_qt4_add_target_depends(QtDeclarative Script Gui)
|
||||
_qt4_add_target_depends(QtDesigner Gui)
|
||||
_qt4_add_target_depends(QtHelp Gui)
|
||||
_qt4_add_target_depends(QtMultimedia Gui)
|
||||
_qt4_add_target_depends(QtOpenGL Gui)
|
||||
_qt4_add_target_depends(QtSvg Gui)
|
||||
_qt4_add_target_depends(QtWebKit Gui Network)
|
||||
|
||||
_qt4_add_target_private_depends(Qt3Support Xml)
|
||||
_qt4_add_target_private_depends(QtSvg Xml)
|
||||
_qt4_add_target_private_depends(QtDBus Xml)
|
||||
_qt4_add_target_private_depends(QtUiTools Xml Gui)
|
||||
_qt4_add_target_private_depends(QtHelp Sql Xml Network)
|
||||
_qt4_add_target_private_depends(QtXmlPatterns Network)
|
||||
_qt4_add_target_private_depends(QtScriptTools Gui)
|
||||
_qt4_add_target_private_depends(QtWebKit XmlPatterns)
|
||||
_qt4_add_target_private_depends(QtDeclarative XmlPatterns Svg Sql Gui)
|
||||
_qt4_add_target_private_depends(QtMultimedia Gui)
|
||||
_qt4_add_target_private_depends(QtOpenGL Gui)
|
||||
_qt4_add_target_private_depends(QAxServer Gui)
|
||||
_qt4_add_target_private_depends(QAxContainer Gui)
|
||||
_qt4_add_target_private_depends(phonon Gui)
|
||||
if(QT_QTDBUS_FOUND)
|
||||
_qt4_add_target_private_depends(phonon DBus)
|
||||
endif()
|
||||
|
||||
if (WIN32 AND NOT QT4_NO_LINK_QTMAIN)
|
||||
set(_isExe $<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>)
|
||||
set(_isWin32 $<BOOL:$<TARGET_PROPERTY:WIN32_EXECUTABLE>>)
|
||||
set(_isNotExcluded $<NOT:$<BOOL:$<TARGET_PROPERTY:QT4_NO_LINK_QTMAIN>>>)
|
||||
set(_isPolicyNEW $<TARGET_POLICY:CMP0020>)
|
||||
set_property(TARGET Qt4::QtCore APPEND PROPERTY
|
||||
IMPORTED_LINK_INTERFACE_LIBRARIES
|
||||
$<$<AND:${_isExe},${_isWin32},${_isNotExcluded},${_isPolicyNEW}>:Qt4::qtmain>
|
||||
)
|
||||
unset(_isExe)
|
||||
unset(_isWin32)
|
||||
unset(_isNotExcluded)
|
||||
unset(_isPolicyNEW)
|
||||
endif()
|
||||
|
||||
#######################################
|
||||
#
|
||||
|
@ -982,13 +1100,13 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
|
|||
endif()
|
||||
|
||||
find_program(QT_MOC_EXECUTABLE
|
||||
NAMES moc-qt4 moc
|
||||
NAMES moc-qt4 moc moc4
|
||||
PATHS ${QT_BINARY_DIR}
|
||||
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
|
||||
)
|
||||
|
||||
find_program(QT_UIC_EXECUTABLE
|
||||
NAMES uic-qt4 uic
|
||||
NAMES uic-qt4 uic uic4
|
||||
PATHS ${QT_BINARY_DIR}
|
||||
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
|
||||
)
|
||||
|
@ -1018,13 +1136,13 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
|
|||
)
|
||||
|
||||
find_program(QT_LUPDATE_EXECUTABLE
|
||||
NAMES lupdate-qt4 lupdate
|
||||
NAMES lupdate-qt4 lupdate lupdate4
|
||||
PATHS ${QT_BINARY_DIR}
|
||||
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
|
||||
)
|
||||
|
||||
find_program(QT_LRELEASE_EXECUTABLE
|
||||
NAMES lrelease-qt4 lrelease
|
||||
NAMES lrelease-qt4 lrelease lrelease4
|
||||
PATHS ${QT_BINARY_DIR}
|
||||
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
|
||||
)
|
||||
|
@ -1036,13 +1154,13 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
|
|||
)
|
||||
|
||||
find_program(QT_DESIGNER_EXECUTABLE
|
||||
NAMES designer-qt4 designer
|
||||
NAMES designer-qt4 designer designer4
|
||||
PATHS ${QT_BINARY_DIR}
|
||||
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
|
||||
)
|
||||
|
||||
find_program(QT_LINGUIST_EXECUTABLE
|
||||
NAMES linguist-qt4 linguist
|
||||
NAMES linguist-qt4 linguist linguist4
|
||||
PATHS ${QT_BINARY_DIR}
|
||||
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
|
||||
)
|
||||
|
@ -1170,11 +1288,6 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
|
|||
|
||||
include("${_qt4_current_dir}/Qt4Macros.cmake")
|
||||
|
||||
# set version variables
|
||||
string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}")
|
||||
string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}")
|
||||
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}")
|
||||
|
||||
endif()
|
||||
|
||||
#support old QT_MIN_VERSION if set, but not if version is supplied by find_package()
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
find_path(SDL_INCLUDE_DIR SDL.h
|
||||
HINTS
|
||||
ENV SDLDIR
|
||||
PATH_SUFFIXES SDL SDL12 SDL11
|
||||
PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
|
||||
)
|
||||
|
||||
# SDL-1.1 is the name used by FreeBSD ports...
|
||||
|
@ -79,6 +79,7 @@ find_library(SDL_LIBRARY_TEMP
|
|||
NAMES SDL SDL-1.1
|
||||
HINTS
|
||||
ENV SDLDIR
|
||||
PATH_SUFFIXES lib
|
||||
)
|
||||
|
||||
if(NOT SDL_BUILDING_LIBRARY)
|
||||
|
@ -121,7 +122,7 @@ if(SDL_LIBRARY_TEMP)
|
|||
if(SDLMAIN_LIBRARY AND NOT SDL_BUILDING_LIBRARY)
|
||||
list(FIND SDL_LIBRARY_TEMP "${SDLMAIN_LIBRARY}" _SDL_MAIN_INDEX)
|
||||
if(_SDL_MAIN_INDEX EQUAL -1)
|
||||
list(APPEND SDL_LIBRARY_TEMP "${SDLMAIN_LIBRARY}")
|
||||
set(SDL_LIBRARY_TEMP "${SDLMAIN_LIBRARY}" ${SDL_LIBRARY_TEMP})
|
||||
endif()
|
||||
unset(_SDL_MAIN_INDEX)
|
||||
endif()
|
||||
|
|
|
@ -40,7 +40,7 @@ find_path(SDL_IMAGE_INCLUDE_DIR SDL_image.h
|
|||
HINTS
|
||||
ENV SDLIMAGEDIR
|
||||
ENV SDLDIR
|
||||
PATH_SUFFIXES SDL SDL12 SDL11
|
||||
PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
|
||||
)
|
||||
|
||||
if(NOT SDL_IMAGE_LIBRARY AND SDLIMAGE_LIBRARY)
|
||||
|
@ -52,6 +52,7 @@ find_library(SDL_IMAGE_LIBRARY
|
|||
HINTS
|
||||
ENV SDLIMAGEDIR
|
||||
ENV SDLDIR
|
||||
PATH_SUFFIXES lib
|
||||
)
|
||||
|
||||
if(SDL_IMAGE_INCLUDE_DIR AND EXISTS "${SDL_IMAGE_INCLUDE_DIR}/SDL_image.h")
|
||||
|
|
|
@ -40,7 +40,7 @@ find_path(SDL_MIXER_INCLUDE_DIR SDL_mixer.h
|
|||
HINTS
|
||||
ENV SDLMIXERDIR
|
||||
ENV SDLDIR
|
||||
PATH_SUFFIXES SDL SDL12 SDL11
|
||||
PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
|
||||
)
|
||||
|
||||
if(NOT SDL_MIXER_LIBRARY AND SDLMIXER_LIBRARY)
|
||||
|
@ -52,6 +52,7 @@ find_library(SDL_MIXER_LIBRARY
|
|||
HINTS
|
||||
ENV SDLMIXERDIR
|
||||
ENV SDLDIR
|
||||
PATH_SUFFIXES lib
|
||||
)
|
||||
|
||||
if(SDL_MIXER_INCLUDE_DIR AND EXISTS "${SDL_MIXER_INCLUDE_DIR}/SDL_mixer.h")
|
||||
|
|
|
@ -40,7 +40,7 @@ find_path(SDL_NET_INCLUDE_DIR SDL_net.h
|
|||
HINTS
|
||||
ENV SDLNETDIR
|
||||
ENV SDLDIR
|
||||
PATH_SUFFIXES SDL SDL12 SDL11
|
||||
PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
|
||||
)
|
||||
|
||||
if(NOT SDL_NET_LIBRARY AND SDLNET_LIBRARY)
|
||||
|
@ -52,6 +52,7 @@ find_library(SDL_NET_LIBRARY
|
|||
HINTS
|
||||
ENV SDLNETDIR
|
||||
ENV SDLDIR
|
||||
PATH_SUFFIXES lib
|
||||
)
|
||||
|
||||
if(SDL_NET_INCLUDE_DIR AND EXISTS "${SDL_NET_INCLUDE_DIR}/SDL_net.h")
|
||||
|
|
|
@ -77,7 +77,7 @@ find_path(SDL_SOUND_INCLUDE_DIR SDL_sound.h
|
|||
HINTS
|
||||
ENV SDLSOUNDDIR
|
||||
ENV SDLDIR
|
||||
PATH_SUFFIXES SDL SDL12 SDL11
|
||||
PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
|
||||
)
|
||||
|
||||
find_library(SDL_SOUND_LIBRARY
|
||||
|
@ -85,6 +85,7 @@ find_library(SDL_SOUND_LIBRARY
|
|||
HINTS
|
||||
ENV SDLSOUNDDIR
|
||||
ENV SDLDIR
|
||||
PATH_SUFFIXES lib
|
||||
)
|
||||
|
||||
if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
|
||||
|
|
|
@ -40,7 +40,7 @@ find_path(SDL_TTF_INCLUDE_DIR SDL_ttf.h
|
|||
HINTS
|
||||
ENV SDLTTFDIR
|
||||
ENV SDLDIR
|
||||
PATH_SUFFIXES SDL SDL12 SDL11
|
||||
PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
|
||||
)
|
||||
|
||||
if(NOT SDL_TTF_LIBRARY AND SDLTTF_LIBRARY)
|
||||
|
@ -52,6 +52,7 @@ find_library(SDL_TTF_LIBRARY
|
|||
HINTS
|
||||
ENV SDLTTFDIR
|
||||
ENV SDLDIR
|
||||
PATH_SUFFIXES lib
|
||||
)
|
||||
|
||||
if(SDL_TTF_INCLUDE_DIR AND EXISTS "${SDL_TTF_INCLUDE_DIR}/SDL_ttf.h")
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
include(FindCygwin)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake)
|
||||
|
||||
find_program(SELF_PACKER_FOR_EXECUTABLE
|
||||
upx
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
#
|
||||
# ---- Find Squish
|
||||
# This module can be used to find Squish (currently support is aimed at version 3).
|
||||
# This module can be used to find Squish. Currently Squish versions 3 and 4 are supported.
|
||||
#
|
||||
# ---- Variables and Macros
|
||||
# SQUISH_FOUND If false, don't try to use Squish
|
||||
# SQUISH_VERSION The full version of Squish found
|
||||
# SQUISH_VERSION_MAJOR The major version of Squish found
|
||||
# SQUISH_VERSION_MINOR The minor version of Squish found
|
||||
# SQUISH_VERSION_PATCH The patch version of Squish found
|
||||
#
|
||||
# SQUISH_INSTALL_DIR The Squish installation directory (containing bin, lib, etc)
|
||||
# SQUISH_SERVER_EXECUTABLE The squishserver executable
|
||||
|
@ -13,18 +17,52 @@
|
|||
# SQUISH_SERVER_EXECUTABLE_FOUND Was the server executable found?
|
||||
# SQUISH_CLIENT_EXECUTABLE_FOUND Was the client executable found?
|
||||
#
|
||||
# macro SQUISH_ADD_TEST(testName applicationUnderTest testSuite testCase)
|
||||
# It provides the function squish_v4_add_test() for adding a squish test to cmake using Squish 4.x:
|
||||
#
|
||||
# squish_v4_add_test(cmakeTestName AUT targetName SUITE suiteName TEST squishTestName
|
||||
# [SETTINGSGROUP group] [PRE_COMMAND command] [POST_COMMAND command] )
|
||||
#
|
||||
# The arguments have the following meaning:
|
||||
# cmakeTestName: this will be used as the first argument for add_test()
|
||||
# AUT targetName: the name of the cmake target which will be used as AUT, i.e. the
|
||||
# executable which will be tested.
|
||||
# SUITE suiteName: this is either the full path to the squish suite, or just the
|
||||
# last directory of the suite, i.e. the suite name. In this case
|
||||
# the CMakeLists.txt which calls squish_add_test() must be located
|
||||
# in the parent directory of the suite directory.
|
||||
# TEST squishTestName: the name of the squish test, i.e. the name of the subdirectory
|
||||
# of the test inside the suite directory.
|
||||
# SETTINGSGROUP group: if specified, the given settings group will be used for executing the test.
|
||||
# If not specified, the groupname will be "CTest_<username>"
|
||||
# PRE_COMMAND command: if specified, the given command will be executed before starting the squish test.
|
||||
# POST_COMMAND command: same as PRE_COMMAND, but after the squish test has been executed.
|
||||
#
|
||||
# ---- Typical Use
|
||||
# enable_testing()
|
||||
# find_package(Squish 4.0)
|
||||
# if (SQUISH_FOUND)
|
||||
# squish_v4_add_test(myTestName AUT myApp SUITE ${CMAKE_SOURCE_DIR}/tests/mySuite TEST someSquishTest SETTINGSGROUP myGroup )
|
||||
# endif ()
|
||||
#
|
||||
#
|
||||
# For users of Squish version 3.x the macro squish_v3_add_test() is provided:
|
||||
# squish_v3_add_test(testName applicationUnderTest testCase envVars testWrapper)
|
||||
# Use this macro to add a test using Squish 3.x.
|
||||
#
|
||||
# ---- Typical Use
|
||||
# enable_testing()
|
||||
# find_package(Squish)
|
||||
# if (SQUISH_FOUND)
|
||||
# SQUISH_ADD_TEST(myTestName myApplication testSuiteName testCaseName)
|
||||
# squish_v3_add_test(myTestName myApplication testCase envVars testWrapper)
|
||||
# endif ()
|
||||
#
|
||||
# macro SQUISH_ADD_TEST(testName applicationUnderTest testCase envVars testWrapper)
|
||||
# This is deprecated. Use SQUISH_V3_ADD_TEST() if you are using Squish 3.x instead.
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2008-2009 Kitware, Inc.
|
||||
# Copyright 2012 Alexander Neundorf
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
|
@ -36,6 +74,9 @@
|
|||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
|
||||
include(CMakeParseArguments)
|
||||
|
||||
set(SQUISH_INSTALL_DIR_STRING "Directory containing the bin, doc, and lib directories for Squish; this should be the root of the installation directory.")
|
||||
set(SQUISH_SERVER_EXECUTABLE_STRING "The squishserver executable program.")
|
||||
set(SQUISH_CLIENT_EXECUTABLE_STRING "The squishclient executable program.")
|
||||
|
@ -74,21 +115,36 @@ if(SQUISH_INSTALL_DIR)
|
|||
|
||||
# find the client program
|
||||
if(NOT SQUISH_CLIENT_EXECUTABLE)
|
||||
find_program(SQUISH_CLIENT_EXECUTABLE ${SQUISH_INSTALL_DIR}/bin/squishrunner DOC "The ${SQUISH_CLIENT_EXECUTABLE_STRING}")
|
||||
find_program(SQUISH_CLIENT_EXECUTABLE ${SQUISH_INSTALL_DIR}/bin/squishrunner${CMAKE_EXECUTABLE_SUFFIX} DOC "The ${SQUISH_CLIENT_EXECUTABLE_STRING}")
|
||||
endif()
|
||||
|
||||
# find the server program
|
||||
if(NOT SQUISH_SERVER_EXECUTABLE)
|
||||
find_program(SQUISH_SERVER_EXECUTABLE ${SQUISH_INSTALL_DIR}/bin/squishserver DOC "The ${SQUISH_SERVER_EXECUTABLE_STRING}")
|
||||
find_program(SQUISH_SERVER_EXECUTABLE ${SQUISH_INSTALL_DIR}/bin/squishserver${CMAKE_EXECUTABLE_SUFFIX} DOC "The ${SQUISH_SERVER_EXECUTABLE_STRING}")
|
||||
endif()
|
||||
|
||||
else()
|
||||
set(SQUISH_INSTALL_DIR_FOUND 0)
|
||||
endif()
|
||||
|
||||
|
||||
set(SQUISH_VERSION)
|
||||
set(SQUISH_VERSION_MAJOR )
|
||||
set(SQUISH_VERSION_MINOR )
|
||||
set(SQUISH_VERSION_PATCH )
|
||||
|
||||
# record if executables are set
|
||||
if(SQUISH_CLIENT_EXECUTABLE)
|
||||
set(SQUISH_CLIENT_EXECUTABLE_FOUND 1)
|
||||
execute_process(COMMAND "${SQUISH_CLIENT_EXECUTABLE}" --version
|
||||
OUTPUT_VARIABLE _squishVersionOutput
|
||||
ERROR_QUIET )
|
||||
if("${_squishVersionOutput}" MATCHES "([0-9]+)\\.([0-9]+)\\.([0-9]+).*$")
|
||||
set(SQUISH_VERSION_MAJOR "${CMAKE_MATCH_1}")
|
||||
set(SQUISH_VERSION_MINOR "${CMAKE_MATCH_2}")
|
||||
set(SQUISH_VERSION_PATCH "${CMAKE_MATCH_3}")
|
||||
set(SQUISH_VERSION "${SQUISH_VERSION_MAJOR}.${SQUISH_VERSION_MINOR}.${SQUISH_VERSION_PATCH}" )
|
||||
endif()
|
||||
else()
|
||||
set(SQUISH_CLIENT_EXECUTABLE_FOUND 0)
|
||||
endif()
|
||||
|
@ -100,16 +156,21 @@ else()
|
|||
endif()
|
||||
|
||||
# record if Squish was found
|
||||
set(SQUISH_FOUND 1)
|
||||
foreach(var SQUISH_INSTALL_DIR_FOUND SQUISH_CLIENT_EXECUTABLE_FOUND SQUISH_SERVER_EXECUTABLE_FOUND)
|
||||
if(NOT ${var})
|
||||
set(SQUISH_FOUND 0)
|
||||
endif()
|
||||
endforeach()
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Squish REQUIRED_VARS SQUISH_INSTALL_DIR SQUISH_CLIENT_EXECUTABLE SQUISH_SERVER_EXECUTABLE
|
||||
VERSION_VAR SQUISH_VERSION )
|
||||
|
||||
|
||||
set(_SQUISH_MODULE_DIR "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
macro(SQUISH_V3_ADD_TEST testName testAUT testCase envVars testWraper)
|
||||
if("${SQUISH_VERSION_MAJOR}" STREQUAL "4")
|
||||
message(STATUS "Using squish_v3_add_test(), but SQUISH_VERSION_MAJOR is ${SQUISH_VERSION_MAJOR}.\nThis may not work.")
|
||||
endif()
|
||||
|
||||
macro(SQUISH_ADD_TEST testName testAUT testCase envVars testWraper)
|
||||
add_test(${testName}
|
||||
${CMAKE_COMMAND} -V -VV
|
||||
"-Dsquish_version:STRING=3"
|
||||
"-Dsquish_aut:STRING=${testAUT}"
|
||||
"-Dsquish_server_executable:STRING=${SQUISH_SERVER_EXECUTABLE}"
|
||||
"-Dsquish_client_executable:STRING=${SQUISH_CLIENT_EXECUTABLE}"
|
||||
|
@ -117,10 +178,84 @@ macro(SQUISH_ADD_TEST testName testAUT testCase envVars testWraper)
|
|||
"-Dsquish_test_case:STRING=${testCase}"
|
||||
"-Dsquish_env_vars:STRING=${envVars}"
|
||||
"-Dsquish_wrapper:STRING=${testWraper}"
|
||||
-P "${CMAKE_ROOT}/Modules/SquishTestScript.cmake"
|
||||
"-Dsquish_module_dir:STRING=${_SQUISH_MODULE_DIR}"
|
||||
-P "${_SQUISH_MODULE_DIR}/SquishTestScript.cmake"
|
||||
)
|
||||
set_tests_properties(${testName}
|
||||
PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED;ERROR;FATAL"
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
||||
macro(SQUISH_ADD_TEST)
|
||||
message(STATUS "Using squish_add_test() is deprecated, use squish_v3_add_test() instead.")
|
||||
squish_v3_add_test(${ARGV})
|
||||
endmacro()
|
||||
|
||||
|
||||
function(SQUISH_V4_ADD_TEST testName)
|
||||
|
||||
if(NOT "${SQUISH_VERSION_MAJOR}" STREQUAL "4")
|
||||
message(STATUS "Using squish_v4_add_test(), but SQUISH_VERSION_MAJOR is ${SQUISH_VERSION_MAJOR}.\nThis may not work.")
|
||||
endif()
|
||||
|
||||
set(oneValueArgs AUT SUITE TEST SETTINGSGROUP PRE_COMMAND POST_COMMAND)
|
||||
|
||||
cmake_parse_arguments(_SQUISH "" "${oneValueArgs}" "" ${ARGN} )
|
||||
|
||||
if(_SQUISH_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "Unknown keywords given to SQUISH_ADD_TEST(): \"${_SQUISH_UNPARSED_ARGUMENTS}\"")
|
||||
endif()
|
||||
|
||||
if(NOT _SQUISH_AUT)
|
||||
message(FATAL_ERROR "Required argument AUT not given for SQUISH_ADD_TEST()")
|
||||
endif()
|
||||
|
||||
if(NOT _SQUISH_SUITE)
|
||||
message(FATAL_ERROR "Required argument SUITE not given for SQUISH_ADD_TEST()")
|
||||
endif()
|
||||
|
||||
if(NOT _SQUISH_TEST)
|
||||
message(FATAL_ERROR "Required argument TEST not given for SQUISH_ADD_TEST()")
|
||||
endif()
|
||||
|
||||
get_target_property(testAUTLocation ${_SQUISH_AUT} LOCATION)
|
||||
get_filename_component(testAUTDir ${testAUTLocation} PATH)
|
||||
get_filename_component(testAUTName ${testAUTLocation} NAME)
|
||||
|
||||
get_filename_component(absTestSuite "${_SQUISH_SUITE}" ABSOLUTE)
|
||||
if(NOT EXISTS "${absTestSuite}")
|
||||
message(FATAL_ERROR "Could not find squish test suite ${_SQUISH_SUITE} (checked ${absTestSuite})")
|
||||
endif()
|
||||
|
||||
set(absTestCase "${absTestSuite}/${_SQUISH_TEST}")
|
||||
if(NOT EXISTS "${absTestCase}")
|
||||
message(FATAL_ERROR "Could not find squish testcase ${_SQUISH_TEST} (checked ${absTestCase})")
|
||||
endif()
|
||||
|
||||
if(NOT _SQUISH_SETTINGSGROUP)
|
||||
set(_SQUISH_SETTINGSGROUP "CTest_$ENV{LOGNAME}")
|
||||
endif()
|
||||
|
||||
add_test(${testName}
|
||||
${CMAKE_COMMAND} -V -VV
|
||||
"-Dsquish_version:STRING=4"
|
||||
"-Dsquish_aut:STRING=${testAUTName}"
|
||||
"-Dsquish_aut_dir:STRING=${testAUTDir}"
|
||||
"-Dsquish_server_executable:STRING=${SQUISH_SERVER_EXECUTABLE}"
|
||||
"-Dsquish_client_executable:STRING=${SQUISH_CLIENT_EXECUTABLE}"
|
||||
"-Dsquish_libqtdir:STRING=${QT_LIBRARY_DIR}"
|
||||
"-Dsquish_test_suite:STRING=${absTestSuite}"
|
||||
"-Dsquish_test_case:STRING=${_SQUISH_TEST}"
|
||||
"-Dsquish_env_vars:STRING=${envVars}"
|
||||
"-Dsquish_wrapper:STRING=${testWraper}"
|
||||
"-Dsquish_module_dir:STRING=${_SQUISH_MODULE_DIR}"
|
||||
"-Dsquish_settingsgroup:STRING=${_SQUISH_SETTINGSGROUP}"
|
||||
"-Dsquish_pre_command:STRING=${_SQUISH_PRE_COMMAND}"
|
||||
"-Dsquish_post_command:STRING=${_SQUISH_POST_COMMAND}"
|
||||
-P "${_SQUISH_MODULE_DIR}/SquishTestScript.cmake"
|
||||
)
|
||||
set_tests_properties(${testName}
|
||||
PROPERTIES FAIL_REGULAR_EXPRESSION "FAIL;FAILED;ERROR;FATAL"
|
||||
)
|
||||
endfunction()
|
||||
|
|
|
@ -44,9 +44,9 @@
|
|||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
include(CMakeFindFrameworks)
|
||||
include(FindTclsh)
|
||||
include(FindWish)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CMakeFindFrameworks.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindTclsh.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindWish.cmake)
|
||||
|
||||
if(TCLSH_VERSION_STRING)
|
||||
set(TCL_TCLSH_VERSION "${TCLSH_VERSION_STRING}")
|
||||
|
@ -82,6 +82,10 @@ set(TCLTK_POSSIBLE_LIB_PATHS
|
|||
"${TK_LIBRARY_PATH}"
|
||||
"${TCL_TCLSH_PATH_PARENT}/lib"
|
||||
"${TK_WISH_PATH_PARENT}/lib"
|
||||
/usr/local/lib/tcl/tcl8.5
|
||||
/usr/local/lib/tcl/tk8.5
|
||||
/usr/local/lib/tcl/tcl8.4
|
||||
/usr/local/lib/tcl/tk8.4
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
|
@ -168,6 +172,10 @@ set(TCLTK_POSSIBLE_INCLUDE_PATHS
|
|||
/usr/include/tcl8.3
|
||||
/usr/include/tcl8.2
|
||||
/usr/include/tcl8.0
|
||||
/usr/local/include/tcl8.5
|
||||
/usr/local/include/tk8.5
|
||||
/usr/local/include/tcl8.4
|
||||
/usr/local/include/tk8.4
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
include(FindTCL)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindTCL.cmake)
|
||||
|
||||
get_filename_component(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH)
|
||||
get_filename_component(TCL_TCLSH_PATH_PARENT "${TCL_TCLSH_PATH}" PATH)
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
include(FindCygwin)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake)
|
||||
|
||||
find_program(BASH
|
||||
bash
|
||||
|
|
|
@ -62,7 +62,7 @@ set(VTK_DIR_MESSAGE "VTK not found. Set the VTK_DIR cmake cache entry to the ${
|
|||
if(_VTK_40_ALLOW AND VTK_DIR)
|
||||
if(EXISTS ${VTK_DIR}/UseVTK.cmake AND NOT EXISTS ${VTK_DIR}/VTKConfig.cmake)
|
||||
set(VTK_FOUND 1)
|
||||
include(UseVTKConfig40) # No VTKConfig; load VTK 4.0 settings.
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/UseVTKConfig40.cmake) # No VTKConfig; load VTK 4.0 settings.
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -117,7 +117,7 @@ if(_VTK_40_ALLOW AND NOT VTK_DIR)
|
|||
if(VTK_DIR)
|
||||
if(EXISTS ${VTK_DIR}/UseVTK.cmake AND NOT EXISTS ${VTK_DIR}/VTKConfig.cmake)
|
||||
set(VTK_FOUND 1)
|
||||
include(UseVTKConfig40) # No VTKConfig; load VTK 4.0 settings.
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/UseVTKConfig40.cmake) # No VTKConfig; load VTK 4.0 settings.
|
||||
else()
|
||||
# We found the wrong version. Pretend we did not find it.
|
||||
set(VTK_DIR "VTK_DIR-NOTFOUND" CACHE PATH "The ${VTK_DIR_DESCRIPTION}" FORCE)
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
include(FindCygwin)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake)
|
||||
|
||||
find_program(WGET_EXECUTABLE
|
||||
wget
|
||||
|
|
|
@ -336,8 +336,8 @@ if (UNIX)
|
|||
endif ()
|
||||
|
||||
if(X11_FOUND)
|
||||
include(CheckFunctionExists)
|
||||
include(CheckLibraryExists)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CheckFunctionExists.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CheckLibraryExists.cmake)
|
||||
|
||||
# Translated from an autoconf-generated configure script.
|
||||
# See libs.m4 in autoconf's m4 directory.
|
||||
|
@ -417,7 +417,7 @@ if (UNIX)
|
|||
# Build the final list of libraries.
|
||||
set(X11_LIBRARIES ${X11_X_PRE_LIBS} ${X11_LIBRARIES} ${X11_X_EXTRA_LIBS})
|
||||
|
||||
include(FindPackageMessage)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageMessage.cmake)
|
||||
FIND_PACKAGE_MESSAGE(X11 "Found X11: ${X11_X11_LIB}"
|
||||
"[${X11_X11_LIB}][${X11_INCLUDE_DIR}]")
|
||||
else ()
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
# #include <osg/PositionAttitudeTransform>
|
||||
# #include <osgUtil/SceneView>
|
||||
|
||||
include(Findosg_functions)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
|
||||
OSG_FIND_PATH (OSG osg/PositionAttitudeTransform)
|
||||
OSG_FIND_LIBRARY(OSG osg)
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
# #include <osg/PositionAttitudeTransform>
|
||||
# #include <osgAnimation/Animation>
|
||||
|
||||
include(Findosg_functions)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
|
||||
OSG_FIND_PATH (OSGANIMATION osgAnimation/Animation)
|
||||
OSG_FIND_LIBRARY(OSGANIMATION osgAnimation)
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
# #include <osg/PositionAttitudeTransform>
|
||||
# #include <osgDB/DatabasePager>
|
||||
|
||||
include(Findosg_functions)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
|
||||
OSG_FIND_PATH (OSGDB osgDB/DatabasePager)
|
||||
OSG_FIND_LIBRARY(OSGDB osgDB)
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
# #include <osg/PositionAttitudeTransform>
|
||||
# #include <osgFX/BumpMapping>
|
||||
|
||||
include(Findosg_functions)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
|
||||
OSG_FIND_PATH (OSGFX osgFX/BumpMapping)
|
||||
OSG_FIND_LIBRARY(OSGFX osgFX)
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
# #include <osg/PositionAttitudeTransform>
|
||||
# #include <osgGA/FlightManipulator>
|
||||
|
||||
include(Findosg_functions)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
|
||||
OSG_FIND_PATH (OSGGA osgGA/FlightManipulator)
|
||||
OSG_FIND_LIBRARY(OSGGA osgGA)
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
# #include <osg/PositionAttitudeTransform>
|
||||
# #include <osgIntrospection/Reflection>
|
||||
|
||||
include(Findosg_functions)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
|
||||
OSG_FIND_PATH (OSGINTROSPECTION osgIntrospection/Reflection)
|
||||
OSG_FIND_LIBRARY(OSGINTROSPECTION osgIntrospection)
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
# #include <osg/PositionAttitudeTransform>
|
||||
# #include <osgManipulator/TrackballDragger>
|
||||
|
||||
include(Findosg_functions)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
|
||||
OSG_FIND_PATH (OSGMANIPULATOR osgManipulator/TrackballDragger)
|
||||
OSG_FIND_LIBRARY(OSGMANIPULATOR osgManipulator)
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
# #include <osg/PositionAttitudeTransform>
|
||||
# #include <osgParticle/FireEffect>
|
||||
|
||||
include(Findosg_functions)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
|
||||
OSG_FIND_PATH (OSGPARTICLE osgParticle/FireEffect)
|
||||
OSG_FIND_LIBRARY(OSGPARTICLE osgParticle)
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
# #include <osg/PositionAttitudeTransform>
|
||||
# #include <osgPresentation/SlideEventHandler>
|
||||
|
||||
include(Findosg_functions)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
|
||||
OSG_FIND_PATH (OSGPRESENTATION osgPresentation/SlideEventHandler)
|
||||
OSG_FIND_LIBRARY(OSGPRESENTATION osgPresentation)
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
# #include <osg/PositionAttitudeTransform>
|
||||
# #include <osgProducer/OsgSceneHandler>
|
||||
|
||||
include(Findosg_functions)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
|
||||
OSG_FIND_PATH (OSGPRODUCER osgProducer/OsgSceneHandler)
|
||||
OSG_FIND_LIBRARY(OSGPRODUCER osgProducer)
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
# #include <osg/PositionAttitudeTransform>
|
||||
# #include <osgQt/GraphicsWindowQt>
|
||||
|
||||
include(Findosg_functions)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
|
||||
OSG_FIND_PATH (OSGQT osgQt/GraphicsWindowQt)
|
||||
OSG_FIND_LIBRARY(OSGQT osgQt)
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
# #include <osg/PositionAttitudeTransform>
|
||||
# #include <osgShadow/ShadowTexture>
|
||||
|
||||
include(Findosg_functions)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
|
||||
OSG_FIND_PATH (OSGSHADOW osgShadow/ShadowTexture)
|
||||
OSG_FIND_LIBRARY(OSGSHADOW osgShadow)
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue