Import cmake 2.6.3~rc11

Signed-off-by: Modestas Vainius <modestas@vainius.eu>
ci/unstable
Modestas Vainius 16 years ago
parent 4a0599115c
commit 2f5181c101

@ -353,8 +353,8 @@ ENDMACRO (CMAKE_BUILD_UTILITIES)
# The CMake version number. # The CMake version number.
SET(CMake_VERSION_MAJOR 2) SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 6) SET(CMake_VERSION_MINOR 6)
SET(CMake_VERSION_PATCH 2) SET(CMake_VERSION_PATCH 3)
#SET(CMake_VERSION_RC 6) SET(CMake_VERSION_RC 11)
# CVS versions are odd, if this is an odd minor version # CVS versions are odd, if this is an odd minor version
# then set the CMake_VERSION_DATE variable # then set the CMake_VERSION_DATE variable
IF("${CMake_VERSION_MINOR}" MATCHES "[13579]$") IF("${CMake_VERSION_MINOR}" MATCHES "[13579]$")

@ -5,3 +5,8 @@ set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "www.cdash.org") set(CTEST_DROP_SITE "www.cdash.org")
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=CMake") set(CTEST_DROP_LOCATION "/CDash/submit.php?project=CMake")
set(CTEST_DROP_SITE_CDASH TRUE) set(CTEST_DROP_SITE_CDASH TRUE)
# use old trigger stuff so that cmake 2.4 and below will not
# get errors on trigger
SET (TRIGGER_SITE
"http://public.kitware.com/cgi-bin/Submit-CMake-TestingResults.cgi")

@ -2,6 +2,7 @@ SET(CTEST_CUSTOM_WARNING_EXCEPTION
${CTEST_CUSTOM_WARNING_EXCEPTION} ${CTEST_CUSTOM_WARNING_EXCEPTION}
"xtree.[0-9]+. : warning C4702: unreachable code" "xtree.[0-9]+. : warning C4702: unreachable code"
"warning LNK4221" "warning LNK4221"
"warning LNK4204" # Occurs by race condition with objects in small libs
"variable .var_args[2]*. is used before its value is set" "variable .var_args[2]*. is used before its value is set"
"jobserver unavailable" "jobserver unavailable"
"warning: \\(Long double usage is reported only once for each file" "warning: \\(Long double usage is reported only once for each file"

@ -1,3 +1,141 @@
Changes in CMake 2.6.3 RC 11
- Fix old-style install to prefix top
- Fix Docs for relative paths in link_directories
- Fix OS X dylib version flags for more linkers
- Add some extra search paths for Haiku
- Fix FindDoxygen not respecting QUIET and REQUIRED
- Fix FindGDAL, FindLua50 FindLua51 FindMPEG2
- add FindOpenSceneGraph.cmake
- Fixes for FindOSG
- Fix FindQt4 find .moc files if there are spaces between # and include#8433.
- Change haiku to use dlopen functions and not BEOS stuff
Changes in CMake 2.6.3 RC 10
- Fix issue #7470. Allow spaces in the path names for CPack NSIS.
- Fix crash with set properties and empty values
- Enforce matching cmake_policy push/pop scope in scripts
- Document find_package refind
- add unset command
- add/fix many osg modules
- Fixes for FindBoost.cmake
- Fixes for FindDoxygen.cmake
- Fixes for FindFLTK.cmake
- Fix endif in FindKDE4.cmake
- Fix HEADER_FILE_ONLY with VS and midl files #7845
- Add #7833 changes to support OSXX11 file associations
- Fix target ordering in VS IDE solution files
- Fix LOCATION property for Mac App Bundle targets
- Better diagnosis of mismatching logical blocks
- Improve scoping of policies (see cmake_policy and CMP0011)
Changes in CMake 2.6.3 RC 9
- Fix borland 55 build
- Pop a function scope even on error
- Provide variable CMAKE_VERSION
Changes in CMake 2.6.3 RC 8
- CMAKE_VERBOSE_MAKEFILE fix for KDevelop3
- FindGettext.cmake fix #8122
- FindPythonInterp.cmake find python 2.6 on windows
- cmake_minimum_required forward compatibility
- Fix (#7289) in cmDocumentationFormatterDocbook.cxx
- Fix #8203: codeblocks + mingw quoting issue
- Clean per-config export files during install
- Bug fixes for Eclipse CDT4 generator
- find_package refind when previously found file is removed
- Support '-' in target names for VS6
- Fix component-name test on installation
- Warn when build directory is too long
- Fix set cache FORCE and -D command line to work together
- Enable LOCATION property for imported targets
- Allow cmake-gui to be built by cmake 2.4
- Fix installation from read-only source file
- Fix for rc and vs6 -D flags
- Create DEBUG_CONFIGURATIONS global property
Changes in CMake 2.6.3 RC 7
- Add both 32/64-bit Program Files as windows paths
- Fix potential crash with ctest and log being null
Changes in CMake 2.6.3 RC 6
- Fix project(foo NONE) enable c later bug on OSX
- Fix Haiku default paths
- RPM Update generator to handle optional dependencies using Requires
- Fix FindCurses for Haiku
- Look for doxygen in more places
- Look for different expat names on windows
- FindLibxml2 use FindPkgConfig.cmake instead of UsePkgConfig.cmake,
- Add translations support to FindQt4.cmake
- FindWxWidgets Fixed placement of initial wxWidgets_FOUND=TRUE
- Fix GetPrerequisites.cmake to work with 0 libs
- Add support for Squish
- Make bundle startup optional in bundle generator
- Fix runtime search path ordering with symlinks (fix from RC4)
- Fix escaping of empty custom command argument on Windows
- Teach find_package more config file locations
- Fix scope of find_package definitions in find-modules
- Teach find_package to push/pop policies for version files
Changes in CMake 2.6.3 RC 5
- add EXCLUDE, INCLUDE to ctest_test command in ctest -S scripts
- Set CMAKE_SYSTEM in ctest -S scripts by reading CMakeDetermineSystem
- Fix for GetLibraryNamesInternal called on imported target issue on osx
- Add FortranCInterface.cmake module to discover Fortran/C interfaces
- Fix Fortran compiler specified with -D issue
- Add support for the MS masm and masm64 assemblers, works with nmake/make
- Improvments to FindQt4.cmake
- InstallRequiredSystemLibraries fix for win64
- Fix flags for Sun Fortran, and g77
- Fix imported library issue with OSX
- Fix -D and CACHE FORCE issue
- Have kwsys submit dashboards to cdash.org
Changes in CMake 2.6.3 RC 4
- Fix for SccProvider in visual studio
- fix for missing package_source target
- FindQt4 QT_PHONON_MODULE_DEPENDS fixes
- Fixes for GetPrerequisites.cmake system libraries on Mac and UNIX
- Merge in kwsys Haiku DynaimcLoader change
Changes in CMake 2.6.3 RC 3
- Merge in CMakeLists.txt curl Haiku change
Changes in CMake 2.6.3 RC 2
- Merge in more Haiku changes
Changes in CMake 2.6.3 RC 1
- Better reporting when nmake compiler environment is not correct
- Fix bug #5936 set locale when running cvs and svn
- Teach find_library to find OpenBSD-style libs (issue #3470).
- Fix lib/ to lib/64/ search path conversion
- Fix CPack DESTDIR issue
- Support longer command lines with windows nmake and make
- Fix bug with color check for dependency scanning
- Use new link info during dependency scanning
- Fix find_* search order with path suffixes
- Fix install with multiple configurations and makefiles.
- Improve find_package interface for recursive find modules.
- Fix build issues with older visual studio versions
- Fix Xcode release builds
- Put custom target sources in Xcode projects
- Fix return value from cmake -E time commands
- Fix documentation for cmake --debug-trycompile
- Add Haiku support
- Fix bug, allow enable_language to be called for C after CXX
- Add FindCoin3D.cmake
- Fix bug in FindGLUT.cmake
- Better find of perl in FindPerlLibs.cmake
- FindQt4 Fix #7784, Fix #7433
- FindQt4 refind qt when qmake changes
- Fix to find wxWidgets_LIB_DIR for windows platform more generally.
- Find ttkstup in FindTclStub.cmake
- Skip a command if its arguments fail to parse
- Fix convenience rule working directory
- Add support for source code control and visual stuido
- Add parenthetical expressions to if
- Fix Rc command with -D options and nmake
- Fix NSIS detection on windows 2000
- Display an error message in ccmake when there are errors
CMake 2.6.2 released
Changes in CMake 2.6.2 RC 6 Changes in CMake 2.6.2 RC 6
- Fix bug#7669 cpack did not work when sym-linked after install - Fix bug#7669 cpack did not work when sym-linked after install

@ -1,3 +1,5 @@
# support for AT&T syntax assemblers, e.g. GNU as
SET(ASM_DIALECT "-ATT") SET(ASM_DIALECT "-ATT")
SET(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;S;asm) SET(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;S;asm)
INCLUDE(CMakeASMInformation) INCLUDE(CMakeASMInformation)

@ -7,7 +7,7 @@ ELSE(UNIX)
ENDIF(UNIX) ENDIF(UNIX)
SET(CMAKE_INCLUDE_FLAG_ASM${ASM_DIALECT} "-I") # -I SET(CMAKE_INCLUDE_FLAG_ASM${ASM_DIALECT} "-I") # -I
SET(CMAKE_BASE_NAME)
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME_WE) GET_FILENAME_COMPONENT(CMAKE_BASE_NAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME_WE)
IF("${CMAKE_BASE_NAME}" STREQUAL "as") IF("${CMAKE_BASE_NAME}" STREQUAL "as")

@ -0,0 +1,10 @@
# support for the MS assembler, masm and masm64
SET(ASM_DIALECT "_MASM")
SET(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS asm)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <FLAGS> /c /Fo <OBJECT> <SOURCE>")
INCLUDE(CMakeASMInformation)
SET(ASM_DIALECT)

@ -12,7 +12,7 @@ IF(UNIX)
ELSE(UNIX) ELSE(UNIX)
SET(CMAKE_C_OUTPUT_EXTENSION .obj) SET(CMAKE_C_OUTPUT_EXTENSION .obj)
ENDIF(UNIX) ENDIF(UNIX)
SET(CMAKE_BASE_NAME)
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_C_COMPILER} NAME_WE) GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_C_COMPILER} NAME_WE)
IF(CMAKE_COMPILER_IS_GNUCC) IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_BASE_NAME gcc) SET(CMAKE_BASE_NAME gcc)
@ -32,10 +32,20 @@ ENDIF(CMAKE_SYSTEM_PROCESSOR)
# load the system- and compiler specific files # load the system- and compiler specific files
IF(CMAKE_C_COMPILER_ID) IF(CMAKE_C_COMPILER_ID)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C
OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF(CMAKE_C_COMPILER_ID) ENDIF(CMAKE_C_COMPILER_ID)
IF (NOT _INCLUDED_FILE) IF (NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}
OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF (NOT _INCLUDED_FILE)
# some systems include the compiler information in the system file
# and if this is the enable_language command then it may not have been
# included at this point, or needs to be included again so that the
# language_INIT variables are set correctly
IF (NOT _INCLUDED_FILE)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}
OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
ENDIF (NOT _INCLUDED_FILE) ENDIF (NOT _INCLUDED_FILE)

@ -13,7 +13,7 @@ ELSE(UNIX)
SET(CMAKE_CXX_OUTPUT_EXTENSION .obj) SET(CMAKE_CXX_OUTPUT_EXTENSION .obj)
ENDIF(UNIX) ENDIF(UNIX)
SET(CMAKE_BASE_NAME)
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE) GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
# since the gnu compiler has several names force g++ # since the gnu compiler has several names force g++
IF(CMAKE_COMPILER_IS_GNUCXX) IF(CMAKE_COMPILER_IS_GNUCXX)

@ -1,4 +1,4 @@
# determine the compiler to use for ASM using AT&T syntax # determine the compiler to use for ASM using AT&T syntax, e.g. GNU as
SET(ASM_DIALECT "-ATT") SET(ASM_DIALECT "-ATT")
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ${_CMAKE_TOOLCHAIN_PREFIX}gas ${_CMAKE_TOOLCHAIN_PREFIX}as) SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ${_CMAKE_TOOLCHAIN_PREFIX}gas ${_CMAKE_TOOLCHAIN_PREFIX}as)

@ -17,7 +17,7 @@ IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
IF (_CMAKE_USER_CXX_COMPILER_PATH OR _CMAKE_USER_C_COMPILER_PATH) IF (_CMAKE_USER_CXX_COMPILER_PATH OR _CMAKE_USER_C_COMPILER_PATH)
FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST} PATHS ${_CMAKE_USER_C_COMPILER_PATH} ${_CMAKE_USER_CXX_COMPILER_PATH} DOC "Assembler" NO_DEFAULT_PATH) FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST} PATHS ${_CMAKE_USER_C_COMPILER_PATH} ${_CMAKE_USER_CXX_COMPILER_PATH} DOC "Assembler" NO_DEFAULT_PATH)
ENDIF (_CMAKE_USER_CXX_COMPILER_PATH OR _CMAKE_USER_C_COMPILER_PATH) ENDIF (_CMAKE_USER_CXX_COMPILER_PATH OR _CMAKE_USER_C_COMPILER_PATH)
FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST} DOC "Assembler") FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST} PATHS ${_CMAKE_TOOLCHAIN_LOCATION} DOC "Assembler")
ELSE(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER) ELSE(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)

@ -0,0 +1,13 @@
# Find the MS assembler (masm or masm64)
SET(ASM_DIALECT "_MASM")
# if we are using the 64bit cl compiler, assume we also want the 64bit assembler
IF(CMAKE_CL_64)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ml64)
ELSE(CMAKE_CL_64)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ml)
ENDIF(CMAKE_CL_64)
INCLUDE(CMakeDetermineASMCompiler)
SET(ASM_DIALECT)

@ -53,7 +53,7 @@ IF(NOT CMAKE_Fortran_COMPILER)
# CMake/Source/CMakeLists.txt, IF YOU CHANGE THIS LIST, # CMake/Source/CMakeLists.txt, IF YOU CHANGE THIS LIST,
# PLEASE UPDATE THAT FILE AS WELL! # PLEASE UPDATE THAT FILE AS WELL!
SET(CMAKE_Fortran_COMPILER_LIST SET(CMAKE_Fortran_COMPILER_LIST
ifort ifc efc f95 pgf95 lf95 xlf95 fort gfortran g95 f90 ifort ifc efc f95 pgf95 lf95 xlf95 fort gfortran gfortran-4 g95 f90
pgf90 xlf90 epcf90 fort77 frt pgf77 xlf fl32 af77 g77 f77 pgf90 xlf90 epcf90 fort77 frt pgf77 xlf fl32 af77 g77 f77
) )
ENDIF(CMAKE_Fortran_COMPILER_INIT) ENDIF(CMAKE_Fortran_COMPILER_INIT)
@ -63,6 +63,32 @@ IF(NOT CMAKE_Fortran_COMPILER)
IF(CMAKE_Fortran_COMPILER_INIT AND NOT CMAKE_Fortran_COMPILER) IF(CMAKE_Fortran_COMPILER_INIT AND NOT CMAKE_Fortran_COMPILER)
SET(CMAKE_Fortran_COMPILER "${CMAKE_Fortran_COMPILER_INIT}" CACHE FILEPATH "Fortran compiler" FORCE) SET(CMAKE_Fortran_COMPILER "${CMAKE_Fortran_COMPILER_INIT}" CACHE FILEPATH "Fortran compiler" FORCE)
ENDIF(CMAKE_Fortran_COMPILER_INIT AND NOT CMAKE_Fortran_COMPILER) ENDIF(CMAKE_Fortran_COMPILER_INIT AND NOT CMAKE_Fortran_COMPILER)
ELSE(NOT CMAKE_Fortran_COMPILER)
# we only get here if CMAKE_Fortran_COMPILER was specified using -D or a pre-made CMakeCache.txt
# (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
# if CMAKE_Fortran_COMPILER is a list of length 2, use the first item as
# CMAKE_Fortran_COMPILER and the 2nd one as CMAKE_Fortran_COMPILER_ARG1
LIST(LENGTH CMAKE_Fortran_COMPILER _CMAKE_Fortran_COMPILER_LIST_LENGTH)
IF("${_CMAKE_Fortran_COMPILER_LIST_LENGTH}" EQUAL 2)
LIST(GET CMAKE_Fortran_COMPILER 1 CMAKE_Fortran_COMPILER_ARG1)
LIST(GET CMAKE_Fortran_COMPILER 0 CMAKE_Fortran_COMPILER)
ENDIF("${_CMAKE_Fortran_COMPILER_LIST_LENGTH}" EQUAL 2)
# if a compiler was specified by the user but without path,
# now try to find it with the full path
# if it is found, force it into the cache,
# if not, don't overwrite the setting (which was given by the user) with "NOTFOUND"
# if the C compiler already had a path, reuse it for searching the CXX compiler
GET_FILENAME_COMPONENT(_CMAKE_USER_Fortran_COMPILER_PATH "${CMAKE_Fortran_COMPILER}" PATH)
IF(NOT _CMAKE_USER_Fortran_COMPILER_PATH)
FIND_PROGRAM(CMAKE_Fortran_COMPILER_WITH_PATH NAMES ${CMAKE_Fortran_COMPILER})
MARK_AS_ADVANCED(CMAKE_Fortran_COMPILER_WITH_PATH)
IF(CMAKE_Fortran_COMPILER_WITH_PATH)
SET(CMAKE_Fortran_COMPILER ${CMAKE_Fortran_COMPILER_WITH_PATH}
CACHE STRING "Fortran compiler" FORCE)
ENDIF(CMAKE_Fortran_COMPILER_WITH_PATH)
ENDIF(NOT _CMAKE_USER_Fortran_COMPILER_PATH)
ENDIF(NOT CMAKE_Fortran_COMPILER) ENDIF(NOT CMAKE_Fortran_COMPILER)
MARK_AS_ADVANCED(CMAKE_Fortran_COMPILER) MARK_AS_ADVANCED(CMAKE_Fortran_COMPILER)

@ -50,6 +50,10 @@ PROGRAM CMakeFortranCompilerId
PRINT *, 'INFO:platform[IRIX]' PRINT *, 'INFO:platform[IRIX]'
#elif defined(__hpux) || defined(__hpux__) #elif defined(__hpux) || defined(__hpux__)
PRINT *, 'INFO:platform[HP-UX]' PRINT *, 'INFO:platform[HP-UX]'
#elif defined(__HAIKU) || defined(__HAIKU__) || defined(_HAIKU)
PRINT *, 'INFO:platform[Haiku]'
! Haiku also defines __BEOS__ so we must
! put it prior to the check for __BEOS__
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
PRINT *, 'INFO:platform[BeOS]' PRINT *, 'INFO:platform[BeOS]'
#elif defined(__QNX__) || defined(__QNXNTO__) #elif defined(__QNX__) || defined(__QNXNTO__)

@ -3,6 +3,7 @@
# It also loads the available platform file for the system-compiler # It also loads the available platform file for the system-compiler
# if it exists. # if it exists.
SET(CMAKE_BASE_NAME)
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER} NAME_WE) GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER} NAME_WE)
# since the gnu compiler has several names force g++ # since the gnu compiler has several names force g++
IF(CMAKE_COMPILER_IS_GNUG77) IF(CMAKE_COMPILER_IS_GNUG77)

