Commit 00230147 authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: move changes from main tree

parent 883c96ba
......@@ -71,27 +71,116 @@ SET(KWSYS_HEADER_ROOT ${CMake_BINARY_DIR}/Source)
SUBDIRS(Source/kwsys)
#-----------------------------------------------------------------------------
# Build zlib library for Curl, CMake, and CTest.
SUBDIRS(Utilities/cmzlib)
SET(CMAKE_ZLIB_INCLUDES
"${CMAKE_CURRENT_BINARY_DIR}/Utilities"
# Setup third-party libraries.
# Everything in the tree should be able to include files from the
# Utilities directory.
INCLUDE_DIRECTORIES(
${CMake_SOURCE_DIR}/Utilities
${CMake_BINARY_DIR}/Utilities
)
SET(CMAKE_ZLIB_LIBRARIES "cmzlib")
SET(CURL_SPECIAL_LIBZ ${CMAKE_ZLIB_LIBRARIES})
SET(CURL_SPECIAL_LIBZ_INCLUDES ${CMAKE_ZLIB_INCLUDES})
SET(CURL_SPECIAL_ZLIB_H "cmzlib/zlib.h")
# Third party libraries must be something that can be found.
IF(EXISTS ${CMAKE_ROOT}/Modules/FindXMLRPC.cmake)
SET(CMAKE_ALLOW_SYSTEM_LIBRARIES 1)
ELSE(EXISTS ${CMAKE_ROOT}/Modules/FindXMLRPC.cmake)
SET(CMAKE_ALLOW_SYSTEM_LIBRARIES 0)
ENDIF(EXISTS ${CMAKE_ROOT}/Modules/FindXMLRPC.cmake)
IF(CMAKE_ALLOW_SYSTEM_LIBRARIES)
# Options have dependencies.
INCLUDE(CMakeDependentOption)
# Allow the user to enable/disable all system utility library options
# by setting CMAKE_USE_SYSTEM_LIBRARIES on the command line.
IF(DEFINED CMAKE_USE_SYSTEM_LIBRARIES)
SET(CMAKE_USE_SYSTEM_LIBRARIES_USER 1)
ENDIF(DEFINED CMAKE_USE_SYSTEM_LIBRARIES)
IF(CMAKE_USE_SYSTEM_LIBRARIES)
SET(CMAKE_USE_SYSTEM_LIBRARIES ON)
ELSE(CMAKE_USE_SYSTEM_LIBRARIES)
SET(CMAKE_USE_SYSTEM_LIBRARIES OFF)
ENDIF(CMAKE_USE_SYSTEM_LIBRARIES)
IF(CMAKE_USE_SYSTEM_LIBRARIES_USER)
SET(CMAKE_USE_SYSTEM_CURL "${CMAKE_USE_SYSTEM_LIBRARIES}" CACHE BOOL "Use system-installed curl" FORCE)
SET(CMAKE_USE_SYSTEM_EXPAT "${CMAKE_USE_SYSTEM_LIBRARIES}" CACHE BOOL "Use system-installed expat" FORCE)
SET(CMAKE_USE_SYSTEM_XMLRPC "${CMAKE_USE_SYSTEM_LIBRARIES}" CACHE BOOL "Use system-installed xmlrpc" FORCE)
SET(CMAKE_USE_SYSTEM_ZLIB "${CMAKE_USE_SYSTEM_LIBRARIES}" CACHE BOOL "Use system-installed zlib" FORCE)
ENDIF(CMAKE_USE_SYSTEM_LIBRARIES_USER)
# Optionally use system utility libraries.
OPTION(CMAKE_USE_SYSTEM_CURL "Use system-installed curl" ${CMAKE_USE_SYSTEM_LIBRARIES})
OPTION(CMAKE_USE_SYSTEM_XMLRPC "Use system-installed xmlrpc" ${CMAKE_USE_SYSTEM_LIBRARIES})
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_EXPAT "Use system-installed expat"
${CMAKE_USE_SYSTEM_LIBRARIES} "NOT CMAKE_USE_SYSTEM_XMLRPC" ON)
CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_ZLIB "Use system-installed zlib"
${CMAKE_USE_SYSTEM_LIBRARIES} "NOT CMAKE_USE_SYSTEM_CURL" ON)
# There is currently no option for system tar because the upstream
# libtar does not have our modifications to allow reentrant
# object-oriented use of the library.
# OPTION(CMAKE_USE_SYSTEM_TAR "Use system-installed tar" OFF)
ELSE(CMAKE_ALLOW_SYSTEM_LIBRARIES)
SET(CMAKE_USE_SYSTEM_CURL 0)
SET(CMAKE_USE_SYSTEM_EXPAT 0)
SET(CMAKE_USE_SYSTEM_XMLRPC 0)
SET(CMAKE_USE_SYSTEM_ZLIB 0)
ENDIF(CMAKE_ALLOW_SYSTEM_LIBRARIES)
# Inform utility library header wrappers whether to use system versions.
CONFIGURE_FILE(${CMake_SOURCE_DIR}/Utilities/cmThirdParty.h.in
${CMake_BINARY_DIR}/Utilities/cmThirdParty.h
@ONLY IMMEDIATE)
# Mention to the user what system libraries are being used.
FOREACH(util CURL EXPAT XMLRPC ZLIB)
IF(CMAKE_USE_SYSTEM_${util})
MESSAGE(STATUS "Using system-installed ${util}")
ENDIF(CMAKE_USE_SYSTEM_${util})
ENDFOREACH(util)
#-----------------------------------------------------------------------------
# Build zlib library for Curl, CMake, and CTest.
SET(CMAKE_ZLIB_HEADER "cm_zlib.h")
IF(CMAKE_USE_SYSTEM_ZLIB)
FIND_PACKAGE(ZLIB)
IF(NOT ZLIB_FOUND)
MESSAGE(FATAL_ERROR "CMAKE_USE_SYSTEM_ZLIB is ON but a zlib is not found!")
ENDIF(NOT ZLIB_FOUND)
SET(CMAKE_ZLIB_INCLUDES ${ZLIB_INCLUDE_DIR})
SET(CMAKE_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
ELSE(CMAKE_USE_SYSTEM_ZLIB)
SUBDIRS(Utilities/cmzlib)
SET(CMAKE_ZLIB_INCLUDES)
SET(CMAKE_ZLIB_LIBRARIES cmzlib)
ENDIF(CMAKE_USE_SYSTEM_ZLIB)
#-----------------------------------------------------------------------------
# Build Curl library for CTest.
SUBDIRS(Utilities/cmcurl)
SET(CMAKE_CURL_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/Utilities")
SET(CMAKE_CURL_LIBRARIES "cmcurl")
IF(CMAKE_USE_SYSTEM_CURL)
FIND_PACKAGE(CURL)
IF(NOT CURL_FOUND)
MESSAGE(FATAL_ERROR "CMAKE_USE_SYSTEM_CURL is ON but a curl is not found!")
ENDIF(NOT CURL_FOUND)
SET(CMAKE_CURL_INCLUDES ${CURL_INCLUDE_DIRS})
SET(CMAKE_CURL_LIBRARIES ${CURL_LIBRARIES})
ELSE(CMAKE_USE_SYSTEM_CURL)
SET(CURL_SPECIAL_ZLIB_H ${CMAKE_ZLIB_HEADER})
SET(CURL_SPECIAL_LIBZ_INCLUDES ${CMAKE_ZLIB_INCLUDES})
SET(CURL_SPECIAL_LIBZ ${CMAKE_ZLIB_LIBRARIES})
SUBDIRS(Utilities/cmcurl)
SET(CMAKE_CURL_INCLUDES)
SET(CMAKE_CURL_LIBRARIES cmcurl)
ENDIF(CMAKE_USE_SYSTEM_CURL)
#-----------------------------------------------------------------------------
# Build Tar library for CTest.
SET(CMTAR_ZLIB_HEADER ${CMAKE_ZLIB_HEADER})
SET(CMTAR_ZLIB_LIBRARIES ${CMAKE_ZLIB_LIBRARIES})
SET(CMTAR_ZLIB_INCLUDE_DIRS ${CMAKE_ZLIB_INCLUDES})
SUBDIRS(Utilities/cmtar)
SET(CMAKE_TAR_INCLUDES "${CMAKE_CURRENT_BINARY_DIR}/Utilities/cmtar")
SET(CMAKE_TAR_LIBRARIES "cmtar")
SET(CMAKE_TAR_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/Utilities/cmtar)
SET(CMAKE_TAR_LIBRARIES cmtar)
#-----------------------------------------------------------------------------
# Build Compress library for CTest.
......@@ -101,19 +190,33 @@ SET(CMAKE_COMPRESS_LIBRARIES "cmcompress")
#-----------------------------------------------------------------------------
# Build expat library for CMake and CTest.
SUBDIRS(Utilities/cmexpat)
SET(CMAKE_EXPAT_INCLUDES
"${CMAKE_CURRENT_BINARY_DIR}/Utilities"
"${CMAKE_CURRENT_BINARY_DIR}/Utilities/cmexpat"
)
SET(CMAKE_EXPAT_LIBRARIES "cmexpat")
SUBDIRS(Utilities/cmxmlrpc)
SET(CMAKE_XMLRPC_INCLUDES
"${CMAKE_CURRENT_SOURCE_DIR}/Utilities/cmxmlrpc"
"${CMAKE_CURRENT_BINARY_DIR}/Utilities/cmxmlrpc"
)
SET(CMAKE_XMLRPC_LIBRARIES "cmXMLRPC")
IF(CMAKE_USE_SYSTEM_EXPAT)
FIND_PACKAGE(EXPAT)
IF(NOT EXPAT_FOUND)
MESSAGE(FATAL_ERROR
"CMAKE_USE_SYSTEM_EXPAT is ON but a expat is not found!")
ENDIF(NOT EXPAT_FOUND)
SET(CMAKE_EXPAT_INCLUDES ${EXPAT_INCLUDE_DIRS})
SET(CMAKE_EXPAT_LIBRARIES ${EXPAT_LIBRARIES})
ELSE(CMAKE_USE_SYSTEM_EXPAT)
SUBDIRS(Utilities/cmexpat)
SET(CMAKE_EXPAT_INCLUDES)
SET(CMAKE_EXPAT_LIBRARIES cmexpat)
ENDIF(CMAKE_USE_SYSTEM_EXPAT)
IF(CMAKE_USE_SYSTEM_XMLRPC)
FIND_PACKAGE(XMLRPC QUIET REQUIRED libwww-client)
IF(NOT XMLRPC_FOUND)
MESSAGE(FATAL_ERROR
"CMAKE_USE_SYSTEM_XMLRPC is ON but a xmlrpc is not found!")
ENDIF(NOT XMLRPC_FOUND)
SET(CMAKE_XMLRPC_INCLUDES ${XMLRPC_INCLUDE_DIRS})
SET(CMAKE_XMLRPC_LIBRARIES ${XMLRPC_LIBRARIES})
ELSE(CMAKE_USE_SYSTEM_XMLRPC)
SUBDIRS(Utilities/cmxmlrpc)
SET(CMAKE_XMLRPC_INCLUDES)
SET(CMAKE_XMLRPC_LIBRARIES cmXMLRPC)
ENDIF(CMAKE_USE_SYSTEM_XMLRPC)
IF (UNIX)
FIND_PACKAGE(Curses QUIET)
......
......@@ -10,14 +10,14 @@ SET(CTEST_CUSTOM_WARNING_EXCEPTION
"libcmcurl.*has no symbols"
"not sorted slower link editing will result"
"stl_deque.h:479"
"Utilities/cmzlib/"
"Utilities/cmxmlrpc/"
"Source/CTest/Curl"
"Utilities/cmcurl"
"Source/CursesDialog/form"
"Utilities.cmzlib."
"Utilities.cmxmlrpc."
"Source.CTest.Curl"
"Utilities.cmcurl"
"Source.CursesDialog.form"
"/usr/bin/ld.*warning.*-..*directory.name.*bin.*does not exist"
"Redeclaration of .send..... with a different storage class specifier"
"Utilities/cmexpat/"
"Utilities.cmexpat."
"is not used for resolving any symbol"
"Clock skew detected"
"remark\\(1209"
......
......@@ -107,6 +107,52 @@ Changes in CMake 2.4.4
* better message if bogus generator is specified.
* Better FindJava and FindJNI
* Fix doxygen.config for CMake
* add CPACK_MODULE_PATH
* Fix configuration for ctest dashboard targets Experimental, Nightly, etc
* Fix FindDoxygen for mac and app-bundles
* Fix CPack simple install test with NSIS
* Allow EXECUTE_PROCESS to strip trailing white space
* Fix mingw echo in makefiles
* Fix Xcode to not mess up -gdwarf-2
* Fix crash when "linking" to custom targets.
* Allow HEADER_FILE_ONLY to not compile the file in VS 7 and 8
* Fix mingw out of binary with spaces in the path.
* Fix for sudo make install (partial)
* Allow installed zlib, curl, expat, xmlrpc to be used.
* Add CMakeDependentOption.cmake module
* Allow projects to set install prefix default
* improved Find/Use wxWidgets
* add support for windows dll version numbers
* Fix message for -G when generator does not exist
* Fix html references in help
* Fix version on .exe cygwin
* allow global timeout in ctest
* Fix some odd cases with custom commands in VS 6
Changes in CMake 2.4.3
* fix for 3557 - Under MSVC8 hardcoded TargetEnvironment for MIDL Compiler
......
# - Macro to provide an option dependent on other options.
# This macro presents an option to the user only if a set of other
# conditions are true. When the option is not presented a default
# value is used, but any value set by the user is preserved for when
# the option is presented again.
# Example invocation:
# CMAKE_DEPENDENT_OPTION(USE_FOO "Use Foo" ON
# "USE_BAR;NOT USE_ZOT" OFF)
# If USE_BAR is true and USE_ZOT is false, this provides an option called
# USE_FOO that defaults to ON. Otherwise, it sets USE_FOO to OFF. If
# the status of USE_BAR or USE_ZOT ever changes, any value for the
# USE_FOO option is saved so that when the option is re-enabled it
# retains its old value.
MACRO(CMAKE_DEPENDENT_OPTION option doc default depends force)
IF(${option}_ISSET MATCHES "^${option}_ISSET$")
SET(${option}_AVAILABLE 1)
FOREACH(d ${depends})
STRING(REGEX REPLACE " +" ";" CMAKE_DEPENDENT_OPTION_DEP "${d}")
IF(${CMAKE_DEPENDENT_OPTION_DEP})
ELSE(${CMAKE_DEPENDENT_OPTION_DEP})
SET(${option}_AVAILABLE 0)
ENDIF(${CMAKE_DEPENDENT_OPTION_DEP})
ENDFOREACH(d)
IF(${option}_AVAILABLE)
OPTION(${option} "${doc}" "${default}")
SET(${option} "${${option}}" CACHE BOOL "${doc}" FORCE)
ELSE(${option}_AVAILABLE)
IF(${option} MATCHES "^${option}$")
ELSE(${option} MATCHES "^${option}$")
SET(${option} "${${option}}" CACHE INTERNAL "${doc}")
ENDIF(${option} MATCHES "^${option}$")
SET(${option} ${force})
ENDIF(${option}_AVAILABLE)
ELSE(${option}_ISSET MATCHES "^${option}_ISSET$")
SET(${option} "${${option}_ISSET}")
ENDIF(${option}_ISSET MATCHES "^${option}_ISSET$")
ENDMACRO(CMAKE_DEPENDENT_OPTION)
......@@ -41,6 +41,14 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles")
MARK_AS_ADVANCED(CMAKE_COLOR_MAKEFILE)
ENDIF(CMAKE_GENERATOR MATCHES "Makefiles")
# Set a variable to indicate whether the value of CMAKE_INSTALL_PREFIX
# was initialized by the block below. This is useful for user
# projects to change the default prefix while still allowing the
# command line to override it.
IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
SET(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 1)
ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
# Choose a default install prefix for this platform.
IF(UNIX)
SET(CMAKE_INSTALL_PREFIX "/usr/local"
......
......@@ -56,6 +56,8 @@ cpack_set_if_not_set(CPACK_RESOURCE_FILE_README
cpack_set_if_not_set(CPACK_RESOURCE_FILE_WELCOME
"${CMAKE_ROOT}/Templates/CPack.GenericWelcome.txt")
cpack_set_if_not_set(CPACK_MODULE_PATH "${CMAKE_MODULE_PATH}")
IF(CPACK_NSIS_MODIFY_PATH)
SET(CPACK_NSIS_MODIFY_PATH ON)
ENDIF(CPACK_NSIS_MODIFY_PATH)
......
......@@ -29,16 +29,22 @@ ENDIF(CTEST_NEW_FORMAT)
# These should NOT need to be modified from project to project.
#
SET(__conf_types "")
IF(CMAKE_CONFIGURATION_TYPES)
# We need to pass the configuration type on the test command line.
SET(__conf_types -C "${CMAKE_CFG_INTDIR}")
ENDIF(CMAKE_CONFIGURATION_TYPES)
# add testing targets
IF(${CMAKE_MAKE_PROGRAM} MATCHES make)
FOREACH(mode Experimental Nightly Continuous NightlyMemoryCheck)
ADD_CUSTOM_TARGET(${mode} ${CMAKE_CTEST_COMMAND} -D ${mode})
ADD_CUSTOM_TARGET(${mode} ${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode})
ENDFOREACH(mode)
ELSE(${CMAKE_MAKE_PROGRAM} MATCHES make)
# for IDE only add them once for nested projects
IF (NOT DART_COMMON_TARGETS_ADDED)
FOREACH(mode Experimental Nightly Continuous NightlyMemoryCheck)
ADD_CUSTOM_TARGET(${mode} ${CMAKE_CTEST_COMMAND} -D ${mode})
ADD_CUSTOM_TARGET(${mode} ${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode})
ENDFOREACH(mode)
SET (DART_COMMON_TARGETS_ADDED 1)
ENDIF (NOT DART_COMMON_TARGETS_ADDED)
......@@ -53,7 +59,7 @@ IF(${CMAKE_MAKE_PROGRAM} MATCHES make)
FOREACH(testtype Start Update Configure Build Test Coverage MemCheck Submit)
# missing purify
ADD_CUSTOM_TARGET(${mode}${testtype}
${CMAKE_CTEST_COMMAND} -D ${mode}${testtype})
${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode}${testtype})
ENDFOREACH(testtype)
ENDFOREACH(mode)
ENDIF (${CMAKE_MAKE_PROGRAM} MATCHES make)
......
# - Find curl
# Find the native CURL headers and libraries.
#
# CURL_INCLUDE_DIRS - where to find curl/curl.h, etc.
# CURL_LIBRARIES - List of libraries when using curl.
# CURL_FOUND - True if curl found.
# Look for the header file.
FIND_PATH(CURL_INCLUDE_DIR NAMES curl/curl.h)
MARK_AS_ADVANCED(CURL_INCLUDE_DIR)
# Look for the library.
FIND_LIBRARY(CURL_LIBRARY NAMES curl)
MARK_AS_ADVANCED(CURL_LIBRARY)
# Copy the results to the output variables.
IF(CURL_INCLUDE_DIR AND CURL_LIBRARY)
SET(CURL_FOUND 1)
SET(CURL_LIBRARIES ${CURL_LIBRARY})
SET(CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIR})
ELSE(CURL_INCLUDE_DIR AND CURL_LIBRARY)
SET(CURL_FOUND 0)
SET(CURL_LIBRARIES)
SET(CURL_INCLUDE_DIRS)
ENDIF(CURL_INCLUDE_DIR AND CURL_LIBRARY)
# Report the results.
IF(NOT CURL_FOUND)
SET(CURL_DIR_MESSAGE
"CURL was not found. Make sure CURL_LIBRARY and CURL_INCLUDE_DIR are set.")
IF(NOT CURL_FIND_QUIETLY)
MESSAGE(STATUS "${CURL_DIR_MESSAGE}")
ELSE(NOT CURL_FIND_QUIETLY)
IF(CURL_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "${CURL_DIR_MESSAGE}")
ENDIF(CURL_FIND_REQUIRED)
ENDIF(NOT CURL_FIND_QUIETLY)
ENDIF(NOT CURL_FOUND)
# - This module looks for Doxygen and the path to Graphiz'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
# With the OS X GUI version, it likes to be installed to /Applications and
# 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.
# located in MacOS. This code sets the following variables:
# DOXYGEN_EXECUTABLE = The path to the doxygen command.
# DOXYGEN_DOT_EXECUTABLE = The path to the dot program used by doxygen.
# DOXYGEN_DOT_PATH = The path to dot not including the executable
# DOXYGEN = same as DOXYGEN_EXECUTABLE for backwards compatibility
# DOT = same as DOXYGEN_DOT_EXECUTABLE for backwards compatibility
# 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")
IF (NOT DOXYGEN_FIND_QUIETLY)
MESSAGE(STATUS "Looking for doxygen...")
ENDIF (NOT DOXYGEN_FIND_QUIETLY)
......@@ -46,34 +65,31 @@ FIND_PROGRAM(DOXYGEN_DOT_EXECUTABLE
/Applications/Graphviz.app/Contents/MacOS
/Applications/Doxygen.app/Contents/Resources
/Applications/Doxygen.app/Contents/MacOS
DOC "Graphiz Dot tool for using Doxygen"
DOC "Graphviz Dot tool for using Doxygen"
)
IF (NOT DOXYGEN_FIND_QUIETLY)
IF (DOXYGEN_DOT_EXECUTABLE)
MESSAGE(STATUS "Looking for dot tool... - found ${DOXYGEN_DOT_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)
ELSE (DOXYGEN_DOT_EXECUTABLE)
MESSAGE(STATUS "Looking for dot tool... - NOT found")
ENDIF (DOXYGEN_DOT_EXECUTABLE)
ENDIF (NOT DOXYGEN_FIND_QUIETLY)
# The Doxyfile wants the path to Dot, not the entire path and executable
# so for convenience, I'll add another search for DOXYGEN_DOT_PATH.
FIND_PATH(DOXYGEN_DOT_PATH
dot
"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 "Path to the Graphviz Dot tool"
)
# Restore the old app-bundle setting setting
SET(CMAKE_FIND_APPBUNDLE ${TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE})
# Backwards compatibility for CMake4.3 and less
SET (DOXYGEN ${DOXYGEN_EXECUTABLE} )
SET (DOT ${DOXYGEN_DOT_EXECUTABLE} )
MARK_AS_ADVANCED(
DOXYGEN_FOUND,
DOXYGEN_EXECUTABLE,
DOXYGEN_DOT_FOUND,
DOXYGEN_DOT_EXECUTABLE,
DOXYGEN_DOT_PATH,
DOXYGEN_FOUND
DOXYGEN_EXECUTABLE
DOXYGEN_DOT_FOUND
DOXYGEN_DOT_EXECUTABLE
DOXYGEN_DOT_PATH
)
# - Find expat
# Find the native EXPAT headers and libraries.
#
# EXPAT_INCLUDE_DIRS - where to find expat.h, etc.
# EXPAT_LIBRARIES - List of libraries when using expat.
# EXPAT_FOUND - True if expat found.
# Look for the header file.
FIND_PATH(EXPAT_INCLUDE_DIR NAMES expat.h)
MARK_AS_ADVANCED(EXPAT_INCLUDE_DIR)
# Look for the library.
FIND_LIBRARY(EXPAT_LIBRARY NAMES expat)
MARK_AS_ADVANCED(EXPAT_LIBRARY)
# Copy the results to the output variables.
IF(EXPAT_INCLUDE_DIR AND EXPAT_LIBRARY)
SET(EXPAT_FOUND 1)
SET(EXPAT_LIBRARIES ${EXPAT_LIBRARY})
SET(EXPAT_INCLUDE_DIRS ${EXPAT_INCLUDE_DIR})
ELSE(EXPAT_INCLUDE_DIR AND EXPAT_LIBRARY)
SET(EXPAT_FOUND 0)
SET(EXPAT_LIBRARIES)
SET(EXPAT_INCLUDE_DIRS)
ENDIF(EXPAT_INCLUDE_DIR AND EXPAT_LIBRARY)
# Report the results.
IF(NOT EXPAT_FOUND)
SET(EXPAT_DIR_MESSAGE
"EXPAT was not found. Make sure EXPAT_LIBRARY and EXPAT_INCLUDE_DIR are set.")
IF(NOT EXPAT_FIND_QUIETLY)
MESSAGE(STATUS "${EXPAT_DIR_MESSAGE}")
ELSE(NOT EXPAT_FIND_QUIETLY)
IF(EXPAT_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "${EXPAT_DIR_MESSAGE}")
ENDIF(EXPAT_FIND_REQUIRED)
ENDIF(NOT EXPAT_FIND_QUIETLY)
ENDIF(NOT EXPAT_FOUND)
......@@ -17,9 +17,15 @@ SET(JAVA_AWT_LIBRARY_DIRECTORIES
/usr/local/lib
/usr/lib/java/jre/lib/i386
/usr/local/lib/java/jre/lib/i386
/usr/local/share/java/jre/lib/i386
/usr/lib/j2sdk1.4-sun/jre/lib/i386
/usr/lib/j2sdk1.5-sun/jre/lib/i386
/opt/sun-jdk-1.5.0.04/jre/lib/amd64
/usr/lib/java/jre/lib/amd64
/usr/local/lib/java/jre/lib/amd64
/usr/local/share/java/jre/lib/amd64
/usr/lib/j2sdk1.4-sun/jre/lib/amd64
/usr/lib/j2sdk1.5-sun/jre/lib/amd64
)
SET(JAVA_AWT_INCLUDE_DIRECTORIES
......@@ -30,6 +36,7 @@ SET(JAVA_AWT_INCLUDE_DIRECTORIES
/usr/local/include
/usr/lib/java/include
/usr/local/lib/java/include
/usr/local/share/java/include
/usr/lib/j2sdk1.4-sun/include
/usr/lib/j2sdk1.5-sun/include
/opt/sun-jdk-1.5.0.04/include
......@@ -53,26 +60,20 @@ FOREACH(JAVA_PROG "${JAVA_RUNTIME}" "${JAVA_COMPILE}" "${JAVA_ARCHIVE}")
ENDFOREACH(JAVA_PROG)
IF(APPLE)
IF(EXISTS ~/Library/Frameworks/JavaEmbedding.framework)
IF(EXISTS ~/Library/Frameworks/JavaVM.framework)
SET(JAVA_HAVE_FRAMEWORK 1)
ENDIF(EXISTS ~/Library/Frameworks/JavaEmbedding.framework)
IF(EXISTS /Library/Frameworks/JavaEmbedding.framework)
ENDIF(EXISTS ~/Library/Frameworks/JavaVM.framework)
IF(EXISTS /Library/Frameworks/JavaVM.framework)
SET(JAVA_HAVE_FRAMEWORK 1)
ENDIF(EXISTS /Library/Frameworks/JavaEmbedding.framework)
IF(EXISTS /System/Library/Frameworks/JavaEmbedding.framework)
SET(JAVA_HAVE_FRAMEWORK 1)
ENDIF(EXISTS /System/Library/Frameworks/JavaEmbedding.framework)
ENDIF(EXISTS /Library/Frameworks/JavaVM.framework)
IF(JAVA_HAVE_FRAMEWORK)
IF(NOT JAVA_AWT_LIBRARY)
SET (JAVA_AWT_LIBRARY "-framework JavaVM -framework JavaEmbedding" CACHE FILEPATH "Java Frameworks" FORCE)
SET (JAVA_AWT_LIBRARY "-framework JavaVM" CACHE FILEPATH "Java Frameworks" FORCE)
ENDIF(NOT JAVA_AWT_LIBRARY)
SET(JAVA_AWT_INCLUDE_DIRECTORIES ${JAVA_AWT_INCLUDE_DIRECTORIES}
~/Library/Frameworks/JavaVM.framework/Headers
/Library/Frameworks/JavaVM.framework/Headers
/System/Library/Frameworks/JavaVM.framework/Headers
~/Library/Frameworks/JavaEmbedding.framework/Headers
/Library/Frameworks/JavaEmbedding.framework/Headers
/System/Library/Frameworks/JavaEmbedding.framework/Headers
)
ENDIF(JAVA_HAVE_FRAMEWORK)
ELSE(APPLE)
......
......@@ -22,6 +22,7 @@ SET(JAVA_BIN_PATH
/usr/share/java/bin
/usr/local/bin
/usr/local/java/bin
/usr/local/java/share/bin
/usr/java/j2sdk1.4.2_04
/usr/lib/j2sdk1.4-sun/bin
/usr/java/j2sdk1.4.2_09/bin
......
......@@ -83,16 +83,22 @@ SET(KDE3_DEFINITIONS -DQT_CLEAN_NAMESPACE -D_GNU_SOURCE)
#only on linux, but NOT e.g. on FreeBSD:
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
SET (KDE3_DEFINITIONS ${KDE3_DEFINITIONS} -D_XOPEN_SOURCE=500 -D_BSD_SOURCE)
SET ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 -Wformat-security -Wmissing-format-attribute -fno-common")
SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 -Wformat-security -fno-exceptions -fno-check-new -fno-common")
SET ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common")
SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -fno-exceptions -fno-check-new -fno-common")
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
# works on FreeBSD, NOT tested on NetBSD and OpenBSD
IF (CMAKE_SYSTEM_NAME MATCHES BSD)
SET ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 -Wformat-security -Wmissing-format-attribute -fno-common")
SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common")
SET ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common")
SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common")
ENDIF (CMAKE_SYSTEM_NAME MATCHES BSD)
# if no special buildtype is selected, add -O2 as default optimization
IF (NOT CMAKE_BUILD_TYPE)
SET ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
ENDIF (NOT CMAKE_BUILD_TYPE)
#SET(CMAKE_SHARED_LINKER_FLAGS "-avoid-version -module -Wl,--no-undefined -Wl,--allow-shlib-undefined")
#SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings -avoid-version -Wl,--no-undefined -lc")
......
......@@ -27,3 +27,7 @@ ELSE (NOT PERL_EXECUTABLE)
SET (PERL ${PERL_EXECUTABLE})
ENDIF (NOT PERL_EXECUTABLE)
IF (NOT PERL_FOUND AND Perl_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Perl")
ENDIF (NOT PERL_FOUND AND Perl_FIND_REQUIRED)
......@@ -76,6 +76,8 @@
#
# QT_LIBRARY_DIR Path to "lib" of Qt4
#
# QT_PLUGINS_DIR Path to "plugins" for Qt4
#
# For every library of Qt there are three variables:
# QT_QTFOO_LIBRARY_RELEASE, which contains the full path to the release version
# QT_QTFOO_LIBRARY_DEBUG, which contains the full path to the debug version
......@@ -317,6 +319,13 @@ IF (QT4_QMAKE_FOUND)
SET(QT_MKSPECS_DIR ${qt_mkspecs_dir} CACHE PATH "The location of the Qt mkspecs")
ENDIF (NOT QT_MKSPECS_DIR)
# ask qmake for the plugins directory
IF (NOT QT_PLUGINS_DIR)
EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
<