@ -26,11 +26,7 @@ SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)
SET (CMAKE_SKIP_RPATH "NO" CACHE BOOL SET (CMAKE_SKIP_RPATH "NO" CACHE BOOL
"If set, runtime paths are not added when using shared libraries.") "If set, runtime paths are not added when using shared libraries.")
SET(CMAKE_INIT_VALUE FALSE) SET(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
IF(CMAKE_GENERATOR MATCHES "KDevelop3")
SET(CMAKE_INIT_VALUE TRUE)
ENDIF(CMAKE_GENERATOR MATCHES "KDevelop3")
SET(CMAKE_VERBOSE_MAKEFILE ${CMAKE_INIT_VALUE} CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
IF(CMAKE_GENERATOR MATCHES "Makefiles") IF(CMAKE_GENERATOR MATCHES "Makefiles")
SET(CMAKE_COLOR_MAKEFILE ON CACHE BOOL SET(CMAKE_COLOR_MAKEFILE ON CACHE BOOL

@ -35,6 +35,12 @@
#elif defined(__hpux) || defined(__hpux__) #elif defined(__hpux) || defined(__hpux__)
# define PLATFORM_ID "HP-UX" # define PLATFORM_ID "HP-UX"
#elif defined(__HAIKU) || defined(__HAIKU__) || 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) #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
# define PLATFORM_ID "BeOS" # define PLATFORM_ID "BeOS"

@ -3,12 +3,15 @@
# It also loads the available platform file for the system-compiler # It also loads the available platform file for the system-compiler
# if it exists. # if it exists.
# make sure we don't use CMAKE_BASE_NAME from somewhere else
SET(CMAKE_BASE_NAME)
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE) GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE)
SET(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE SET(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE
${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake) ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
SET (CMAKE_RC_FLAGS "$ENV{RCFLAGS} ${CMAKE_RC_FLAGS_INIT}" CACHE STRING SET (CMAKE_RC_FLAGS "$ENV{RCFLAGS} ${CMAKE_RC_FLAGS_INIT}" CACHE STRING
"Flags for Fortran compiler.") "Flags for Fortran compiler.")
@ -23,7 +26,7 @@ SET(CMAKE_INCLUDE_FLAG_RC "-I")
# compile a Resource file into an object file # compile a Resource file into an object file
IF(NOT CMAKE_RC_COMPILE_OBJECT) IF(NOT CMAKE_RC_COMPILE_OBJECT)
SET(CMAKE_RC_COMPILE_OBJECT SET(CMAKE_RC_COMPILE_OBJECT
"<CMAKE_RC_COMPILER> <FLAGS> /fo<OBJECT> <SOURCE>") "<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> /fo<OBJECT> <SOURCE>")
ENDIF(NOT CMAKE_RC_COMPILE_OBJECT) ENDIF(NOT CMAKE_RC_COMPILE_OBJECT)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(

@ -29,7 +29,7 @@ IF(NOT _INCLUDED_SYSTEM_INFO_FILE)
IF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt) IF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/CMakeCache.txt CONFIGURE_FILE(${CMAKE_BINARY_DIR}/CMakeCache.txt
${CMAKE_BINARY_DIR}/CopyOfCMakeCache.txt COPYONLY) ${CMAKE_BINARY_DIR}/CopyOfCMakeCache.txt COPYONLY)
MESSAGE("You CMakeCache.txt file was copied to CopyOfCMakeCache.txt. " MESSAGE("Your CMakeCache.txt file was copied to CopyOfCMakeCache.txt. "
"Please send that file to cmake@www.cmake.org.") "Please send that file to cmake@www.cmake.org.")
ENDIF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt) ENDIF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
ENDIF(NOT _INCLUDED_SYSTEM_INFO_FILE) ENDIF(NOT _INCLUDED_SYSTEM_INFO_FILE)

@ -4,6 +4,7 @@
# and link the most basic of programs. If not, a fatal error # and link the most basic of programs. If not, a fatal error
# is set and cmake stops processing commands and will not generate # is set and cmake stops processing commands and will not generate
# any makefiles or projects. # any makefiles or projects.
SET(ASM_DIALECT "-ATT") SET(ASM_DIALECT "-ATT")
INCLUDE(CMakeTestASMCompiler) INCLUDE(CMakeTestASMCompiler)
SET(ASM_DIALECT) SET(ASM_DIALECT)

@ -0,0 +1,10 @@
# This file is used by EnableLanguage in cmGlobalGenerator to
# determine that the selected ASM_MASM "compiler" (should be masm or masm64)
# can actually "compile" and link the most basic of programs. If not, a
# fatal error is set and cmake stops processing commands and will not generate
# any makefiles or projects.
SET(ASM_DIALECT "_MASM")
INCLUDE(CMakeTestASMCompiler)
SET(ASM_DIALECT)

@ -4,6 +4,19 @@
<dict> <dict>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>English</string> <string>English</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>@CPACK_FILE_ASSOCIATION_EXTENSION@</string>
</array>
<key>CFBundleTypeName</key>
<string>@CPACK_FILE_ASSOCIATION_TYPE@</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
</array>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>@CPACK_PACKAGE_FILE_NAME@</string> <string>@CPACK_PACKAGE_FILE_NAME@</string>
<key>CFBundleGetInfoString</key> <key>CFBundleGetInfoString</key>

@ -5,6 +5,26 @@
CWD="`dirname \"$0\"`" CWD="`dirname \"$0\"`"
TMP=/tmp/$UID/TemporaryItems TMP=/tmp/$UID/TemporaryItems
version=`sw_vers -productVersion`
if [ "$?" == "0" ]; then
major=${version%%\.*}
rest=${version#*\.}
minor=${rest%%\.*}
build=${rest#*\.}
else
major=10
minor=4
build=0
fi
echo $version
echo "Major = $major"
echo "Minor = $minor"
echo "Build = $build"
# if 10.5 or greater, then all the open-x11 stuff need not occur
if ((( $major < 10 )) || ((( $major == 10)) && (( $minor < 5 )))); then
version=`sw_vers -productVersion` version=`sw_vers -productVersion`
if [ "$?" = "0" ]; then if [ "$?" = "0" ]; then
major=${version%%\.*} major=${version%%\.*}
@ -42,6 +62,7 @@ else
echo \$DISPLAY > "$TMP/display" echo \$DISPLAY > "$TMP/display"
fi fi
__END_OF_GETDISPLAY_SCRIPT__ __END_OF_GETDISPLAY_SCRIPT__
fi
chmod +x "$TMP/getdisplay.sh" chmod +x "$TMP/getdisplay.sh"
rm -f $TMP/display rm -f $TMP/display
open-x11 $TMP/getdisplay.sh || \ open-x11 $TMP/getdisplay.sh || \

@ -708,6 +708,7 @@ if(NOT CPACK_GENERATOR)
else(CYGWIN) else(CYGWIN)
if(APPLE) if(APPLE)
option(CPACK_BINARY_BUNDLE "Enable to build OSX bundles" OFF) option(CPACK_BINARY_BUNDLE "Enable to build OSX bundles" OFF)
option(CPACK_BINARY_DRAGNDROP "Enable to build OSX Drag And Drop package" OFF)
option(CPACK_BINARY_PACKAGEMAKER "Enable to build PackageMaker packages" ON) option(CPACK_BINARY_PACKAGEMAKER "Enable to build PackageMaker packages" ON)
option(CPACK_BINARY_OSXX11 "Enable to build OSX X11 packages" OFF) option(CPACK_BINARY_OSXX11 "Enable to build OSX X11 packages" OFF)
else(APPLE) else(APPLE)
@ -715,17 +716,18 @@ if(NOT CPACK_GENERATOR)
endif(APPLE) endif(APPLE)
option(CPACK_BINARY_STGZ "Enable to build STGZ packages" ON) option(CPACK_BINARY_STGZ "Enable to build STGZ packages" ON)
option(CPACK_BINARY_TGZ "Enable to build TGZ packages" ON) option(CPACK_BINARY_TGZ "Enable to build TGZ packages" ON)
option(CPACK_BINARY_TBZ2 "Enable to build TBZ2 packages" ON) option(CPACK_BINARY_TBZ2 "Enable to build TBZ2 packages" OFF)
option(CPACK_BINARY_DEB "Enable to build Debian packages" OFF) option(CPACK_BINARY_DEB "Enable to build Debian packages" OFF)
option(CPACK_BINARY_RPM "Enable to build RPM packages" OFF) option(CPACK_BINARY_RPM "Enable to build RPM packages" OFF)
option(CPACK_BINARY_NSIS "Enable to build NSIS packages" OFF) option(CPACK_BINARY_NSIS "Enable to build NSIS packages" OFF)
endif(CYGWIN) endif(CYGWIN)
else(UNIX) else(UNIX)
option(CPACK_BINARY_NSIS "Enable to build NSIS packages" ON) option(CPACK_BINARY_NSIS "Enable to build NSIS packages" ON)
option(CPACK_BINARY_ZIP "Enable to build ZIP packages" ON) option(CPACK_BINARY_ZIP "Enable to build ZIP packages" OFF)
endif(UNIX) endif(UNIX)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_BUNDLE Bundle) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_BUNDLE Bundle)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_DRAGNDROP DragNDrop)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_PACKAGEMAKER PackageMaker) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_PACKAGEMAKER PackageMaker)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_OSXX11 OSXX11) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_OSXX11 OSXX11)
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_CYGWIN CygwinBinary) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_CYGWIN CygwinBinary)
@ -768,7 +770,7 @@ mark_as_advanced(CPACK_BINARY_CYGWIN CPACK_BINARY_PACKAGEMAKER CPACK_BINARY_OSXX
CPACK_BINARY_DEB CPACK_BINARY_RPM CPACK_BINARY_TZ CPACK_BINARY_DEB CPACK_BINARY_RPM CPACK_BINARY_TZ
CPACK_BINARY_NSIS CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE CPACK_BINARY_NSIS CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE
CPACK_SOURCE_CYGWIN CPACK_SOURCE_TBZ2 CPACK_SOURCE_TGZ CPACK_SOURCE_CYGWIN CPACK_SOURCE_TBZ2 CPACK_SOURCE_TGZ
CPACK_SOURCE_TZ CPACK_SOURCE_ZIP) CPACK_SOURCE_TZ CPACK_SOURCE_ZIP CPACK_BINARY_DRAGNDROP)
# Set some other variables # Set some other variables
cpack_set_if_not_set(CPACK_INSTALL_CMAKE_PROJECTS cpack_set_if_not_set(CPACK_INSTALL_CMAKE_PROJECTS

@ -126,11 +126,24 @@ IF (NOT CPACK_RPM_PACKAGE_DESCRIPTION)
ENDIF (CPACK_PACKAGE_DESCRIPTION_FILE) ENDIF (CPACK_PACKAGE_DESCRIPTION_FILE)
ENDIF (NOT CPACK_RPM_PACKAGE_DESCRIPTION) ENDIF (NOT CPACK_RPM_PACKAGE_DESCRIPTION)
# CPACK_RPM_PACKAGE_REQUIRES
# Placeholder used to specify binary RPM dependencies (if any)
# see http://www.rpm.org/max-rpm/s1-rpm-depend-manual-dependencies.html
IF(CPACK_RPM_PACKAGE_REQUIRES)
IF(CPACK_RPM_PACKAGE_DEBUG)
MESSAGE("CPackRPM:Debug: User defined Requires:\n ${CPACK_RPM_PACKAGE_REQUIRES}")
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
SET(TMP_RPM_REQUIRES "Requires: ${CPACK_RPM_PACKAGE_REQUIRES}")
ENDIF(CPACK_RPM_PACKAGE_REQUIRES)
# CPACK_RPM_SPEC_INSTALL_POST # CPACK_RPM_SPEC_INSTALL_POST
# May be used to define a RPM post intallation script # May be used to define a RPM post intallation script
# for example setting it to "/bin/true" may prevent # for example setting it to "/bin/true" may prevent
# rpmbuild from stripping binaries. # rpmbuild from stripping binaries.
IF(CPACK_RPM_SPEC_INSTALL_POST) IF(CPACK_RPM_SPEC_INSTALL_POST)
IF(CPACK_RPM_PACKAGE_DEBUG)
MESSAGE("CPackRPM:Debug: User defined CPACK_RPM_SPEC_INSTALL_POST = ${CPACK_RPM_SPEC_INSTALL_POST}")
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
SET(TMP_RPM_SPEC_INSTALL_POST "%define __spec_install_post ${CPACK_RPM_SPEC_INSTALL_POST}") SET(TMP_RPM_SPEC_INSTALL_POST "%define __spec_install_post ${CPACK_RPM_SPEC_INSTALL_POST}")
ENDIF(CPACK_RPM_SPEC_INSTALL_POST) ENDIF(CPACK_RPM_SPEC_INSTALL_POST)
@ -177,14 +190,13 @@ ELSE(CPACK_RPM_USER_BINARY_SPECFILE)
IF(CPACK_RPM_PACKAGE_DEBUG) IF(CPACK_RPM_PACKAGE_DEBUG)
MESSAGE("CPackRPM:Debug: CPACK_TOPLEVEL_DIRECTORY = ${CPACK_TOPLEVEL_DIRECTORY}") MESSAGE("CPackRPM:Debug: CPACK_TOPLEVEL_DIRECTORY = ${CPACK_TOPLEVEL_DIRECTORY}")
MESSAGE("CPackRPM:Debug: CPACK_TOPLEVEL_TAG = ${CPACK_TOPLEVEL_TAG}") MESSAGE("CPackRPM:Debug: CPACK_TOPLEVEL_TAG = ${CPACK_TOPLEVEL_TAG}")
MESSAGE("CPackRPM:Debug: CPACK_TEMPORARY_DIRECTORY = ${PACK_TEMPORARY_DIRECTORY}") MESSAGE("CPackRPM:Debug: CPACK_TEMPORARY_DIRECTORY = ${CPACK_TEMPORARY_DIRECTORY}")
MESSAGE("CPackRPM:Debug: CPACK_OUTPUT_FILE_NAME = ${CPACK_OUTPUT_FILE_NAME}") MESSAGE("CPackRPM:Debug: CPACK_OUTPUT_FILE_NAME = ${CPACK_OUTPUT_FILE_NAME}")
MESSAGE("CPackRPM:Debug: CPACK_OUTPUT_FILE_PATH = ${CPACK_OUTPUT_FILE_PATH}") MESSAGE("CPackRPM:Debug: CPACK_OUTPUT_FILE_PATH = ${CPACK_OUTPUT_FILE_PATH}")
MESSAGE("CPackRPM:Debug: CPACK_PACKAGE_FILE_NAME = ${CPACK_PACKAGE_FILE_NAME}") MESSAGE("CPackRPM:Debug: CPACK_PACKAGE_FILE_NAME = ${CPACK_PACKAGE_FILE_NAME}")
MESSAGE("CPackRPM:Debug: CPACK_RPM_BINARY_SPECFILE = ${CPACK_RPM_BINARY_SPECFILE}") MESSAGE("CPackRPM:Debug: CPACK_RPM_BINARY_SPECFILE = ${CPACK_RPM_BINARY_SPECFILE}")
MESSAGE("CPackRPM:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = ${PACK_PACKAGE_INSTALL_DIRECTORY}") MESSAGE("CPackRPM:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY = ${CPACK_PACKAGE_INSTALL_DIRECTORY}")
MESSAGE("CPackRPM:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = ${CPACK_TEMPORARY_PACKAGE_FILE_NAME}") MESSAGE("CPackRPM:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = ${CPACK_TEMPORARY_PACKAGE_FILE_NAME}")
MESSAGE("CPackRPM:Debug: CPACK_RPM_SPEC_INSTALL_POST = ${CPACK_RPM_SPEC_INSTALL_POST}")
ENDIF(CPACK_RPM_PACKAGE_DEBUG) ENDIF(CPACK_RPM_PACKAGE_DEBUG)
FILE(WRITE ${CPACK_RPM_BINARY_SPECFILE} FILE(WRITE ${CPACK_RPM_BINARY_SPECFILE}
"# -*- rpm-spec -*- "# -*- rpm-spec -*-
@ -196,6 +208,7 @@ Release: ${CPACK_RPM_PACKAGE_RELEASE}
License: ${CPACK_RPM_PACKAGE_LICENSE} License: ${CPACK_RPM_PACKAGE_LICENSE}
Group: ${CPACK_RPM_PACKAGE_GROUP} Group: ${CPACK_RPM_PACKAGE_GROUP}
Vendor: ${CPACK_RPM_PACKAGE_VENDOR} Vendor: ${CPACK_RPM_PACKAGE_VENDOR}
${TMP_RPM_REQUIRES}
${TMP_RPM_BUILDARCH} ${TMP_RPM_BUILDARCH}
#%define prefix ${CMAKE_INSTALL_PREFIX} #%define prefix ${CMAKE_INSTALL_PREFIX}
@ -228,6 +241,9 @@ ${CPACK_RPM_PACKAGE_DESCRIPTION}
/* /*
%changelog %changelog
* Mon Oct 03 2008 Erk <eric.noulard@gmail.com>
Update generator to handle optional dependencies using Requires
Update DEBUG output typos.
* Mon Aug 25 2008 Erk <eric.noulard@gmail.com> * Mon Aug 25 2008 Erk <eric.noulard@gmail.com>
Update generator to handle optional post-install Update generator to handle optional post-install
* Tue Aug 16 2007 Erk <eric.noulard@gmail.com> * Tue Aug 16 2007 Erk <eric.noulard@gmail.com>

@ -1,5 +1,5 @@
# - Configure a project for testing with CTest/Dart # - Configure a project for testing with CTest/CDash
# This file configures a project to use the CTest/Dart # This file configures a project to use the CTest/CDash/Dart
# testing/dashboard process. This module should be included # testing/dashboard process. This module should be included
# in the CMakeLists.txt file at the top of a project. Typical usage: # in the CMakeLists.txt file at the top of a project. Typical usage:
# INCLUDE(CTest) # INCLUDE(CTest)

@ -16,7 +16,7 @@ int main(int ac, char*av[]){
pthread_create(&tid[0], 0, runner, (void*)1); pthread_create(&tid[0], 0, runner, (void*)1);
pthread_create(&tid[1], 0, runner, (void*)2); pthread_create(&tid[1], 0, runner, (void*)2);
#if defined(__BEOS__) && !defined(__ZETA__) // (no usleep on BeOS 5.) #if defined(__BEOS__) && !defined(__ZETA__) && !defined(__HAIKU__) // (no usleep on BeOS 5.)
usleep(1); // for strange behavior on single-processor sun usleep(1); // for strange behavior on single-processor sun
#endif #endif

@ -1,50 +1,97 @@
# - Try to find Boost include dirs and libraries # - Try to find Boost include dirs and libraries
# Usage of this module as follows: # Usage of this module as follows:
# #
# SET(Boost_USE_STATIC_LIBS ON) # == Using Header-Only libraries from within Boost: ==
# SET(Boost_USE_MULTITHREAD OFF)
# FIND_PACKAGE( Boost 1.34.1 COMPONENTS date_time filesystem iostreams ... )
# #
# The Boost_ADDITIONAL_VERSIONS variable can be used to specify a list of # FIND_PACKAGE( Boost 1.36.0 )
# boost version numbers that should be taken into account when searching # INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
# for the libraries. Unfortunately boost puts the version number into the # ADD_EXECUTABLE(foo foo.cc)
# actual filename for the libraries, so this might be needed in the future
# when new Boost versions are released.
# #
# Currently this module searches for the following version numbers: # == Using actual libraries from within Boost: ==
# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1, 1.36, #
# 1.36.0, 1.36.1 # SET(Boost_USE_STATIC_LIBS ON)
# SET(Boost_USE_MULTITHREADED ON)
# FIND_PACKAGE( Boost 1.36.0 COMPONENTS date_time filesystem system ... )
# INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
#
# ADD_EXECUTABLE(foo foo.cc)
# TARGET_LINK_LIBRARIES(foo ${Boost_LIBRARIES})
# #
# The components list needs to be the actual names of boost libraries, that is # The components list needs to be the actual names of boost libraries, that is
# the part of the actual library files that differ on different libraries. So # the part of the actual library files that differ on different libraries. So
# its "date_time" for "libboost_date_time...". Anything else will result in # its "date_time" for "libboost_date_time...". Anything else will result in
# errors # errors. If you're using parts of Boost that contains header files only (e.g.
# foreach) you do not need to specify COMPONENTS.
# #
# You can provide a minimum version number that should be used. If you provide this # You should provide a minimum version number that should be used. If you provide this
# version number and specify the REQUIRED attribute, this module will fail if it # version number and specify the REQUIRED attribute, this module will fail if it
# can't find the specified or a later version. If you specify a version number this is # can't find the specified or a later version. If you specify a version number this is
# automatically put into the considered list of version numbers and thus doesn't need # automatically put into the considered list of version numbers and thus doesn't need
# to be specified in the Boost_ADDITIONAL_VERSIONS variable # to be specified in the Boost_ADDITIONAL_VERSIONS variable (see below).
#
# NOTE for Visual Studio Users:
# Automatic linking is used on MSVC & Borland compilers by default when
# #including things in Boost. It's important to note that setting
# Boost_USE_STATIC_LIBS to OFF is NOT enough to get you dynamic linking,
# autolinking typically uses static libraries by default.
#
# Please see the section below near Boost_LIB_DIAGNOSTIC_DEFINITIONS for
# more details. Adding a TARGET_LINK_LIBRARIES() as shown in the example
# above appears to cause VS to link dynamically if Boost_USE_STATIC_LIBS
# gets set to OFF.
#
# =========== The mess that is Boost_ADDITIONAL_VERSIONS (sorry?) ============
#
# OK, so the Boost_ADDITIONAL_VERSIONS variable can be used to specify a list of
# boost version numbers that should be taken into account when searching
# for Boost. Unfortunately boost puts the version number into the
# actual filename for the libraries, so this variable will certainly be needed
# in the future when new Boost versions are released.
#
# Currently this module searches for the following version numbers:
# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1,
# 1.36, 1.36.0, 1.36.1, 1.37, 1.37.0, 1.38, 1.38.0
#
# NOTE: If you add a new major 1.x version in Boost_ADDITIONAL_VERSIONS you should
# add both 1.x and 1.x.0 as shown above. Official boost include directories
# omit the 3rd version number from include paths if it is 0 although not all
# binary boost releases do so.
#
# SET(Boost_ADDITIONAL_VERSIONS "0.99" "0.99.0" "1.78" "1.78.0")
#
# ============================================================================
# #
# Variables used by this module, they can change the default behaviour and need to be set # Variables used by this module, they can change the default behaviour and need to be set
# before calling find_package: # before calling find_package:
# Boost_USE_MULTITHREAD Can be set to OFF to use the non-multithreaded #
# boost libraries. Defaults to ON. # Boost_USE_MULTITHREADED Can be set to OFF to use the non-multithreaded
# boost libraries. If not specified, defaults
# to ON.
#
# Boost_USE_STATIC_LIBS Can be set to ON to force the use of the static # Boost_USE_STATIC_LIBS Can be set to ON to force the use of the static
# boost libraries. Defaults to OFF. # boost libraries. Defaults to OFF.
#
# Other Variables used by this module which you may want to set.
#
# Boost_ADDITIONAL_VERSIONS A list of version numbers to use for searching # Boost_ADDITIONAL_VERSIONS A list of version numbers to use for searching
# the boost include directory. The default list # the boost include directory. Please see
# of version numbers is: # the documentation above regarding this
# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, # annoying, but necessary variable :(
# 1.35, 1.35.0, 1.35.1, 1.36, 1.36.0, 1.36.1 #
# If you want to look for an older or newer # Boost_DEBUG Set this to TRUE to enable debugging output
# version set this variable to a list of # of FindBoost.cmake if you are having problems.
# strings, where each string contains a number, i.e. # Please enable this before filing any bug
# SET(Boost_ADDITIONAL_VERSIONS "0.99.0" "1.35.0") # reports.
#
# Boost_COMPILER Set this to the compiler suffix used by boost (e.g. -gcc43) if the
# module has problems finding the proper Boost installation
#
# BOOST_ROOT or BOOSTROOT Preferred installation prefix for searching for Boost, # BOOST_ROOT or BOOSTROOT Preferred installation prefix for searching for Boost,
# set this if the module has problems finding the proper Boost installation # set this if the module has problems finding the proper Boost installation
#
# BOOST_INCLUDEDIR Set this to the include directory of Boost, if the # BOOST_INCLUDEDIR Set this to the include directory of Boost, if the
# module has problems finding the proper Boost installation # module has problems finding the proper Boost installation
#
# BOOST_LIBRARYDIR Set this to the lib directory of Boost, if the # BOOST_LIBRARYDIR Set this to the lib directory of Boost, if the
# module has problems finding the proper Boost installation # module has problems finding the proper Boost installation
# #
@ -55,21 +102,31 @@
# #
# Boost_FOUND System has Boost, this means the include dir was found, # Boost_FOUND System has Boost, this means the include dir was found,
# as well as all the libraries specified in the COMPONENTS list # as well as all the libraries specified in the COMPONENTS list
#
# Boost_INCLUDE_DIRS Boost include directories, not cached # Boost_INCLUDE_DIRS Boost include directories, not cached
#
# Boost_INCLUDE_DIR This is almost the same as above, but this one is cached and may be # Boost_INCLUDE_DIR This is almost the same as above, but this one is cached and may be
# modified by advanced users # modified by advanced users
#
# Boost_LIBRARIES Link these to use the Boost libraries that you specified, not cached # Boost_LIBRARIES Link these to use the Boost libraries that you specified, not cached
#
# Boost_LIBRARY_DIRS The path to where the Boost library files are. # Boost_LIBRARY_DIRS The path to where the Boost library files are.
#
# Boost_VERSION The version number of the boost libraries that have been found, # Boost_VERSION The version number of the boost libraries that have been found,
# same as in version.hpp from Boost # same as in version.hpp from Boost
#
# Boost_LIB_VERSION The version number in filename form as its appended to the library filenames # Boost_LIB_VERSION The version number in filename form as its appended to the library filenames
#
# Boost_MAJOR_VERSION major version number of boost # Boost_MAJOR_VERSION major version number of boost
# Boost_MINOR_VERSION minor version number of boost # Boost_MINOR_VERSION minor version number of boost
# Boost_SUBMINOR_VERSION subminor version number of boost # Boost_SUBMINOR_VERSION subminor version number of boost
# Boost_LIB_DIAGNOSTIC_DEFINITIONS Only set on windows. Can be used with add_definitions #
# to print diagnostic information about the automatic # Boost_LIB_DIAGNOSTIC_DEFINITIONS [WIN32 Only] You can call
# linking done on windows. # add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINTIIONS})
# to have diagnostic information about
# Boost's automatic linking outputted
# during compilation time.
#
# For each component you list the following variables are set. # For each component you list the following variables are set.
# ATTENTION: The component names need to be in lower case, just as the boost # ATTENTION: The component names need to be in lower case, just as the boost
# library names however the cmake variables use upper case for the component # library names however the cmake variables use upper case for the component
@ -91,23 +148,43 @@
# BSD license. # BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file. # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
# #
OPTION(Boost_USE_MULTITHREADED
"Use the multithreaded versions of the Boost libraries" ON) IF(NOT DEFINED Boost_USE_MULTITHREADED)
SET(Boost_USE_MULTITHREADED TRUE)
if (Boost_FIND_VERSION_EXACT) ENDIF()
if (Boost_FIND_VERSION_PATCH)
set( _boost_TEST_VERSIONS if(Boost_FIND_VERSION_EXACT)
"${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.${Boost_FIND_VERSION_PATCH}") # The version may appear in a directory with or without the patch
else (Boost_FIND_VERSION_PATCH) # level, even when the patch level is non-zero.
set( _boost_TEST_VERSIONS set(_boost_TEST_VERSIONS
"${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.0" "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.${Boost_FIND_VERSION_PATCH}"
"${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}") "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}")
endif (Boost_FIND_VERSION_PATCH) else(Boost_FIND_VERSION_EXACT)
else (Boost_FIND_VERSION_EXACT) # The user has not requested an exact version. Among known
set( _boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS} # versions, find those that are acceptable to the user request.
"1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0" set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
"1.34" "1.33.1" "1.33.0" "1.33" ) "1.38.0" "1.38" "1.37.0" "1.37"
endif (Boost_FIND_VERSION_EXACT) "1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0"
"1.34" "1.33.1" "1.33.0" "1.33")
set(_boost_TEST_VERSIONS)
if(Boost_FIND_VERSION)
set(_Boost_FIND_VERSION_SHORT "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}")
# Select acceptable versions.
foreach(version ${_Boost_KNOWN_VERSIONS})
if(NOT "${version}" VERSION_LESS "${Boost_FIND_VERSION}")
# This version is high enough.
list(APPEND _boost_TEST_VERSIONS "${version}")
elseif("${version}.99" VERSION_EQUAL "${_Boost_FIND_VERSION_SHORT}.99")
# This version is a short-form for the requested version with
# the patch level dropped.
list(APPEND _boost_TEST_VERSIONS "${version}")
endif()
endforeach(version)
else(Boost_FIND_VERSION)
# Any version is acceptable.
set(_boost_TEST_VERSIONS "${_Boost_KNOWN_VERSIONS}")
endif(Boost_FIND_VERSION)
endif(Boost_FIND_VERSION_EXACT)
# The reason that we failed to find Boost. This will be set to a # The reason that we failed to find Boost. This will be set to a
# user-friendly message when we fail to find some necessary piece of # user-friendly message when we fail to find some necessary piece of
@ -155,9 +232,27 @@ MACRO (_Boost_ADJUST_LIB_VARS basename)
ENDIF (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE) ENDIF (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE)
IF (Boost_${basename}_LIBRARY) IF (Boost_${basename}_LIBRARY)
SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE FILEPATH "The Boost ${basename} library") IF(WIN32)
GET_FILENAME_COMPONENT(Boost_LIBRARY_DIRS "${Boost_${basename}_LIBRARY}" PATH) # Workaround issue #8378.
SET(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE FILEPATH "Boost library directory") SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE STRING "The Boost ${basename} library")
ELSE()
SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE FILEPATH "The Boost ${basename} library")
ENDIF()
# Remove superfluous "debug" / "optimized" keywords from
# Boost_LIBRARY_DIRS
FOREACH(_boost_my_lib ${Boost_${basename}_LIBRARY})
GET_FILENAME_COMPONENT(_boost_my_lib_path "${_boost_my_lib}" PATH)
LIST(APPEND Boost_LIBRARY_DIRS ${_boost_my_lib_path})
ENDFOREACH()
LIST(REMOVE_DUPLICATES Boost_LIBRARY_DIRS)
IF(WIN32)
# Workaround issue #8378.
SET(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE STRING "Boost library directory")
ELSE()
SET(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE FILEPATH "Boost library directory")
ENDIF()
SET(Boost_${basename}_FOUND ON CACHE INTERNAL "Whether the Boost ${basename} library found") SET(Boost_${basename}_FOUND ON CACHE INTERNAL "Whether the Boost ${basename} library found")
ENDIF (Boost_${basename}_LIBRARY) ENDIF (Boost_${basename}_LIBRARY)
@ -170,6 +265,23 @@ MACRO (_Boost_ADJUST_LIB_VARS basename)
) )
ENDMACRO (_Boost_ADJUST_LIB_VARS) ENDMACRO (_Boost_ADJUST_LIB_VARS)
#
# Runs compiler with "-dumpversion" and parses major/minor
# version with a regex.
#
FUNCTION(_Boost_COMPILER_DUMPVERSION _OUTPUT_VERSION)
EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
OUTPUT_VARIABLE _boost_COMPILER_VERSION
)
STRING(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2"
_boost_COMPILER_VERSION ${_boost_COMPILER_VERSION})
SET(${_OUTPUT_VERSION} ${_boost_COMPILER_VERSION} PARENT_SCOPE)
ENDFUNCTION()
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
@ -199,8 +311,24 @@ IF (_boost_IN_CACHE)
MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000") MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000")
MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100") MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100")
ENDIF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0") ENDIF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0")
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"boost ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION} "
"is already in the cache. For debugging messages, please clear the cache.")
endif()
ELSE (_boost_IN_CACHE) ELSE (_boost_IN_CACHE)
# Need to search for boost # Need to search for boost
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"Boost not in cache")
# Output some of their choices
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}")
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"Boost_USE_MULTITHREADED = ${Boost_USE_MULTITHREADED}")
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"Boost_USE_STATIC_LIBS = ${Boost_USE_STATIC_LIBS}")
endif()
IF(WIN32) IF(WIN32)
# In windows, automatic linking is performed, so you do not have # In windows, automatic linking is performed, so you do not have
@ -226,20 +354,11 @@ ELSE (_boost_IN_CACHE)
SET(_boost_INCLUDE_SEARCH_DIRS SET(_boost_INCLUDE_SEARCH_DIRS
C:/boost/include C:/boost/include
"C:/boost" C:/boost
"$ENV{ProgramFiles}/boost/boost_${Boost_FIND_VERSION_MAJOR}_${Boost_FIND_VERSION_MINOR}_${Boost_FIND_VERSION_PATCH}" "$ENV{ProgramFiles}/boost"
"$ENV{ProgramFiles}/Boost"
/sw/local/include /sw/local/include
) )
SET(_boost_LIBRARIES_SEARCH_DIRS
C:/boost/lib
"C:/boost"
"$ENV{ProgramFiles}/boost/boost_${Boost_FIND_VERSION_MAJOR}_${Boost_FIND_VERSION_MINOR}_${Boost_FIND_VERSION_PATCH}/lib"
"$ENV{ProgramFiles}/Boost"
/sw/local/lib
)
# If BOOST_ROOT was defined in the environment, use it. # If BOOST_ROOT was defined in the environment, use it.
if (NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "") if (NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "")
set(BOOST_ROOT $ENV{BOOST_ROOT}) set(BOOST_ROOT $ENV{BOOST_ROOT})
@ -254,22 +373,34 @@ ELSE (_boost_IN_CACHE)
IF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" ) IF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" )
set(BOOST_INCLUDEDIR $ENV{BOOST_INCLUDEDIR}) set(BOOST_INCLUDEDIR $ENV{BOOST_INCLUDEDIR})
ENDIF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" ) ENDIF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" )
# If BOOST_LIBRARYDIR was defined in the environment, use it. # If BOOST_LIBRARYDIR was defined in the environment, use it.
IF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" ) IF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" )
set(BOOST_LIBRARYDIR $ENV{BOOST_LIBRARYDIR}) set(BOOST_LIBRARYDIR $ENV{BOOST_LIBRARYDIR})
ENDIF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" ) ENDIF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" )
IF( BOOST_ROOT ) IF( BOOST_ROOT )
file(TO_CMAKE_PATH ${BOOST_ROOT} BOOST_ROOT) file(TO_CMAKE_PATH ${BOOST_ROOT} BOOST_ROOT)
ENDIF( BOOST_ROOT )
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"Declared as CMake or Environmental Variables:")
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
" BOOST_ROOT = ${BOOST_ROOT}")
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
" BOOST_INCLUDEDIR = ${BOOST_INCLUDEDIR}")
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
" BOOST_LIBRARYDIR = ${BOOST_LIBRARYDIR}")
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}")
endif()
IF( BOOST_ROOT )
SET(_boost_INCLUDE_SEARCH_DIRS SET(_boost_INCLUDE_SEARCH_DIRS
${BOOST_ROOT}/include ${BOOST_ROOT}/include
${BOOST_ROOT} ${BOOST_ROOT}
${_boost_INCLUDE_SEARCH_DIRS}) ${_boost_INCLUDE_SEARCH_DIRS})
SET(_boost_LIBRARIES_SEARCH_DIRS
${BOOST_ROOT}/lib
${BOOST_ROOT}/stage/lib
${_boost_LIBRARIES_SEARCH_DIRS})
ENDIF( BOOST_ROOT ) ENDIF( BOOST_ROOT )
IF( BOOST_INCLUDEDIR ) IF( BOOST_INCLUDEDIR )
@ -278,12 +409,9 @@ ELSE (_boost_IN_CACHE)
${BOOST_INCLUDEDIR} ${_boost_INCLUDE_SEARCH_DIRS}) ${BOOST_INCLUDEDIR} ${_boost_INCLUDE_SEARCH_DIRS})
ENDIF( BOOST_INCLUDEDIR ) ENDIF( BOOST_INCLUDEDIR )
IF( BOOST_LIBRARYDIR ) # ------------------------------------------------------------------------
file(TO_CMAKE_PATH ${BOOST_LIBRARYDIR} BOOST_LIBRARYDIR) # Search for Boost include DIR
SET(_boost_LIBRARIES_SEARCH_DIRS # ------------------------------------------------------------------------
${BOOST_LIBRARYDIR} ${_boost_LIBRARIES_SEARCH_DIRS})
ENDIF( BOOST_LIBRARYDIR )
# Try to find Boost by stepping backwards through the Boost versions # Try to find Boost by stepping backwards through the Boost versions
# we know about. # we know about.
IF( NOT Boost_INCLUDE_DIR ) IF( NOT Boost_INCLUDE_DIR )
@ -293,21 +421,33 @@ ELSE (_boost_IN_CACHE)
# Add in a path suffix, based on the required version, ideally # Add in a path suffix, based on the required version, ideally
# we could read this from version.hpp, but for that to work we'd # we could read this from version.hpp, but for that to work we'd
# need to know the include dir already # need to know the include dir already
if (WIN32 AND NOT CYGWIN) set(_boost_BOOSTIFIED_VERSION)
set(_boost_PATH_SUFFIX boost_${_boost_VER})
else (WIN32 AND NOT CYGWIN)
set(_boost_PATH_SUFFIX boost-${_boost_VER})
endif (WIN32 AND NOT CYGWIN)
IF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+") # Transform 1.35 => 1_35 and 1.36.0 => 1_36_0
IF(_boost_VER MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1_\\2_\\3" STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1_\\2_\\3"
_boost_PATH_SUFFIX ${_boost_PATH_SUFFIX}) _boost_BOOSTIFIED_VERSION ${_boost_VER})
ELSEIF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+") ELSEIF(_boost_VER MATCHES "[0-9]+\\.[0-9]+")
STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1_\\2" STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1_\\2"
_boost_PATH_SUFFIX ${_boost_PATH_SUFFIX}) _boost_BOOSTIFIED_VERSION ${_boost_VER})
ENDIF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+") ENDIF()
LIST(APPEND _boost_PATH_SUFFIXES "${_boost_PATH_SUFFIX}")
LIST(APPEND _boost_PATH_SUFFIXES "boost-${_boost_BOOSTIFIED_VERSION}")
IF(WIN32)
# Yay Boost Pro! We dig your underscores.
LIST(APPEND _boost_PATH_SUFFIXES "boost_${_boost_BOOSTIFIED_VERSION}")
ENDIF()
ENDFOREACH(_boost_VER) ENDFOREACH(_boost_VER)
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"Include debugging info:")
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
" _boost_INCLUDE_SEARCH_DIRS = ${_boost_INCLUDE_SEARCH_DIRS}")
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
" _boost_PATH_SUFFIXES = ${_boost_PATH_SUFFIXES}")
endif()
# Look for a standard boost header file. # Look for a standard boost header file.
FIND_PATH(Boost_INCLUDE_DIR FIND_PATH(Boost_INCLUDE_DIR
@ -316,6 +456,10 @@ ELSE (_boost_IN_CACHE)
PATH_SUFFIXES ${_boost_PATH_SUFFIXES} PATH_SUFFIXES ${_boost_PATH_SUFFIXES}
) )
ENDIF( NOT Boost_INCLUDE_DIR ) ENDIF( NOT Boost_INCLUDE_DIR )
# ------------------------------------------------------------------------
# Extract version information from version.hpp
# ------------------------------------------------------------------------
IF(Boost_INCLUDE_DIR) IF(Boost_INCLUDE_DIR)
# Extract Boost_VERSION and Boost_LIB_VERSION from version.hpp # Extract Boost_VERSION and Boost_LIB_VERSION from version.hpp
@ -324,6 +468,10 @@ ELSE (_boost_IN_CACHE)
SET(BOOST_VERSION 0) SET(BOOST_VERSION 0)
SET(BOOST_LIB_VERSION "") SET(BOOST_LIB_VERSION "")
FILE(READ "${Boost_INCLUDE_DIR}/boost/version.hpp" _boost_VERSION_HPP_CONTENTS) FILE(READ "${Boost_INCLUDE_DIR}/boost/version.hpp" _boost_VERSION_HPP_CONTENTS)
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"location of version.hpp: ${Boost_INCLUDE_DIR}/boost/version.hpp")
endif()
STRING(REGEX REPLACE ".*#define BOOST_VERSION ([0-9]+).*" "\\1" Boost_VERSION "${_boost_VERSION_HPP_CONTENTS}") STRING(REGEX REPLACE ".*#define BOOST_VERSION ([0-9]+).*" "\\1" Boost_VERSION "${_boost_VERSION_HPP_CONTENTS}")
STRING(REGEX REPLACE ".*#define BOOST_LIB_VERSION \"([0-9_]+)\".*" "\\1" Boost_LIB_VERSION "${_boost_VERSION_HPP_CONTENTS}") STRING(REGEX REPLACE ".*#define BOOST_LIB_VERSION \"([0-9_]+)\".*" "\\1" Boost_LIB_VERSION "${_boost_VERSION_HPP_CONTENTS}")
@ -339,74 +487,109 @@ ELSE (_boost_IN_CACHE)
set(Boost_ERROR_REASON set(Boost_ERROR_REASON
"${Boost_ERROR_REASON}Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}\nBoost include path: ${Boost_INCLUDE_DIR}") "${Boost_ERROR_REASON}Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}\nBoost include path: ${Boost_INCLUDE_DIR}")
ENDIF(NOT "${Boost_VERSION}" STREQUAL "0") ENDIF(NOT "${Boost_VERSION}" STREQUAL "0")
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"version.hpp reveals boost "
"${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
endif()
ELSE(Boost_INCLUDE_DIR) ELSE(Boost_INCLUDE_DIR)
set(Boost_ERROR_REASON set(Boost_ERROR_REASON
"${Boost_ERROR_REASON}Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers.") "${Boost_ERROR_REASON}Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers.")
ENDIF(Boost_INCLUDE_DIR) ENDIF(Boost_INCLUDE_DIR)
# ------------------------------------------------------------------------
# Suffix initialization and compiler suffix detection.
# ------------------------------------------------------------------------
# Setting some more suffixes for the library # Setting some more suffixes for the library
SET (Boost_LIB_PREFIX "") SET (Boost_LIB_PREFIX "")
IF ( WIN32 AND Boost_USE_STATIC_LIBS ) if ( MSVC AND Boost_USE_STATIC_LIBS )
SET (Boost_LIB_PREFIX "lib") SET (Boost_LIB_PREFIX "lib")
ENDIF ( WIN32 AND Boost_USE_STATIC_LIBS ) endif()
SET (_boost_COMPILER "-gcc")
IF (MSVC90) if (Boost_COMPILER)
SET (_boost_COMPILER "-vc90") set(_boost_COMPILER ${Boost_COMPILER})
ELSEIF (MSVC80) if(Boost_DEBUG)
SET (_boost_COMPILER "-vc80") message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
ELSEIF (MSVC71) "using user-specified Boost_COMPILER = ${_boost_COMPILER}")
SET (_boost_COMPILER "-vc71") endif()
ENDIF(MSVC90) else(Boost_COMPILER)
IF (MINGW) # Attempt to guess the compiler suffix
EXEC_PROGRAM(${CMAKE_CXX_COMPILER} # NOTE: this is not perfect yet, if you experience any issues
ARGS -dumpversion # please report them and use the Boost_COMPILER variable
OUTPUT_VARIABLE _boost_COMPILER_VERSION # to work around the problems.
) if (MSVC90)
STRING(REGEX REPLACE "([0-9])\\.([0-9])\\.[0-9]" "\\1\\2" SET (_boost_COMPILER "-vc90")
_boost_COMPILER_VERSION ${_boost_COMPILER_VERSION}) elseif (MSVC80)
SET (_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}") SET (_boost_COMPILER "-vc80")
ENDIF(MINGW) elseif (MSVC71)
IF (UNIX) SET (_boost_COMPILER "-vc71")
IF (NOT CMAKE_COMPILER_IS_GNUCC) elseif (MSVC70) # Good luck!
# We assume that we have the Intel compiler. SET (_boost_COMPILER "-vc7") # yes, this is correct
SET (_boost_COMPILER "-il") elseif (MSVC60) # Good luck!
ELSE (NOT CMAKE_COMPILER_IS_GNUCC) SET (_boost_COMPILER "-vc6") # yes, this is correct
# Determine which version of GCC we have. elseif (BORLAND)
EXEC_PROGRAM(${CMAKE_CXX_COMPILER} SET (_boost_COMPILER "-bcb")
ARGS -dumpversion elseif("${CMAKE_CXX_COMPILER}" MATCHES "icl"
OUTPUT_VARIABLE _boost_COMPILER_VERSION OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc")
) if(WIN32)
STRING(REGEX REPLACE "([0-9])\\.([0-9])\\.[0-9]" "\\1\\2" set (_boost_COMPILER "-iw")
_boost_COMPILER_VERSION ${_boost_COMPILER_VERSION}) else()
IF(APPLE) set (_boost_COMPILER "-il")
IF(Boost_MINOR_VERSION) endif()
IF(${Boost_MINOR_VERSION} GREATER 35) elseif (MINGW)
# In Boost 1.36.0 and newer, the mangled compiler name used if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34)
# on Mac OS X/Darwin is "xgcc". SET(_boost_COMPILER "-mgw") # no GCC version encoding prior to 1.34
SET(_boost_COMPILER "-xgcc${_boost_COMPILER_VERSION}") else()
ELSE(${Boost_MINOR_VERSION} GREATER 35) _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION)
# In Boost <= 1.35.0, there is no mangled compiler name for SET (_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}")
# the Mac OS X/Darwin version of GCC. endif()
SET(_boost_COMPILER "") elseif (UNIX)
ENDIF(${Boost_MINOR_VERSION} GREATER 35) if (CMAKE_COMPILER_IS_GNUCXX)
ELSE(Boost_MINOR_VERSION) if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34)
# We don't know the Boost version, so assume it's SET(_boost_COMPILER "-gcc") # no GCC version encoding prior to 1.34
# pre-1.36.0. else()
SET(_boost_COMPILER "") _Boost_COMPILER_DUMPVERSION(_boost_COMPILER_VERSION)
ENDIF(Boost_MINOR_VERSION) # Determine which version of GCC we have.
ELSE() IF(APPLE)
SET (_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}") IF(Boost_MINOR_VERSION)
ENDIF() IF(${Boost_MINOR_VERSION} GREATER 35)
ENDIF (NOT CMAKE_COMPILER_IS_GNUCC) # In Boost 1.36.0 and newer, the mangled compiler name used
ENDIF(UNIX) # on Mac OS X/Darwin is "xgcc".
SET(_boost_COMPILER "-xgcc${_boost_COMPILER_VERSION}")
ELSE(${Boost_MINOR_VERSION} GREATER 35)
# In Boost <= 1.35.0, there is no mangled compiler name for
# the Mac OS X/Darwin version of GCC.
SET(_boost_COMPILER "")
ENDIF(${Boost_MINOR_VERSION} GREATER 35)
ELSE(Boost_MINOR_VERSION)
# We don't know the Boost version, so assume it's
# pre-1.36.0.
SET(_boost_COMPILER "")
ENDIF(Boost_MINOR_VERSION)
ELSE()
SET (_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}")
ENDIF()
endif()
endif (CMAKE_COMPILER_IS_GNUCXX)
endif()
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"guessed _boost_COMPILER = ${_boost_COMPILER}")
endif()
endif(Boost_COMPILER)
SET (_boost_MULTITHREADED "-mt") SET (_boost_MULTITHREADED "-mt")
if( NOT Boost_USE_MULTITHREADED )
IF( NOT Boost_USE_MULTITHREADED ) set (_boost_MULTITHREADED "")
SET (_boost_MULTITHREADED "") endif()
ENDIF( NOT Boost_USE_MULTITHREADED ) if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"_boost_MULTITHREADED = ${_boost_MULTITHREADED}")
endif()
SET( _boost_STATIC_TAG "") SET( _boost_STATIC_TAG "")
set( _boost_ABI_TAG "")
IF (WIN32) IF (WIN32)
IF(MSVC) IF(MSVC)
SET (_boost_ABI_TAG "g") SET (_boost_ABI_TAG "g")
@ -416,10 +599,42 @@ ELSE (_boost_IN_CACHE)
ENDIF( Boost_USE_STATIC_LIBS ) ENDIF( Boost_USE_STATIC_LIBS )
ENDIF(WIN32) ENDIF(WIN32)
SET (_boost_ABI_TAG "${_boost_ABI_TAG}d") SET (_boost_ABI_TAG "${_boost_ABI_TAG}d")
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"_boost_STATIC_TAG = ${_boost_STATIC_TAG}")
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"_boost_ABI_TAG = ${_boost_ABI_TAG}")
endif()
# ------------------------------------------------------------------------ # ------------------------------------------------------------------------
# Begin finding boost libraries # Begin finding boost libraries
# ------------------------------------------------------------------------ # ------------------------------------------------------------------------
SET(_boost_LIBRARIES_SEARCH_DIRS
C:/boost/lib
C:/boost
"$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib"
"$ENV{ProgramFiles}/boost"
/sw/local/lib
)
IF( BOOST_ROOT )
SET(_boost_LIBRARIES_SEARCH_DIRS
${BOOST_ROOT}/lib
${BOOST_ROOT}/stage/lib
${_boost_LIBRARIES_SEARCH_DIRS})
ENDIF( BOOST_ROOT )
IF( BOOST_LIBRARYDIR )
file(TO_CMAKE_PATH ${BOOST_LIBRARYDIR} BOOST_LIBRARYDIR)
SET(_boost_LIBRARIES_SEARCH_DIRS
${BOOST_LIBRARYDIR} ${_boost_LIBRARIES_SEARCH_DIRS})
ENDIF( BOOST_LIBRARYDIR )
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
"_boost_LIBRARIES_SEARCH_DIRS = ${_boost_LIBRARIES_SEARCH_DIRS}")
endif()
FOREACH(COMPONENT ${Boost_FIND_COMPONENTS}) FOREACH(COMPONENT ${Boost_FIND_COMPONENTS})
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT) STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
SET( Boost_${UPPERCOMPONENT}_LIBRARY "Boost_${UPPERCOMPONENT}_LIBRARY-NOTFOUND" ) SET( Boost_${UPPERCOMPONENT}_LIBRARY "Boost_${UPPERCOMPONENT}_LIBRARY-NOTFOUND" )
@ -439,6 +654,8 @@ ELSE (_boost_IN_CACHE)
FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE
NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION} NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED} ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG} ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}
${Boost_LIB_PREFIX}boost_${COMPONENT} ${Boost_LIB_PREFIX}boost_${COMPONENT}
@ -448,6 +665,8 @@ ELSE (_boost_IN_CACHE)
FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG
NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION} NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION}
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION} ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION}
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION}
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION}
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG} ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG}
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG} ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}
${Boost_LIB_PREFIX}boost_${COMPONENT}-${_boost_ABI_TAG} ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_boost_ABI_TAG}
@ -540,6 +759,10 @@ ELSE (_boost_IN_CACHE)
endforeach(COMPONENT) endforeach(COMPONENT)
endif (Boost_FOUND) endif (Boost_FOUND)
if(Boost_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] Boost_FOUND = ${Boost_FOUND}")
endif()
if (_Boost_MISSING_COMPONENTS) if (_Boost_MISSING_COMPONENTS)
# We were unable to find some libraries, so generate a sensible # We were unable to find some libraries, so generate a sensible
# error message that lists the libraries we were unable to find. # error message that lists the libraries we were unable to find.
@ -621,18 +844,10 @@ ELSE (_boost_IN_CACHE)
ENDIF(Boost_FIND_REQUIRED) ENDIF(Boost_FIND_REQUIRED)
ENDIF(Boost_FOUND) ENDIF(Boost_FOUND)
# Under Windows, automatic linking is performed, so no need to specify the libraries.
IF (WIN32)
IF (NOT MINGW)
SET(Boost_LIBRARIES "")
ENDIF (NOT MINGW)
ENDIF(WIN32)
# show the Boost_INCLUDE_DIRS AND Boost_LIBRARIES variables only in the advanced view # show the Boost_INCLUDE_DIRS AND Boost_LIBRARIES variables only in the advanced view
MARK_AS_ADVANCED(Boost_INCLUDE_DIR MARK_AS_ADVANCED(Boost_INCLUDE_DIR
Boost_INCLUDE_DIRS Boost_INCLUDE_DIRS
Boost_LIBRARY_DIRS Boost_LIBRARY_DIRS
Boost_USE_MULTITHREADED
) )
ENDIF(_boost_IN_CACHE) ENDIF(_boost_IN_CACHE)

@ -0,0 +1,72 @@
# - Find Coin3D (Open Inventor)
# Coin3D is an implementation of the Open Inventor API.
# It provides data structures and algorithms for 3D visualization
# http://www.coin3d.org/
#
# This module defines the following variables
# COIN3D_FOUND - system has Coin3D - Open Inventor
# COIN3D_INCLUDE_DIRS - where the Inventor include directory can be found
# COIN3D_LIBRARIES - Link to this to use Coin3D
#
IF (WIN32)
IF (CYGWIN)
FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h)
FIND_LIBRARY(COIN3D_LIBRARIES Coin)
ELSE (CYGWIN)
FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/include"
)
FIND_LIBRARY(COIN3D_LIBRARY_DEBUG coin2d
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/lib"
)
FIND_LIBRARY(COIN3D_LIBRARY_RELEASE coin2
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\Coin3D\\2;Installation Path]/lib"
)
IF (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
SET(COIN3D_LIBRARIES optimized ${COIN3D_LIBRARY_RELEASE}
debug ${COIN3D_LIBRARY_DEBUG})
ELSE (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
IF (COIN3D_LIBRARY_DEBUG)
SET (COIN3D_LIBRARIES ${COIN3D_LIBRARY_DEBUG})
ENDIF (COIN3D_LIBRARY_DEBUG)
IF (COIN3D_LIBRARY_RELEASE)
SET (COIN3D_LIBRARIES ${COIN3D_LIBRARY_RELEASE})
ENDIF (COIN3D_LIBRARY_RELEASE)
ENDIF (COIN3D_LIBRARY_DEBUG AND COIN3D_LIBRARY_RELEASE)
ENDIF (CYGWIN)
ELSE (WIN32)
IF(APPLE)
FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h
/Library/Frameworks/Inventor.framework/Headers
)
FIND_LIBRARY(COIN3D_LIBRARIES Coin
/Library/Frameworks/Inventor.framework/Libraries
)
SET(COIN3D_LIBRARIES "-framework Coin3d" CACHE STRING "Coin3D library for OSX")
ELSE(APPLE)
FIND_PATH(COIN3D_INCLUDE_DIRS Inventor/So.h)
FIND_LIBRARY(COIN3D_LIBRARIES Coin)
ENDIF(APPLE)
ENDIF (WIN32)
# handle the QUIETLY and REQUIRED arguments and set COIN3D_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Coin3D DEFAULT_MSG COIN3D_LIBRARIES COIN3D_INCLUDE_DIRS)
MARK_AS_ADVANCED(COIN3D_INCLUDE_DIRS COIN3D_LIBRARIES )

@ -15,7 +15,6 @@
FIND_LIBRARY(CURSES_CURSES_LIBRARY NAMES curses ) FIND_LIBRARY(CURSES_CURSES_LIBRARY NAMES curses )
FIND_LIBRARY(CURSES_NCURSES_LIBRARY NAMES ncurses ) FIND_LIBRARY(CURSES_NCURSES_LIBRARY NAMES ncurses )
SET(CURSES_USE_NCURSES FALSE) SET(CURSES_USE_NCURSES FALSE)
IF(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_LIBRARY) IF(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_LIBRARY)
@ -80,21 +79,32 @@ ELSE(NOT CURSES_USE_NCURSES)
# for compatibility with older FindCurses.cmake this has to be in the cache # for compatibility with older FindCurses.cmake this has to be in the cache
# FORCE must not be used since this would break builds which preload # FORCE must not be used since this would break builds which preload
# however if the value of the variable has NOTFOUND in it, then
# it is OK to force, and we need to force in order to have it work.
# a cache wqith these variables set # a cache wqith these variables set
# only put ncurses include and library into # only put ncurses include and library into
# variables if they are found # variables if they are found
IF(NOT CURSES_NCURSES_INCLUDE_PATH AND CURSES_HAVE_NCURSES_NCURSES_H)
GET_FILENAME_COMPONENT(CURSES_NCURSES_INCLUDE_PATH
"${CURSES_HAVE_NCURSES_NCURSES_H}" PATH)
ENDIF(NOT CURSES_NCURSES_INCLUDE_PATH AND CURSES_HAVE_NCURSES_NCURSES_H)
IF(CURSES_NCURSES_INCLUDE_PATH AND CURSES_NCURSES_LIBRARY) IF(CURSES_NCURSES_INCLUDE_PATH AND CURSES_NCURSES_LIBRARY)
SET( FORCE_IT )
IF(CURSES_INCLUDE_PATH MATCHES NOTFOUND)
SET(FORCE_IT FORCE)
ENDIF(CURSES_INCLUDE_PATH MATCHES NOTFOUND)
SET(CURSES_INCLUDE_PATH "${CURSES_NCURSES_INCLUDE_PATH}" SET(CURSES_INCLUDE_PATH "${CURSES_NCURSES_INCLUDE_PATH}"
CACHE FILEPATH "The curses include path") CACHE FILEPATH "The curses include path" ${FORCE_IT})
SET( FORCE_IT)
IF(CURSES_LIBRARY MATCHES NOTFOUND)
SET(FORCE_IT FORCE)
ENDIF(CURSES_LIBRARY MATCHES NOTFOUND)
SET(CURSES_LIBRARY "${CURSES_NCURSES_LIBRARY}" SET(CURSES_LIBRARY "${CURSES_NCURSES_LIBRARY}"
CACHE FILEPATH "The curses library") CACHE FILEPATH "The curses library" ${FORCE_IT})
ENDIF(CURSES_NCURSES_INCLUDE_PATH AND CURSES_NCURSES_LIBRARY) ENDIF(CURSES_NCURSES_INCLUDE_PATH AND CURSES_NCURSES_LIBRARY)
ENDIF(NOT CURSES_USE_NCURSES) ENDIF(NOT CURSES_USE_NCURSES)
FIND_LIBRARY(CURSES_EXTRA_LIBRARY cur_colr HINTS "${_cursesLibDir}") FIND_LIBRARY(CURSES_EXTRA_LIBRARY cur_colr HINTS "${_cursesLibDir}")
FIND_LIBRARY(CURSES_EXTRA_LIBRARY cur_colr ) FIND_LIBRARY(CURSES_EXTRA_LIBRARY cur_colr )

@ -0,0 +1,113 @@
# - Find CxxTest
# Find the CxxTest suite and declare a helper macro for creating unit tests
# and integrating them with CTest.
# For more details on CxxTest see http://cxxtest.tigris.org
#
# INPUT Variables
#
# CXXTEST_USE_PYTHON
# If true, the CXXTEST_ADD_TEST macro will use
# the Python test generator instead of Perl.
#
# OUTPUT Variables
#
# CXXTEST_FOUND
# True if the CxxTest framework was found
# CXXTEST_INCLUDE_DIR
# Where to find the CxxTest include directory
# CXXTEST_PERL_TESTGEN_EXECUTABLE
# The perl-based test generator.
# CXXTEST_PYTHON_TESTGEN_EXECUTABLE
# The python-based test generator.
#
# MACROS for use by CMake users:
#
# CXXTEST_ADD_TEST(<test_name> <gen_source_file> <input_files_to_testgen...>)
# Creates a CxxTest runner and adds it to the CTest testing suite
# Parameters:
# test_name The name of the test
# gen_source_file The generated source filename to be generated by CxxTest
# input_files_to_testgen The list of header files containing the
# CxxTest::TestSuite's to be included in this runner
#
# #==============
# Example Usage:
#
# FIND_PACKAGE(CxxTest)
# INCLUDE_DIRECTORIES(${CXXTEST_INCLUDE_DIR})
#
# ENABLE_TESTING()
# CXXTEST_ADD_TEST(unittest_foo foo_test.cc ${CMAKE_CURRENT_SOURCE_DIR}/foo_test.h)
#
# This will:
# 1. Invoke the testgen executable to autogenerate foo_test.cc in the
# binary tree from "foo_test.h" in the current source directory.
# 2. Create an executable and test called unittest_foo.
#
# #=============
# Example foo_test.h:
#
# #include <cxxtest/TestSuite.h>
#
# class MyTestSuite : public CxxTest::TestSuite
# {
# public:
# void testAddition( void )
# {
# TS_ASSERT( 1 + 1 > 1 );
# TS_ASSERT_EQUALS( 1 + 1, 2 );
# }
# };
#
#
# FindCxxTest.cmake
# Copyright (c) 2008
# Philip Lowman <philip@yhbt.com>
#
# Version 1.0 (1/8/08)
# Fixed CXXTEST_INCLUDE_DIRS so it will work properly
# Eliminated superfluous CXXTEST_FOUND assignment
# Cleaned up and added more documentation
#=============================================================
# CXXTEST_ADD_TEST (public macro)
#=============================================================
MACRO(CXXTEST_ADD_TEST _cxxtest_testname _cxxtest_outfname)
SET(_cxxtest_real_outfname ${CMAKE_CURRENT_BINARY_DIR}/${_cxxtest_outfname})
IF(CXXTEST_USE_PYTHON)
SET(_cxxtest_executable ${CXXTEST_PYTHON_TESTGEN_EXECUTABLE})
ELSE()
SET(_cxxtest_executable ${CXXTEST_PERL_TESTGEN_EXECUTABLE})
ENDIF()
ADD_CUSTOM_COMMAND(
OUTPUT ${_cxxtest_real_outfname}
DEPENDS ${ARGN}
COMMAND ${_cxxtest_executable}
--error-printer -o ${_cxxtest_real_outfname} ${ARGN}
)
SET_SOURCE_FILES_PROPERTIES(${_cxxtest_real_outfname} PROPERTIES GENERATED true)
ADD_EXECUTABLE(${_cxxtest_testname} ${_cxxtest_real_outfname})
IF(CMAKE_RUNTIME_OUTPUT_DIRECTORY)
ADD_TEST(${_cxxtest_testname} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_cxxtest_testname})
ELSEIF(EXECUTABLE_OUTPUT_PATH)
ADD_TEST(${_cxxtest_testname} ${EXECUTABLE_OUTPUT_PATH}/${_cxxtest_testname})
ELSE()
ADD_TEST(${_cxxtest_testname} ${CMAKE_CURRENT_BINARY_DIR}/${_cxxtest_testname})
ENDIF()
ENDMACRO(CXXTEST_ADD_TEST)
#=============================================================
# main()
#=============================================================
FIND_PATH(CXXTEST_INCLUDE_DIR cxxtest/TestSuite.h)
FIND_PROGRAM(CXXTEST_PERL_TESTGEN_EXECUTABLE cxxtestgen.pl)
FIND_PROGRAM(CXXTEST_PYTHON_TESTGEN_EXECUTABLE cxxtestgen.py)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CxxTest DEFAULT_MSG CXXTEST_INCLUDE_DIR)
SET(CXXTEST_INCLUDE_DIRS ${CXXTEST_INCLUDE_DIR})

@ -0,0 +1,50 @@
# This module locates the developer's image library.
# http://openil.sourceforge.net/
#
# This module sets:
# IL_LIBRARY the name of the IL library.
# ILU_LIBRARY the name of the ILU library.
# ILUT_LIBRARY the name of the ILUT library.
# IL_INCLUDE_DIR where to find the il.h, ilu.h and ilut.h files.
# IL_FOUND this is set to TRUE if all the above variables were set.
# Original file by: Christopher Harvey
# TODO: Add version support.
# Tested under Linux and Windows (MSVC)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PATH(IL_INCLUDE_DIR il.h
PATH_SUFFIXES include IL
DOC "The path the the directory that contains il.h"
)
#MESSAGE("IL_INCLUDE_DIR is ${IL_INCLUDE_DIR}")
FIND_LIBRARY(IL_LIBRARY
NAMES IL
PATH_SUFFIXES lib64 lib lib32
DOC "The file that corresponds to the base il library."
)
#MESSAGE("IL_LIBRARY is ${IL_LIBRARY}")
FIND_LIBRARY(ILUT_LIBRARY
NAMES ILUT
PATH_SUFFIXES lib64 lib lib32
DOC "The file that corresponds to the il (system?) utility library."
)
#MESSAGE("ILUT_LIBRARY is ${ILUT_LIBRARY}")
FIND_LIBRARY(ILU_LIBRARY
NAMES ILU
PATH_SUFFIXES lib64 lib lib32
DOC "The file that corresponds to the il utility library."
)
#MESSAGE("ILU_LIBRARY is ${ILU_LIBRARY}")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(IL DEFAULT_MSG
IL_LIBRARY ILU_LIBRARY
ILUT_LIBRARY IL_INCLUDE_DIR)

@ -1,102 +1,126 @@
# - This module looks for Doxygen and the path to Graphviz's dot # - This module looks for Doxygen and the path to Graphviz's dot
# Doxygen is a documentation generation tool see http://www.doxygen.org # Doxygen is a documentation generation tool. Please see
# With the OS X GUI version, it likes to be installed to /Applications and # http://www.doxygen.org
# it contains the doxygen executable in the bundle. In the versions I've #
# seen, it is located in Resources, but in general, more often binaries are # This module accepts the following optional variables:
# located in MacOS. This code sets the following variables: #
# DOXYGEN_EXECUTABLE = The path to the doxygen command. # DOXYGEN_SKIP_DOT = If true this module will skip trying to find Dot
# DOXYGEN_DOT_EXECUTABLE = The path to the dot program used by doxygen. # (an optional component often used by Doxygen)
# DOXYGEN_DOT_PATH = The path to dot not including the executable #
# DOXYGEN = same as DOXYGEN_EXECUTABLE for backwards compatibility # This modules defines the following variables:
# DOT = same as DOXYGEN_DOT_EXECUTABLE for backwards compatibility #
# DOXYGEN_EXECUTABLE = The path to the doxygen command.
# DOXYGEN_FOUND = Was Doxygen found or not?
#
# DOXYGEN_DOT_EXECUTABLE = The path to the dot program used by doxygen.
# DOXYGEN_DOT_FOUND = Was Dot found or not?
# DOXYGEN_DOT_PATH = The path to dot not including the executable
#
#
# The official Doxygen.app that is distributed for OS X uses non-standard
# conventions. Instead of the command-line "doxygen" tool being placed in
# Doxygen.app/Contents/MacOS, "Doxywizard" is placed there instead and
# "doxygen" is actually placed in Contents/Resources. This is most likely
# to accomodate people who double-click on the Doxygen.app package and expect
# to see something happen. However, the CMake backend gets horribly confused
# by this. Once CMake sees the bundle, it indiscrimately uses Doxywizard
# as the executable to use. The only work-around I have found is to disable
# the app-bundle feature for only this command.
# Save the old setting
SET(TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE ${CMAKE_FIND_APPBUNDLE})
# Disable the App-bundle detection feature
SET(CMAKE_FIND_APPBUNDLE "NEVER")
# For backwards compatibility support # For backwards compatibility support
# DOXYGEN_FIND_QUIETLY, but it should have been
# Doxygen_FIND_QUIETLY.
IF(Doxygen_FIND_QUIETLY) IF(Doxygen_FIND_QUIETLY)
SET(DOXYGEN_FIND_QUIETLY TRUE) SET(DOXYGEN_FIND_QUIETLY TRUE)
ENDIF(Doxygen_FIND_QUIETLY) ENDIF(Doxygen_FIND_QUIETLY)
IF (NOT DOXYGEN_FIND_QUIETLY) # ===== Rationale for OS X AppBundle mods below =====
MESSAGE(STATUS "Looking for doxygen...") # With the OS X GUI version, Doxygen likes to be installed to /Applications and
ENDIF (NOT DOXYGEN_FIND_QUIETLY) # it contains the doxygen executable in the bundle. In the versions I've
# seen, it is located in Resources, but in general, more often binaries are
# located in MacOS.
#
# NOTE: The official Doxygen.app that is distributed for OS X uses non-standard
# conventions. Instead of the command-line "doxygen" tool being placed in
# Doxygen.app/Contents/MacOS, "Doxywizard" is placed there instead and
# "doxygen" is placed in Contents/Resources. This is most likely done
# so that something happens when people double-click on the Doxygen.app
# package. Unfortunately, CMake gets confused by this as when it sees the
# bundle it uses "Doxywizard" as the executable to use instead of
# "doxygen". Therefore to work-around this issue we temporarily disable
# the app-bundle feature, just for this CMake module:
if(APPLE)
# Save the old setting
SET(TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE ${CMAKE_FIND_APPBUNDLE})
# Disable the App-bundle detection feature
SET(CMAKE_FIND_APPBUNDLE "NEVER")
endif()
# FYI:
# In the older versions of OS X Doxygen, dot was included with the
# Doxygen bundle. But the new versions require you to download
# Graphviz.app which contains "dot" in it's bundle.
# ============== End OSX stuff ================
#
# Find Doxygen...
#
FIND_PROGRAM(DOXYGEN_EXECUTABLE FIND_PROGRAM(DOXYGEN_EXECUTABLE
NAMES doxygen NAMES doxygen
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\doxygen_is1;Inno Setup: App Path]/bin" PATHS
/Applications/Doxygen.app/Contents/Resources "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\doxygen_is1;Inno Setup: App Path]/bin"
/Applications/Doxygen.app/Contents/MacOS /Applications/Doxygen.app/Contents/Resources
/Applications/Doxygen.app/Contents/MacOS
DOC "Doxygen documentation generation tool (http://www.doxygen.org)" DOC "Doxygen documentation generation tool (http://www.doxygen.org)"
) )
IF (DOXYGEN_EXECUTABLE) include(FindPackageHandleStandardArgs)
SET (DOXYGEN_FOUND "YES") FIND_PACKAGE_HANDLE_STANDARD_ARGS(Doxygen DEFAULT_MSG DOXYGEN_EXECUTABLE)
IF (NOT DOXYGEN_FIND_QUIETLY)
MESSAGE(STATUS "Looking for doxygen... - found ${DOXYGEN_EXECUTABLE}")
ENDIF (NOT DOXYGEN_FIND_QUIETLY)
ELSE (DOXYGEN_EXECUTABLE)
IF (NOT DOXYGEN_FIND_QUIETLY)
IF (DOXYGEN_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Looking for doxygen... - NOT found")
ELSE (DOXYGEN_FIND_REQUIRED)
MESSAGE(STATUS "Looking for doxygen... - NOT found")
ENDIF (DOXYGEN_FIND_REQUIRED)
ENDIF (NOT DOXYGEN_FIND_QUIETLY)
ENDIF (DOXYGEN_EXECUTABLE)
# In the older versions of OS X Doxygen, dot was included with the
# Doxygen bundle. But the new versions place make you download Graphviz.app
# which contains dot in its bundle.
IF (NOT DOXYGEN_FIND_QUIETLY)
MESSAGE(STATUS "Looking for dot tool...")
ENDIF (NOT DOXYGEN_FIND_QUIETLY)
FIND_PROGRAM(DOXYGEN_DOT_EXECUTABLE #
NAMES dot # Find Dot...
PATHS "$ENV{ProgramFiles}/ATT/Graphviz/bin" #
"C:/Program Files/ATT/Graphviz/bin"
[HKEY_LOCAL_MACHINE\\SOFTWARE\\ATT\\Graphviz;InstallPath]/bin
/Applications/Graphviz.app/Contents/MacOS
/Applications/Doxygen.app/Contents/Resources
/Applications/Doxygen.app/Contents/MacOS
DOC "Graphviz Dot tool for using Doxygen"
)
IF (NOT DOXYGEN_FIND_QUIETLY) IF(NOT DOXYGEN_SKIP_DOT)
IF (DOXYGEN_DOT_EXECUTABLE) FIND_PROGRAM(DOXYGEN_DOT_EXECUTABLE
MESSAGE(STATUS "Looking for dot tool... - found ${DOXYGEN_DOT_EXECUTABLE}") NAMES dot
PATHS
"$ENV{ProgramFiles}/Graphviz 2.21/bin"
"C:/Program Files/Graphviz 2.21/bin"
"$ENV{ProgramFiles}/ATT/Graphviz/bin"
"C:/Program Files/ATT/Graphviz/bin"
[HKEY_LOCAL_MACHINE\\SOFTWARE\\ATT\\Graphviz;InstallPath]/bin
/Applications/Graphviz.app/Contents/MacOS
/Applications/Doxygen.app/Contents/Resources
/Applications/Doxygen.app/Contents/MacOS
DOC "Graphviz Dot tool for using Doxygen"
)
if(DOXYGEN_DOT_EXECUTABLE)
set(DOXYGEN_DOT_FOUND TRUE)
# The Doxyfile wants the path to Dot, not the entire path and executable # The Doxyfile wants the path to Dot, not the entire path and executable
GET_FILENAME_COMPONENT(DOXYGEN_DOT_PATH "${DOXYGEN_DOT_EXECUTABLE}" PATH CACHE) get_filename_component(DOXYGEN_DOT_PATH "${DOXYGEN_DOT_EXECUTABLE}" PATH CACHE)
ELSE (DOXYGEN_DOT_EXECUTABLE) endif()
MESSAGE(STATUS "Looking for dot tool... - NOT found")
ENDIF (DOXYGEN_DOT_EXECUTABLE) endif(NOT DOXYGEN_SKIP_DOT)
ENDIF (NOT DOXYGEN_FIND_QUIETLY)
#
# Backwards compatibility...
#
if(APPLE)
# Restore the old app-bundle setting setting
SET(CMAKE_FIND_APPBUNDLE ${TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE})
endif()
# Restore the old app-bundle setting setting # Maintain the _FOUND variables as "YES" or "NO" for backwards compatibility
SET(CMAKE_FIND_APPBUNDLE ${TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE}) # (allows people to stuff them directly into Doxyfile with configure_file())
if(DOXYGEN_FOUND)
set(DOXYGEN_FOUND "YES")
else()
set(DOXYGEN_FOUND "NO")
endif()
if(DOXYGEN_DOT_FOUND)
set(DOXYGEN_DOT_FOUND "YES")
else()
set(DOXYGEN_DOT_FOUND "NO")
endif()
# Backwards compatibility for CMake4.3 and less # For backwards compatibility support
SET (DOXYGEN ${DOXYGEN_EXECUTABLE} ) SET (DOXYGEN ${DOXYGEN_EXECUTABLE} )
SET (DOT ${DOXYGEN_DOT_EXECUTABLE} ) SET (DOT ${DOXYGEN_DOT_EXECUTABLE} )
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
DOXYGEN_FOUND
DOXYGEN_EXECUTABLE DOXYGEN_EXECUTABLE
DOXYGEN_DOT_FOUND
DOXYGEN_DOT_EXECUTABLE DOXYGEN_DOT_EXECUTABLE
DOXYGEN_DOT_PATH DOXYGEN_DOT_PATH
) )

@ -9,7 +9,7 @@
FIND_PATH(EXPAT_INCLUDE_DIR NAMES expat.h) FIND_PATH(EXPAT_INCLUDE_DIR NAMES expat.h)
# Look for the library. # Look for the library.
FIND_LIBRARY(EXPAT_LIBRARY NAMES expat) FIND_LIBRARY(EXPAT_LIBRARY NAMES expat libexpat)
# handle the QUIETLY and REQUIRED arguments and set EXPAT_FOUND to TRUE if # handle the QUIETLY and REQUIRED arguments and set EXPAT_FOUND to TRUE if
# all listed variables are TRUE # all listed variables are TRUE

@ -1,20 +1,37 @@
# - Find the native FLTK includes and library # - Find the native FLTK includes and library
# The following settings are defined #
# FLTK_FLUID_EXECUTABLE, where to find the Fluid tool # By default FindFLTK.cmake will search for all of the FLTK components and
# FLTK_WRAP_UI, This enables the FLTK_WRAP_UI command # add them to the FLTK_LIBRARIES variable.
# FLTK_INCLUDE_DIR, where to find include files #
# FLTK_LIBRARIES, list of fltk libraries # You can limit the components which get placed in FLTK_LIBRARIES by
# FLTK_FOUND, Don't use FLTK if false. # defining one or more of the following three options:
# The following settings should not be used in general. #
# FLTK_BASE_LIBRARY = the full path to fltk.lib # FLTK_SKIP_OPENGL, set to true to disable searching for opengl and
# FLTK_GL_LIBRARY = the full path to fltk_gl.lib # the FLTK GL library
# FLTK_FORMS_LIBRARY = the full path to fltk_forms.lib # FLTK_SKIP_FORMS, set to true to disable searching for fltk_forms
# FLTK_IMAGES_LIBRARY = the full path to fltk_images.lib # FLTK_SKIP_IMAGES, set to true to disable searching for fltk_images
#
IF (FLTK_INCLUDE_DIR) # FLTK_SKIP_FLUID, set to true if the fluid binary need not be present
# Already in cache, be silent # at build time
SET(FLTK_FIND_QUIETLY TRUE) #
ENDIF (FLTK_INCLUDE_DIR) # The following variables will be defined:
# FLTK_FOUND, True if all components not skipped were found
# FLTK_INCLUDE_DIR, where to find include files
# FLTK_LIBRARIES, list of fltk libraries you should link against
# FLTK_FLUID_EXECUTABLE, where to find the Fluid tool
# FLTK_WRAP_UI, This enables the FLTK_WRAP_UI command
#
# The following cache variables are assigned but should not be used.
# See the FLTK_LIBRARIES variable instead.
#
# FLTK_BASE_LIBRARY = the full path to fltk.lib
# FLTK_GL_LIBRARY = the full path to fltk_gl.lib
# FLTK_FORMS_LIBRARY = the full path to fltk_forms.lib
# FLTK_IMAGES_LIBRARY = the full path to fltk_images.lib
IF(NOT FLTK_SKIP_OPENGL)
FIND_PACKAGE(OpenGL)
ENDIF()
# Platform dependent libraries required by FLTK # Platform dependent libraries required by FLTK
IF(WIN32) IF(WIN32)
@ -87,6 +104,8 @@ IF(NOT FLTK_DIR)
# Read from the CMakeSetup registry entries. It is likely that # Read from the CMakeSetup registry entries. It is likely that
# FLTK will have been recently built. # FLTK will have been recently built.
# TODO: Is this really a good idea? I can already hear the user screaming, "But
# it worked when I configured the build LAST week!"
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1] [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1]
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2] [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2]
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3] [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3]
@ -113,7 +132,7 @@ ENDIF(NOT FLTK_DIR)
INCLUDE(${FLTK_DIR}/FLTKConfig.cmake) INCLUDE(${FLTK_DIR}/FLTKConfig.cmake)
# Fluid # Fluid
IF(FLUID_COMMAND) IF(FLUID_COMMAND)
SET(FLTK_FLUID_EXECUTABLE ${FLUID_COMMAND} CACHE FILEPATH "Fluid executable") SET(FLTK_FLUID_EXECUTABLE ${FLUID_COMMAND} CACHE FILEPATH "Fluid executable")
ELSE(FLUID_COMMAND) ELSE(FLUID_COMMAND)
FIND_PROGRAM(FLTK_FLUID_EXECUTABLE fluid PATHS FIND_PROGRAM(FLTK_FLUID_EXECUTABLE fluid PATHS
@ -172,17 +191,53 @@ ENDIF(NOT FLTK_DIR)
SET(FLTK_WRAP_UI 1) SET(FLTK_WRAP_UI 1)
ENDIF(FLTK_FLUID_EXECUTABLE) ENDIF(FLTK_FLUID_EXECUTABLE)
#
# Try to find FLTK include dir using fltk-config
#
IF(UNIX)
# Use fltk-config to generate a list of possible include directories
FIND_PROGRAM(FLTK_CONFIG_SCRIPT fltk-config PATHS ${FLTK_BIN_DIR})
IF(FLTK_CONFIG_SCRIPT)
IF(NOT FLTK_INCLUDE_DIR)
EXEC_PROGRAM(${FLTK_CONFIG_SCRIPT} ARGS --cxxflags OUTPUT_VARIABLE FLTK_CXXFLAGS)
IF(FLTK_CXXFLAGS)
STRING(REGEX MATCHALL "-I[^ ]*" _fltk_temp_dirs ${FLTK_CXXFLAGS})
STRING(REPLACE "-I" "" _fltk_temp_dirs "${_fltk_temp_dirs}")
FOREACH(_dir ${_fltk_temp_dirs})
STRING(STRIP ${_dir} _output)
LIST(APPEND _FLTK_POSSIBLE_INCLUDE_DIRS ${_output})
ENDFOREACH()
ENDIF(FLTK_CXXFLAGS)
ENDIF()
ENDIF()
ENDIF()
SET(FLTK_INCLUDE_SEARCH_PATH ${FLTK_INCLUDE_SEARCH_PATH} SET(FLTK_INCLUDE_SEARCH_PATH ${FLTK_INCLUDE_SEARCH_PATH}
/usr/local/fltk /usr/local/fltk
/usr/X11R6/include /usr/X11R6/include
${_FLTK_POSSIBLE_INCLUDE_DIRS}
) )
FIND_PATH(FLTK_INCLUDE_DIR FL/Fl.h ${FLTK_INCLUDE_SEARCH_PATH}) FIND_PATH(FLTK_INCLUDE_DIR
NAMES FL/Fl.h FL/Fl.H # fltk 1.1.9 has Fl.H (#8376)
PATHS ${FLTK_INCLUDE_SEARCH_PATH})
#
# Try to find FLTK library
IF(UNIX)
IF(FLTK_CONFIG_SCRIPT)
EXEC_PROGRAM(${FLTK_CONFIG_SCRIPT} ARGS --libs OUTPUT_VARIABLE _FLTK_POSSIBLE_LIBS)
IF(_FLTK_POSSIBLE_LIBS)
GET_FILENAME_COMPONENT(_FLTK_POSSIBLE_LIBRARY_DIR ${_FLTK_POSSIBLE_LIBS} PATH)
ENDIF()
ENDIF()
ENDIF()
SET(FLTK_LIBRARY_SEARCH_PATH ${FLTK_LIBRARY_SEARCH_PATH} SET(FLTK_LIBRARY_SEARCH_PATH ${FLTK_LIBRARY_SEARCH_PATH}
/usr/local/fltk/lib /usr/local/fltk/lib
/usr/X11R6/lib /usr/X11R6/lib
${FLTK_INCLUDE_DIR}/lib ${FLTK_INCLUDE_DIR}/lib
${_FLTK_POSSIBLE_LIBRARY_DIR}
) )
FIND_LIBRARY(FLTK_BASE_LIBRARY NAMES fltk fltkd FIND_LIBRARY(FLTK_BASE_LIBRARY NAMES fltk fltkd
@ -196,7 +251,6 @@ ENDIF(NOT FLTK_DIR)
# Find the extra libraries needed for the fltk_images library. # Find the extra libraries needed for the fltk_images library.
IF(UNIX) IF(UNIX)
FIND_PROGRAM(FLTK_CONFIG_SCRIPT fltk-config PATHS ${FLTK_BIN_DIR})
IF(FLTK_CONFIG_SCRIPT) IF(FLTK_CONFIG_SCRIPT)
EXEC_PROGRAM(${FLTK_CONFIG_SCRIPT} ARGS --use-images --ldflags EXEC_PROGRAM(${FLTK_CONFIG_SCRIPT} ARGS --use-images --ldflags
OUTPUT_VARIABLE FLTK_IMAGES_LDFLAGS) OUTPUT_VARIABLE FLTK_IMAGES_LDFLAGS)
@ -215,19 +269,29 @@ ENDIF(NOT FLTK_DIR)
ENDIF(FLTK_BUILT_WITH_CMAKE) ENDIF(FLTK_BUILT_WITH_CMAKE)
# Append all of the required libraries together (by default, everything)
SET(FLTK_LIBRARIES)
IF(NOT FLTK_SKIP_IMAGES)
LIST(APPEND FLTK_LIBRARIES ${FLTK_IMAGES_LIBRARY})
ENDIF()
IF(NOT FLTK_SKIP_FORMS)
LIST(APPEND FLTK_LIBRARIES ${FLTK_FORMS_LIBRARY})
ENDIF()
IF(NOT FLTK_SKIP_OPENGL)
LIST(APPEND FLTK_LIBRARIES ${FLTK_GL_LIBRARY} ${OPENGL_gl_LIBRARY})
LIST(APPEND FLTK_INCLUDE_DIR ${OPENGL_INCLUDE_DIR})
LIST(REMOVE_DUPLICATES FLTK_INCLUDE_DIR)
ENDIF()
LIST(APPEND FLTK_LIBRARIES ${FLTK_BASE_LIBRARY})
SET(FLTK_FOUND 1) INCLUDE(FindPackageHandleStandardArgs)
FOREACH(var FLTK_FLUID_EXECUTABLE FLTK_INCLUDE_DIR IF(FLTK_SKIP_FLUID)
FLTK_BASE_LIBRARY FLTK_GL_LIBRARY FIND_PACKAGE_HANDLE_STANDARD_ARGS(FLTK DEFAULT_MSG FLTK_LIBRARIES FLTK_INCLUDE_DIR)
FLTK_FORMS_LIBRARY FLTK_IMAGES_LIBRARY) ELSE()
IF(NOT ${var}) FIND_PACKAGE_HANDLE_STANDARD_ARGS(FLTK DEFAULT_MSG FLTK_LIBRARIES FLTK_INCLUDE_DIR FLTK_FLUID_EXECUTABLE)
SET(FLTK_FOUND 0) ENDIF()
ENDIF(NOT ${var})
ENDFOREACH(var)
IF(FLTK_FOUND) IF(FLTK_FOUND)
SET(FLTK_LIBRARIES ${FLTK_IMAGES_LIBRARY} ${FLTK_IMAGES_LIBS} ${FLTK_BASE_LIBRARY} ${FLTK_GL_LIBRARY}
${FLTK_FORMS_LIBRARY} )
IF(APPLE) IF(APPLE)
SET(FLTK_LIBRARIES ${FLTK_PLATFORM_DEPENDENT_LIBS} ${FLTK_LIBRARIES}) SET(FLTK_LIBRARIES ${FLTK_PLATFORM_DEPENDENT_LIBS} ${FLTK_LIBRARIES})
ELSE(APPLE) ELSE(APPLE)
@ -241,5 +305,3 @@ IF(FLTK_FOUND)
SET (FLTK_LIBRARY ${FLTK_LIBRARIES}) SET (FLTK_LIBRARY ${FLTK_LIBRARIES})
ENDIF(FLTK_FOUND) ENDIF(FLTK_FOUND)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FLTK DEFAULT_MSG FLTK_LIBRARIES FLTK_INCLUDE_DIR)

@ -1,8 +1,14 @@
# Locate gdal # Locate gdal
# This module defines #
# GDAL_LIBRARY # This module accepts the following environment variables:
# GDAL_FOUND, if false, do not try to link to gdal #
# GDAL_INCLUDE_DIR, where to find the headers # GDAL_DIR or GDAL_ROOT - Specify the location of GDAL
#
# This module defines the following CMake variables:
#
# GDAL_FOUND - True if libgdal is found
# GDAL_LIBRARY - A variable pointing to the GDAL library
# GDAL_INCLUDE_DIR - Where to find the headers
# #
# $GDALDIR is an environment variable that would # $GDALDIR is an environment variable that would
# correspond to the ./configure --prefix=$GDAL_DIR # correspond to the ./configure --prefix=$GDAL_DIR
@ -17,57 +23,71 @@
# to happen). # to happen).
# This makes the presumption that you are include gdal.h like # This makes the presumption that you are include gdal.h like
# #include "gdal.h" #
#include "gdal.h"
FIND_PATH(GDAL_INCLUDE_DIR gdal.h FIND_PATH(GDAL_INCLUDE_DIR gdal.h
HINTS HINTS
$ENV{GDAL_DIR} $ENV{GDAL_DIR}
PATH_SUFFIXES include $ENV{GDAL_ROOT}
PATH_SUFFIXES
include/gdal
include/GDAL
include
PATHS PATHS
~/Library/Frameworks/gdal.framework/Headers ~/Library/Frameworks/gdal.framework/Headers
/Library/Frameworks/gdal.framework/Headers /Library/Frameworks/gdal.framework/Headers
/usr/local/include/gdal /sw # Fink
/usr/local/include/GDAL /opt/local # DarwinPorts
/usr/local/include /opt/csw # Blastwave
/usr/include/gdal /opt
/usr/include/GDAL
/usr/include
/sw/include/gdal
/sw/include/GDAL
/sw/include # Fink
/opt/local/include/gdal
/opt/local/include/GDAL
/opt/local/include # DarwinPorts
/opt/csw/include/gdal
/opt/csw/include/GDAL
/opt/csw/include # Blastwave
/opt/include/gdal
/opt/include/GDAL
/opt/include
) )
IF(UNIX)
# Use gdal-config to obtain the library version (this should hopefully
# allow us to -lgdal1.x.y where x.y are correct version)
# For some reason, libgdal development packages do not contain
# libgdal.so...
FIND_PROGRAM(GDAL_CONFIG gdal-config
HINTS
$ENV{GDAL_DIR}
$ENV{GDAL_ROOT}
PATH_SUFFIXES bin
PATHS
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
if(GDAL_CONFIG)
exec_program(${GDAL_CONFIG} ARGS --libs OUTPUT_VARIABLE GDAL_CONFIG_LIBS)
if(GDAL_CONFIG_LIBS)
string(REGEX MATCHALL "-l[^ ]+" _gdal_dashl ${GDAL_CONFIG_LIBS})
string(REGEX REPLACE "-l" "" _gdal_lib "${_gdal_dashl}")
string(REGEX MATCHALL "-L[^ ]+" _gdal_dashL ${GDAL_CONFIG_LIBS})
string(REGEX REPLACE "-L" "" _gdal_libpath "${_gdal_dashL}")
endif()
endif()
endif()
FIND_LIBRARY(GDAL_LIBRARY FIND_LIBRARY(GDAL_LIBRARY
NAMES gdal GDAL NAMES ${_gdal_lib} gdal gdal_i gdal1.5.0 gdal1.4.0 gdal1.3.2 GDAL
HINTS HINTS
$ENV{GDAL_DIR} $ENV{GDAL_DIR}
$ENV{GDAL_ROOT}
${_gdal_libpath}
PATH_SUFFIXES lib64 lib PATH_SUFFIXES lib64 lib
PATHS PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw /sw
/opt/local /opt/local
/opt/csw /opt/csw
/opt /opt
/usr/freeware /usr/freeware
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;GDAL_ROOT]/lib
) )
SET(GDAL_FOUND "NO") include(FindPackageHandleStandardArgs)
IF(GDAL_LIBRARY AND GDAL_INCLUDE_DIR) FIND_PACKAGE_HANDLE_STANDARD_ARGS(GDAL DEFAULT_MSG GDAL_LIBRARY GDAL_INCLUDE_DIR)
SET(GDAL_FOUND "YES")
ENDIF(GDAL_LIBRARY AND GDAL_INCLUDE_DIR)
set(GDAL_LIBRARIES ${GDAL_LIBRARY})
set(GDAL_INCLUDE_DIRS ${GDAL_INCLUDE_DIR})

@ -11,6 +11,7 @@ IF (WIN32)
FIND_PATH( GLUT_INCLUDE_DIR NAMES GL/glut.h FIND_PATH( GLUT_INCLUDE_DIR NAMES GL/glut.h
PATHS ${GLUT_ROOT_PATH}/include ) PATHS ${GLUT_ROOT_PATH}/include )
FIND_LIBRARY( GLUT_glut_LIBRARY NAMES glut glut32 FIND_LIBRARY( GLUT_glut_LIBRARY NAMES glut glut32
PATHS
${OPENGL_LIBRARY_DIR} ${OPENGL_LIBRARY_DIR}
${GLUT_ROOT_PATH}/Release ${GLUT_ROOT_PATH}/Release
) )

@ -18,7 +18,9 @@ FIND_PROGRAM(GETTEXT_MSGMERGE_EXECUTABLE msgmerge)
FIND_PROGRAM(GETTEXT_MSGFMT_EXECUTABLE msgfmt) FIND_PROGRAM(GETTEXT_MSGFMT_EXECUTABLE msgfmt)
MACRO(GETTEXT_CREATE_TRANSLATIONS _potFile _firstPoFile) MACRO(GETTEXT_CREATE_TRANSLATIONS _potFile _firstPoFileArg)
# make it a real variable, so we can modify it here
SET(_firstPoFile "${_firstPoFileArg}")
SET(_gmoFiles) SET(_gmoFiles)
GET_FILENAME_COMPONENT(_potBasename ${_potFile} NAME_WE) GET_FILENAME_COMPONENT(_potBasename ${_potFile} NAME_WE)

@ -106,13 +106,13 @@ IF(KDECONFIG_EXECUTABLE)
EXECUTE_PROCESS(COMMAND ${KDECONFIG_EXECUTABLE} --version EXECUTE_PROCESS(COMMAND ${KDECONFIG_EXECUTABLE} --version
OUTPUT_VARIABLE kde_config_version ) OUTPUT_VARIABLE kde_config_version )
STRING(REGEX MATCH "KDE: .\\." kde_version ${kde_config_version}) STRING(REGEX MATCH "KDE: .\\." kde_version "${kde_config_version}")
IF (${kde_version} MATCHES "KDE: 3\\.") IF ("${kde_version}" MATCHES "KDE: 3\\.")
EXECUTE_PROCESS(COMMAND ${KDECONFIG_EXECUTABLE} --prefix EXECUTE_PROCESS(COMMAND ${KDECONFIG_EXECUTABLE} --prefix
OUTPUT_VARIABLE kdedir ) OUTPUT_VARIABLE kdedir )
STRING(REGEX REPLACE "\n" "" KDE3PREFIX "${kdedir}") STRING(REGEX REPLACE "\n" "" KDE3PREFIX "${kdedir}")
ENDIF (${kde_version} MATCHES "KDE: 3\\.") ENDIF ("${kde_version}" MATCHES "KDE: 3\\.")
ENDIF(KDECONFIG_EXECUTABLE) ENDIF(KDECONFIG_EXECUTABLE)

@ -16,7 +16,7 @@ IF(QT_QT_LIBRARY)
ELSE(KDE4_FIND_REQUIRED) ELSE(KDE4_FIND_REQUIRED)
IF(NOT KDE4_FIND_QUIETLY) IF(NOT KDE4_FIND_QUIETLY)
MESSAGE( STATUS "KDE4/Qt4 and Qt3 cannot be used together in one project.") MESSAGE( STATUS "KDE4/Qt4 and Qt3 cannot be used together in one project.")
ENDIF(NOT KDE_FIND_QUIETLY) ENDIF(NOT KDE4_FIND_QUIETLY)
RETURN() RETURN()
ENDIF(KDE4_FIND_REQUIRED) ENDIF(KDE4_FIND_REQUIRED)
ENDIF(QT_QT_LIBRARY) ENDIF(QT_QT_LIBRARY)

@ -21,20 +21,22 @@ ENDIF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES)
IF (NOT WIN32) IF (NOT WIN32)
# use pkg-config to get the directories and then use these values # use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls # in the FIND_PATH() and FIND_LIBRARY() calls
INCLUDE(UsePkgConfig) FIND_PACKAGE(PkgConfig)
PKGCONFIG(libxml-2.0 _LibXml2IncDir _LibXml2LinkDir _LibXml2LinkFlags _LibXml2Cflags) PKG_CHECK_MODULES(PC_LIBXML libxml-2.0)
SET(LIBXML2_DEFINITIONS ${_LibXml2Cflags}) SET(LIBXML2_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER})
ENDIF (NOT WIN32) ENDIF (NOT WIN32)
FIND_PATH(LIBXML2_INCLUDE_DIR libxml/xpath.h FIND_PATH(LIBXML2_INCLUDE_DIR libxml/xpath.h
PATHS HINTS
${_LibXml2IncDir} ${PC_LIBXML_INCLUDEDIR}
${PC_LIBXML_INCLUDE_DIRS}
PATH_SUFFIXES libxml2 PATH_SUFFIXES libxml2
) )
FIND_LIBRARY(LIBXML2_LIBRARIES NAMES xml2 libxml2 FIND_LIBRARY(LIBXML2_LIBRARIES NAMES xml2 libxml2
PATHS HINTS
${_LibXml2LinkDir} ${PC_LIBXML_LIBDIR}
${PC_LIBXML_LIBRARY_DIRS}
) )
FIND_PROGRAM(LIBXML2_XMLLINT_EXECUTABLE xmllint) FIND_PROGRAM(LIBXML2_XMLLINT_EXECUTABLE xmllint)

@ -28,7 +28,7 @@ FIND_PATH(LUA_INCLUDE_DIR lua.h
) )
FIND_LIBRARY(LUA_LIBRARY_lua FIND_LIBRARY(LUA_LIBRARY_lua
NAMES lua50 lua5.0 lua5 lua NAMES lua50 lua5.0 lua-5.0 lua5 lua
HINTS HINTS
$ENV{LUA_DIR} $ENV{LUA_DIR}
PATH_SUFFIXES lib64 lib PATH_SUFFIXES lib64 lib

@ -28,7 +28,7 @@ FIND_PATH(LUA_INCLUDE_DIR lua.h
) )
FIND_LIBRARY(LUA_LIBRARY FIND_LIBRARY(LUA_LIBRARY
NAMES lua51 lua5.1 lua NAMES lua51 lua5.1 lua-5.1 lua
HINTS HINTS
$ENV{LUA_DIR} $ENV{LUA_DIR}
PATH_SUFFIXES lib64 lib PATH_SUFFIXES lib64 lib

@ -1,19 +1,47 @@
# - Find MFC on Windows # - Find MFC on Windows
# Find the native MFC - i.e. decide if this is an MS VC box. # Find the native MFC - i.e. decide if an application can link to the MFC
# libraries.
# MFC_FOUND - Was MFC support found # MFC_FOUND - Was MFC support found
# You don't need to include anything or link anything to use it. # You don't need to include anything or link anything to use it.
# Assume no MFC support # Assume no MFC support
SET( MFC_FOUND "NO" ) SET(MFC_FOUND "NO")
# Add MFC support if win32 and not cygwin and not borland
IF( WIN32 )
IF( NOT CYGWIN )
IF( NOT BORLAND )
IF( NOT MINGW )
SET( MFC_FOUND "YES" )
ENDIF( NOT MINGW )
ENDIF( NOT BORLAND )
ENDIF( NOT CYGWIN )
ENDIF( WIN32 )
# Only attempt the try_compile call if it has a chance to succeed:
SET(MFC_ATTEMPT_TRY_COMPILE 0)
IF(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW)
SET(MFC_ATTEMPT_TRY_COMPILE 1)
ENDIF(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW)
IF(MFC_ATTEMPT_TRY_COMPILE)
IF("MFC_HAVE_MFC" MATCHES "^MFC_HAVE_MFC$")
SET(CHECK_INCLUDE_FILE_VAR "afxwin.h")
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx)
MESSAGE(STATUS "Looking for MFC")
TRY_COMPILE(MFC_HAVE_MFC
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx
CMAKE_FLAGS
-DCMAKE_MFC_FLAG:STRING=2
-DCOMPILE_DEFINITIONS:STRING=-D_AFXDLL
OUTPUT_VARIABLE OUTPUT)
IF(MFC_HAVE_MFC)
MESSAGE(STATUS "Looking for MFC - found")
SET(MFC_HAVE_MFC 1 CACHE INTERNAL "Have MFC?")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if MFC exists passed with the following output:\n"
"${OUTPUT}\n\n")
ELSE(MFC_HAVE_MFC)
MESSAGE(STATUS "Looking for MFC - not found")
SET(MFC_HAVE_MFC 0 CACHE INTERNAL "Have MFC?")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if MFC exists failed with the following output:\n"
"${OUTPUT}\n\n")
ENDIF(MFC_HAVE_MFC)
ENDIF("MFC_HAVE_MFC" MATCHES "^MFC_HAVE_MFC$")
IF(MFC_HAVE_MFC)
SET(MFC_FOUND "YES")
ENDIF(MFC_HAVE_MFC)
ENDIF(MFC_ATTEMPT_TRY_COMPILE)

@ -31,7 +31,7 @@ IF(MPEG2_FOUND)
#some native mpeg2 installations will depend #some native mpeg2 installations will depend
#on libSDL, if found, add it in. #on libSDL, if found, add it in.
INCLUDE( FindSDL.cmake ) INCLUDE( FindSDL )
IF(SDL_FOUND) IF(SDL_FOUND)
SET( MPEG2_LIBRARIES ${MPEG2_LIBRARIES} ${SDL_LIBRARY}) SET( MPEG2_LIBRARIES ${MPEG2_LIBRARIES} ${SDL_LIBRARY})
ENDIF(SDL_FOUND) ENDIF(SDL_FOUND)

@ -0,0 +1,108 @@
# - Finds OpenMP support
# This module can be used to detect OpenMP support in a compiler.
# If the compiler supports OpenMP, the flags required to compile with
# openmp support are set.
#
# The following variables are set:
# OpenMP_C_FLAGS - flags to add to the C compiler for OpenMP support
# OpenMP_CXX_FLAGS - flags to add to the CXX compiler for OpenMP support
# OPENMP_FOUND - true if openmp is detected
#
# Supported compilers can be found at http://openmp.org/wp/openmp-compilers/
# Copyright 2008, 2009 <André Rigland Brodtkorb> Andre.Brodtkorb@ifi.uio.no
#
# Redistribution AND use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
include(CheckCSourceCompiles)
include(CheckCXXSourceCompiles)
include(FindPackageHandleStandardArgs)
set(OpenMP_C_FLAG_CANDIDATES
#Gnu
"-fopenmp"
#Microsoft Visual Studio
"/openmp"
#Intel windows
"-Qopenmp"
#Intel
"-openmp"
#Empty, if compiler automatically accepts openmp
" "
#Sun
"-xopenmp"
#HP
"+Oopenmp"
#IBM XL C/c++
"-qsmp"
#Portland Group
"-mp"
)
set(OpenMP_CXX_FLAG_CANDIDATES ${OpenMP_C_FLAG_CANDIDATES})
# sample openmp source code to test
set(OpenMP_C_TEST_SOURCE
"
#include <omp.h>
int main() {
#ifdef _OPENMP
return 0;
#else
breaks_on_purpose
#endif
}
")
# use the same source for CXX as C for now
set(OpenMP_CXX_TEST_SOURCE ${OpenMP_C_TEST_SOURCE})
# if these are set then do not try to find them again,
# by avoiding any try_compiles for the flags
if(DEFINED OpenMP_C_FLAGS AND DEFINED OpenMP_CXX_FLAGS)
set(OpenMP_C_FLAG_CANDIDATES)
set(OpenMP_CXX_FLAG_CANDIDATES)
endif(DEFINED OpenMP_C_FLAGS AND DEFINED OpenMP_CXX_FLAGS)
# check c compiler
foreach(FLAG ${OpenMP_C_FLAG_CANDIDATES})
set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_FLAGS "${FLAG}")
unset(OpenMP_FLAG_DETECTED CACHE)
message(STATUS "Try OpenMP C flag = [${FLAG}]")
check_c_source_compiles("${OpenMP_CXX_TEST_SOURCE}" OpenMP_FLAG_DETECTED)
set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
if(OpenMP_FLAG_DETECTED)
set(OpenMP_C_FLAGS_INTERNAL "${FLAG}")
break()
endif(OpenMP_FLAG_DETECTED)
endforeach(FLAG ${OpenMP_C_FLAG_CANDIDATES})
# check cxx compiler
foreach(FLAG ${OpenMP_CXX_FLAG_CANDIDATES})
set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_FLAGS "${FLAG}")
unset(OpenMP_FLAG_DETECTED CACHE)
message(STATUS "Try OpenMP CXX flag = [${FLAG}]")
check_cxx_source_compiles("${OpenMP_C_TEST_SOURCE}" OpenMP_FLAG_DETECTED)
set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
if(OpenMP_FLAG_DETECTED)
set(OpenMP_CXX_FLAGS_INTERNAL "${FLAG}")
break()
endif(OpenMP_FLAG_DETECTED)
endforeach(FLAG ${OpenMP_CXX_FLAG_CANDIDATES})
set(OpenMP_C_FLAGS "${OpenMP_C_FLAGS_INTERNAL}"
CACHE STRING "C compiler flags for OpenMP parallization")
set(OpenMP_CXX_FLAGS "${OpenMP_CXX_FLAGS_INTERNAL}"
CACHE STRING "C++ compiler flags for OpenMP parallization")
# handle the standard arguments for find_package
find_package_handle_standard_args(OpenMP DEFAULT_MSG
OpenMP_C_FLAGS OpenMP_CXX_FLAGS )
mark_as_advanced(
OpenMP_C_FLAGS
OpenMP_CXX_FLAGS
)

@ -0,0 +1,213 @@
# - Find OpenSceneGraph
# This module searches for the OpenSceneGraph core "osg" library as well as
# OpenThreads, and whatever additional COMPONENTS that you specify.
# See http://www.openscenegraph.org
#
# NOTE: If you would like to use this module in your CMAKE_MODULE_PATH instead
# of requiring CMake >= 2.6.3, you will also need to download
# FindOpenThreads.cmake, Findosg_functions.cmake, Findosg.cmake, as well as
# files for any Components you need to call (FindosgDB.cmake,
# FindosgUtil.cmake, etc.)
#
#==================================
#
# This module accepts the following variables (note mixed case)
#
# OpenSceneGraph_DEBUG - Enable debugging output
#
# OpenSceneGraph_MARK_AS_ADVANCED - Mark cache variables as advanced
# automatically
#
# The following environment variables are also respected for finding the OSG
# and it's various components. CMAKE_PREFIX_PATH can also be used for this
# (see find_library() CMake documentation).
#
# <MODULE>_DIR (where MODULE is of the form "OSGVOLUME" and there is a FindosgVolume.cmake file)
# OSG_DIR
# OSGDIR
# OSG_ROOT
#
# This module defines the following output variables:
#
# OPENSCENEGRAPH_FOUND - Was the OSG and all of the specified components found?
#
# OPENSCENEGRAPH_VERSION - The version of the OSG which was found
#
# OPENSCENEGRAPH_INCLUDE_DIRS - Where to find the headers
#
# OPENSCENEGRAPH_LIBRARIES - The OSG libraries
#
#==================================
# Example Usage:
#
# find_package(OpenSceneGraph 2.0.0 COMPONENTS osgDB osgUtil)
# include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS})
#
# add_executable(foo foo.cc)
# target_link_libraries(foo ${OPENSCENEGRAPH_LIBRARIES})
#
#==================================
#
# Naming convention:
# Local variables of the form _osg_foo
# Input variables of the form OpenSceneGraph_FOO
# Output variables of the form OPENSCENEGRAPH_FOO
#
# Copyright (c) 2009, Philip Lowman <philip@yhbt.com>
#
# Redistribution AND use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
#==================================
include(Findosg_functions)
set(_osg_modules_to_process)
foreach(_osg_component ${OpenSceneGraph_FIND_COMPONENTS})
list(APPEND _osg_modules_to_process ${_osg_component})
endforeach()
list(APPEND _osg_modules_to_process "osg" "OpenThreads")
list(REMOVE_DUPLICATES _osg_modules_to_process)
if(OpenSceneGraph_DEBUG)
message("[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] "
"Components = ${_osg_modules_to_process}")
endif()
#
# First we need to find and parse osg/Version
#
OSG_FIND_PATH(OSG osg/Version)
if(OpenSceneGraph_MARK_AS_ADVANCED)
OSG_MARK_AS_ADVANCED(OSG)
endif()
# Try to ascertain the version...
if(OSG_INCLUDE_DIR)
if(OpenSceneGraph_DEBUG)
message("[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] "
"Detected OSG_INCLUDE_DIR = ${OSG_INCLUDE_DIR}")
endif()
file(READ "${OSG_INCLUDE_DIR}/osg/Version" _osg_Version_contents)
string(REGEX MATCH ".*#define OSG_VERSION_MAJOR[ \t]+[0-9]+.*"
_osg_old_defines ${_osg_Version_contents})
string(REGEX MATCH ".*#define OPENSCENEGRAPH_MAJOR_VERSION[ \t]+[0-9]+.*"
_osg_new_defines ${_osg_Version_contents})
if(_osg_old_defines)
string(REGEX REPLACE ".*#define OSG_VERSION_MAJOR[ \t]+([0-9]+).*"
"\\1" _osg_VERSION_MAJOR ${_osg_Version_contents})
string(REGEX REPLACE ".*#define OSG_VERSION_MINOR[ \t]+([0-9]+).*"
"\\1" _osg_VERSION_MINOR ${_osg_Version_contents})
string(REGEX REPLACE ".*#define OSG_VERSION_PATCH[ \t]+([0-9]+).*"
"\\1" _osg_VERSION_PATCH ${_osg_Version_contents})
elseif(_osg_new_defines)
string(REGEX REPLACE ".*#define OPENSCENEGRAPH_MAJOR_VERSION[ \t]+([0-9]+).*"
"\\1" _osg_VERSION_MAJOR ${_osg_Version_contents})
string(REGEX REPLACE ".*#define OPENSCENEGRAPH_MINOR_VERSION[ \t]+([0-9]+).*"
"\\1" _osg_VERSION_MINOR ${_osg_Version_contents})
string(REGEX REPLACE ".*#define OPENSCENEGRAPH_PATCH_VERSION[ \t]+([0-9]+).*"
"\\1" _osg_VERSION_PATCH ${_osg_Version_contents})
else()
message("[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] "
"Failed to parse version number, please report this as a bug")
endif()
set(OPENSCENEGRAPH_VERSION "${_osg_VERSION_MAJOR}.${_osg_VERSION_MINOR}.${_osg_VERSION_PATCH}"
CACHE INTERNAL "The version of OSG which was detected")
if(OpenSceneGraph_DEBUG)
message("[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] "
"Detected version ${OPENSCENEGRAPH_VERSION}")
endif()
endif()
#
# Version checking
#
if(OpenSceneGraph_FIND_VERSION)
if(OpenSceneGraph_FIND_VERSION_EXACT)
if(NOT OPENSCENEGRAPH_VERSION VERSION_EQUAL ${OpenSceneGraph_FIND_VERSION})
set(_osg_version_not_exact TRUE)
endif()
else()
# version is too low
if(NOT OPENSCENEGRAPH_VERSION VERSION_EQUAL ${OpenSceneGraph_FIND_VERSION} AND
NOT OPENSCENEGRAPH_VERSION VERSION_GREATER ${OpenSceneGraph_FIND_VERSION})
set(_osg_version_not_high_enough TRUE)
endif()
endif()
endif()
set(_osg_required)
set(_osg_quiet)
if(OpenSceneGraph_FIND_REQUIRED)
set(_osg_required "REQUIRED")
endif()
if(OpenSceneGraph_FIND_QUIETLY)
set(_osg_quiet "QUIET")
endif()
#
# Here we call FIND_PACKAGE() on all of the components
#
foreach(_osg_module ${_osg_modules_to_process})
if(OpenSceneGraph_DEBUG)
message("[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] "
"Calling find_package(${_osg_module} ${_osg_required} ${_osg_quiet})")
endif()
find_package(${_osg_module} ${_osg_required} ${_osg_quiet})
string(TOUPPER ${_osg_module} _osg_module_UC)
list(APPEND OPENSCENEGRAPH_INCLUDE_DIR ${${_osg_module_UC}_INCLUDE_DIR})
list(APPEND OPENSCENEGRAPH_LIBRARIES ${${_osg_module_UC}_LIBRARIES})
if(OpenSceneGraph_MARK_AS_ADVANCED)
OSG_MARK_AS_ADVANCED(${_osg_module})
endif()
endforeach()
if(OPENSCENEGRAPH_INCLUDE_DIR)
list(REMOVE_DUPLICATES OPENSCENEGRAPH_INCLUDE_DIR)
endif()
#
# Inform the users with an error message based on
# what version they have vs. what version was
# required.
#
if(OpenSceneGraph_FIND_REQUIRED)
set(_osg_version_output_type FATAL_ERROR)
else()
set(_osg_version_output_type STATUS)
endif()
if(_osg_version_not_high_enough)
set(_osg_EPIC_FAIL TRUE)
if(NOT OpenSceneGraph_FIND_QUIETLY)
message(${_osg_version_output_type}
"ERROR: Version ${OpenSceneGraph_FIND_VERSION} or higher of the OSG "
"is required. Version ${OPENSCENEGRAPH_VERSION} was found.")
endif()
elseif(_osg_version_not_exact)
set(_osg_EPIC_FAIL TRUE)
if(NOT OpenSceneGraph_FIND_QUIETLY)
message(${_osg_version_output_type}
"ERROR: Version ${OpenSceneGraph_FIND_VERSION} of the OSG is required "
"(exactly), version ${OPENSCENEGRAPH_VERSION} was found.")
endif()
else()
# If the version was OK, we should hit this case where we can do the
# typical user notifications
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenSceneGraph DEFAULT_MSG OPENSCENEGRAPH_LIBRARIES OPENSCENEGRAPH_INCLUDE_DIR)
endif()
if(_osg_EPIC_FAIL)
# Zero out everything, we didn't meet version requirements
set(OPENSCENEGRAPH_FOUND FALSE)
set(OPENSCENEGRAPH_LIBRARIES)
set(OPENSCENEGRAPH_INCLUDE_DIR)
endif()
set(OPENSCENEGRAPH_INCLUDE_DIRS ${OPENSCENEGRAPH_INCLUDE_DIR})

@ -38,108 +38,73 @@
# standard install paths. # standard install paths.
# Explicit -DVAR=value arguments should still be able to override everything. # Explicit -DVAR=value arguments should still be able to override everything.
FIND_PATH(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread find_path(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread
HINTS HINTS
$ENV{OPENTHREADS_INCLUDE_DIR} # enough environment variables?
$ENV{OPENTHREADS_DIR}/include $ENV{OPENTHREADS_INCLUDE_DIR}
$ENV{OPENTHREADS_DIR} $ENV{OPENTHREADS_DIR}
$ENV{OSG_INCLUDE_DIR} $ENV{OSG_INCLUDE_DIR}
$ENV{OSG_DIR}/include $ENV{OSG_DIR}
$ENV{OSG_DIR} $ENV{OSGDIR}
$ENV{OSGDIR}/include $ENV{OpenThreads_ROOT}
$ENV{OSGDIR} $ENV{OSG_ROOT}
PATHS PATHS
~/Library/Frameworks /sw # Fink
/Library/Frameworks /opt/local # DarwinPorts
/usr/local/include /opt/csw # Blastwave
/usr/include /opt
/sw/include # Fink /usr/freeware
/opt/local/include # DarwinPorts PATH_SUFFIXES include
/opt/csw/include # Blastwave
/opt/include
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]/include
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
) )
FIND_LIBRARY(OPENTHREADS_LIBRARY find_library(OPENTHREADS_LIBRARY
NAMES OpenThreads OpenThreadsWin32 NAMES OpenThreads OpenThreadsWin32
HINTS HINTS
$ENV{OPENTHREADS_LIBRARY_DIR} $ENV{OPENTHREADS_LIBRARY_DIR}
$ENV{OPENTHREADS_DIR}/lib64 $ENV{OPENTHREADS_DIR}
$ENV{OPENTHREADS_DIR}/lib $ENV{OSG_LIBRARY_DIR}
$ENV{OPENTHREADS_DIR} $ENV{OSG_DIR}
$ENV{OSG_LIBRARY_DIR} $ENV{OSGDIR}
$ENV{OSG_DIR}/lib64 $ENV{OpenThreads_ROOT}
$ENV{OSG_DIR}/lib $ENV{OSG_ROOT}
$ENV{OSG_DIR}
$ENV{OSGDIR}/lib64
$ENV{OSGDIR}/lib
$ENV{OSGDIR}
PATHS PATHS
~/Library/Frameworks /sw
/Library/Frameworks /opt/local
/usr/local/lib64 /opt/csw
/usr/local/lib /opt
/usr/lib64 /usr/freeware
/usr/lib PATH_SUFFIXES lib64 lib
/sw/lib64
/sw/lib
/opt/local/lib64
/opt/local/lib
/opt/csw/lib64
/opt/csw/lib
/opt/lib64
/opt/lib
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]/lib
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib
) )
find_library(OPENTHREADS_LIBRARY_DEBUG
FIND_LIBRARY(OPENTHREADS_LIBRARY_DEBUG
NAMES OpenThreadsd OpenThreadsWin32d NAMES OpenThreadsd OpenThreadsWin32d
HINTS HINTS
$ENV{OPENTHREADS_DEBUG_LIBRARY_DIR} $ENV{OPENTHREADS_DEBUG_LIBRARY_DIR}
$ENV{OPENTHREADS_LIBRARY_DIR} $ENV{OPENTHREADS_LIBRARY_DIR}
$ENV{OPENTHREADS_DIR}/lib64 $ENV{OPENTHREADS_DIR}
$ENV{OPENTHREADS_DIR}/lib $ENV{OSG_LIBRARY_DIR}
$ENV{OPENTHREADS_DIR} $ENV{OSG_DIR}
$ENV{OSG_LIBRARY_DIR} $ENV{OSGDIR}
$ENV{OSG_DIR}/lib64 $ENV{OpenThreads_ROOT}
$ENV{OSG_DIR}/lib $ENV{OSG_ROOT}
$ENV{OSG_DIR}
$ENV{OSGDIR}/lib64
$ENV{OSGDIR}/lib
$ENV{OSGDIR}
PATHS PATHS
/usr/local/lib64 /sw
/usr/local/lib /opt/local
/usr/lib64 /opt/csw
/usr/lib /opt
/sw/lib64 /usr/freeware
/sw/lib PATH_SUFFIXES lib64 lib
/opt/local/lib64
/opt/local/lib
/opt/csw/lib64
/opt/csw/lib
/opt/lib64
/opt/lib
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]/lib
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib
) )
if(OPENTHREADS_LIBRARY_DEBUG)
set(OPENTHREADS_LIBRARIES
optimized ${OPENTHREADS_LIBRARY}
debug ${OPENTHREADS_LIBRARY_DEBUG})
else()
set(OPENTHREADS_LIBRARIES ${OPENTHREADS_LIBRARY})
endif()
IF(OPENTHREADS_LIBRARY) include(FindPackageHandleStandardArgs)
IF(NOT OPENTHREADS_LIBRARY_DEBUG) FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenThreads DEFAULT_MSG
#MESSAGE("-- Warning Debug OpenThreads not found, using: ${OPENTHREADS_LIBRARY}") OPENTHREADS_LIBRARY OPENTHREADS_INCLUDE_DIR)
#SET(OPENTHREADS_LIBRARY_DEBUG "${OPENTHREADS_LIBRARY}")
SET(OPENTHREADS_LIBRARY_DEBUG "${OPENTHREADS_LIBRARY}" CACHE FILEPATH "Debug version of OpenThreads Library (use regular version if not available)" FORCE)
ENDIF(NOT OPENTHREADS_LIBRARY_DEBUG)
ENDIF(OPENTHREADS_LIBRARY)
SET(OPENTHREADS_FOUND "NO")
IF(OPENTHREADS_INCLUDE_DIR AND OPENTHREADS_LIBRARY)
SET(OPENTHREADS_FOUND "YES")
# MESSAGE("-- Found OpenThreads: "${OPENTHREADS_LIBRARY})
ENDIF(OPENTHREADS_INCLUDE_DIR AND OPENTHREADS_LIBRARY)

@ -22,8 +22,9 @@ SET(PERL_POSSIBLE_LIB_PATHS
FIND_PATH(PERL_INCLUDE_PATH perl.h FIND_PATH(PERL_INCLUDE_PATH perl.h
${PERL_POSSIBLE_INCLUDE_PATHS}) ${PERL_POSSIBLE_INCLUDE_PATHS})
# find the perl executable
INCLUDE(FindPerl)
FIND_PROGRAM(PERL_EXECUTABLE perl )
IF(PERL_EXECUTABLE) IF(PERL_EXECUTABLE)
EXEC_PROGRAM(${PERL_EXECUTABLE} EXEC_PROGRAM(${PERL_EXECUTABLE}

@ -64,9 +64,6 @@ FIND_LIBRARY(PRODUCER_LIBRARY
/opt /opt
) )
SET(PRODUCER_FOUND "NO") include(FindPackageHandleStandardArgs)
IF(PRODUCER_LIBRARY AND PRODUCER_INCLUDE_DIR) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Producer DEFAULT_MSG
SET(PRODUCER_FOUND "YES") PRODUCER_LIBRARY PRODUCER_INCLUDE_DIR)
ENDIF(PRODUCER_LIBRARY AND PRODUCER_INCLUDE_DIR)

@ -9,6 +9,7 @@
FIND_PROGRAM(PYTHON_EXECUTABLE FIND_PROGRAM(PYTHON_EXECUTABLE
NAMES python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python NAMES python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python
PATHS PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]

@ -177,7 +177,6 @@
# You do not need to use these variables if you include QT_USE_FILE. # You do not need to use these variables if you include QT_USE_FILE.
# #
# QT_INCLUDE_DIR Path to "include" of Qt4 # QT_INCLUDE_DIR Path to "include" of Qt4
# QT_QT_INCLUDE_DIR Path to "include/Qt"
# QT_QT3SUPPORT_INCLUDE_DIR Path to "include/Qt3Support" # QT_QT3SUPPORT_INCLUDE_DIR Path to "include/Qt3Support"
# QT_QTASSISTANT_INCLUDE_DIR Path to "include/QtAssistant" # QT_QTASSISTANT_INCLUDE_DIR Path to "include/QtAssistant"
# QT_QTCORE_INCLUDE_DIR Path to "include/QtCore" # QT_QTCORE_INCLUDE_DIR Path to "include/QtCore"
@ -200,9 +199,12 @@
# QT_QTXMLPATTERNS_INCLUDE_DIR Path to "include/QtXmlPatterns" # QT_QTXMLPATTERNS_INCLUDE_DIR Path to "include/QtXmlPatterns"
# QT_PHONON_INCLUDE_DIR Path to "include/phonon" # QT_PHONON_INCLUDE_DIR Path to "include/phonon"
# #
# QT_BINARY_DIR Path to "bin" of Qt4
# QT_LIBRARY_DIR Path to "lib" of Qt4 # QT_LIBRARY_DIR Path to "lib" of Qt4
#
# QT_PLUGINS_DIR Path to "plugins" for Qt4 # QT_PLUGINS_DIR Path to "plugins" for Qt4
# QT_TRANSLATIONS_DIR Path to "translations" of Qt4
# QT_DOC_DIR Path to "doc" of Qt4
# QT_MKSPECS_DIR Path to "mkspecs" of Qt4
# #
# #
# The Qt toolkit may contain both debug and release libraries. # The Qt toolkit may contain both debug and release libraries.
@ -244,9 +246,6 @@
# QT_LUPDATE_EXECUTABLE Where to find the lupdate tool. # QT_LUPDATE_EXECUTABLE Where to find the lupdate tool.
# QT_LRELEASE_EXECUTABLE Where to find the lrelease tool. # QT_LRELEASE_EXECUTABLE Where to find the lrelease tool.
# #
# QT_DOC_DIR Path to "doc" of Qt4
# QT_MKSPECS_DIR Path to "mkspecs" of Qt4
#
# #
# These are around for backwards compatibility # These are around for backwards compatibility
# they will be set # they will be set
@ -321,6 +320,12 @@ FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 PATHS
IF (QT_QMAKE_EXECUTABLE) IF (QT_QMAKE_EXECUTABLE)
IF(QT_QMAKE_EXECUTABLE_LAST AND NOT QT_QMAKE_EXECUTABLE_LAST MATCHES "^${QT_QMAKE_EXECUTABLE}$")
SET(QT_QMAKE_CHANGED 1)
ENDIF(QT_QMAKE_EXECUTABLE_LAST AND NOT QT_QMAKE_EXECUTABLE_LAST MATCHES "^${QT_QMAKE_EXECUTABLE}$")
SET(QT_QMAKE_EXECUTABLE_LAST "${QT_QMAKE_EXECUTABLE}" CACHE INTERNAL "" FORCE)
SET(QT4_QMAKE_FOUND FALSE) SET(QT4_QMAKE_FOUND FALSE)
EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE} ARGS "-query QT_VERSION" OUTPUT_VARIABLE QTVERSION) EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE} ARGS "-query QT_VERSION" OUTPUT_VARIABLE QTVERSION)
@ -386,65 +391,65 @@ IF (QT4_QMAKE_FOUND)
# ask qmake for the library dir # ask qmake for the library dir
# Set QT_LIBRARY_DIR # Set QT_LIBRARY_DIR
IF (NOT QT_LIBRARY_DIR) IF (NOT QT_LIBRARY_DIR OR QT_QMAKE_CHANGED)
EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE} EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
ARGS "-query QT_INSTALL_LIBS" ARGS "-query QT_INSTALL_LIBS"
OUTPUT_VARIABLE QT_LIBRARY_DIR_TMP ) OUTPUT_VARIABLE QT_LIBRARY_DIR_TMP )
# make sure we have / and not \ as qmake gives on windows # make sure we have / and not \ as qmake gives on windows
FILE(TO_CMAKE_PATH "${QT_LIBRARY_DIR_TMP}" QT_LIBRARY_DIR_TMP) FILE(TO_CMAKE_PATH "${QT_LIBRARY_DIR_TMP}" QT_LIBRARY_DIR_TMP)
IF(EXISTS "${QT_LIBRARY_DIR_TMP}") IF(EXISTS "${QT_LIBRARY_DIR_TMP}")
SET(QT_LIBRARY_DIR ${QT_LIBRARY_DIR_TMP} CACHE PATH "Qt library dir") SET(QT_LIBRARY_DIR ${QT_LIBRARY_DIR_TMP} CACHE PATH "Qt library dir" FORCE)
ELSE(EXISTS "${QT_LIBRARY_DIR_TMP}") ELSE(EXISTS "${QT_LIBRARY_DIR_TMP}")
MESSAGE("Warning: QT_QMAKE_EXECUTABLE reported QT_INSTALL_LIBS as ${QT_LIBRARY_DIR_TMP}") MESSAGE("Warning: QT_QMAKE_EXECUTABLE reported QT_INSTALL_LIBS as ${QT_LIBRARY_DIR_TMP}")
MESSAGE("Warning: ${QT_LIBRARY_DIR_TMP} does NOT exist, Qt must NOT be installed correctly.") MESSAGE("Warning: ${QT_LIBRARY_DIR_TMP} does NOT exist, Qt must NOT be installed correctly.")
ENDIF(EXISTS "${QT_LIBRARY_DIR_TMP}") ENDIF(EXISTS "${QT_LIBRARY_DIR_TMP}")
ENDIF(NOT QT_LIBRARY_DIR) ENDIF(NOT QT_LIBRARY_DIR OR QT_QMAKE_CHANGED)
IF (APPLE) IF (APPLE)
IF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework) IF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
SET(QT_USE_FRAMEWORKS ON SET(QT_USE_FRAMEWORKS ON
CACHE BOOL "Set to ON if Qt build uses frameworks.") CACHE BOOL "Set to ON if Qt build uses frameworks." FORCE)
ELSE (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework) ELSE (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
SET(QT_USE_FRAMEWORKS OFF SET(QT_USE_FRAMEWORKS OFF
CACHE BOOL "Set to ON if Qt build uses frameworks.") CACHE BOOL "Set to ON if Qt build uses frameworks." FORCE)
ENDIF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework) ENDIF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
MARK_AS_ADVANCED(QT_USE_FRAMEWORKS) MARK_AS_ADVANCED(QT_USE_FRAMEWORKS)
ENDIF (APPLE) ENDIF (APPLE)
# ask qmake for the binary dir # ask qmake for the binary dir
IF (QT_LIBRARY_DIR AND NOT QT_BINARY_DIR) IF ((QT_LIBRARY_DIR AND NOT QT_BINARY_DIR) OR QT_QMAKE_CHANGED)
EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE} EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE}
ARGS "-query QT_INSTALL_BINS" ARGS "-query QT_INSTALL_BINS"
OUTPUT_VARIABLE qt_bins ) OUTPUT_VARIABLE qt_bins )
# make sure we have / and not \ as qmake gives on windows # make sure we have / and not \ as qmake gives on windows
FILE(TO_CMAKE_PATH "${qt_bins}" qt_bins) FILE(TO_CMAKE_PATH "${qt_bins}" qt_bins)
SET(QT_BINARY_DIR ${qt_bins} CACHE INTERNAL "") SET(QT_BINARY_DIR ${qt_bins} CACHE INTERNAL "" FORCE)
ENDIF (QT_LIBRARY_DIR AND NOT QT_BINARY_DIR) ENDIF ((QT_LIBRARY_DIR AND NOT QT_BINARY_DIR) OR QT_QMAKE_CHANGED)
# ask qmake for the include dir # ask qmake for the include dir
IF (QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR) IF ((QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR) OR QT_QMAKE_CHANGED)
EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE} EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
ARGS "-query QT_INSTALL_HEADERS" ARGS "-query QT_INSTALL_HEADERS"
OUTPUT_VARIABLE qt_headers ) OUTPUT_VARIABLE qt_headers )
# make sure we have / and not \ as qmake gives on windows # make sure we have / and not \ as qmake gives on windows
FILE(TO_CMAKE_PATH "${qt_headers}" qt_headers) FILE(TO_CMAKE_PATH "${qt_headers}" qt_headers)
SET(QT_HEADERS_DIR ${qt_headers} CACHE INTERNAL "") SET(QT_HEADERS_DIR ${qt_headers} CACHE INTERNAL "" FORCE)
ENDIF(QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR) ENDIF ((QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR) OR QT_QMAKE_CHANGED)
# ask qmake for the documentation directory # ask qmake for the documentation directory
IF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR) IF ((QT_LIBRARY_DIR AND NOT QT_DOC_DIR) OR QT_QMAKE_CHANGED)
EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE} EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
ARGS "-query QT_INSTALL_DOCS" ARGS "-query QT_INSTALL_DOCS"
OUTPUT_VARIABLE qt_doc_dir ) OUTPUT_VARIABLE qt_doc_dir )
# make sure we have / and not \ as qmake gives on windows # make sure we have / and not \ as qmake gives on windows
FILE(TO_CMAKE_PATH "${qt_doc_dir}" qt_doc_dir) FILE(TO_CMAKE_PATH "${qt_doc_dir}" qt_doc_dir)
SET(QT_DOC_DIR ${qt_doc_dir} CACHE PATH "The location of the Qt docs") SET(QT_DOC_DIR ${qt_doc_dir} CACHE PATH "The location of the Qt docs" FORCE)
ENDIF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR) ENDIF ((QT_LIBRARY_DIR AND NOT QT_DOC_DIR) OR QT_QMAKE_CHANGED)
# ask qmake for the mkspecs directory # ask qmake for the mkspecs directory
IF (QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR) IF ((QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR) OR QT_QMAKE_CHANGED)
EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE} EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
ARGS "-query QMAKE_MKSPECS" ARGS "-query QMAKE_MKSPECS"
OUTPUT_VARIABLE qt_mkspecs_dirs ) OUTPUT_VARIABLE qt_mkspecs_dirs )
@ -453,48 +458,119 @@ IF (QT4_QMAKE_FOUND)
IF(UNIX) IF(UNIX)
STRING(REPLACE ":" ";" qt_mkspecs_dirs "${qt_mkspecs_dirs}") STRING(REPLACE ":" ";" qt_mkspecs_dirs "${qt_mkspecs_dirs}")
ENDIF(UNIX) ENDIF(UNIX)
SET(QT_MKSPECS_DIR NOTFOUND)
FIND_PATH(QT_MKSPECS_DIR qconfig.pri PATHS ${qt_mkspecs_dirs} FIND_PATH(QT_MKSPECS_DIR qconfig.pri PATHS ${qt_mkspecs_dirs}
DOC "The location of the Qt mkspecs containing qconfig.pri" DOC "The location of the Qt mkspecs containing qconfig.pri"
NO_DEFAULT_PATH ) NO_DEFAULT_PATH )
ENDIF (QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR) ENDIF ((QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR) OR QT_QMAKE_CHANGED)
# ask qmake for the plugins directory # ask qmake for the plugins directory
IF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR) IF ((QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR) OR QT_QMAKE_CHANGED)
EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE} EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
ARGS "-query QT_INSTALL_PLUGINS" ARGS "-query QT_INSTALL_PLUGINS"
OUTPUT_VARIABLE qt_plugins_dir ) OUTPUT_VARIABLE qt_plugins_dir )
# make sure we have / and not \ as qmake gives on windows # make sure we have / and not \ as qmake gives on windows
FILE(TO_CMAKE_PATH "${qt_plugins_dir}" qt_plugins_dir) FILE(TO_CMAKE_PATH "${qt_plugins_dir}" qt_plugins_dir)
SET(QT_PLUGINS_DIR ${qt_plugins_dir} CACHE PATH "The location of the Qt plugins") SET(QT_PLUGINS_DIR ${qt_plugins_dir} CACHE PATH "The location of the Qt plugins" FORCE)
ENDIF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR) ENDIF ((QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR) OR QT_QMAKE_CHANGED)
# ask qmake for the translations directory
IF ((QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR) OR QT_QMAKE_CHANGED)
EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
ARGS "-query QT_INSTALL_TRANSLATIONS"
OUTPUT_VARIABLE qt_translations_dir )
# make sure we have / and not \ as qmake gives on windows
FILE(TO_CMAKE_PATH "${qt_translations_dir}" qt_translations_dir)
SET(QT_TRANSLATIONS_DIR ${qt_translations_dir} CACHE PATH "The location of the Qt translations" FORCE)
ENDIF ((QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR) OR QT_QMAKE_CHANGED)
######################################## ########################################
# #
# Setting the INCLUDE-Variables # Setting the INCLUDE-Variables
# #
######################################## ########################################
FIND_PATH(QT_QTCORE_INCLUDE_DIR QtGlobal SET(QT_MODULES QtCore QtGui Qt3Support QtSvg QtScript QtTest QtUiTools
QtHelp QtWebKit QtXmlPatterns phonon QtMotif QtNetwork
QtNsPlugin QtOpenGL QtSql QtXml QtDesigner QtDBus)
IF(QT_QMAKE_CHANGED)
FOREACH(QT_MODULE ${QT_MODULES})
STRING(TOUPPER ${QT_MODULE} _upper_qt_module)
SET(QT_${_upper_qt_module}_INCLUDE_DIR NOTFOUND)
SET(QT_${_upper_qt_module}_LIBRARY_RELEASE NOTFOUND)
SET(QT_${_upper_qt_module}_LIBRARY_DEBUG NOTFOUND)
ENDFOREACH(QT_MODULE)
SET(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR NOTFOUND)
SET(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NOTFOUND)
SET(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NOTFOUND)
SET(QT_QTASSISTANTCLIENT_INCLUDE_DIR NOTFOUND)
SET(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NOTFOUND)
SET(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NOTFOUND)
SET(QT_QTASSISTANT_INCLUDE_DIR NOTFOUND)
SET(QT_QTASSISTANT_LIBRARY_RELEASE NOTFOUND)
SET(QT_QTASSISTANT_LIBRARY_DEBUG NOTFOUND)
SET(QT_QTCLUCENE_LIBRARY_RELEASE NOTFOUND)
SET(QT_QTCLUCENE_LIBRARY_DEBUG NOTFOUND)
ENDIF(QT_QMAKE_CHANGED)
FOREACH(QT_MODULE ${QT_MODULES})
STRING(TOUPPER ${QT_MODULE} _upper_qt_module)
FIND_PATH(QT_${_upper_qt_module}_INCLUDE_DIR ${QT_MODULE}
PATHS
${QT_HEADERS_DIR}/${QT_MODULE}
${QT_LIBRARY_DIR}/${QT_MODULE}.framework/Headers
NO_DEFAULT_PATH
)
ENDFOREACH(QT_MODULE)
# Set QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR
FIND_PATH(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR QDesignerComponents
PATHS PATHS
${QT_HEADERS_DIR}/QtCore ${QT_HEADERS_DIR}/QtDesigner
${QT_LIBRARY_DIR}/QtCore.framework/Headers ${QT_LIBRARY_DIR}/QtDesigner.framework/Headers
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
# Set QT_QTASSISTANT_INCLUDE_DIR
FIND_PATH(QT_QTASSISTANT_INCLUDE_DIR QAssistantClient
PATHS
${QT_HEADERS_DIR}/QtAssistant
${QT_LIBRARY_DIR}/QtAssistant.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QTASSISTANTCLIENT_INCLUDE_DIR
FIND_PATH(QT_QTASSISTANTCLIENT_INCLUDE_DIR QAssistantClient
PATHS
${QT_HEADERS_DIR}/QtAssistant
${QT_LIBRARY_DIR}/QtAssistant.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_INCLUDE_DIR by removine "/QtCore" in the string ${QT_QTCORE_INCLUDE_DIR} # Set QT_INCLUDE_DIR by removine "/QtCore" in the string ${QT_QTCORE_INCLUDE_DIR}
IF( QT_QTCORE_INCLUDE_DIR AND NOT QT_INCLUDE_DIR) IF( QT_QTCORE_INCLUDE_DIR AND NOT QT_INCLUDE_DIR)
IF (QT_USE_FRAMEWORKS) IF (QT_USE_FRAMEWORKS)
SET(QT_INCLUDE_DIR ${QT_HEADERS_DIR}) SET(QT_INCLUDE_DIR ${QT_HEADERS_DIR})
ELSE (QT_USE_FRAMEWORKS) ELSE (QT_USE_FRAMEWORKS)
STRING( REGEX REPLACE "/QtCore$" "" qt4_include_dir ${QT_QTCORE_INCLUDE_DIR}) STRING( REGEX REPLACE "/QtCore$" "" qt4_include_dir ${QT_QTCORE_INCLUDE_DIR})
SET( QT_INCLUDE_DIR ${qt4_include_dir} CACHE PATH "") SET( QT_INCLUDE_DIR ${qt4_include_dir})
ENDIF (QT_USE_FRAMEWORKS) ENDIF (QT_USE_FRAMEWORKS)
ENDIF( QT_QTCORE_INCLUDE_DIR AND NOT QT_INCLUDE_DIR) ENDIF( QT_QTCORE_INCLUDE_DIR AND NOT QT_INCLUDE_DIR)
IF( NOT QT_INCLUDE_DIR) IF( NOT QT_INCLUDE_DIR)
IF(Qt4_FIND_REQUIRED) IF(Qt4_FIND_REQUIRED)
MESSAGE( FATAL_ERROR "Could NOT find QtGlobal header") MESSAGE( FATAL_ERROR "Could NOT find QtCore header")
ENDIF(Qt4_FIND_REQUIRED) ENDIF(Qt4_FIND_REQUIRED)
ENDIF( NOT QT_INCLUDE_DIR) ENDIF( NOT QT_INCLUDE_DIR)
# Make variables changeble to the advanced user
MARK_AS_ADVANCED( QT_LIBRARY_DIR QT_INCLUDE_DIR QT_DOC_DIR QT_MKSPECS_DIR
QT_PLUGINS_DIR QT_TRANSLATIONS_DIR)
# Set QT_INCLUDES
SET( QT_INCLUDES ${QT_MKSPECS_DIR}/default ${QT_INCLUDE_DIR} )
############################################# #############################################
# #
@ -515,6 +591,9 @@ IF (QT4_QMAKE_FOUND)
CHECK_SYMBOL_EXISTS(Q_WS_WIN "QtCore/qglobal.h" Q_WS_WIN) CHECK_SYMBOL_EXISTS(Q_WS_WIN "QtCore/qglobal.h" Q_WS_WIN)
CHECK_SYMBOL_EXISTS(Q_WS_QWS "QtCore/qglobal.h" Q_WS_QWS) CHECK_SYMBOL_EXISTS(Q_WS_QWS "QtCore/qglobal.h" Q_WS_QWS)
CHECK_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC) CHECK_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC)
IF(Q_WS_MAC)
CHECK_SYMBOL_EXISTS(QT_MAC_USE_COCOA "QtCore/qconfig.h" QT_MAC_USE_COCOA)
ENDIF(Q_WS_MAC)
IF (QT_QTCOPY_REQUIRED) IF (QT_QTCOPY_REQUIRED)
CHECK_SYMBOL_EXISTS(QT_IS_QTCOPY "QtCore/qglobal.h" QT_KDE_QT_COPY) CHECK_SYMBOL_EXISTS(QT_IS_QTCOPY "QtCore/qglobal.h" QT_KDE_QT_COPY)
@ -529,252 +608,25 @@ IF (QT4_QMAKE_FOUND)
# #
############################################# #############################################
# Set QT_QT3SUPPORT_INCLUDE_DIR
FIND_PATH(QT_QT3SUPPORT_INCLUDE_DIR Qt3Support
PATHS
${QT_INCLUDE_DIR}/Qt3Support
${QT_LIBRARY_DIR}/Qt3Support.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QT_INCLUDE_DIR
FIND_PATH(QT_QT_INCLUDE_DIR qglobal.h
PATHS
${QT_INCLUDE_DIR}/Qt
${QT_LIBRARY_DIR}/QtCore.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QTGUI_INCLUDE_DIR
FIND_PATH(QT_QTGUI_INCLUDE_DIR QtGui
PATHS
${QT_INCLUDE_DIR}/QtGui
${QT_LIBRARY_DIR}/QtGui.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QTSVG_INCLUDE_DIR
FIND_PATH(QT_QTSVG_INCLUDE_DIR QtSvg
PATHS
${QT_INCLUDE_DIR}/QtSvg
${QT_LIBRARY_DIR}/QtSvg.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QTSCRIPT_INCLUDE_DIR
FIND_PATH(QT_QTSCRIPT_INCLUDE_DIR QtScript
PATHS
${QT_INCLUDE_DIR}/QtScript
${QT_LIBRARY_DIR}/QtScript.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QTTEST_INCLUDE_DIR
FIND_PATH(QT_QTTEST_INCLUDE_DIR QtTest
PATHS
${QT_INCLUDE_DIR}/QtTest
${QT_LIBRARY_DIR}/QtTest.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QTUITOOLS_INCLUDE_DIR
FIND_PATH(QT_QTUITOOLS_INCLUDE_DIR QtUiTools
PATHS
${QT_INCLUDE_DIR}/QtUiTools
${QT_LIBRARY_DIR}/QtUiTools.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QTMOTIF_INCLUDE_DIR
IF(Q_WS_X11)
FIND_PATH(QT_QTMOTIF_INCLUDE_DIR QtMotif
PATHS
${QT_INCLUDE_DIR}/QtMotif
NO_DEFAULT_PATH )
ENDIF(Q_WS_X11)
# Set QT_QTNETWORK_INCLUDE_DIR
FIND_PATH(QT_QTNETWORK_INCLUDE_DIR QtNetwork
PATHS
${QT_INCLUDE_DIR}/QtNetwork
${QT_LIBRARY_DIR}/QtNetwork.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QTNSPLUGIN_INCLUDE_DIR
FIND_PATH(QT_QTNSPLUGIN_INCLUDE_DIR QtNsPlugin
PATHS
${QT_INCLUDE_DIR}/QtNsPlugin
${QT_LIBRARY_DIR}/QtNsPlugin.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QTOPENGL_INCLUDE_DIR
FIND_PATH(QT_QTOPENGL_INCLUDE_DIR QtOpenGL
PATHS
${QT_INCLUDE_DIR}/QtOpenGL
${QT_LIBRARY_DIR}/QtOpenGL.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QTSQL_INCLUDE_DIR
FIND_PATH(QT_QTSQL_INCLUDE_DIR QtSql
PATHS
${QT_INCLUDE_DIR}/QtSql
${QT_LIBRARY_DIR}/QtSql.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QTXML_INCLUDE_DIR
FIND_PATH(QT_QTXML_INCLUDE_DIR QtXml
PATHS
${QT_INCLUDE_DIR}/QtXml
${QT_LIBRARY_DIR}/QtXml.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QTASSISTANT_INCLUDE_DIR
FIND_PATH(QT_QTASSISTANT_INCLUDE_DIR QtAssistant
PATHS
${QT_INCLUDE_DIR}/QtAssistant
${QT_LIBRARY_DIR}/QtAssistant.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QTDESIGNER_INCLUDE_DIR
FIND_PATH(QT_QTDESIGNER_INCLUDE_DIR QDesignerComponents
PATHS
${QT_INCLUDE_DIR}/QtDesigner
${QT_LIBRARY_DIR}/QtDesigner.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR
FIND_PATH(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR QDesignerComponents
PATHS
${QT_INCLUDE_DIR}/QtDesigner
${QT_LIBRARY_DIR}/QtDesigner.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QTDBUS_INCLUDE_DIR
FIND_PATH(QT_QTDBUS_INCLUDE_DIR QtDBus
PATHS
${QT_INCLUDE_DIR}/QtDBus
${QT_LIBRARY_DIR}/QtDBus.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QTASSISTANTCLIENT_INCLUDE_DIR
FIND_PATH(QT_QTASSISTANTCLIENT_INCLUDE_DIR QAssistantClient
PATHS
${QT_INCLUDE_DIR}/QtAssistant
${QT_LIBRARY_DIR}/QtAssistant.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QTHELP_INCLUDE_DIR
FIND_PATH(QT_QTHELP_INCLUDE_DIR QtHelp
PATHS
${QT_INCLUDE_DIR}/QtHelp
${QT_LIBRARY_DIR}/QtHelp.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QTWEBKIT_INCLUDE_DIR
FIND_PATH(QT_QTWEBKIT_INCLUDE_DIR QtWebKit
PATHS
${QT_INCLUDE_DIR}/QtWebKit
${QT_LIBRARY_DIR}/QtWebKit.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_QTXMLPATTERNS_INCLUDE_DIR
FIND_PATH(QT_QTXMLPATTERNS_INCLUDE_DIR QtXmlPatterns
PATHS
${QT_INCLUDE_DIR}/QtXmlPatterns
${QT_LIBRARY_DIR}/QtXmlPatterns.framework/Headers
NO_DEFAULT_PATH
)
# Set QT_PHONON_INCLUDE_DIR # find the libraries
FIND_PATH(QT_PHONON_INCLUDE_DIR phonon FOREACH(QT_MODULE ${QT_MODULES})
PATHS STRING(TOUPPER ${QT_MODULE} _upper_qt_module)
${QT_INCLUDE_DIR}/phonon FIND_LIBRARY(QT_${_upper_qt_module}_LIBRARY_RELEASE
${QT_LIBRARY_DIR}/phonon.framework/Headers NAMES ${QT_MODULE} ${QT_MODULE}4
NO_DEFAULT_PATH PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH
) )
FIND_LIBRARY(QT_${_upper_qt_module}_LIBRARY_DEBUG
# Make variables changeble to the advanced user NAMES ${QT_MODULE}_debug ${QT_MODULE}d ${QT_MODULE}d4
MARK_AS_ADVANCED( QT_LIBRARY_DIR QT_INCLUDE_DIR QT_QT_INCLUDE_DIR QT_DOC_DIR QT_MKSPECS_DIR QT_PLUGINS_DIR) PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH
)
# Set QT_INCLUDES ENDFOREACH(QT_MODULE)
SET( QT_INCLUDES ${QT_QT_INCLUDE_DIR} ${QT_MKSPECS_DIR}/default ${QT_INCLUDE_DIR} )
# Set QT_QTCORE_LIBRARY by searching for a lib with "QtCore." as part of the filename
FIND_LIBRARY(QT_QTCORE_LIBRARY_RELEASE NAMES QtCore QtCore4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH )
FIND_LIBRARY(QT_QTCORE_LIBRARY_DEBUG NAMES QtCore_debug QtCored QtCored4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# Set QT_QT3SUPPORT_LIBRARY
FIND_LIBRARY(QT_QT3SUPPORT_LIBRARY_RELEASE NAMES Qt3Support Qt3Support4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QT3SUPPORT_LIBRARY_DEBUG NAMES Qt3Support_debug Qt3Supportd Qt3Supportd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# Set QT_QTGUI_LIBRARY
FIND_LIBRARY(QT_QTGUI_LIBRARY_RELEASE NAMES QtGui QtGui4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTGUI_LIBRARY_DEBUG NAMES QtGui_debug QtGuid QtGuid4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# Set QT_QTMOTIF_LIBRARY
IF(Q_WS_X11)
FIND_LIBRARY(QT_QTMOTIF_LIBRARY_RELEASE NAMES QtMotif PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTMOTIF_LIBRARY_DEBUG NAMES QtMotif_debug PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
ENDIF(Q_WS_X11)
# Set QT_QTNETWORK_LIBRARY
FIND_LIBRARY(QT_QTNETWORK_LIBRARY_RELEASE NAMES QtNetwork QtNetwork4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTNETWORK_LIBRARY_DEBUG NAMES QtNetwork_debug QtNetworkd QtNetworkd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# Set QT_QTNSPLUGIN_LIBRARY
FIND_LIBRARY(QT_QTNSPLUGIN_LIBRARY_RELEASE NAMES QtNsPlugin PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTNSPLUGIN_LIBRARY_DEBUG NAMES QtNsPlugin_debug PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# Set QT_QTOPENGL_LIBRARY
FIND_LIBRARY(QT_QTOPENGL_LIBRARY_RELEASE NAMES QtOpenGL QtOpenGL4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTOPENGL_LIBRARY_DEBUG NAMES QtOpenGL_debug QtOpenGLd QtOpenGLd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# Set QT_QTSQL_LIBRARY
FIND_LIBRARY(QT_QTSQL_LIBRARY_RELEASE NAMES QtSql QtSql4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTSQL_LIBRARY_DEBUG NAMES QtSql_debug QtSqld QtSqld4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# Set QT_QTXML_LIBRARY
FIND_LIBRARY(QT_QTXML_LIBRARY_RELEASE NAMES QtXml QtXml4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTXML_LIBRARY_DEBUG NAMES QtXml_debug QtXmld QtXmld4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# Set QT_QTSVG_LIBRARY
FIND_LIBRARY(QT_QTSVG_LIBRARY_RELEASE NAMES QtSvg QtSvg4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTSVG_LIBRARY_DEBUG NAMES QtSvg_debug QtSvgd QtSvgd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# Set QT_QTUITOOLS_LIBRARY
FIND_LIBRARY(QT_QTUITOOLS_LIBRARY_RELEASE NAMES QtUiTools QtUiTools4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTUITOOLS_LIBRARY_DEBUG NAMES QtUiTools_debug QtUiToolsd QtUiToolsd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# QtUiTools not with other frameworks with binary installation (in /usr/lib) # QtUiTools not with other frameworks with binary installation (in /usr/lib)
IF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE) IF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE)
FIND_LIBRARY(QT_QTUITOOLS_LIBRARY_RELEASE NAMES QtUiTools PATHS ${QT_LIBRARY_DIR}) FIND_LIBRARY(QT_QTUITOOLS_LIBRARY_RELEASE NAMES QtUiTools PATHS ${QT_LIBRARY_DIR})
ENDIF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE) ENDIF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE)
# Set QT_QTTEST_LIBRARY
FIND_LIBRARY(QT_QTTEST_LIBRARY_RELEASE NAMES QtTest QtTest4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTTEST_LIBRARY_DEBUG NAMES QtTest_debug QtTestd QtTestd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# Set QT_QTDBUS_LIBRARY
# This was introduced with Qt 4.2, where also the naming scheme for debug libs was changed
# So does any of the debug lib names listed here actually exist ?
FIND_LIBRARY(QT_QTDBUS_LIBRARY_RELEASE NAMES QtDBus QtDBus4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTDBUS_LIBRARY_DEBUG NAMES QtDBus_debug QtDBusd QtDBusd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# Set QT_QTSCRIPT_LIBRARY
FIND_LIBRARY(QT_QTSCRIPT_LIBRARY_RELEASE NAMES QtScript QtScript4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTSCRIPT_LIBRARY_DEBUG NAMES QtScript_debug QtScriptd QtScriptd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
IF( NOT QT_QTCORE_LIBRARY_DEBUG AND NOT QT_QTCORE_LIBRARY_RELEASE ) IF( NOT QT_QTCORE_LIBRARY_DEBUG AND NOT QT_QTCORE_LIBRARY_RELEASE )
# try dropping a hint if trying to use Visual Studio with Qt built by mingw # try dropping a hint if trying to use Visual Studio with Qt built by mingw
@ -789,14 +641,6 @@ IF (QT4_QMAKE_FOUND)
ENDIF(Qt4_FIND_REQUIRED) ENDIF(Qt4_FIND_REQUIRED)
ENDIF( NOT QT_QTCORE_LIBRARY_DEBUG AND NOT QT_QTCORE_LIBRARY_RELEASE ) ENDIF( NOT QT_QTCORE_LIBRARY_DEBUG AND NOT QT_QTCORE_LIBRARY_RELEASE )
# Set QT_QTASSISTANT_LIBRARY
FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_RELEASE NAMES QtAssistantClient QtAssistantClient4 QtAssistant QtAssistant4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_DEBUG NAMES QtAssistantClientd QtAssistantClientd4 QtAssistantClient_debug QtAssistant_debug QtAssistantd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# Set QT_QTDESIGNER_LIBRARY
FIND_LIBRARY(QT_QTDESIGNER_LIBRARY_RELEASE NAMES QtDesigner QtDesigner4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTDESIGNER_LIBRARY_DEBUG NAMES QtDesigner_debug QtDesignerd QtDesignerd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# Set QT_QTDESIGNERCOMPONENTS_LIBRARY # Set QT_QTDESIGNERCOMPONENTS_LIBRARY
FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NAMES QtDesignerComponents QtDesignerComponents4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NAMES QtDesignerComponents QtDesignerComponents4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NAMES QtDesignerComponents_debug QtDesignerComponentsd QtDesignerComponentsd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NAMES QtDesignerComponents_debug QtDesignerComponentsd QtDesignerComponentsd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
@ -812,10 +656,12 @@ IF (QT4_QMAKE_FOUND)
# Set QT_QTASSISTANTCLIENT_LIBRARY # Set QT_QTASSISTANTCLIENT_LIBRARY
FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NAMES QtAssistantClient QtAssistantClient4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NAMES QtAssistantClient QtAssistantClient4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NAMES QtAssistantClient_debug QtAssistantClientd QtAssistantClientd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NAMES QtAssistantClient_debug QtAssistantClientd QtAssistantClientd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# Set QT_QTASSISTANT_LIBRARY
FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_RELEASE NAMES QtAssistantClient QtAssistantClient4 QtAssistant QtAssistant4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_DEBUG NAMES QtAssistantClient_debug QtAssistantClientd QtAssistantClientd4 QtAssistant_debug QtAssistantd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# Set QT_QTHELP_LIBRARY # Set QT_QTHELP_LIBRARY
FIND_LIBRARY(QT_QTHELP_LIBRARY_RELEASE NAMES QtHelp QtHelp4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTHELP_LIBRARY_DEBUG NAMES QtHelp_debug QtHelpd QtHelpd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene QtCLucene4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene QtCLucene4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_DEBUG NAMES QtCLucene_debug QtCLucened QtCLucened4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_DEBUG NAMES QtCLucene_debug QtCLucened QtCLucened4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# QtCLucene not with other frameworks with binary installation (in /usr/lib) # QtCLucene not with other frameworks with binary installation (in /usr/lib)
@ -823,18 +669,6 @@ IF (QT4_QMAKE_FOUND)
FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene PATHS ${QT_LIBRARY_DIR}) FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene PATHS ${QT_LIBRARY_DIR})
ENDIF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE) ENDIF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE)
# Set QT_QTWEBKIT_LIBRARY
FIND_LIBRARY(QT_QTWEBKIT_LIBRARY_RELEASE NAMES QtWebKit QtWebKit4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTWEBKIT_LIBRARY_DEBUG NAMES QtWebKit_debug QtWebKitd QtWebKitd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# Set QT_QTXMLPATTERNS_LIBRARY
FIND_LIBRARY(QT_QTXMLPATTERNS_LIBRARY_RELEASE NAMES QtXmlPatterns QtXmlPatterns4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTXMLPATTERNS_LIBRARY_DEBUG NAMES QtXmlPatterns_debug QtXmlPatternsd QtXmlPatternsd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
# Set QT_PHONON_LIBRARY
FIND_LIBRARY(QT_PHONON_LIBRARY_RELEASE NAMES phonon phonon4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_PHONON_LIBRARY_DEBUG NAMES phonon_debug phonond phonond4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
############################################ ############################################
# #
# Check the existence of the libraries. # Check the existence of the libraries.
@ -871,7 +705,11 @@ IF (QT4_QMAKE_FOUND)
SET(QT_${basename}_LIBRARIES optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG}) SET(QT_${basename}_LIBRARIES optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG})
ENDIF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE) ENDIF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE)
SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY} CACHE FILEPATH "The Qt ${basename} library") IF(QT_QMAKE_CHANGED)
SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY} CACHE FILEPATH "The Qt ${basename} library" FORCE)
ELSE(QT_QMAKE_CHANGED)
SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY} CACHE FILEPATH "The Qt ${basename} library")
ENDIF(QT_QMAKE_CHANGED)
IF (QT_${basename}_LIBRARY) IF (QT_${basename}_LIBRARY)
SET(QT_${basename}_FOUND 1) SET(QT_${basename}_FOUND 1)
@ -913,11 +751,9 @@ IF (QT4_QMAKE_FOUND)
_QT4_ADJUST_LIB_VARS(QTXMLPATTERNS) _QT4_ADJUST_LIB_VARS(QTXMLPATTERNS)
_QT4_ADJUST_LIB_VARS(PHONON) _QT4_ADJUST_LIB_VARS(PHONON)
_QT4_ADJUST_LIB_VARS(QTCLUCENE) _QT4_ADJUST_LIB_VARS(QTCLUCENE)
_QT4_ADJUST_LIB_VARS(QTMOTIF)
# platform dependent libraries # platform dependent libraries
IF(Q_WS_X11)
_QT4_ADJUST_LIB_VARS(QTMOTIF)
ENDIF(Q_WS_X11)
IF(WIN32) IF(WIN32)
_QT4_ADJUST_LIB_VARS(QTMAIN) _QT4_ADJUST_LIB_VARS(QTMAIN)
ENDIF(WIN32) ENDIF(WIN32)
@ -942,10 +778,26 @@ IF (QT4_QMAKE_FOUND)
FILE(TO_CMAKE_PATH FILE(TO_CMAKE_PATH
"${QT_UIC_EXECUTABLE_INTERNAL}" QT_UIC_EXECUTABLE_INTERNAL) "${QT_UIC_EXECUTABLE_INTERNAL}" QT_UIC_EXECUTABLE_INTERNAL)
SET(QT_MOC_EXECUTABLE IF(QT_QMAKE_CHANGED)
${QT_MOC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The moc executable") SET(QT_MOC_EXECUTABLE
SET(QT_UIC_EXECUTABLE ${QT_MOC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The moc executable" FORCE)
${QT_UIC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The uic executable") SET(QT_UIC_EXECUTABLE
${QT_UIC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The uic executable" FORCE)
ELSE(QT_QMAKE_CHANGED)
SET(QT_MOC_EXECUTABLE
${QT_MOC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The moc executable")
SET(QT_UIC_EXECUTABLE
${QT_UIC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The uic executable")
ENDIF(QT_QMAKE_CHANGED)
IF(QT_QMAKE_CHANGED)
SET(QT_UIC3_EXECUTABLE NOTFOUND)
SET(QT_RCC_EXECUTABLE NOTFOUND)
SET(QT_DBUSCPP2XML_EXECUTABLE NOTFOUND)
SET(QT_DBUSXML2CPP_EXECUTABLE NOTFOUND)
SET(QT_LUPDATE_EXECUTABLE NOTFOUND)
SET(QT_LRELEASE_EXECUTABLE NOTFOUND)
ENDIF(QT_QMAKE_CHANGED)
FIND_PROGRAM(QT_UIC3_EXECUTABLE FIND_PROGRAM(QT_UIC3_EXECUTABLE
NAMES uic3 NAMES uic3
@ -1027,12 +879,14 @@ IF (QT4_QMAKE_FOUND)
SET(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR}) SET(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR})
IF(_infileLength GREATER _binlength) IF(_infileLength GREATER _binlength)
STRING(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile) STRING(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile)
ENDIF(_infileLength GREATER _binlength) IF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
IF(CMAKE_CURRENT_BINARY_DIR MATCHES "${_checkinfile}") FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile})
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile}) ELSE(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
ELSE(CMAKE_CURRENT_BINARY_DIR MATCHES "${_checkinfile}") FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
ENDIF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
ELSE(_infileLength GREATER _binlength)
FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile}) FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
ENDIF(CMAKE_CURRENT_BINARY_DIR MATCHES "${_checkinfile}") ENDIF(_infileLength GREATER _binlength)
SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}") SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
STRING(REPLACE ".." "__" _outfile ${_outfile}) STRING(REPLACE ".." "__" _outfile ${_outfile})
GET_FILENAME_COMPONENT(outpath ${_outfile} PATH) GET_FILENAME_COMPONENT(outpath ${_outfile} PATH)
@ -1277,7 +1131,7 @@ IF (QT4_QMAKE_FOUND)
GET_FILENAME_COMPONENT(_abs_PATH ${_abs_FILE} PATH) GET_FILENAME_COMPONENT(_abs_PATH ${_abs_FILE} PATH)
STRING(REGEX MATCHALL "#include +[^ ]+\\.moc[\">]" _match "${_contents}") STRING(REGEX MATCHALL "# *include +[^ ]+\\.moc[\">]" _match "${_contents}")
IF(_match) IF(_match)
FOREACH (_current_MOC_INC ${_match}) FOREACH (_current_MOC_INC ${_match})
STRING(REGEX MATCH "[^ <\"]+\\.moc" _current_MOC "${_current_MOC_INC}") STRING(REGEX MATCH "[^ <\"]+\\.moc" _current_MOC "${_current_MOC_INC}")
@ -1294,24 +1148,36 @@ IF (QT4_QMAKE_FOUND)
MACRO(QT4_CREATE_TRANSLATION _qm_files) MACRO(QT4_CREATE_TRANSLATION _qm_files)
QT4_EXTRACT_OPTIONS(_lupdate_files _lupdate_options ${ARGN}) QT4_EXTRACT_OPTIONS(_lupdate_files _lupdate_options ${ARGN})
MESSAGE("lupdate_files ${_lupdate_files}")
MESSAGE("lupdate_options ${_lupdate_options}")
SET(_my_sources) SET(_my_sources)
SET(_my_dirs)
SET(_my_tsfiles) SET(_my_tsfiles)
SET(_ts_pro)
FOREACH (_file ${_lupdate_files}) FOREACH (_file ${_lupdate_files})
GET_FILENAME_COMPONENT(_ext ${_file} EXT) GET_FILENAME_COMPONENT(_ext ${_file} EXT)
GET_FILENAME_COMPONENT(_abs_FILE ${_file} ABSOLUTE) GET_FILENAME_COMPONENT(_abs_FILE ${_file} ABSOLUTE)
IF(_ext MATCHES "ts") IF(_ext MATCHES "ts")
LIST(APPEND _my_tsfiles ${_abs_FILE}) LIST(APPEND _my_tsfiles ${_abs_FILE})
ELSE(_ext MATCHES "ts") ELSE(_ext MATCHES "ts")
LIST(APPEND _my_sources ${_abs_FILE}) IF(NOT _ext)
LIST(APPEND _my_dirs ${_abs_FILE})
ELSE(NOT _ext)
LIST(APPEND _my_sources ${_abs_FILE})
ENDIF(NOT _ext)
ENDIF(_ext MATCHES "ts") ENDIF(_ext MATCHES "ts")
ENDFOREACH(_file) ENDFOREACH(_file)
FOREACH(_ts_file ${_my_tsfiles}) FOREACH(_ts_file ${_my_tsfiles})
IF(_my_sources)
# make a .pro file to call lupdate on, so we don't make our commands too
# long for some systems
GET_FILENAME_COMPONENT(_ts_name ${_ts_file} NAME_WE)
SET(_ts_pro ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${_ts_name}_lupdate.pro)
STRING(REPLACE ";" " " _pro_srcs "${_my_sources}")
FILE(WRITE ${_ts_pro} "SOURCES = ${_pro_srcs}")
ENDIF(_my_sources)
ADD_CUSTOM_COMMAND(OUTPUT ${_ts_file} ADD_CUSTOM_COMMAND(OUTPUT ${_ts_file}
COMMAND ${QT_LUPDATE_EXECUTABLE} COMMAND ${QT_LUPDATE_EXECUTABLE}
ARGS ${_lupdate_options} ${_my_sources} -ts ${_ts_file} ARGS ${_lupdate_options} ${_ts_pro} ${_my_dirs} -ts ${_ts_file}
DEPENDS ${_my_sources}) DEPENDS ${_my_sources} ${_ts_pro})
ENDFOREACH(_ts_file) ENDFOREACH(_ts_file)
QT4_ADD_TRANSLATION(${_qm_files} ${_my_tsfiles}) QT4_ADD_TRANSLATION(${_qm_files} ${_my_tsfiles})
ENDMACRO(QT4_CREATE_TRANSLATION) ENDMACRO(QT4_CREATE_TRANSLATION)
@ -1523,8 +1389,8 @@ IF (QT4_QMAKE_FOUND)
ENDIF(OPENSSL_LIBRARIES) ENDIF(OPENSSL_LIBRARIES)
ENDIF(QT_QCONFIG MATCHES "openssl" AND NOT Q_WS_WIN) ENDIF(QT_QCONFIG MATCHES "openssl" AND NOT Q_WS_WIN)
## qdbus ## dbus
IF(QT_QCONFIG MATCHES "qdbus") IF(QT_QCONFIG MATCHES "dbus")
# if the dbus library isn't found, we'll assume its not required to build # if the dbus library isn't found, we'll assume its not required to build
# shared Qt on Linux doesn't require it # shared Qt on Linux doesn't require it
@ -1550,7 +1416,7 @@ IF (QT4_QMAKE_FOUND)
MARK_AS_ADVANCED(QT_DBUS_LIBRARY) MARK_AS_ADVANCED(QT_DBUS_LIBRARY)
ENDIF(NOT QT_DBUS_LIBRARY) ENDIF(NOT QT_DBUS_LIBRARY)
ENDIF(QT_QCONFIG MATCHES "qdbus") ENDIF(QT_QCONFIG MATCHES "dbus")
## glib ## glib
IF(QT_QCONFIG MATCHES "glib") IF(QT_QCONFIG MATCHES "glib")
@ -1574,15 +1440,16 @@ IF (QT4_QMAKE_FOUND)
FIND_LIBRARY(QT_GLIB_LIBRARY NAMES glib-2.0 PATHS ${_glib_query_output} ) FIND_LIBRARY(QT_GLIB_LIBRARY NAMES glib-2.0 PATHS ${_glib_query_output} )
FIND_LIBRARY(QT_GTHREAD_LIBRARY NAMES gthread-2.0 PATHS ${_glib_query_output} ) FIND_LIBRARY(QT_GTHREAD_LIBRARY NAMES gthread-2.0 PATHS ${_glib_query_output} )
IF(QT_GLIB_LIBRARY AND QT_GTHREAD_LIBRARY)
SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES}
${QT_GTHREAD_LIBRARY} ${QT_GLIB_LIBRARY})
ENDIF(QT_GLIB_LIBRARY AND QT_GTHREAD_LIBRARY)
MARK_AS_ADVANCED(QT_GLIB_LIBRARY) MARK_AS_ADVANCED(QT_GLIB_LIBRARY)
MARK_AS_ADVANCED(QT_GTHREAD_LIBRARY) MARK_AS_ADVANCED(QT_GTHREAD_LIBRARY)
ENDIF(NOT QT_GLIB_LIBRARY OR NOT QT_GTHREAD_LIBRARY) ENDIF(NOT QT_GLIB_LIBRARY OR NOT QT_GTHREAD_LIBRARY)
IF(QT_GLIB_LIBRARY AND QT_GTHREAD_LIBRARY)
SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES}
${QT_GTHREAD_LIBRARY} ${QT_GLIB_LIBRARY})
ENDIF(QT_GLIB_LIBRARY AND QT_GTHREAD_LIBRARY)
ENDIF(QT_QCONFIG MATCHES "glib") ENDIF(QT_QCONFIG MATCHES "glib")
## clock-monotonic, just see if we need to link with rt ## clock-monotonic, just see if we need to link with rt

@ -0,0 +1,88 @@
# - Try to find M&S HLA RTI libraries
# This module finds if any HLA RTI is installed and locates the standard RTI
# include files and libraries.
#
# RTI is a simulation infrastructure standartized by IEEE and SISO. It has a
# well defined C++ API that assures that simulation applications are
# independent on a particular RTI implementation.
# http://en.wikipedia.org/wiki/Run-Time_Infrastructure_(simulation)
#
# This code sets the following variables:
# RTI_INCLUDE_DIR = the directory where RTI includes file are found
# RTI_LIBRARIES = The libraries to link against to use RTI
# RTI_DEFINITIONS = -DRTI_USES_STD_FSTREAM
# RTI_FOUND = Set to FALSE if any HLA RTI was not found
#
# Report problems to <certi-devel@nongnu.org>
MACRO(RTI_MESSAGE_QUIETLY QUIET TYPE MSG)
IF(NOT ${QUIET})
MESSAGE(${TYPE} "${MSG}")
ENDIF(NOT ${QUIET})
ENDMACRO(RTI_MESSAGE_QUIETLY QUIET TYPE MSG)
# Detect the CERTI installation, http://www.cert.fr/CERTI
IF ("$ENV{CERTI_HOME}" STRGREATER "")
FILE(TO_CMAKE_PATH "$ENV{CERTI_HOME}" CERTI_HOME)
RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "Using environment defined CERTI_HOME: ${CERTI_HOME}")
ENDIF ("$ENV{CERTI_HOME}" STRGREATER "")
SET(RTI_DEFINITIONS "-DRTI_USES_STD_FSTREAM")
# Detect the MAK Technologies RTI installation, http://www.mak.com/products/rti.php
# note: the following list is ordered to find the most recent version first
SET(RTI_POSSIBLE_DIRS
${CERTI_HOME}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MAK Technologies\\MAK RTI 3.2 MSVC++ 8.0;Location]"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MAK RTI 3.2-win32-msvc++8.0;InstallLocation]"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MAK Technologies\\MAK RTI 2.2;Location]"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MAK RTI 2.2;InstallLocation]")
SET(RTI_OLD_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}")
# The MAK RTI has the "lib" prefix even on Windows.
SET(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")
FIND_LIBRARY(RTI_LIBRARY
NAMES RTI RTI-NG
PATHS ${RTI_POSSIBLE_DIRS}
PATH_SUFFIXES lib
DOC "The RTI Library")
IF (RTI_LIBRARY)
SET(RTI_LIBRARIES ${RTI_LIBRARY})
RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI library found: ${RTI_LIBRARY}")
ELSE (RTI_LIBRARY)
RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI library NOT found")
ENDIF (RTI_LIBRARY)
FIND_LIBRARY(RTI_FEDTIME_LIBRARY
NAMES FedTime
PATHS ${RTI_POSSIBLE_DIRS}
PATH_SUFFIXES lib
DOC "The FedTime Library")
IF (RTI_FEDTIME_LIBRARY)
SET(RTI_LIBRARIES ${RTI_LIBRARIES} ${RTI_FEDTIME_LIBRARY})
RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI FedTime found: ${RTI_FEDTIME_LIBRARY}")
ENDIF (RTI_FEDTIME_LIBRARY)
FIND_PATH(RTI_INCLUDE_DIR
NAMES RTI.hh
PATHS ${RTI_POSSIBLE_DIRS}
PATH_SUFFIXES include
DOC "The RTI Include Files")
IF (RTI_INCLUDE_DIR)
RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI headers found: ${RTI_INCLUDE_DIR}")
ELSE (RTI_INCLUDE_DIR)
RTI_MESSAGE_QUIETLY(RTI_FIND_QUIETLY STATUS "RTI headers NOT found")
ENDIF (RTI_INCLUDE_DIR)
# Set the modified system variables back to the original value.
SET(CMAKE_FIND_LIBRARY_PREFIXES "${RTI_OLD_FIND_LIBRARY_PREFIXES}")
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(RTI DEFAULT_MSG
RTI_LIBRARY RTI_INCLUDE_DIR)
# $Id: FindRTI.cmake,v 1.3.2.2 2009-02-04 16:44:12 hoffman Exp $

@ -0,0 +1,119 @@
#
# ---- Find Squish
# This module can be used to find Squish (currently support is aimed at version 3).
#
# ---- Variables and Macros
# SQUISH_FOUND If false, don't try to use Squish
# 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
# SQUISH_CLIENT_EXECUTABLE The squishrunner executable
#
# SQUISH_INSTALL_DIR_FOUND Was the install directory found?
# 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)
#
# ---- Typical Use
# ENABLE_TESTING()
# FIND_PACKAGE(Squish)
# IF (SQUISH_FOUND)
# SQUISH_ADD_TEST(myTestName myApplication testSuiteName testCaseName)
# ENDIF (SQUISH_FOUND)
#
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.")
# Search only if the location is not already known.
IF(NOT SQUISH_INSTALL_DIR)
# Get the system search path as a list.
IF(UNIX)
STRING(REGEX MATCHALL "[^:]+" SQUISH_INSTALL_DIR_SEARCH1 "$ENV{PATH}")
ELSE(UNIX)
STRING(REGEX REPLACE "\\\\" "/" SQUISH_INSTALL_DIR_SEARCH1 "$ENV{PATH}")
ENDIF(UNIX)
STRING(REGEX REPLACE "/;" ";" SQUISH_INSTALL_DIR_SEARCH2 ${SQUISH_INSTALL_DIR_SEARCH1})
# Construct a set of paths relative to the system search path.
SET(SQUISH_INSTALL_DIR_SEARCH "")
FOREACH(dir ${SQUISH_INSTALL_DIR_SEARCH2})
SET(SQUISH_INSTALL_DIR_SEARCH ${SQUISH_INSTALL_DIR_SEARCH} "${dir}/../lib/fltk")
ENDFOREACH(dir)
# Look for an installation
FIND_PATH(SQUISH_INSTALL_DIR bin/squishrunner
# Look for an environment variable SQUISH_INSTALL_DIR.
$ENV{SQUISH_INSTALL_DIR}
# Look in places relative to the system executable search path.
${SQUISH_INSTALL_DIR_SEARCH}
# Look in standard UNIX install locations.
#/usr/local/squish
DOC "The ${SQUISH_INSTALL_DIR_STRING}"
)
ENDIF(NOT SQUISH_INSTALL_DIR)
# search for the executables
IF(SQUISH_INSTALL_DIR)
SET(SQUISH_INSTALL_DIR_FOUND 1)
# 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}")
ENDIF(NOT SQUISH_CLIENT_EXECUTABLE)
# 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}")
ENDIF(NOT SQUISH_SERVER_EXECUTABLE)
ELSE(SQUISH_INSTALL_DIR)
SET(SQUISH_INSTALL_DIR_FOUND 0)
ENDIF(SQUISH_INSTALL_DIR)
# record if executables are set
IF(SQUISH_CLIENT_EXECUTABLE)
SET(SQUISH_CLIENT_EXECUTABLE_FOUND 1)
ELSE(SQUISH_CLIENT_EXECUTABLE)
SET(SQUISH_CLIENT_EXECUTABLE_FOUND 0)
ENDIF(SQUISH_CLIENT_EXECUTABLE)
IF(SQUISH_SERVER_EXECUTABLE)
SET(SQUISH_SERVER_EXECUTABLE_FOUND 1)
ELSE(SQUISH_SERVER_EXECUTABLE)
SET(SQUISH_SERVER_EXECUTABLE_FOUND 0)
ENDIF(SQUISH_SERVER_EXECUTABLE)
# 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(NOT ${var})
ENDFOREACH(var)
MACRO(SQUISH_ADD_TEST testName testAUT testCase envVars testWraper)
ADD_TEST(${testName}
${CMAKE_COMMAND} -V -VV
"-Dsquish_aut:STRING=${testAUT}"
"-Dsquish_server_executable:STRING=${SQUISH_SERVER_EXECUTABLE}"
"-Dsquish_client_executable:STRING=${SQUISH_CLIENT_EXECUTABLE}"
"-Dsquish_libqtdir:STRING=${QT_LIBRARY_DIR}"
"-Dsquish_test_case:STRING=${testCase}"
"-Dsquish_env_vars:STRING=${envVars}"
"-Dsquish_wrapper:STRING=${testWraper}"
-P "${CMAKE_ROOT}/Modules/SquishTestScript.cmake"
)
SET_TESTS_PROPERTIES(${testName}
PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED;ERROR;FATAL"
)
ENDMACRO(SQUISH_ADD_TEST)

@ -8,6 +8,7 @@
# This code sets the following variables: # This code sets the following variables:
# TCL_STUB_LIBRARY = path to Tcl stub library # TCL_STUB_LIBRARY = path to Tcl stub library
# TK_STUB_LIBRARY = path to Tk stub library # TK_STUB_LIBRARY = path to Tk stub library
# TTK_STUB_LIBRARY = path to ttk stub library
# #
# In an effort to remove some clutter and clear up some issues for people # In an effort to remove some clutter and clear up some issues for people
# who are not necessarily Tcl/Tk gurus/developpers, some variables were # who are not necessarily Tcl/Tk gurus/developpers, some variables were
@ -101,6 +102,17 @@ FIND_LIBRARY(TK_STUB_LIBRARY
PATHS ${TCLTK_POSSIBLE_LIB_PATHS} PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
) )
FIND_LIBRARY(TTK_STUB_LIBRARY
NAMES
ttkstub
ttkstub${TCL_LIBRARY_VERSION} ttkstub${TCL_TCLSH_VERSION} ttkstub${TK_WISH_VERSION}
ttkstub88 ttkstub8.8
ttkstub87 ttkstub8.7
ttkstub86 ttkstub8.6
ttkstub85 ttkstub8.5
PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
TCL_STUB_LIBRARY TCL_STUB_LIBRARY
TK_STUB_LIBRARY TK_STUB_LIBRARY

@ -1,3 +1,7 @@
#
# NOTE: It is highly recommended that you use the new FindOpenSceneGraph.cmake
# introduced in CMake 2.6.3 and not use this Find module directly.
#
# This is part of the Findosg* suite used to find OpenSceneGraph components. # This is part of the Findosg* suite used to find OpenSceneGraph components.
# Each component is separate and you must opt in to each module. You must # Each component is separate and you must opt in to each module. You must
# also opt into OpenGL and OpenThreads (and Producer if needed) as these # also opt into OpenGL and OpenThreads (and Producer if needed) as these
@ -11,9 +15,13 @@
# #
# Locate osg # Locate osg
# This module defines # This module defines
# OSG_LIBRARY #
# OSG_FOUND, if false, do not try to link to osg # OSG_FOUND - Was the Osg found?
# OSG_INCLUDE_DIR, where to find the headers # OSG_INCLUDE_DIR - Where to find the headers
# OSG_LIBRARIES - The libraries to link against for the OSG (use this)
#
# OSG_LIBRARY - The OSG library
# OSG_LIBRARY_DEBUG - The OSG debug library
# #
# $OSGDIR is an environment variable that would # $OSGDIR is an environment variable that would
# correspond to the ./configure --prefix=$OSGDIR # correspond to the ./configure --prefix=$OSGDIR
@ -25,44 +33,9 @@
# #include <osg/PositionAttitudeTransform> # #include <osg/PositionAttitudeTransform>
# #include <osgUtil/SceneView> # #include <osgUtil/SceneView>
# Try the user's environment request before anything else. include(Findosg_functions)
FIND_PATH(OSG_INCLUDE_DIR osg/PositionAttitudeTransform OSG_FIND_PATH (OSG osg/PositionAttitudeTransform)
HINTS OSG_FIND_LIBRARY(OSG osg)
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
)
FIND_LIBRARY(OSG_LIBRARY
NAMES osg
HINTS
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
SET(OSG_FOUND "NO")
IF(OSG_LIBRARY AND OSG_INCLUDE_DIR)
SET(OSG_FOUND "YES")
ENDIF(OSG_LIBRARY AND OSG_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osg DEFAULT_MSG OSG_LIBRARY OSG_INCLUDE_DIR)

@ -0,0 +1,38 @@
# This is part of the Findosg* suite used to find OpenSceneGraph components.
# Each component is separate and you must opt in to each module. You must
# also opt into OpenGL and OpenThreads (and Producer if needed) as these
# modules won't do it for you. This is to allow you control over your own
# system piece by piece in case you need to opt out of certain components
# or change the Find behavior for a particular module (perhaps because the
# default FindOpenGL.cmake module doesn't work with your system as an
# example).
# If you want to use a more convenient module that includes everything,
# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
#
# Locate osgAnimation
# This module defines
#
# OSGANIMATION_FOUND - Was osgAnimation found?
# OSGANIMATION_INCLUDE_DIR - Where to find the headers
# OSGANIMATION_LIBRARIES - The libraries to link against for the OSG (use this)
#
# OSGANIMATION_LIBRARY - The OSG library
# OSGANIMATION_LIBRARY_DEBUG - The OSG debug library
#
# $OSGDIR is an environment variable that would
# correspond to the ./configure --prefix=$OSGDIR
# used in building osg.
#
# Created by Eric Wing.
# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgAnimation/Animation>
include(Findosg_functions)
OSG_FIND_PATH (OSGANIMATION osgAnimation/Animation)
OSG_FIND_LIBRARY(OSGANIMATION osgAnimation)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgAnimation DEFAULT_MSG
OSGANIMATION_LIBRARY OSGANIMATION_INCLUDE_DIR)

@ -11,9 +11,13 @@
# #
# Locate osgDB # Locate osgDB
# This module defines # This module defines
# OSGDB_LIBRARY #
# OSGDB_FOUND, if false, do not try to link to osgDB # OSGDB_FOUND - Was osgDB found?
# OSGDB_INCLUDE_DIR, where to find the headers # OSGDB_INCLUDE_DIR - Where to find the headers
# OSGDB_LIBRARIES - The libraries to link against for the osgDB (use this)
#
# OSGDB_LIBRARY - The osgDB library
# OSGDB_LIBRARY_DEBUG - The osgDB debug library
# #
# $OSGDIR is an environment variable that would # $OSGDIR is an environment variable that would
# correspond to the ./configure --prefix=$OSGDIR # correspond to the ./configure --prefix=$OSGDIR
@ -25,46 +29,10 @@
# #include <osg/PositionAttitudeTransform> # #include <osg/PositionAttitudeTransform>
# #include <osgDB/DatabasePager> # #include <osgDB/DatabasePager>
# Try the user's environment request before anything else. include(Findosg_functions)
FIND_PATH(OSGDB_INCLUDE_DIR osgDB/DatabasePager OSG_FIND_PATH (OSGDB osgDB/DatabasePager)
HINTS OSG_FIND_LIBRARY(OSGDB osgDB)
$ENV{OSGDB_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
)
FIND_LIBRARY(OSGDB_LIBRARY
NAMES osgDB
HINTS
$ENV{OSGDB_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
SET(OSGDB_FOUND "NO")
IF(OSGDB_LIBRARY AND OSGDB_INCLUDE_DIR)
SET(OSGDB_FOUND "YES")
ENDIF(OSGDB_LIBRARY AND OSGDB_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgDB DEFAULT_MSG
OSGDB_LIBRARY OSGDB_INCLUDE_DIR)

@ -11,9 +11,13 @@
# #
# Locate osgFX # Locate osgFX
# This module defines # This module defines
# OSGFX_LIBRARY #
# OSGFX_FOUND, if false, do not try to link to osgFX # OSGFX_FOUND - Was osgFX found?
# OSGFX_INCLUDE_DIR, where to find the headers # OSGFX_INCLUDE_DIR - Where to find the headers
# OSGFX_LIBRARIES - The libraries to link against for the osgFX (use this)
#
# OSGFX_LIBRARY - The osgFX library
# OSGFX_LIBRARY_DEBUG - The osgFX debug library
# #
# $OSGDIR is an environment variable that would # $OSGDIR is an environment variable that would
# correspond to the ./configure --prefix=$OSGDIR # correspond to the ./configure --prefix=$OSGDIR
@ -25,46 +29,10 @@
# #include <osg/PositionAttitudeTransform> # #include <osg/PositionAttitudeTransform>
# #include <osgFX/BumpMapping> # #include <osgFX/BumpMapping>
# Try the user's environment request before anything else. include(Findosg_functions)
FIND_PATH(OSGFX_INCLUDE_DIR osgFX/BumpMapping OSG_FIND_PATH (OSGFX osgFX/BumpMapping)
HINTS OSG_FIND_LIBRARY(OSGFX osgFX)
$ENV{OSGFX_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
)
FIND_LIBRARY(OSGFX_LIBRARY
NAMES osgFX
HINTS
$ENV{OSGFX_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
SET(OSGFX_FOUND "NO")
IF(OSGFX_LIBRARY AND OSGFX_INCLUDE_DIR)
SET(OSGFX_FOUND "YES")
ENDIF(OSGFX_LIBRARY AND OSGFX_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgFX DEFAULT_MSG
OSGFX_LIBRARY OSGFX_INCLUDE_DIR)

@ -11,9 +11,13 @@
# #
# Locate osgGA # Locate osgGA
# This module defines # This module defines
# OSGGA_LIBRARY #
# OSGGA_FOUND, if false, do not try to link to osgGA # OSGGA_FOUND - Was osgGA found?
# OSGGA_INCLUDE_DIR, where to find the headers # OSGGA_INCLUDE_DIR - Where to find the headers
# OSGGA_LIBRARIES - The libraries to link against for the osgGA (use this)
#
# OSGGA_LIBRARY - The osgGA library
# OSGGA_LIBRARY_DEBUG - The osgGA debug library
# #
# $OSGDIR is an environment variable that would # $OSGDIR is an environment variable that would
# correspond to the ./configure --prefix=$OSGDIR # correspond to the ./configure --prefix=$OSGDIR
@ -25,46 +29,10 @@
# #include <osg/PositionAttitudeTransform> # #include <osg/PositionAttitudeTransform>
# #include <osgGA/FlightManipulator> # #include <osgGA/FlightManipulator>
# Try the user's environment request before anything else. include(Findosg_functions)
FIND_PATH(OSGGA_INCLUDE_DIR osgGA/FlightManipulator OSG_FIND_PATH (OSGGA osgGA/FlightManipulator)
HINTS OSG_FIND_LIBRARY(OSGGA osgGA)
$ENV{OSGGA_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
)
FIND_LIBRARY(OSGGA_LIBRARY
NAMES osgGA
HINTS
$ENV{OSGGA_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
SET(OSGGA_FOUND "NO")
IF(OSGGA_LIBRARY AND OSGGA_INCLUDE_DIR)
SET(OSGGA_FOUND "YES")
ENDIF(OSGGA_LIBRARY AND OSGGA_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgGA DEFAULT_MSG
OSGGA_LIBRARY OSGGA_INCLUDE_DIR)

@ -9,11 +9,15 @@
# If you want to use a more convenient module that includes everything, # If you want to use a more convenient module that includes everything,
# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. # use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
# #
# Locate osgIntrospection # Locate osgINTROSPECTION
# This module defines # This module defines
# OSGINTROSPECTION_LIBRARY #
# OSGINTROSPECTION_FOUND, if false, do not try to link to osgIntrospection # OSGINTROSPECTION_FOUND - Was osgIntrospection found?
# OSGINTROSPECTION_INCLUDE_DIR, where to find the headers # OSGINTROSPECTION_INCLUDE_DIR - Where to find the headers
# OSGINTROSPECTION_LIBRARIES - The libraries to link for osgIntrospection (use this)
#
# OSGINTROSPECTION_LIBRARY - The osgIntrospection library
# OSGINTROSPECTION_LIBRARY_DEBUG - The osgIntrospection debug library
# #
# $OSGDIR is an environment variable that would # $OSGDIR is an environment variable that would
# correspond to the ./configure --prefix=$OSGDIR # correspond to the ./configure --prefix=$OSGDIR
@ -25,46 +29,10 @@
# #include <osg/PositionAttitudeTransform> # #include <osg/PositionAttitudeTransform>
# #include <osgIntrospection/Reflection> # #include <osgIntrospection/Reflection>
# Try the user's environment request before anything else. include(Findosg_functions)
FIND_PATH(OSGINTROSPECTION_INCLUDE_DIR osgIntrospection/Reflection OSG_FIND_PATH (OSGINTROSPECTION osgIntrospection/Reflection)
HINTS OSG_FIND_LIBRARY(OSGINTROSPECTION osgIntrospection)
$ENV{OSGINTROSPECTION_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
)
FIND_LIBRARY(OSGINTROSPECTION_LIBRARY
NAMES osgIntrospection
HINTS
$ENV{OSGINTROSPECTION_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
SET(OSGINTROSPECTION_FOUND "NO")
IF(OSGINTROSPECTION_LIBRARY AND OSGINTROSPECTION_INCLUDE_DIR)
SET(OSGINTROSPECTION_FOUND "YES")
ENDIF(OSGINTROSPECTION_LIBRARY AND OSGINTROSPECTION_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgIntrospection DEFAULT_MSG
OSGINTROSPECTION_LIBRARY OSGINTROSPECTION_INCLUDE_DIR)

@ -11,9 +11,13 @@
# #
# Locate osgManipulator # Locate osgManipulator
# This module defines # This module defines
# OSG_LIBRARY #
# OSGMANIPULATOR_FOUND, if false, do not try to link to osgManipulator # OSGMANIPULATOR_FOUND - Was osgManipulator found?
# OSGMANIPULATOR_INCLUDE_DIR, where to find the headers # OSGMANIPULATOR_INCLUDE_DIR - Where to find the headers
# OSGMANIPULATOR_LIBRARIES - The libraries to link for osgManipulator (use this)
#
# OSGMANIPULATOR_LIBRARY - The osgManipulator library
# OSGMANIPULATOR_LIBRARY_DEBUG - The osgManipulator debug library
# #
# $OSGDIR is an environment variable that would # $OSGDIR is an environment variable that would
# correspond to the ./configure --prefix=$OSGDIR # correspond to the ./configure --prefix=$OSGDIR
@ -25,46 +29,10 @@
# #include <osg/PositionAttitudeTransform> # #include <osg/PositionAttitudeTransform>
# #include <osgManipulator/TrackballDragger> # #include <osgManipulator/TrackballDragger>
# Try the user's environment request before anything else. include(Findosg_functions)
FIND_PATH(OSGMANIPULATOR_INCLUDE_DIR osgManipulator/TrackballDragger OSG_FIND_PATH (OSGMANIPULATOR osgManipulator/TrackballDragger)
HINTS OSG_FIND_LIBRARY(OSGMANIPULATOR osgManipulator)
$ENV{OSGMANIPULATOR_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
)
FIND_LIBRARY(OSGMANIPULATOR_LIBRARY
NAMES osgManipulator
HINTS
$ENV{OSGMANIPULATOR_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
SET(OSGMANIPULATOR_FOUND "NO")
IF(OSGMANIPULATOR_LIBRARY AND OSGMANIPULATOR_INCLUDE_DIR)
SET(OSGMANIPULATOR_FOUND "YES")
ENDIF(OSGMANIPULATOR_LIBRARY AND OSGMANIPULATOR_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgManipulator DEFAULT_MSG
OSGMANIPULATOR_LIBRARY OSGMANIPULATOR_INCLUDE_DIR)

@ -11,9 +11,13 @@
# #
# Locate osgParticle # Locate osgParticle
# This module defines # This module defines
# OSGPARTICLE_LIBRARY #
# OSGPARTICLE_FOUND, if false, do not try to link to osgParticle # OSGPARTICLE_FOUND - Was osgParticle found?
# OSGPARTICLE_INCLUDE_DIR, where to find the headers # OSGPARTICLE_INCLUDE_DIR - Where to find the headers
# OSGPARTICLE_LIBRARIES - The libraries to link for osgParticle (use this)
#
# OSGPARTICLE_LIBRARY - The osgParticle library
# OSGPARTICLE_LIBRARY_DEBUG - The osgParticle debug library
# #
# $OSGDIR is an environment variable that would # $OSGDIR is an environment variable that would
# correspond to the ./configure --prefix=$OSGDIR # correspond to the ./configure --prefix=$OSGDIR
@ -25,46 +29,10 @@
# #include <osg/PositionAttitudeTransform> # #include <osg/PositionAttitudeTransform>
# #include <osgParticle/FireEffect> # #include <osgParticle/FireEffect>
# Try the user's environment request before anything else. include(Findosg_functions)
FIND_PATH(OSGPARTICLE_INCLUDE_DIR osgParticle/FireEffect OSG_FIND_PATH (OSGPARTICLE osgParticle/FireEffect)
HINTS OSG_FIND_LIBRARY(OSGPARTICLE osgParticle)
$ENV{OSGPARTICLE_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
)
FIND_LIBRARY(OSGPARTICLE_LIBRARY
NAMES osgParticle
HINTS
$ENV{OSGPARTICLE_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
SET(OSGPARTICLE_FOUND "NO")
IF(OSGPARTICLE_LIBRARY AND OSGPARTICLE_INCLUDE_DIR)
SET(OSGPARTICLE_FOUND "YES")
ENDIF(OSGPARTICLE_LIBRARY AND OSGPARTICLE_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgParticle DEFAULT_MSG
OSGPARTICLE_LIBRARY OSGPARTICLE_INCLUDE_DIR)

@ -11,9 +11,13 @@
# #
# Locate osgProducer # Locate osgProducer
# This module defines # This module defines
# OSGPRODUCER_LIBRARY #
# OSGPRODUCER_FOUND, if false, do not try to link to osgProducer # OSGPRODUCER_FOUND - Was osgProducer found?
# OSGPRODUCER_INCLUDE_DIR, where to find the headers # OSGPRODUCER_INCLUDE_DIR - Where to find the headers
# OSGPRODUCER_LIBRARIES - The libraries to link for osgProducer (use this)
#
# OSGPRODUCER_LIBRARY - The osgProducer library
# OSGPRODUCER_LIBRARY_DEBUG - The osgProducer debug library
# #
# $OSGDIR is an environment variable that would # $OSGDIR is an environment variable that would
# correspond to the ./configure --prefix=$OSGDIR # correspond to the ./configure --prefix=$OSGDIR
@ -25,46 +29,10 @@
# #include <osg/PositionAttitudeTransform> # #include <osg/PositionAttitudeTransform>
# #include <osgProducer/OsgSceneHandler> # #include <osgProducer/OsgSceneHandler>
# Try the user's environment request before anything else. include(Findosg_functions)
FIND_PATH(OSGPRODUCER_INCLUDE_DIR osgProducer/OsgSceneHandler OSG_FIND_PATH (OSGPRODUCER osgProducer/OsgSceneHandler)
HINTS OSG_FIND_LIBRARY(OSGPRODUCER osgProducer)
$ENV{OSGPRODUCER_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
)
FIND_LIBRARY(OSGPRODUCER_LIBRARY
NAMES osgProducer
HINTS
$ENV{OSGPRODUCER_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
SET(OSGPRODUCER_FOUND "NO")
IF(OSGPRODUCER_LIBRARY AND OSGPRODUCER_INCLUDE_DIR)
SET(OSGPRODUCER_FOUND "YES")
ENDIF(OSGPRODUCER_LIBRARY AND OSGPRODUCER_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgProducer DEFAULT_MSG
OSGPRODUCER_LIBRARY OSGPRODUCER_INCLUDE_DIR)

@ -11,9 +11,13 @@
# #
# Locate osgShadow # Locate osgShadow
# This module defines # This module defines
# OSGSHADOW_LIBRARY #
# OSGSHADOW_FOUND, if false, do not try to link to osgShadow # OSGSHADOW_FOUND - Was osgShadow found?
# OSGSHADOW_INCLUDE_DIR, where to find the headers # OSGSHADOW_INCLUDE_DIR - Where to find the headers
# OSGSHADOW_LIBRARIES - The libraries to link for osgShadow (use this)
#
# OSGSHADOW_LIBRARY - The osgShadow library
# OSGSHADOW_LIBRARY_DEBUG - The osgShadow debug library
# #
# $OSGDIR is an environment variable that would # $OSGDIR is an environment variable that would
# correspond to the ./configure --prefix=$OSGDIR # correspond to the ./configure --prefix=$OSGDIR
@ -25,46 +29,10 @@
# #include <osg/PositionAttitudeTransform> # #include <osg/PositionAttitudeTransform>
# #include <osgShadow/ShadowTexture> # #include <osgShadow/ShadowTexture>
# Try the user's environment request before anything else. include(Findosg_functions)
FIND_PATH(OSGSHADOW_INCLUDE_DIR osgShadow/ShadowTexture OSG_FIND_PATH (OSGSHADOW osgShadow/ShadowTexture)
HINTS OSG_FIND_LIBRARY(OSGSHADOW osgShadow)
$ENV{OSGSHADOW_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
)
FIND_LIBRARY(OSGSHADOW_LIBRARY
NAMES osgShadow
HINTS
$ENV{OSGSHADOW_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
SET(OSGSHADOW_FOUND "NO")
IF(OSGSHADOW_LIBRARY AND OSGSHADOW_INCLUDE_DIR)
SET(OSGSHADOW_FOUND "YES")
ENDIF(OSGSHADOW_LIBRARY AND OSGSHADOW_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgShadow DEFAULT_MSG
OSGSHADOW_LIBRARY OSGSHADOW_INCLUDE_DIR)

@ -11,9 +11,13 @@
# #
# Locate osgSim # Locate osgSim
# This module defines # This module defines
# OSGSIM_LIBRARY #
# OSGSIM_FOUND, if false, do not try to link to osgSim # OSGSIM_FOUND - Was osgSim found?
# OSGSIM_INCLUDE_DIR, where to find the headers # OSGSIM_INCLUDE_DIR - Where to find the headers
# OSGSIM_LIBRARIES - The libraries to link for osgSim (use this)
#
# OSGSIM_LIBRARY - The osgSim library
# OSGSIM_LIBRARY_DEBUG - The osgSim debug library
# #
# $OSGDIR is an environment variable that would # $OSGDIR is an environment variable that would
# correspond to the ./configure --prefix=$OSGDIR # correspond to the ./configure --prefix=$OSGDIR
@ -25,46 +29,10 @@
# #include <osg/PositionAttitudeTransform> # #include <osg/PositionAttitudeTransform>
# #include <osgSim/ImpostorSprite> # #include <osgSim/ImpostorSprite>
# Try the user's environment request before anything else. include(Findosg_functions)
FIND_PATH(OSGSIM_INCLUDE_DIR osgSim/ImpostorSprite OSG_FIND_PATH (OSGSIM osgSim/ImpostorSprite)
HINTS OSG_FIND_LIBRARY(OSGSIM osgSim)
$ENV{OSGSIM_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
)
FIND_LIBRARY(OSGSIM_LIBRARY
NAMES osgSim
HINTS
$ENV{OSGSIM_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
SET(OSGSIM_FOUND "NO")
IF(OSGSIM_LIBRARY AND OSGSIM_INCLUDE_DIR)
SET(OSGSIM_FOUND "YES")
ENDIF(OSGSIM_LIBRARY AND OSGSIM_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgSim DEFAULT_MSG
OSGSIM_LIBRARY OSGSIM_INCLUDE_DIR)

@ -11,9 +11,13 @@
# #
# Locate osgTerrain # Locate osgTerrain
# This module defines # This module defines
# OSGTERRAIN_LIBRARY #
# OSGTERRAIN_FOUND, if false, do not try to link to osgTerrain # OSGTERRAIN_FOUND - Was osgTerrain found?
# OSGTERRAIN_INCLUDE_DIR, where to find the headers # OSGTERRAIN_INCLUDE_DIR - Where to find the headers
# OSGTERRAIN_LIBRARIES - The libraries to link for osgTerrain (use this)
#
# OSGTERRAIN_LIBRARY - The osgTerrain library
# OSGTERRAIN_LIBRARY_DEBUG - The osgTerrain debug library
# #
# $OSGDIR is an environment variable that would # $OSGDIR is an environment variable that would
# correspond to the ./configure --prefix=$OSGDIR # correspond to the ./configure --prefix=$OSGDIR
@ -25,46 +29,10 @@
# #include <osg/PositionAttitudeTransform> # #include <osg/PositionAttitudeTransform>
# #include <osgTerrain/Terrain> # #include <osgTerrain/Terrain>
# Try the user's environment request before anything else. include(Findosg_functions)
FIND_PATH(OSGTERRAIN_INCLUDE_DIR osgTerrain/Terrain OSG_FIND_PATH (OSGTERRAIN osgTerrain/Terrain)
HINTS OSG_FIND_LIBRARY(OSGTERRAIN osgTerrain)
$ENV{OSGTERRAIN_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
)
FIND_LIBRARY(OSGTERRAIN_LIBRARY
NAMES osgTerrain
HINTS
$ENV{OSGTERRAIN_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
SET(OSGTERRAIN_FOUND "NO")
IF(OSGTERRAIN_LIBRARY AND OSGTERRAIN_INCLUDE_DIR)
SET(OSGTERRAIN_FOUND "YES")
ENDIF(OSGTERRAIN_LIBRARY AND OSGTERRAIN_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgTerrain DEFAULT_MSG
OSGTERRAIN_LIBRARY OSGTERRAIN_INCLUDE_DIR)

@ -11,9 +11,13 @@
# #
# Locate osgText # Locate osgText
# This module defines # This module defines
# OSGTEXT_LIBRARY #
# OSGTEXT_FOUND, if false, do not try to link to osgText # OSGTEXT_FOUND - Was osgText found?
# OSGTEXT_INCLUDE_DIR, where to find the headers # OSGTEXT_INCLUDE_DIR - Where to find the headers
# OSGTEXT_LIBRARIES - The libraries to link for osgText (use this)
#
# OSGTEXT_LIBRARY - The osgText library
# OSGTEXT_LIBRARY_DEBUG - The osgText debug library
# #
# $OSGDIR is an environment variable that would # $OSGDIR is an environment variable that would
# correspond to the ./configure --prefix=$OSGDIR # correspond to the ./configure --prefix=$OSGDIR
@ -25,46 +29,10 @@
# #include <osg/PositionAttitudeTransform> # #include <osg/PositionAttitudeTransform>
# #include <osgText/Text> # #include <osgText/Text>
# Try the user's environment request before anything else. include(Findosg_functions)
FIND_PATH(OSGTEXT_INCLUDE_DIR osgText/Text OSG_FIND_PATH (OSGTEXT osgText/Text)
HINTS OSG_FIND_LIBRARY(OSGTEXT osgText)
$ENV{OSGTEXT_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
)
FIND_LIBRARY(OSGTEXT_LIBRARY
NAMES osgText
HINTS
$ENV{OSGTEXT_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
SET(OSGTEXT_FOUND "NO")
IF(OSGTEXT_LIBRARY AND OSGTEXT_INCLUDE_DIR)
SET(OSGTEXT_FOUND "YES")
ENDIF(OSGTEXT_LIBRARY AND OSGTEXT_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgText DEFAULT_MSG
OSGTEXT_LIBRARY OSGTEXT_INCLUDE_DIR)

@ -11,9 +11,13 @@
# #
# Locate osgUtil # Locate osgUtil
# This module defines # This module defines
# OSGUTIL_LIBRARY #
# OSGUTIL_FOUND, if false, do not try to link to osgUtil # OSGUTIL_FOUND - Was osgUtil found?
# OSGUTIL_INCLUDE_DIR, where to find the headers # OSGUTIL_INCLUDE_DIR - Where to find the headers
# OSGUTIL_LIBRARIES - The libraries to link for osgUtil (use this)
#
# OSGUTIL_LIBRARY - The osgUtil library
# OSGUTIL_LIBRARY_DEBUG - The osgUtil debug library
# #
# $OSGDIR is an environment variable that would # $OSGDIR is an environment variable that would
# correspond to the ./configure --prefix=$OSGDIR # correspond to the ./configure --prefix=$OSGDIR
@ -25,46 +29,10 @@
# #include <osg/PositionAttitudeTransform> # #include <osg/PositionAttitudeTransform>
# #include <osgUtil/SceneView> # #include <osgUtil/SceneView>
# Try the user's environment request before anything else. include(Findosg_functions)
FIND_PATH(OSGUTIL_INCLUDE_DIR osgUtil/SceneView OSG_FIND_PATH (OSGUTIL osgUtil/SceneView)
HINTS OSG_FIND_LIBRARY(OSGUTIL osgUtil)
$ENV{OSGUTIL_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
)
FIND_LIBRARY(OSGUTIL_LIBRARY
NAMES osgUtil
HINTS
$ENV{OSGUTIL_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
SET(OSGUTIL_FOUND "NO")
IF(OSGUTIL_LIBRARY AND OSGUTIL_INCLUDE_DIR)
SET(OSGUTIL_FOUND "YES")
ENDIF(OSGUTIL_LIBRARY AND OSGUTIL_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgUtil DEFAULT_MSG
OSGUTIL_LIBRARY OSGUTIL_INCLUDE_DIR)

@ -11,9 +11,13 @@
# #
# Locate osgViewer # Locate osgViewer
# This module defines # This module defines
# OSGVIEWER_LIBRARY #
# OSGVIEWER_FOUND, if false, do not try to link to osgViewer # OSGVIEWER_FOUND - Was osgViewer found?
# OSGVIEWER_INCLUDE_DIR, where to find the headers # OSGVIEWER_INCLUDE_DIR - Where to find the headers
# OSGVIEWER_LIBRARIES - The libraries to link for osgViewer (use this)
#
# OSGVIEWER_LIBRARY - The osgViewer library
# OSGVIEWER_LIBRARY_DEBUG - The osgViewer debug library
# #
# $OSGDIR is an environment variable that would # $OSGDIR is an environment variable that would
# correspond to the ./configure --prefix=$OSGDIR # correspond to the ./configure --prefix=$OSGDIR
@ -25,46 +29,10 @@
# #include <osg/PositionAttitudeTransform> # #include <osg/PositionAttitudeTransform>
# #include <osgViewer/Viewer> # #include <osgViewer/Viewer>
# Try the user's environment request before anything else. include(Findosg_functions)
FIND_PATH(OSGVIEWER_INCLUDE_DIR osgViewer/Viewer OSG_FIND_PATH (OSGVIEWER osgViewer/Viewer)
HINTS OSG_FIND_LIBRARY(OSGVIEWER osgViewer)
$ENV{OSGVIEWER_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
)
FIND_LIBRARY(OSGVIEWER_LIBRARY
NAMES osgViewer
HINTS
$ENV{OSGVIEWER_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
PATH_SUFFIXES lib64 lib
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
)
SET(OSGVIEWER_FOUND "NO")
IF(OSGVIEWER_LIBRARY AND OSGVIEWER_INCLUDE_DIR)
SET(OSGVIEWER_FOUND "YES")
ENDIF(OSGVIEWER_LIBRARY AND OSGVIEWER_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgViewer DEFAULT_MSG
OSGVIEWER_LIBRARY OSGVIEWER_INCLUDE_DIR)

@ -0,0 +1,38 @@
# This is part of the Findosg* suite used to find OpenSceneGraph components.
# Each component is separate and you must opt in to each module. You must
# also opt into OpenGL and OpenThreads (and Producer if needed) as these
# modules won't do it for you. This is to allow you control over your own
# system piece by piece in case you need to opt out of certain components
# or change the Find behavior for a particular module (perhaps because the
# default FindOpenGL.cmake module doesn't work with your system as an
# example).
# If you want to use a more convenient module that includes everything,
# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
#
# Locate osgVolume
# This module defines
#
# OSGVOLUME_FOUND - Was osgVolume found?
# OSGVOLUME_INCLUDE_DIR - Where to find the headers
# OSGVOLUME_LIBRARIES - The libraries to link for osgVolume (use this)
#
# OSGVOLUME_LIBRARY - The osgVolume library
# OSGVOLUME_LIBRARY_DEBUG - The osgVolume debug library
#
# $OSGDIR is an environment variable that would
# correspond to the ./configure --prefix=$OSGDIR
# used in building osg.
#
# Created by Eric Wing.
# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgVolume/Volume>
include(Findosg_functions)
OSG_FIND_PATH (OSGVOLUME osgVolume/Volume)
OSG_FIND_LIBRARY(OSGVOLUME osgVolume)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgVolume DEFAULT_MSG
OSGVOLUME_LIBRARY OSGVOLUME_INCLUDE_DIR)

@ -0,0 +1,38 @@
# This is part of the Findosg* suite used to find OpenSceneGraph components.
# Each component is separate and you must opt in to each module. You must
# also opt into OpenGL and OpenThreads (and Producer if needed) as these
# modules won't do it for you. This is to allow you control over your own
# system piece by piece in case you need to opt out of certain components
# or change the Find behavior for a particular module (perhaps because the
# default FindOpenGL.cmake module doesn't work with your system as an
# example).
# If you want to use a more convenient module that includes everything,
# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
#
# Locate osgWidget
# This module defines
#
# OSGWIDGET_FOUND - Was osgWidget found?
# OSGWIDGET_INCLUDE_DIR - Where to find the headers
# OSGWIDGET_LIBRARIES - The libraries to link for osgWidget (use this)
#
# OSGWIDGET_LIBRARY - The osgWidget library
# OSGWIDGET_LIBRARY_DEBUG - The osgWidget debug library
#
# $OSGDIR is an environment variable that would
# correspond to the ./configure --prefix=$OSGDIR
# used in building osg.
#
# FindosgWidget.cmake tweaked from Findosg* suite as created by Eric Wing.
# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgWidget/Widget>
include(Findosg_functions)
OSG_FIND_PATH (OSGWIDGET osgWidget/Widget)
OSG_FIND_LIBRARY(OSGWIDGET osgWidget)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgWidget DEFAULT_MSG
OSGWIDGET_LIBRARY OSGWIDGET_INCLUDE_DIR)

@ -0,0 +1,91 @@
#
# This CMake file contains two macros to assist with searching for OSG
# libraries and nodekits.
#
#
# OSG_FIND_PATH
#
function(OSG_FIND_PATH module header)
string(TOUPPER ${module} module_uc)
# Try the user's environment request before anything else.
find_path(${module_uc}_INCLUDE_DIR ${header}
HINTS
$ENV{${module_uc}_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
$ENV{OSG_ROOT}
PATH_SUFFIXES include
PATHS
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
/usr/freeware
)
endfunction(OSG_FIND_PATH module header)
#
# OSG_FIND_LIBRARY
#
function(OSG_FIND_LIBRARY module library)
string(TOUPPER ${module} module_uc)
find_library(${module_uc}_LIBRARY
NAMES ${library}
HINTS
$ENV{${module_uc}_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
$ENV{OSG_ROOT}
PATH_SUFFIXES lib64 lib
PATHS
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
/usr/freeware
)
find_library(${module_uc}_LIBRARY_DEBUG
NAMES ${library}d
HINTS
$ENV{${module_uc}_DIR}
$ENV{OSG_DIR}
$ENV{OSGDIR}
$ENV{OSG_ROOT}
PATH_SUFFIXES lib64 lib
PATHS
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
/usr/freeware
)
if(NOT ${module_uc}_LIBRARY_DEBUG)
# They don't have a debug library
set(${module_uc}_LIBRARY_DEBUG ${${module_uc}_LIBRARY} PARENT_SCOPE)
set(${module_uc}_LIBRARIES ${${module_uc}_LIBRARY} PARENT_SCOPE)
else()
# They really have a FOO_LIBRARY_DEBUG
set(${module_uc}_LIBRARIES
optimized ${${module_uc}_LIBRARY}
debug ${${module_uc}_LIBRARY_DEBUG}
PARENT_SCOPE
)
endif()
endfunction(OSG_FIND_LIBRARY module library)
#
# OSG_MARK_AS_ADVANCED
# Just a convenience function for calling MARK_AS_ADVANCED
#
function(OSG_MARK_AS_ADVANCED _module)
string(TOUPPER ${_module} _module_UC)
mark_as_advanced(${_module_UC}_INCLUDE_DIR)
mark_as_advanced(${_module_UC}_LIBRARY)
mark_as_advanced(${_module_UC}_LIBRARY_DEBUG)
endfunction()

@ -400,6 +400,7 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
wxWidgets-2.9.2 wxWidgets-2.9.2
wxWidgets-2.9.1 wxWidgets-2.9.1
wxWidgets-2.9.0 wxWidgets-2.9.0
wxWidgets-2.8.9
wxWidgets-2.8.8 wxWidgets-2.8.8
wxWidgets-2.8.7 wxWidgets-2.8.7
wxWidgets-2.8.6 wxWidgets-2.8.6
@ -446,7 +447,15 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
ENDIF(MINGW) ENDIF(MINGW)
IF(BUILD_SHARED_LIBS) IF(BUILD_SHARED_LIBS)
FIND_PATH(wxWidgets_LIB_DIR FIND_PATH(wxWidgets_LIB_DIR
NAMES msw/build.cfg mswd/build.cfg NAMES
msw/wx/setup.h
mswd/wx/setup.h
mswu/wx/setup.h
mswud/wx/setup.h
mswuniv/wx/setup.h
mswunivd/wx/setup.h
mswunivu/wx/setup.h
mswunivud/wx/setup.h
PATHS PATHS
${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll # prefer shared ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll # prefer shared
${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib
@ -455,7 +464,15 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
) )
ELSE(BUILD_SHARED_LIBS) ELSE(BUILD_SHARED_LIBS)
FIND_PATH(wxWidgets_LIB_DIR FIND_PATH(wxWidgets_LIB_DIR
NAMES msw/build.cfg mswd/build.cfg NAMES
msw/wx/setup.h
mswd/wx/setup.h
mswu/wx/setup.h
mswud/wx/setup.h
mswuniv/wx/setup.h
mswunivd/wx/setup.h
mswunivu/wx/setup.h
mswunivud/wx/setup.h
PATHS PATHS
${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib # prefer static ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib # prefer static
${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll
@ -472,8 +489,6 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
ENDIF(NOT WX_LIB_DIR STREQUAL wxWidgets_LIB_DIR) ENDIF(NOT WX_LIB_DIR STREQUAL wxWidgets_LIB_DIR)
IF(WX_LIB_DIR) IF(WX_LIB_DIR)
SET(wxWidgets_FOUND TRUE)
# If building shared libs, define WXUSINGDLL to use dllimport. # If building shared libs, define WXUSINGDLL to use dllimport.
IF(WX_LIB_DIR MATCHES ".*[dD][lL][lL].*") IF(WX_LIB_DIR MATCHES ".*[dD][lL][lL].*")
SET(wxWidgets_DEFINITIONS "-DWXUSINGDLL") SET(wxWidgets_DEFINITIONS "-DWXUSINGDLL")
@ -492,6 +507,8 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
DBG_MSG_V("WX_CONFIGURATION_LIST=${WX_CONFIGURATION_LIST}") DBG_MSG_V("WX_CONFIGURATION_LIST=${WX_CONFIGURATION_LIST}")
IF(WX_CONFIGURATION) IF(WX_CONFIGURATION)
SET(wxWidgets_FOUND TRUE)
# If the selected configuration wasn't found force the default # If the selected configuration wasn't found force the default
# one. Otherwise, use it but still force a refresh for # one. Otherwise, use it but still force a refresh for
# updating the doc string with the current list of available # updating the doc string with the current list of available

@ -0,0 +1,231 @@
# FortranCInterface.cmake
#
# This file defines the function create_fortran_c_interface.
# this function is used to create a configured header file
# that contains a mapping from C to a Fortran function using
# the correct name mangling scheme as defined by the current
# fortran compiler.
#
# The function tages a list of functions and the name of
# a header file to configure.
#
# This file also defines some helper functions that are used
# to detect the fortran name mangling scheme used by the
# current Fortran compiler.
# test_fortran_mangling - test a single fortran mangling
# discover_fortran_mangling - loop over all combos of fortran
# name mangling and call test_fortran_mangling until one of them
# works.
# discover_fortran_module_mangling - try different types of
# fortran modle name mangling to find one that works
#
#
#
# this function tests a single fortran mangling.
# CODE - test code to try should define a subroutine called "sub"
# PREFIX - string to put in front of sub
# POSTFIX - string to put after sub
# ISUPPER - if TRUE then sub will be called as SUB
# DOC - string used in status checking Fortran ${DOC} linkage
# SUB - the name of the SUB to call
# RESULT place to store result TRUE if this linkage works, FALSE
# if not.
#
function(test_fortran_mangling CODE PREFIX ISUPPER POSTFIX DOC SUB RESULT)
if(ISUPPER)
string(TOUPPER "${SUB}" sub)
else(ISUPPER)
string(TOLOWER "${SUB}" sub)
endif(ISUPPER)
set(FUNCTION "${PREFIX}${sub}${POSTFIX}")
# create a fortran file with sub called sub
#
set(TMP_DIR
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckFortranLink")
file(REMOVE_RECURSE "${TMP_DIR}")
file(WRITE "${TMP_DIR}/test.f" "${CODE}" )
message(STATUS "checking Fortran ${DOC} linkage: ${FUNCTION}")
file(WRITE "${TMP_DIR}/ctof.c"
"
extern ${FUNCTION}();
int main() { ${FUNCTION}(); return 0;}
"
)
file(WRITE "${TMP_DIR}/CMakeLists.txt"
"
project(testf C Fortran)
add_library(flib test.f)
add_executable(ctof ctof.c)
target_link_libraries(ctof flib)
"
)
set(FORTRAN_NAME_MANGLE_TEST FALSE)
try_compile(FORTRAN_NAME_MANGLE_TEST "${TMP_DIR}" "${TMP_DIR}"
testf
OUTPUT_VARIABLE output)
if(FORTRAN_NAME_MANGLE_TEST)
set(${RESULT} TRUE PARENT_SCOPE)
else()
set(${RESULT} FALSE PARENT_SCOPE)
endif()
endfunction(test_fortran_mangling)
# this function discovers the name mangling scheme used
# for functions in a fortran module.
function(discover_fortran_module_mangling prefix suffix found)
set(CODE
"
module test_interface
interface dummy
module procedure sub
end interface
contains
subroutine sub
end subroutine
end module test_interface
")
set(worked FALSE)
foreach(interface
"test_interface$"
"TEST_INTERFACE_mp_"
"_test_interface__"
"__test_interface__"
"__test_interface_NMOD_"
"__test_interface_MOD_")
test_fortran_mangling("${CODE}" "${interface}"
${FORTRAN_C_MANGLING_UPPERCASE} "" "module" "sub" worked)
if(worked)
# if this is the upper case module match then
# lower case it for the extraction of pre and post strings
if("${interface}" MATCHES "TEST_INTERFACE")
string(TOLOWER "${interface}" interface)
endif()
string(REGEX REPLACE "(.*)test_interface(.*)" "\\1" pre "${interface}")
string(REGEX REPLACE "(.*)test_interface(.*)" "\\2" post "${interface}")
set(${prefix} "${pre}" PARENT_SCOPE)
set(${suffix} "${post}" PARENT_SCOPE)
set(${found} TRUE PARENT_SCOPE)
return()
endif(worked)
endforeach(interface)
if(NOT worked)
message(STATUS "Failed to find C binding to Fortran module functions.")
set(${prefix} "BROKEN_C_FORTRAN_MODULE_BINDING" PARENT_SCOPE)
set(${suffix} "BROKEN_C_FORTRAN_MODULE_BINDING" PARENT_SCOPE)
set(${found} FALSE PARENT_SCOPE)
endif(NOT worked)
endfunction(discover_fortran_module_mangling)
function(discover_fortran_mangling prefix isupper suffix extra_under_score
found )
set(CODE
"
subroutine sub
end subroutine sub
")
foreach(post "_" "")
foreach(isup FALSE TRUE)
foreach(pre "" "_" "__")
set(worked FALSE)
test_fortran_mangling("${CODE}" "${pre}" ${isup}
"${post}" "function" sub worked )
if(worked)
message(STATUS "found Fortran function linkage")
set(${isupper} "${isup}" PARENT_SCOPE)
set(${prefix} "${pre}" PARENT_SCOPE)
set(${suffix} "${post}" PARENT_SCOPE)
set(${found} TRUE PARENT_SCOPE)
set(CODE
"
subroutine my_sub
end subroutine my_sub
")
set(worked FALSE)
test_fortran_mangling("${CODE}" "${pre}" ${isup}
"${post}" "function with _ " my_sub worked )
if(worked)
set(${extra_under_score} FALSE PARENT_SCOPE)
else(worked)
test_fortran_mangling("${CODE}" "${pre}" ${isup}
"${post}_" "function with _ " my_sub worked )
if(worked)
set(${extra_under_score} TRUE PARENT_SCOPE)
endif(worked)
endif(worked)
return()
endif()
endforeach()
endforeach()
endforeach()
set(${found} FALSE PARENT_SCOPE)
endfunction(discover_fortran_mangling)
function(create_fortran_c_interface NAMESPACE FUNCTIONS HEADER)
if(NOT FORTRAN_C_MANGLING_FOUND)
# find regular fortran function mangling
discover_fortran_mangling(prefix isupper suffix extra_under found)
if(NOT found)
message(SEND_ERROR "Could not find fortran c name mangling.")
return()
endif(NOT found)
# find fortran module function mangling
set(FORTRAN_C_PREFIX "${prefix}" CACHE INTERNAL
"PREFIX for Fortran to c name mangling")
set(FORTRAN_C_SUFFIX "${suffix}" CACHE INTERNAL
"SUFFIX for Fortran to c name mangling")
set(FORTRAN_C_MANGLING_UPPERCASE ${isupper} CACHE INTERNAL
"Was fortran to c mangling found" )
set(FORTRAN_C_MANGLING_EXTRA_UNDERSCORE ${extra_under} CACHE INTERNAL
"If a function has a _ in the name does the compiler append an extra _" )
set(FORTRAN_C_MANGLING_FOUND TRUE CACHE INTERNAL
"Was fortran to c mangling found" )
set(prefix )
set(suffix )
set(found FALSE)
# only try this if the compiler is F90 compatible
if(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
discover_fortran_module_mangling(prefix suffix found)
endif(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
if(found)
message(STATUS "found Fortran module linkage")
else(found)
message(STATUS "Failed to find Fortran module linkage")
endif(found)
set(FORTRAN_C_MODULE_PREFIX "${prefix}" CACHE INTERNAL
"PREFIX for Fortran to c name mangling")
set(FORTRAN_C_MODULE_SUFFIX "${suffix}" CACHE INTERNAL
"SUFFIX for Fortran to c name mangling")
set(FORTRAN_C_MODULE_MANGLING_FOUND ${found} CACHE INTERNAL
"Was for Fortran to c name mangling found for modules")
endif(NOT FORTRAN_C_MANGLING_FOUND)
foreach(f ${${FUNCTIONS}})
if(FORTRAN_C_MANGLING_UPPERCASE)
string(TOUPPER "${f}" fcase)
else()
string(TOLOWER "${f}" fcase)
endif()
if("${f}" MATCHES ":")
string(REGEX REPLACE "(.*):(.*)" "\\1" module "${f}")
string(REGEX REPLACE "(.*):(.*)" "\\2" function "${f}")
string(REGEX REPLACE "(.*):(.*)" "\\1" module_case "${fcase}")
string(REGEX REPLACE "(.*):(.*)" "\\2" function_case "${fcase}")
set(HEADER_CONTENT "${HEADER_CONTENT}
#define ${NAMESPACE}${module}_${function} ${FORTRAN_C_MODULE_PREFIX}${module_case}${FORTRAN_C_MODULE_SUFFIX}${function_case}
")
else("${f}" MATCHES ":")
set(function "${FORTRAN_C_PREFIX}${fcase}${FORTRAN_C_SUFFIX}")
if("${f}" MATCHES "_" AND FORTRAN_C_MANGLING_EXTRA_UNDERSCORE)
set(function "${function}_")
endif("${f}" MATCHES "_" AND FORTRAN_C_MANGLING_EXTRA_UNDERSCORE)
set(HEADER_CONTENT "${HEADER_CONTENT}
#define ${NAMESPACE}${f} ${function}
")
endif("${f}" MATCHES ":")
endforeach(f)
configure_file(
"${CMAKE_ROOT}/Modules/FortranCInterface.h.in"
${HEADER} @ONLY)
message(STATUS "created ${HEADER}")
endfunction()

@ -0,0 +1,9 @@
/* This file is automatically generated by CMake, DO NOT EDIT.
It contains a mapping from Fortran functions so they can
be called from C or C++. */
@HEADER_CONTENT@

@ -69,9 +69,17 @@ function(gp_file_type original_file file type_var)
endif("${file}" MATCHES "^@(executable|loader)_path") endif("${file}" MATCHES "^@(executable|loader)_path")
if(NOT is_embedded) if(NOT is_embedded)
if("${file}" MATCHES "^(/System/Library/|/usr/lib/)") if(UNIX)
set(is_system 1) if("${file}" MATCHES "^(/lib/|/lib32/|/lib64/)")
endif("${file}" MATCHES "^(/System/Library/|/usr/lib/)") set(is_system 1)
endif("${file}" MATCHES "^(/lib/|/lib32/|/lib64/)")
endif(UNIX)
if(APPLE)
if("${file}" MATCHES "^(/System/Library/|/usr/lib/)")
set(is_system 1)
endif("${file}" MATCHES "^(/System/Library/|/usr/lib/)")
endif(APPLE)
if(WIN32) if(WIN32)
string(TOLOWER "$ENV{SystemRoot}" sysroot) string(TOLOWER "$ENV{SystemRoot}" sysroot)
@ -406,7 +414,7 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
if("${gp_tool}" STREQUAL "ldd") if("${gp_tool}" STREQUAL "ldd")
set(gp_cmd_args "") set(gp_cmd_args "")
set(gp_regex "^\t([\t ]+)[\t ].*${eol_char}$") set(gp_regex "^[\t ]*[^\t ]+ => ([^\t ]+).*${eol_char}$")
set(gp_regex_cmp_count 1) set(gp_regex_cmp_count 1)
set(gp_tool_known 1) set(gp_tool_known 1)
endif("${gp_tool}" STREQUAL "ldd") endif("${gp_tool}" STREQUAL "ldd")
@ -560,8 +568,10 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
endif("${candidate}" MATCHES "${gp_regex}") endif("${candidate}" MATCHES "${gp_regex}")
endforeach(candidate) endforeach(candidate)
list(SORT ${prerequisites_var}) list(LENGTH ${prerequisites_var} prerequisites_var_length)
if(prerequisites_var_length GREATER 0)
list(SORT ${prerequisites_var})
endif(prerequisites_var_length GREATER 0)
if(${recurse}) if(${recurse})
set(more_inputs ${unseen_prereqs}) set(more_inputs ${unseen_prereqs})
foreach(input ${more_inputs}) foreach(input ${more_inputs})

@ -14,12 +14,14 @@
IF(MSVC) IF(MSVC)
FILE(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT) FILE(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT)
IF(MSVC70) IF(MSVC70)
SET(__install__libs SET(__install__libs
"${SYSTEMROOT}/system32/msvcp70.dll" "${SYSTEMROOT}/system32/msvcp70.dll"
"${SYSTEMROOT}/system32/msvcr70.dll" "${SYSTEMROOT}/system32/msvcr70.dll"
) )
ENDIF(MSVC70) ENDIF(MSVC70)
IF(MSVC71) IF(MSVC71)
SET(__install__libs SET(__install__libs
"${SYSTEMROOT}/system32/msvcp71.dll" "${SYSTEMROOT}/system32/msvcp71.dll"
@ -33,10 +35,15 @@ IF(MSVC)
SET(CMAKE_MSVC_ARCH x86) SET(CMAKE_MSVC_ARCH x86)
ENDIF(CMAKE_CL_64) ENDIF(CMAKE_CL_64)
GET_FILENAME_COMPONENT(devenv_dir "${CMAKE_MAKE_PROGRAM}" PATH)
GET_FILENAME_COMPONENT(base_dir "${devenv_dir}/../.." ABSOLUTE)
IF(MSVC80) IF(MSVC80)
# Find the runtime library redistribution directory. # Find the runtime library redistribution directory.
FIND_PATH(MSVC80_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest FIND_PATH(MSVC80_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir]/../../VC/redist" PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir]/../../VC/redist"
"${base_dir}/VC/redist"
) )
MARK_AS_ADVANCED(MSVC80_REDIST_DIR) MARK_AS_ADVANCED(MSVC80_REDIST_DIR)
SET(MSVC80_CRT_DIR "${MSVC80_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT") SET(MSVC80_CRT_DIR "${MSVC80_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT")
@ -62,16 +69,18 @@ IF(MSVC)
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES) ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
ENDIF(MSVC80) ENDIF(MSVC80)
IF(MSVC90) IF(MSVC90)
# Find the runtime library redistribution directory. # Find the runtime library redistribution directory.
FIND_PATH(MSVC90_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT/Microsoft.VC90.CRT.manifest FIND_PATH(MSVC90_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT/Microsoft.VC90.CRT.manifest
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir]/../../VC/redist" PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir]/../../VC/redist"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir]/../../VC/redist" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir]/../../VC/redist"
"${base_dir}/VC/redist"
) )
MARK_AS_ADVANCED(MSVC90_REDIST_DIR) MARK_AS_ADVANCED(MSVC90_REDIST_DIR)
SET(MSVC90_CRT_DIR "${MSVC90_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT") SET(MSVC90_CRT_DIR "${MSVC90_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.CRT")
# Install the manifest that allows DLLs to be loaded from the # Install the manifest that allows DLLs to be loaded from the
# directory containing the executable. # directory containing the executable.
SET(__install__libs SET(__install__libs
@ -91,6 +100,7 @@ IF(MSVC)
) )
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES) ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
ENDIF(MSVC90) ENDIF(MSVC90)
IF(CMAKE_INSTALL_MFC_LIBRARIES) IF(CMAKE_INSTALL_MFC_LIBRARIES)
IF(MSVC70) IF(MSVC70)
SET(__install__libs ${__install__libs} SET(__install__libs ${__install__libs}
@ -142,6 +152,7 @@ IF(MSVC)
"${MSVC80_MFCLOC_DIR}/mfc80kor.dll" "${MSVC80_MFCLOC_DIR}/mfc80kor.dll"
) )
ENDIF(MSVC80) ENDIF(MSVC80)
IF(MSVC90) IF(MSVC90)
IF(CMAKE_INSTALL_DEBUG_LIBRARIES) IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
SET(MSVC90_MFC_DIR SET(MSVC90_MFC_DIR
@ -184,6 +195,7 @@ IF(MSVC)
ENDIF(MSVC90) ENDIF(MSVC90)
ENDIF(CMAKE_INSTALL_MFC_LIBRARIES) ENDIF(CMAKE_INSTALL_MFC_LIBRARIES)
FOREACH(lib FOREACH(lib
${__install__libs} ${__install__libs}
) )
@ -205,5 +217,3 @@ IF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
ENDIF(WIN32) ENDIF(WIN32)
ENDIF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP) ENDIF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP)
ENDIF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS) ENDIF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)

@ -27,8 +27,8 @@ SET(CMAKE_SHARED_MODULE_SUFFIX ".so")
SET(CMAKE_MODULE_EXISTS 1) SET(CMAKE_MODULE_EXISTS 1)
SET(CMAKE_DL_LIBS "") SET(CMAKE_DL_LIBS "")
SET(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG -Wl,-compatibility_version,) SET(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ")
SET(CMAKE_C_OSX_CURRENT_VERSION_FLAG -Wl,-current_version,) SET(CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ")
SET(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}") SET(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
SET(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}") SET(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")
@ -52,7 +52,7 @@ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")
# and still cmake didn't fail in CMakeFindBinUtils.cmake (because it isn't rerun) # and still cmake didn't fail in CMakeFindBinUtils.cmake (because it isn't rerun)
# hardcode CMAKE_INSTALL_NAME_TOOL here to install_name_tool, so it behaves as it did before, Alex # hardcode CMAKE_INSTALL_NAME_TOOL here to install_name_tool, so it behaves as it did before, Alex
IF(NOT DEFINED CMAKE_INSTALL_NAME_TOOL) IF(NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
SET(CMAKE_INSTALL_NAME_TOOL install_name_tool) FIND_PROGRAM(CMAKE_INSTALL_NAME_TOOL install_name_tool)
ENDIF(NOT DEFINED CMAKE_INSTALL_NAME_TOOL) ENDIF(NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
# find installed SDKs # find installed SDKs
FILE(GLOB _CMAKE_OSX_SDKS "/Developer/SDKs/*") FILE(GLOB _CMAKE_OSX_SDKS "/Developer/SDKs/*")

@ -0,0 +1,21 @@
SET(BEOS 1)
# GCC is the default compiler on Haiku.
INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake)
SET(CMAKE_DL_LIBS root be)
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-nostart")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-soname,")
INCLUDE(Platform/UnixPaths)
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH /boot/common)
LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH /boot/common/include)
LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH /boot/common/lib)
LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH /boot/common/bin)
LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES /boot/common/lib)
LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH /boot/develop/headers/3rdparty)
LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH /boot/develop/lib/x86)

@ -59,3 +59,5 @@ INCLUDE(Platform/UnixPaths)
IF(EXISTS "/etc/debian_version") IF(EXISTS "/etc/debian_version")
SET_PROPERTY(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE) SET_PROPERTY(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE)
ENDIF(EXISTS "/etc/debian_version") ENDIF(EXISTS "/etc/debian_version")
# always include the gcc compiler information
INCLUDE(Platform/gcc)

@ -1,2 +1,3 @@
SET(CMAKE_DL_LIBS "") SET(CMAKE_DL_LIBS "")
SET_PROPERTY(GLOBAL PROPERTY FIND_LIBRARY_USE_OPENBSD_VERSIONING 1)
INCLUDE(Platform/UnixPaths) INCLUDE(Platform/UnixPaths)

@ -1,2 +1,5 @@
SET(CMAKE_Fortran_MODDIR_FLAG "-moddir=") set(CMAKE_Fortran_MODDIR_FLAG "-moddir=")
SET(CMAKE_Fortran_MODPATH_FLAG "-M") set(CMAKE_Fortran_MODPATH_FLAG "-M")
set(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG "-R")
set(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-KPIC")

@ -14,3 +14,10 @@ SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
SET(CMAKE_LIBRARY_PATH_FLAG "-L") SET(CMAKE_LIBRARY_PATH_FLAG "-L")
SET(CMAKE_LINK_LIBRARY_FLAG "-l") SET(CMAKE_LINK_LIBRARY_FLAG "-l")
SET (CMAKE_Fortran_FLAGS_INIT "")
SET (CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
SET (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-O1")
SET (CMAKE_Fortran_FLAGS_RELEASE_INIT "-O2")
SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-02 -g")

@ -15,6 +15,12 @@ SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty
SET(CMAKE_SHARED_MODULE_C_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}") # -pic
SET(CMAKE_SHARED_MODULE_CXX_FLAGS
"${CMAKE_SHARED_LIBRARY_CXX_FLAGS}") # -pic
SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS
"${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}") # -shared
SET(CMAKE_LIBRARY_PATH_FLAG "-L") SET(CMAKE_LIBRARY_PATH_FLAG "-L")
SET(CMAKE_LINK_LIBRARY_FLAG "-l") SET(CMAKE_LINK_LIBRARY_FLAG "-l")
SET(CMAKE_EXTRA_LINK_EXTENSIONS ".lib") # MinGW can also link to a MS .lib SET(CMAKE_EXTRA_LINK_EXTENSIONS ".lib") # MinGW can also link to a MS .lib
@ -23,6 +29,8 @@ SET(CMAKE_CREATE_WIN32_EXE "-mwindows")
IF(MINGW) IF(MINGW)
SET(CMAKE_FIND_LIBRARY_PREFIXES "lib" "") SET(CMAKE_FIND_LIBRARY_PREFIXES "lib" "")
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll" ".dll.a" ".a" ".lib") SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll" ".dll.a" ".a" ".lib")
SET (CMAKE_C_STANDARD_LIBRARIES_INIT "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32")
SET(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}")
ENDIF(MINGW) ENDIF(MINGW)
SET(CMAKE_GNULD_IMAGE_VERSION SET(CMAKE_GNULD_IMAGE_VERSION

@ -1,15 +1,56 @@
# Add the program-files folder(s) to the list of installation
# prefixes.
#
# Windows 64-bit Binary:
# ENV{ProgramFiles(x86)} = [C:\Program Files (x86)]
# ENV{ProgramFiles} = [C:\Program Files]
# ENV{ProgramW6432} = <not set>
# (executed from cygwin):
# ENV{ProgramFiles(x86)} = <not set>
# ENV{ProgramFiles} = [C:\Program Files]
# ENV{ProgramW6432} = <not set>
#
# Windows 32-bit Binary:
# ENV{ProgramFiles(x86)} = [C:\Program Files (x86)]
# ENV{ProgramFiles} = [C:\Program Files (x86)]
# ENV{ProgramW6432} = [C:\Program Files]
# (executed from cygwin):
# ENV{ProgramFiles(x86)} = <not set>
# ENV{ProgramFiles} = [C:\Program Files (x86)]
# ENV{ProgramW6432} = [C:\Program Files]
IF(DEFINED "ENV{ProgramW6432}")
# 32-bit binary on 64-bit windows.
# The 64-bit program files are in ProgramW6432.
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{ProgramW6432}")
# The 32-bit program files are in ProgramFiles.
IF(DEFINED "ENV{ProgramFiles}")
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{ProgramFiles}")
ENDIF()
ELSE()
# 64-bit binary, or 32-bit binary on 32-bit windows.
IF(DEFINED "ENV{ProgramFiles}")
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{ProgramFiles}")
ENDIF()
IF(DEFINED "ENV{ProgramFiles(x86)}")
# 64-bit binary. 32-bit program files are in ProgramFiles(x86).
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH "$ENV{ProgramFiles(x86)}")
ELSEIF(DEFINED "ENV{SystemDrive}")
# Guess the 32-bit program files location.
IF(EXISTS "$ENV{SystemDrive}/Program Files (x86)")
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH
"$ENV{SystemDrive}/Program Files (x86)")
ENDIF()
ENDIF()
ENDIF()
# Add the CMake install location.
GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH) GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH)
GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH) GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH "${_CMAKE_INSTALL_DIR}")
# List common installation prefixes. These will be used for all # Add other locations.
# search types.
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH
# Standard
"$ENV{ProgramFiles}"
# CMake install location
"${_CMAKE_INSTALL_DIR}"
# Project install destination. # Project install destination.
"${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}"

@ -0,0 +1,11 @@
echo 'Starting the squish server...'
start %1
echo 'Running the test case...'
%2 --testcase %3 --wrapper %4 --aut %5
set result=%ERRORLEVEL%
echo 'Stopping the squish server...'
%1 --stop
exit \b %result%

@ -0,0 +1,13 @@
#!/bin/sh
echo "Starting the squish server...$1 --daemon"
$1 --daemon
echo "Running the test case...$2 --testcase $3 --wrapper $4 --aut $5"
$2 --testcase $3 --wrapper $4 --aut $5
returnValue=$?
echo "Stopping the squish server...$1 --stop"
$1 --stop
exit $returnValue

@ -0,0 +1,59 @@
#
# This script launches a GUI test using Squish. You should not call
# the script directly; instead, you should acces it via the
# SQUISH_ADD_TEST macro that is defined in FindSquish.cmake.
#
# This script starts the Squish server, launches the test on the
# client, and finally stops the squish server. If any of these steps
# fail (including if the tests do not pass) then a fatal error is
# raised.
#
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
# print out the variable that we are using
message(STATUS "squish_aut='${squish_aut}'")
message(STATUS "squish_server_executable='${squish_server_executable}'")
message(STATUS "squish_client_executable='${squish_client_executable}'")
message(STATUS "squish_libqtdir ='${squish_libqtdir}'")
message(STATUS "squish_test_case='${squish_test_case}'")
message(STATUS "squish_wrapper='${squish_wrapper}'")
message(STATUS "squish_env_vars='${squish_env_vars}'")
# parse enviornment variables
foreach(i ${squish_env_vars})
message(STATUS "parsing env var key/value pair ${i}")
string(REGEX MATCH "([^=]*)=(.*)" squish_env_name ${i})
message(STATUS "key=${CMAKE_MATCH_1}")
message(STATUS "value=${CMAKE_MATCH_2}")
set ( ENV{${CMAKE_MATCH_1}} ${CMAKE_MATCH_2} )
endforeach()
if (QT4_INSTALLED)
# record qt lib directory
set ( ENV{${SQUISH_LIBQTDIR}} ${squish_libqtdir} )
endif (QT4_INSTALLED)
# run the test
if (WIN32)
execute_process(
COMMAND ${CMAKE_ROOT}/Modules/SquishRunTestCase.bat ${squish_server_executable} ${squish_client_executable} ${squish_test_case} ${squish_wrapper} ${squish_aut}
RESULT_VARIABLE test_rv
)
endif (WIN32)
if (UNIX)
execute_process(
COMMAND ${CMAKE_ROOT}/Modules/SquishRunTestCase.sh ${squish_server_executable} ${squish_client_executable} ${squish_test_case} ${squish_wrapper} ${squish_aut}
RESULT_VARIABLE test_rv
)
endif (UNIX)
# check for an error with running the test
if(NOT "${test_rv}" STREQUAL "0")
message(FATAL_ERROR "Error running Squish test")
endif(NOT "${test_rv}" STREQUAL "0")

@ -11,6 +11,9 @@ SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_
SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG) SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG)
INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR})
IF(Q_WS_MAC AND QT_USE_FRAMEWORKS)
INCLUDE_DIRECTORIES(${QT_QTCORE_LIBRARY})
ENDIF(Q_WS_MAC AND QT_USE_FRAMEWORKS)
SET(QT_LIBRARIES "") SET(QT_LIBRARIES "")
@ -41,7 +44,11 @@ SET(QT_QT3SUPPORT_MODULE_DEPENDS QTGUI QTSQL QTXML QTNETWORK QTCORE)
SET(QT_QTSVG_MODULE_DEPENDS QTGUI QTXML QTCORE) SET(QT_QTSVG_MODULE_DEPENDS QTGUI QTXML QTCORE)
SET(QT_QTUITOOLS_MODULE_DEPENDS QTGUI QTXML QTCORE) SET(QT_QTUITOOLS_MODULE_DEPENDS QTGUI QTXML QTCORE)
SET(QT_QTHELP_MODULE_DEPENDS QTGUI QTSQL QTXML QTCORE) SET(QT_QTHELP_MODULE_DEPENDS QTGUI QTSQL QTXML QTCORE)
SET(QT_PHONON_MODULE_DEPENDS QTGUI QTDBUS QTCORE) IF(QT_QTDBUS_FOUND)
SET(QT_PHONON_MODULE_DEPENDS QTGUI QTDBUS QTCORE)
ELSE(QT_QTDBUS_FOUND)
SET(QT_PHONON_MODULE_DEPENDS QTGUI QTCORE)
ENDIF(QT_QTDBUS_FOUND)
SET(QT_QTDBUS_MODULE_DEPENDS QTXML QTCORE) SET(QT_QTDBUS_MODULE_DEPENDS QTXML QTCORE)
SET(QT_QTXMLPATTERNS_MODULE_DEPENDS QTNETWORK QTCORE) SET(QT_QTXMLPATTERNS_MODULE_DEPENDS QTNETWORK QTCORE)

@ -302,19 +302,6 @@ IF(CMAKE_BUILD_ON_VISUAL_STUDIO OR MINGW)
TARGET_LINK_LIBRARIES(CMakeLib rpcrt4) TARGET_LINK_LIBRARIES(CMakeLib rpcrt4)
ENDIF(CMAKE_BUILD_ON_VISUAL_STUDIO OR MINGW) ENDIF(CMAKE_BUILD_ON_VISUAL_STUDIO OR MINGW)
# With the Microsoft compiler (for _bstr_t support used from
# cmCallVisualStudioMacro) we need the comsupp lib. Needed when
# _MSC_VER and HAVE_COMDEF_H are defined...
#
IF(MSVC)
IF(MSVC60)
# comsuppd did not yet exist in VS6
TARGET_LINK_LIBRARIES(CMakeLib comsupp)
ELSE(MSVC60)
TARGET_LINK_LIBRARIES(CMakeLib optimized comsupp debug comsuppd)
ENDIF(MSVC60)
ENDIF(MSVC)
# #
# CTestLib # CTestLib
# #
@ -389,6 +376,7 @@ ENDIF(UNIX)
IF(APPLE) IF(APPLE)
SET(CPACK_SRCS ${CPACK_SRCS} SET(CPACK_SRCS ${CPACK_SRCS}
CPack/cmCPackBundleGenerator.cxx CPack/cmCPackBundleGenerator.cxx
CPack/cmCPackDragNDropGenerator.cxx
CPack/cmCPackOSXX11Generator.cxx CPack/cmCPackOSXX11Generator.cxx
CPack/cmCPackPackageMakerGenerator.cxx CPack/cmCPackPackageMakerGenerator.cxx
) )

@ -3,8 +3,8 @@
Program: CMake - Cross-Platform Makefile Generator Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile: cmCPackBundleGenerator.cxx,v $ Module: $RCSfile: cmCPackBundleGenerator.cxx,v $
Language: C++ Language: C++
Date: $Date: 2008-07-22 18:04:24 $ Date: $Date: 2009-02-04 16:44:18 $
Version: $Revision: 1.2.2.3 $ Version: $Revision: 1.2.2.6 $
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
@ -19,6 +19,8 @@
#include "cmCPackLog.h" #include "cmCPackLog.h"
#include "cmSystemTools.h" #include "cmSystemTools.h"
#include <cmsys/RegularExpression.hxx>
//---------------------------------------------------------------------- //----------------------------------------------------------------------
cmCPackBundleGenerator::cmCPackBundleGenerator() cmCPackBundleGenerator::cmCPackBundleGenerator()
{ {
@ -32,37 +34,19 @@ cmCPackBundleGenerator::~cmCPackBundleGenerator()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
int cmCPackBundleGenerator::InitializeInternal() int cmCPackBundleGenerator::InitializeInternal()
{ {
const std::string hdiutil_path = cmSystemTools::FindProgram("hdiutil", const char* name = this->GetOption("CPACK_BUNDLE_NAME");
std::vector<std::string>(), false); if(0 == name)
if(hdiutil_path.empty())
{ {
cmCPackLogger(cmCPackLog::LOG_ERROR, cmCPackLogger(cmCPackLog::LOG_ERROR,
"Cannot locate hdiutil command" "CPACK_BUNDLE_NAME must be set to use the Bundle generator."
<< std::endl); << std::endl);
return 0;
}
this->SetOptionIfNotSet("CPACK_COMMAND_HDIUTIL", hdiutil_path.c_str());
const std::string setfile_path = cmSystemTools::FindProgram("SetFile",
std::vector<std::string>(1, "/Developer/Tools"), false);
if(setfile_path.empty())
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Cannot locate SetFile command"
<< std::endl);
return 0; return 0;
} }
this->SetOptionIfNotSet("CPACK_COMMAND_SETFILE", setfile_path.c_str());
return this->Superclass::InitializeInternal(); return this->Superclass::InitializeInternal();
} }
//----------------------------------------------------------------------
const char* cmCPackBundleGenerator::GetOutputExtension()
{
return ".dmg";
}
//---------------------------------------------------------------------- //----------------------------------------------------------------------
const char* cmCPackBundleGenerator::GetPackagingInstallPrefix() const char* cmCPackBundleGenerator::GetPackagingInstallPrefix()
{ {
@ -80,7 +64,8 @@ int cmCPackBundleGenerator::CompressFiles(const char* outFileName,
(void) files; (void) files;
// Get required arguments ... // Get required arguments ...
const std::string cpack_bundle_name = this->GetOption("CPACK_BUNDLE_NAME") ? this->GetOption("CPACK_BUNDLE_NAME") : ""; const std::string cpack_bundle_name = this->GetOption("CPACK_BUNDLE_NAME")
? this->GetOption("CPACK_BUNDLE_NAME") : "";
if(cpack_bundle_name.empty()) if(cpack_bundle_name.empty())
{ {
cmCPackLogger(cmCPackLog::LOG_ERROR, cmCPackLogger(cmCPackLog::LOG_ERROR,
@ -90,7 +75,8 @@ int cmCPackBundleGenerator::CompressFiles(const char* outFileName,
return 0; return 0;
} }
const std::string cpack_bundle_plist = this->GetOption("CPACK_BUNDLE_PLIST") ? this->GetOption("CPACK_BUNDLE_PLIST") : ""; const std::string cpack_bundle_plist = this->GetOption("CPACK_BUNDLE_PLIST")
? this->GetOption("CPACK_BUNDLE_PLIST") : "";
if(cpack_bundle_plist.empty()) if(cpack_bundle_plist.empty())
{ {
cmCPackLogger(cmCPackLog::LOG_ERROR, cmCPackLogger(cmCPackLog::LOG_ERROR,
@ -100,7 +86,8 @@ int cmCPackBundleGenerator::CompressFiles(const char* outFileName,
return 0; return 0;
} }
const std::string cpack_bundle_icon = this->GetOption("CPACK_BUNDLE_ICON") ? this->GetOption("CPACK_BUNDLE_ICON") : ""; const std::string cpack_bundle_icon = this->GetOption("CPACK_BUNDLE_ICON")
? this->GetOption("CPACK_BUNDLE_ICON") : "";
if(cpack_bundle_icon.empty()) if(cpack_bundle_icon.empty())
{ {
cmCPackLogger(cmCPackLog::LOG_ERROR, cmCPackLogger(cmCPackLog::LOG_ERROR,
@ -110,18 +97,13 @@ int cmCPackBundleGenerator::CompressFiles(const char* outFileName,
return 0; return 0;
} }
const std::string cpack_bundle_startup_command = this->GetOption("CPACK_BUNDLE_STARTUP_COMMAND") ? this->GetOption("CPACK_BUNDLE_STARTUP_COMMAND") : "";
if(cpack_bundle_startup_command.empty())
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
"CPACK_BUNDLE_STARTUP_COMMAND must be set."
<< std::endl);
return 0;
}
// Get optional arguments ... // Get optional arguments ...
const std::string cpack_package_icon = this->GetOption("CPACK_PACKAGE_ICON") ? this->GetOption("CPACK_PACKAGE_ICON") : ""; const std::string cpack_package_icon = this->GetOption("CPACK_PACKAGE_ICON")
? this->GetOption("CPACK_PACKAGE_ICON") : "";
const std::string cpack_bundle_startup_command =
this->GetOption("CPACK_BUNDLE_STARTUP_COMMAND")
? this->GetOption("CPACK_BUNDLE_STARTUP_COMMAND") : "";
// The staging directory contains everything that will end-up inside the // The staging directory contains everything that will end-up inside the
// final disk image ... // final disk image ...
@ -170,24 +152,28 @@ int cmCPackBundleGenerator::CompressFiles(const char* outFileName,
return 0; return 0;
} }
// Install a user-provided startup command (could be an executable or a // Optionally a user-provided startup command (could be an
// script) ... // executable or a script) ...
cmOStringStream command_source; if(!cpack_bundle_startup_command.empty())
command_source << cpack_bundle_startup_command; {
cmOStringStream command_source;
command_source << cpack_bundle_startup_command;
cmOStringStream command_target; cmOStringStream command_target;
command_target << application.str() << "/" << cpack_bundle_name; command_target << application.str() << "/" << cpack_bundle_name;
if(!this->CopyFile(command_source, command_target)) if(!this->CopyFile(command_source, command_target))
{ {
cmCPackLogger(cmCPackLog::LOG_ERROR, cmCPackLogger(cmCPackLog::LOG_ERROR,
"Error copying startup command. Check the value of CPACK_BUNDLE_STARTUP_COMMAND." "Error copying startup command. "
<< std::endl); " Check the value of CPACK_BUNDLE_STARTUP_COMMAND."
<< std::endl);
return 0; return 0;
} }
cmSystemTools::SetPermissions(command_target.str().c_str(), 0777); cmSystemTools::SetPermissions(command_target.str().c_str(), 0777);
}
// Add a symlink to /Applications so users can drag-and-drop the bundle // Add a symlink to /Applications so users can drag-and-drop the bundle
// into it // into it
@ -208,7 +194,8 @@ int cmCPackBundleGenerator::CompressFiles(const char* outFileName,
if(!this->CopyFile(package_icon_source, package_icon_destination)) if(!this->CopyFile(package_icon_source, package_icon_destination))
{ {
cmCPackLogger(cmCPackLog::LOG_ERROR, cmCPackLogger(cmCPackLog::LOG_ERROR,
"Error copying disk volume icon. Check the value of CPACK_PACKAGE_ICON." "Error copying disk volume icon. "
"Check the value of CPACK_PACKAGE_ICON."
<< std::endl); << std::endl);
return 0; return 0;
@ -242,16 +229,14 @@ int cmCPackBundleGenerator::CompressFiles(const char* outFileName,
if(!cpack_package_icon.empty()) if(!cpack_package_icon.empty())
{ {
cmOStringStream temp_mount; cmOStringStream temp_mount;
temp_mount << this->GetOption("CPACK_TOPLEVEL_DIRECTORY") << "/mnt";
cmSystemTools::MakeDirectory(temp_mount.str().c_str());
cmOStringStream attach_command; cmOStringStream attach_command;
attach_command << this->GetOption("CPACK_COMMAND_HDIUTIL"); attach_command << this->GetOption("CPACK_COMMAND_HDIUTIL");
attach_command << " attach"; attach_command << " attach";
attach_command << " -mountpoint \"" << temp_mount.str() << "\"";
attach_command << " \"" << temp_image.str() << "\""; attach_command << " \"" << temp_image.str() << "\"";
if(!this->RunCommand(attach_command)) std::string attach_output;
if(!this->RunCommand(attach_command, &attach_output))
{ {
cmCPackLogger(cmCPackLog::LOG_ERROR, cmCPackLogger(cmCPackLog::LOG_ERROR,
"Error attaching temporary disk image." "Error attaching temporary disk image."
@ -260,6 +245,10 @@ int cmCPackBundleGenerator::CompressFiles(const char* outFileName,
return 0; return 0;
} }
cmsys::RegularExpression mountpoint_regex(".*(/Volumes/[^\n]+)\n.*");
mountpoint_regex.find(attach_output.c_str());
temp_mount << mountpoint_regex.match(1);
cmOStringStream setfile_command; cmOStringStream setfile_command;
setfile_command << this->GetOption("CPACK_COMMAND_SETFILE"); setfile_command << this->GetOption("CPACK_COMMAND_SETFILE");
setfile_command << " -a C"; setfile_command << " -a C";
@ -309,51 +298,3 @@ int cmCPackBundleGenerator::CompressFiles(const char* outFileName,
return 1; return 1;
} }
//----------------------------------------------------------------------
bool cmCPackBundleGenerator::CopyFile(cmOStringStream& source,
cmOStringStream& target)
{
if(!cmSystemTools::CopyFileIfDifferent(
source.str().c_str(),
target.str().c_str()))
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Error copying "
<< source.str()
<< " to "
<< target.str()
<< std::endl);
return false;
}
return true;
}
//----------------------------------------------------------------------
bool cmCPackBundleGenerator::RunCommand(cmOStringStream& command)
{
std::string output;
int exit_code = 1;
bool result = cmSystemTools::RunSingleCommand(
command.str().c_str(),
&output,
&exit_code,
0,
this->GeneratorVerbose,
0);
if(!result || exit_code)
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Error executing: "
<< command.str()
<< std::endl);
return false;
}
return true;
}

@ -3,8 +3,8 @@
Program: CMake - Cross-Platform Makefile Generator Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile: cmCPackBundleGenerator.h,v $ Module: $RCSfile: cmCPackBundleGenerator.h,v $
Language: C++ Language: C++
Date: $Date: 2008-06-25 13:51:33 $ Date: $Date: 2009-02-04 16:44:18 $
Version: $Revision: 1.1.2.2 $ Version: $Revision: 1.1.2.3 $
Copyright (c) 2002 Kitware, Inc. All rights reserved. Copyright (c) 2002 Kitware, Inc. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
@ -18,31 +18,27 @@
#ifndef cmCPackBundleGenerator_h #ifndef cmCPackBundleGenerator_h
#define cmCPackBundleGenerator_h #define cmCPackBundleGenerator_h
#include "cmCPackGenerator.h" #include "cmCPackDragNDropGenerator.h"
/** \class cmCPackBundleGenerator /** \class cmCPackBundleGenerator
* \brief A generator for OSX bundles * \brief A generator for OSX bundles
* *
* Based on Gimp.app * Based on Gimp.app
*/ */
class cmCPackBundleGenerator : public cmCPackGenerator class cmCPackBundleGenerator : public cmCPackDragNDropGenerator
{ {
public: public:
cmCPackTypeMacro(cmCPackBundleGenerator, cmCPackGenerator); cmCPackTypeMacro(cmCPackBundleGenerator, cmCPackDragNDropGenerator);
cmCPackBundleGenerator(); cmCPackBundleGenerator();
virtual ~cmCPackBundleGenerator(); virtual ~cmCPackBundleGenerator();
protected: protected:
virtual int InitializeInternal(); virtual int InitializeInternal();
virtual const char* GetOutputExtension();
virtual const char* GetPackagingInstallPrefix(); virtual const char* GetPackagingInstallPrefix();
int CompressFiles(const char* outFileName, const char* toplevel, int CompressFiles(const char* outFileName, const char* toplevel,
const std::vector<std::string>& files); const std::vector<std::string>& files);
bool CopyFile(cmOStringStream& source, cmOStringStream& target);
bool RunCommand(cmOStringStream& command);
std::string InstallPrefix; std::string InstallPrefix;
}; };

@ -0,0 +1,253 @@
/*=========================================================================
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile: cmCPackDragNDropGenerator.cxx,v $
Language: C++
Date: $Date: 2009-02-05 03:04:12 $
Version: $Revision: 1.1.2.2 $
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "cmCPackDragNDropGenerator.h"
#include "cmCPackLog.h"
#include "cmSystemTools.h"
#include <cmsys/RegularExpression.hxx>
//----------------------------------------------------------------------
cmCPackDragNDropGenerator::cmCPackDragNDropGenerator()
{
}
//----------------------------------------------------------------------
cmCPackDragNDropGenerator::~cmCPackDragNDropGenerator()
{
}
//----------------------------------------------------------------------
int cmCPackDragNDropGenerator::InitializeInternal()
{
const std::string hdiutil_path = cmSystemTools::FindProgram("hdiutil",
std::vector<std::string>(), false);
if(hdiutil_path.empty())
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Cannot locate hdiutil command"
<< std::endl);
return 0;
}
this->SetOptionIfNotSet("CPACK_COMMAND_HDIUTIL", hdiutil_path.c_str());
const std::string setfile_path = cmSystemTools::FindProgram("SetFile",
std::vector<std::string>(1, "/Developer/Tools"), false);
if(setfile_path.empty())
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Cannot locate SetFile command"
<< std::endl);
return 0;
}
this->SetOptionIfNotSet("CPACK_COMMAND_SETFILE", setfile_path.c_str());
return this->Superclass::InitializeInternal();
}
//----------------------------------------------------------------------
const char* cmCPackDragNDropGenerator::GetOutputExtension()
{
return ".dmg";
}
//----------------------------------------------------------------------
int cmCPackDragNDropGenerator::CompressFiles(const char* outFileName,
const char* toplevel, const std::vector<std::string>& files)
{
(void) files;
// Get optional arguments ...
const std::string cpack_package_icon = this->GetOption("CPACK_PACKAGE_ICON")
? this->GetOption("CPACK_PACKAGE_ICON") : "";
// The staging directory contains everything that will end-up inside the
// final disk image ...
cmOStringStream staging;
staging << toplevel;
// Add a symlink to /Applications so users can drag-and-drop the bundle
// into it
cmOStringStream application_link;
application_link << staging.str() << "/Applications";
cmSystemTools::CreateSymlink("/Applications",
application_link.str().c_str());
// Optionally add a custom volume icon ...
if(!cpack_package_icon.empty())
{
cmOStringStream package_icon_source;
package_icon_source << cpack_package_icon;
cmOStringStream package_icon_destination;
package_icon_destination << staging.str() << "/.VolumeIcon.icns";
if(!this->CopyFile(package_icon_source, package_icon_destination))
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Error copying disk volume icon. "
"Check the value of CPACK_PACKAGE_ICON."
<< std::endl);
return 0;
}
}
// Create a temporary read-write disk image ...
cmOStringStream temp_image;
temp_image << this->GetOption("CPACK_TOPLEVEL_DIRECTORY") << "/temp.dmg";
cmOStringStream temp_image_command;
temp_image_command << this->GetOption("CPACK_COMMAND_HDIUTIL");
temp_image_command << " create";
temp_image_command << " -ov";
temp_image_command << " -srcfolder \"" << staging.str() << "\"";
temp_image_command << " -volname \""
<< this->GetOption("CPACK_PACKAGE_FILE_NAME") << "\"";
temp_image_command << " -format UDRW";
temp_image_command << " \"" << temp_image.str() << "\"";
if(!this->RunCommand(temp_image_command))
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Error generating temporary disk image."
<< std::endl);
return 0;
}
// Optionally set the custom icon flag for the image ...
if(!cpack_package_icon.empty())
{
cmOStringStream temp_mount;
cmOStringStream attach_command;
attach_command << this->GetOption("CPACK_COMMAND_HDIUTIL");
attach_command << " attach";
attach_command << " \"" << temp_image.str() << "\"";
std::string attach_output;
if(!this->RunCommand(attach_command, &attach_output))
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Error attaching temporary disk image."
<< std::endl);
return 0;
}
cmsys::RegularExpression mountpoint_regex(".*(/Volumes/[^\n]+)\n.*");
mountpoint_regex.find(attach_output.c_str());
temp_mount << mountpoint_regex.match(1);
cmOStringStream setfile_command;
setfile_command << this->GetOption("CPACK_COMMAND_SETFILE");
setfile_command << " -a C";
setfile_command << " \"" << temp_mount.str() << "\"";
if(!this->RunCommand(setfile_command))
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Error assigning custom icon to temporary disk image."
<< std::endl);
return 0;
}
cmOStringStream detach_command;
detach_command << this->GetOption("CPACK_COMMAND_HDIUTIL");
detach_command << " detach";
detach_command << " \"" << temp_mount.str() << "\"";
if(!this->RunCommand(detach_command))
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Error detaching temporary disk image."
<< std::endl);
return 0;
}
}
// Create the final compressed read-only disk image ...
cmOStringStream final_image_command;
final_image_command << this->GetOption("CPACK_COMMAND_HDIUTIL");
final_image_command << " convert \"" << temp_image.str() << "\"";
final_image_command << " -format UDZO";
final_image_command << " -imagekey";
final_image_command << " zlib-level=9";
final_image_command << " -o \"" << outFileName << "\"";
if(!this->RunCommand(final_image_command))
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Error compressing disk image."
<< std::endl);
return 0;
}
return 1;
}
//----------------------------------------------------------------------
bool cmCPackDragNDropGenerator::CopyFile(cmOStringStream& source,
cmOStringStream& target)
{
if(!cmSystemTools::CopyFileIfDifferent(
source.str().c_str(),
target.str().c_str()))
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Error copying "
<< source.str()
<< " to "
<< target.str()
<< std::endl);
return false;
}
return true;
}
//----------------------------------------------------------------------
bool cmCPackDragNDropGenerator::RunCommand(cmOStringStream& command,
std::string* output)
{
int exit_code = 1;
bool result = cmSystemTools::RunSingleCommand(
command.str().c_str(),
output,
&exit_code,
0,
this->GeneratorVerbose,
0);
if(!result || exit_code)
{
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Error executing: "
<< command.str()
<< std::endl);
return false;
}
return true;
}

@ -0,0 +1,47 @@
/*=========================================================================
Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile: cmCPackDragNDropGenerator.h,v $
Language: C++
Date: $Date: 2009-02-05 03:04:18 $
Version: $Revision: 1.1.2.2 $
Copyright (c) 2002 Kitware, Inc. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef cmCPackDragNDropGenerator_h
#define cmCPackDragNDropGenerator_h
#include "cmCPackGenerator.h"
/** \class cmCPackDragNDropGenerator
* \brief A generator for OSX drag-n-drop installs
*/
class cmCPackDragNDropGenerator : public cmCPackGenerator
{
public:
cmCPackTypeMacro(cmCPackDragNDropGenerator, cmCPackGenerator);
cmCPackDragNDropGenerator();
virtual ~cmCPackDragNDropGenerator();
protected:
virtual int InitializeInternal();
virtual const char* GetOutputExtension();
int CompressFiles(const char* outFileName, const char* toplevel,
const std::vector<std::string>& files);
bool CopyFile(cmOStringStream& source, cmOStringStream& target);
bool RunCommand(cmOStringStream& command, std::string* output = 0);
std::string InstallPrefix;
};
#endif

@ -3,8 +3,8 @@
Program: CMake - Cross-Platform Makefile Generator Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile: cmCPackGenerator.cxx,v $ Module: $RCSfile: cmCPackGenerator.cxx,v $
Language: C++ Language: C++
Date: $Date: 2008-09-24 14:07:49 $ Date: $Date: 2008-10-24 15:18:55 $
Version: $Revision: 1.6.2.4 $ Version: $Revision: 1.6.2.5 $
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
@ -642,10 +642,11 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
if ( setDestDir ) if ( setDestDir )
{ {
// For DESTDIR based packaging, use the *project* CMAKE_INSTALL_PREFIX // For DESTDIR based packaging, use the *project*
// underneath the tempInstallDirectory. The value of the project's // CMAKE_INSTALL_PREFIX underneath the tempInstallDirectory. The
// CMAKE_INSTALL_PREFIX is sent in here as the value of the // value of the project's CMAKE_INSTALL_PREFIX is sent in here as
// CPACK_INSTALL_PREFIX variable. // the value of the CPACK_INSTALL_PREFIX variable.
//
std::string dir; std::string dir;
if (this->GetOption("CPACK_INSTALL_PREFIX")) if (this->GetOption("CPACK_INSTALL_PREFIX"))
{ {
@ -653,6 +654,29 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
} }
mf->AddDefinition("CMAKE_INSTALL_PREFIX", dir.c_str()); mf->AddDefinition("CMAKE_INSTALL_PREFIX", dir.c_str());
cmCPackLogger(
cmCPackLog::LOG_DEBUG,
"- Using DESTDIR + CPACK_INSTALL_PREFIX... (mf->AddDefinition)"
<< std::endl);
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"- Setting CMAKE_INSTALL_PREFIX to '" << dir << "'"
<< std::endl);
// Make sure that DESTDIR + CPACK_INSTALL_PREFIX directory
// exists:
//
if (cmSystemTools::StringStartsWith(dir.c_str(), "/"))
{
dir = tempInstallDirectory + dir;
}
else
{
dir = tempInstallDirectory + "/" + dir;
}
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"- Creating directory: '" << dir << "'" << std::endl);
if ( !cmsys::SystemTools::MakeDirectory(dir.c_str())) if ( !cmsys::SystemTools::MakeDirectory(dir.c_str()))
{ {
cmCPackLogger(cmCPackLog::LOG_ERROR, cmCPackLogger(cmCPackLog::LOG_ERROR,
@ -660,19 +684,14 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
<< dir << std::endl); << dir << std::endl);
return 0; return 0;
} }
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"- Using DESTDIR + CPACK_INSTALL_PREFIX... (mf->AddDefinition)"
<< std::endl);
cmCPackLogger(cmCPackLog::LOG_DEBUG,
"- Setting CMAKE_INSTALL_PREFIX to '" << dir << "'"
<< std::endl);
} }
else else
{ {
mf->AddDefinition("CMAKE_INSTALL_PREFIX", tempInstallDirectory.c_str()); mf->AddDefinition("CMAKE_INSTALL_PREFIX",
tempInstallDirectory.c_str());
if ( !cmsys::SystemTools::MakeDirectory(tempInstallDirectory.c_str())) if ( !cmsys::SystemTools::MakeDirectory(
tempInstallDirectory.c_str()))
{ {
cmCPackLogger(cmCPackLog::LOG_ERROR, cmCPackLogger(cmCPackLog::LOG_ERROR,
"Problem creating temporary directory: " "Problem creating temporary directory: "
@ -681,9 +700,11 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
} }
cmCPackLogger(cmCPackLog::LOG_DEBUG, cmCPackLogger(cmCPackLog::LOG_DEBUG,
"- Using non-DESTDIR install... (mf->AddDefinition)" << std::endl); "- Using non-DESTDIR install... (mf->AddDefinition)"
<< std::endl);
cmCPackLogger(cmCPackLog::LOG_DEBUG, cmCPackLogger(cmCPackLog::LOG_DEBUG,
"- Setting CMAKE_INSTALL_PREFIX to '" << tempInstallDirectory "- Setting CMAKE_INSTALL_PREFIX to '"
<< tempInstallDirectory
<< "'" << std::endl); << "'" << std::endl);
} }
@ -770,7 +791,8 @@ int cmCPackGenerator::DoPackage()
= this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
if ( cmSystemTools::FileExists(toplevelDirectory) ) if ( cmSystemTools::FileExists(toplevelDirectory) )
{ {
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Remove toplevel directory: " cmCPackLogger(cmCPackLog::LOG_VERBOSE,
"Remove toplevel directory: "
<< toplevelDirectory << std::endl); << toplevelDirectory << std::endl);
if ( !cmSystemTools::RemoveADirectory(toplevelDirectory) ) if ( !cmSystemTools::RemoveADirectory(toplevelDirectory) )
{ {
@ -1077,7 +1099,8 @@ bool cmCPackGenerator::SupportsComponentInstallation() const
//---------------------------------------------------------------------- //----------------------------------------------------------------------
cmCPackInstallationType* cmCPackInstallationType*
cmCPackGenerator::GetInstallationType(const char *projectName, const char *name) cmCPackGenerator::GetInstallationType(const char *projectName,
const char *name)
{ {
(void) projectName; (void) projectName;
bool hasInstallationType = this->InstallationTypes.count(name) != 0; bool hasInstallationType = this->InstallationTypes.count(name) != 0;
@ -1138,7 +1161,8 @@ cmCPackGenerator::GetComponent(const char *projectName, const char *name)
= this->IsSet((macroPrefix + "_DOWNLOADED").c_str()) = this->IsSet((macroPrefix + "_DOWNLOADED").c_str())
|| cmSystemTools::IsOn(this->GetOption("CPACK_DOWNLOAD_ALL")); || cmSystemTools::IsOn(this->GetOption("CPACK_DOWNLOAD_ALL"));
const char* archiveFile = this->GetOption((macroPrefix + "_ARCHIVE_FILE").c_str()); const char* archiveFile = this->GetOption((macroPrefix +
"_ARCHIVE_FILE").c_str());
if (archiveFile && *archiveFile) if (archiveFile && *archiveFile)
{ {
component->ArchiveFile = archiveFile; component->ArchiveFile = archiveFile;
@ -1190,7 +1214,8 @@ cmCPackGenerator::GetComponent(const char *projectName, const char *name)
dependIt != dependsVector.end(); dependIt != dependsVector.end();
++dependIt) ++dependIt)
{ {
cmCPackComponent *child = GetComponent(projectName, dependIt->c_str()); cmCPackComponent *child = GetComponent(projectName,
dependIt->c_str());
component->Dependencies.push_back(child); component->Dependencies.push_back(child);
child->ReverseDependencies.push_back(component); child->ReverseDependencies.push_back(component);
} }

@ -3,8 +3,8 @@
Program: CMake - Cross-Platform Makefile Generator Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile: cmCPackGenerator.h,v $ Module: $RCSfile: cmCPackGenerator.h,v $
Language: C++ Language: C++
Date: $Date: 2008-09-24 14:07:50 $ Date: $Date: 2008-10-24 15:18:55 $
Version: $Revision: 1.2.2.3 $ Version: $Revision: 1.2.2.4 $
Copyright (c) 2002 Kitware, Inc. All rights reserved. Copyright (c) 2002 Kitware, Inc. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
@ -127,9 +127,12 @@ protected:
bool setDestDir, const char* tempInstallDirectory); bool setDestDir, const char* tempInstallDirectory);
virtual bool SupportsComponentInstallation() const; virtual bool SupportsComponentInstallation() const;
virtual cmCPackInstallationType* GetInstallationType(const char *projectName, const char* name); virtual cmCPackInstallationType* GetInstallationType(const char *projectName,
virtual cmCPackComponent* GetComponent(const char *projectName, const char* name); const char* name);
virtual cmCPackComponentGroup* GetComponentGroup(const char *projectName, const char* name); virtual cmCPackComponent* GetComponent(const char *projectName,
const char* name);
virtual cmCPackComponentGroup* GetComponentGroup(const char *projectName,
const char* name);
bool GeneratorVerbose; bool GeneratorVerbose;
std::string Name; std::string Name;

@ -3,8 +3,8 @@
Program: CMake - Cross-Platform Makefile Generator Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile: cmCPackGeneratorFactory.cxx,v $ Module: $RCSfile: cmCPackGeneratorFactory.cxx,v $
Language: C++ Language: C++
Date: $Date: 2008-06-25 13:51:39 $ Date: $Date: 2009-02-04 16:44:18 $
Version: $Revision: 1.2.2.1 $ Version: $Revision: 1.2.2.2 $
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
@ -25,6 +25,7 @@
#include "cmCPackSTGZGenerator.h" #include "cmCPackSTGZGenerator.h"
#include "cmCPackNSISGenerator.h" #include "cmCPackNSISGenerator.h"
#ifdef __APPLE__ #ifdef __APPLE__
# include "cmCPackDragNDropGenerator.h"
# include "cmCPackBundleGenerator.h" # include "cmCPackBundleGenerator.h"
# include "cmCPackPackageMakerGenerator.h" # include "cmCPackPackageMakerGenerator.h"
# include "cmCPackOSXX11Generator.h" # include "cmCPackOSXX11Generator.h"
@ -67,6 +68,8 @@ cmCPackGeneratorFactory::cmCPackGeneratorFactory()
this->RegisterGenerator("TZ", "Tar Compress compression", this->RegisterGenerator("TZ", "Tar Compress compression",
cmCPackTarCompressGenerator::CreateGenerator); cmCPackTarCompressGenerator::CreateGenerator);
#ifdef __APPLE__ #ifdef __APPLE__
this->RegisterGenerator("DragNDrop", "Mac OSX Drag And Drop",
cmCPackDragNDropGenerator::CreateGenerator);
this->RegisterGenerator("Bundle", "Mac OSX bundle", this->RegisterGenerator("Bundle", "Mac OSX bundle",
cmCPackBundleGenerator::CreateGenerator); cmCPackBundleGenerator::CreateGenerator);
this->RegisterGenerator("PackageMaker", "Mac OSX Package Maker installer", this->RegisterGenerator("PackageMaker", "Mac OSX Package Maker installer",

@ -3,8 +3,8 @@
Program: CMake - Cross-Platform Makefile Generator Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile: cmCPackLog.cxx,v $ Module: $RCSfile: cmCPackLog.cxx,v $
Language: C++ Language: C++
Date: $Date: 2006-03-10 18:06:26 $ Date: $Date: 2009-02-04 16:44:18 $
Version: $Revision: 1.7 $ Version: $Revision: 1.7.12.1 $
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
@ -18,6 +18,7 @@
#include "cmCPackLog.h" #include "cmCPackLog.h"
#include "cmGeneratedFileStream.h" #include "cmGeneratedFileStream.h"
#include "cmSystemTools.h"
//---------------------------------------------------------------------- //----------------------------------------------------------------------
cmCPackLog::cmCPackLog() cmCPackLog::cmCPackLog()
@ -221,4 +222,9 @@ void cmCPackLog::Log(int tag, const char* file, int line,
{ {
this->NewLine = true; this->NewLine = true;
} }
if ( error )
{
cmSystemTools::SetErrorOccured();
}
} }

@ -3,8 +3,8 @@
Program: CMake - Cross-Platform Makefile Generator Program: CMake - Cross-Platform Makefile Generator
Module: $RCSfile: cmCPackNSISGenerator.cxx,v $ Module: $RCSfile: cmCPackNSISGenerator.cxx,v $
Language: C++ Language: C++
Date: $Date: 2008-07-13 21:55:24 $ Date: $Date: 2009-02-04 16:44:18 $
Version: $Revision: 1.31.2.2 $ Version: $Revision: 1.31.2.4 $
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
@ -111,7 +111,8 @@ int cmCPackNSISGenerator::CompressFiles(const char* outFileName,
std::string::size_type slash = fileN.find('/'); std::string::size_type slash = fileN.find('/');
if (slash != std::string::npos) if (slash != std::string::npos)
{ {
// If this is a component installation, determine which component it is. // If this is a component installation, determine which component it
// is.
componentName = fileN.substr(0, slash); componentName = fileN.substr(0, slash);
// Strip off the component part of the path. // Strip off the component part of the path.
@ -284,12 +285,17 @@ int cmCPackNSISGenerator::CompressFiles(const char* outFileName,
} }
} }
this->SetOptionIfNotSet("CPACK_NSIS_INSTALLATION_TYPES", installTypesCode.c_str()); this->SetOptionIfNotSet("CPACK_NSIS_INSTALLATION_TYPES",
this->SetOptionIfNotSet("CPACK_NSIS_PAGE_COMPONENTS", "!insertmacro MUI_PAGE_COMPONENTS"); installTypesCode.c_str());
this->SetOptionIfNotSet("CPACK_NSIS_PAGE_COMPONENTS",
"!insertmacro MUI_PAGE_COMPONENTS");
this->SetOptionIfNotSet("CPACK_NSIS_FULL_INSTALL", ""); this->SetOptionIfNotSet("CPACK_NSIS_FULL_INSTALL", "");
this->SetOptionIfNotSet("CPACK_NSIS_COMPONENT_SECTIONS", componentCode.c_str()); this->SetOptionIfNotSet("CPACK_NSIS_COMPONENT_SECTIONS",
this->SetOptionIfNotSet("CPACK_NSIS_COMPONENT_SECTION_LIST", sectionList.c_str()); componentCode.c_str());
this->SetOptionIfNotSet("CPACK_NSIS_SECTION_SELECTED_VARS", selectedVarsList.c_str()); this->SetOptionIfNotSet("CPACK_NSIS_COMPONENT_SECTION_LIST",
sectionList.c_str());
this->SetOptionIfNotSet("CPACK_NSIS_SECTION_SELECTED_VARS",
selectedVarsList.c_str());
this->SetOption("CPACK_NSIS_DEFINES", defines.c_str()); this->SetOption("CPACK_NSIS_DEFINES", defines.c_str());
} }
@ -342,13 +348,17 @@ int cmCPackNSISGenerator::InitializeInternal()
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath, "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath,
cmsys::SystemTools::KeyWOW64_32) ) cmsys::SystemTools::KeyWOW64_32) )
{ {
cmCPackLogger if ( !cmsys::SystemTools::ReadRegistryValue(
(cmCPackLog::LOG_ERROR, "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath) )
"Cannot find NSIS registry value. This is usually caused by NSIS " {
"not being installed. Please install NSIS from " cmCPackLogger
"http://nsis.sourceforge.net" (cmCPackLog::LOG_ERROR,
<< std::endl); "Cannot find NSIS registry value. This is usually caused by NSIS "
return 0; "not being installed. Please install NSIS from "
"http://nsis.sourceforge.net"
<< std::endl);
return 0;
}
} }
path.push_back(nsisPath); path.push_back(nsisPath);
#endif #endif
@ -590,7 +600,8 @@ bool cmCPackNSISGenerator::SupportsComponentInstallation() const
//---------------------------------------------------------------------- //----------------------------------------------------------------------
std::string std::string
cmCPackNSISGenerator:: cmCPackNSISGenerator::
CreateComponentDescription(cmCPackComponent *component, cmOStringStream& macrosOut) CreateComponentDescription(cmCPackComponent *component,
cmOStringStream& macrosOut)
{ {
// Basic description of the component // Basic description of the component
std::string componentCode = "Section "; std::string componentCode = "Section ";
@ -640,7 +651,8 @@ CreateComponentDescription(cmCPackComponent *component, cmOStringStream& macrosO
} }
// Create the directory for the upload area // Create the directory for the upload area
const char* userUploadDirectory = this->GetOption("CPACK_UPLOAD_DIRECTORY"); const char* userUploadDirectory =
this->GetOption("CPACK_UPLOAD_DIRECTORY");
std::string uploadDirectory; std::string uploadDirectory;
if (userUploadDirectory && *userUploadDirectory) if (userUploadDirectory && *userUploadDirectory)
{ {
@ -770,7 +782,8 @@ CreateComponentDescription(cmCPackComponent *component, cmOStringStream& macrosO
} }
else else
{ {
componentCode += " File /r \"${INST_DIR}\\" + component->Name + "\\*.*\"\n"; componentCode += " File /r \"${INST_DIR}\\" +
component->Name + "\\*.*\"\n";
} }
componentCode += " noinstall_" + component->Name + ":\n"; componentCode += " noinstall_" + component->Name + ":\n";
componentCode += "SectionEnd\n"; componentCode += "SectionEnd\n";
@ -780,20 +793,25 @@ CreateComponentDescription(cmCPackComponent *component, cmOStringStream& macrosO
macrosOut << " IntCmp $" << component->Name << "_was_installed 0 noremove_" macrosOut << " IntCmp $" << component->Name << "_was_installed 0 noremove_"
<< component->Name << "\n"; << component->Name << "\n";
std::vector<std::string>::iterator pathIt; std::vector<std::string>::iterator pathIt;
for (pathIt = component->Files.begin(); std::string path;
pathIt != component->Files.end(); for (pathIt = component->Files.begin();
++pathIt) pathIt != component->Files.end();
{ ++pathIt)
macrosOut << " Delete \"$INSTDIR\\" {
<< cmSystemTools::ConvertToWindowsOutputPath(pathIt->c_str()) path = *pathIt;
cmSystemTools::ReplaceString(path, "/", "\\");
macrosOut << " Delete \"$INSTDIR\\"
<< path.c_str()
<< "\"\n"; << "\"\n";
} }
for (pathIt = component->Directories.begin(); for (pathIt = component->Directories.begin();
pathIt != component->Directories.end(); pathIt != component->Directories.end();
++pathIt) ++pathIt)
{ {
macrosOut << " RMDir \"$INSTDIR\\" path = *pathIt;
<< cmSystemTools::ConvertToWindowsOutputPath(pathIt->c_str()) cmSystemTools::ReplaceString(path, "/", "\\");
macrosOut << " RMDir \"$INSTDIR\\"
<< path.c_str()
<< "\"\n"; << "\"\n";
} }
macrosOut << " noremove_" << component->Name << ":\n"; macrosOut << " noremove_" << component->Name << ":\n";
@ -837,7 +855,8 @@ std::string cmCPackNSISGenerator::CreateSelectionDependenciesDescription
out << " SectionGetFlags ${" << (*dependIt)->Name << "} $0\n"; out << " SectionGetFlags ${" << (*dependIt)->Name << "} $0\n";
out << " IntOp $0 $0 | ${SF_SELECTED}\n"; out << " IntOp $0 $0 | ${SF_SELECTED}\n";
out << " SectionSetFlags ${" << (*dependIt)->Name << "} $0\n"; out << " SectionSetFlags ${" << (*dependIt)->Name << "} $0\n";
out << " IntOp $" << (*dependIt)->Name << "_selected 0 + ${SF_SELECTED}\n"; out << " IntOp $" << (*dependIt)->Name
<< "_selected 0 + ${SF_SELECTED}\n";
// Recurse // Recurse
out << CreateSelectionDependenciesDescription(*dependIt, visited).c_str(); out << CreateSelectionDependenciesDescription(*dependIt, visited).c_str();
} }
@ -872,7 +891,8 @@ std::string cmCPackNSISGenerator::CreateDeselectionDependenciesDescription
out << " IntOp $" << (*dependIt)->Name << "_selected 0 + 0\n"; out << " IntOp $" << (*dependIt)->Name << "_selected 0 + 0\n";
// Recurse // Recurse
out << CreateDeselectionDependenciesDescription(*dependIt, visited).c_str(); out <<
CreateDeselectionDependenciesDescription(*dependIt, visited).c_str();
} }
return out.str(); return out.str();

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save