# # $Id: CMakeLists.txt,v 1.28.2.2 2007/07/02 17:47:22 anton Exp $ # # (C) Copyright 2005-2007 Johns Hopkins University (JHU), All Rights # Reserved. # # --- begin cisst license - do not edit --- # # This software is provided "as is" under an open source license, with # no warranty. The complete license can be found in license.txt and # http://www.cisst.org/cisst/license.txt. # # --- end cisst license --- # Backward compatibility CMAKE_MINIMUM_REQUIRED(VERSION 2.0) PROJECT(cisst) # Custom CMake functions SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${cisst_SOURCE_DIR}/libs/cmake) INCLUDE(cisstMacros) # Output directories. SET(LIBRARY_OUTPUT_PATH ${cisst_BINARY_DIR}/libs/lib) SET(EXECUTABLE_OUTPUT_PATH ${cisst_BINARY_DIR}/libs/bin) # Where to find afterwards SET(cisst_LIBRARY_PATH "${LIBRARY_OUTPUT_PATH}") SET(cisst_EXECUTABLE_PATH "${EXECUTABLE_OUTPUT_PATH}") # Options # OPTION(BUILD_TESTS "Build tests." OFF) OPTION(BUILD_EXAMPLES "Build examples." ON) # OPTION(BUILD_APPS "Build applications." OFF) # IF(UNIX) # OPTION(BUILD_DOC "Build the documentation." OFF) # ENDIF(UNIX) # Build static or dynamic libraries OPTION(CISST_BUILD_SHARED_LIBS "Build cisst with shared libraries." OFF) IF(CISST_BUILD_SHARED_LIBS) SET(IS_SHARED SHARED) SET(BUILD_SHARED_LIBS SHARED) IF(WIN32) ADD_DEFINITIONS(-DCISST_DLL) ENDIF(WIN32) ELSE(CISST_BUILD_SHARED_LIBS) SET(IS_SHARED STATIC) ENDIF(CISST_BUILD_SHARED_LIBS) # Wrapping with swig for Python and/or Java # OPTION(CISST_HAS_SWIG_PYTHON "Build the Python wrappers for cisst with Swig." OFF) # IF(CISST_HAS_SWIG_PYTHON) # # Find Swig # FIND_PACKAGE(SWIG REQUIRED) # INCLUDE(${SWIG_USE_FILE}) # # Check that the main libraries are compiled shared # VARIABLE_REQUIRES(CISST_HAS_SWIG_PYTHON REQUIREMENT_MET CISST_BUILD_SHARED_LIBS) # # Define the include directory for interface files # SET(CISST_SWIG_INCLUDE_DIR ${cisst_SOURCE_DIR}/libs/wrapping) # # Force to use exceptions # SET(CMN_THROW_DOES_ABORT OFF CACHE BOOL "cmnThrow uses abort() instead of throw" FORCE) # SET(CMN_ASSERT_THROWS_EXCEPTION ON CACHE BOOL "CMN_ASSERT throws an exception instead of abort" FORCE) # ENDIF(CISST_HAS_SWIG_PYTHON) # IF(CISST_HAS_SWIG_PYTHON) # # Find Python # FIND_PACKAGE(PythonLibs REQUIRED) # FIND_PACKAGE(PythonInterp REQUIRED) # INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) # ENDIF(CISST_HAS_SWIG_PYTHON) # TEMPORARY!!! We must still decide on an XML policy. # Conditional inclusion of cmnXMLPath in the entire CISST project. # Note: to use trackers or robots, users are going to need XML anyway. # cmnXMLPath depends on external libraries, which the user may or # may not have. The user should specify path definitions to these # external libraries if USE_cmnXMLPath is ON. # # This is a temporary fix to simplify building the libraries until # an XML policy is decided on. # SET(USE_cmnXMLPath OFF CACHE BOOL "Include cmnXMLPath in the version (requires setting additional paths)") # IF(USE_cmnXMLPath) # SET(XERCES_HEADER_ROOT "" CACHE PATH "Root of the Xerces library header files tree") # SET(XERCES_LIB_ROOT "" CACHE PATH "Root of the Xerces library build tree") # SET(XALAN_HEADER_ROOT "" CACHE PATH "Root of the Xalan library header files tree") # SET(XALAN_LIB_ROOT "" CACHE PATH "Root of the Xalan library build tree") # INCLUDE_DIRECTORIES(${XERCES_HEADER_ROOT} ${XALAN_HEADER_ROOT}) # LINK_DIRECTORIES(${XERCES_LIB_ROOT}/ ${XALAN_LIB_ROOT}/) # IF(WIN32) # SET(XERCES_LIBRARY "Xerces-C_2" CACHE STRING "Name of the Xerces library file") # SET(XALAN_LIBRARY "Xalan-C_1" CACHE STRING "Name of the Xalan library file") # ELSE(WIN32) # SET(XERCES_LIBRARY "xerces-c" CACHE STRING "Name of the Xerces library file") # SET(XALAN_LIBRARY "xalan-c" CACHE STRING "Name of the Xalan library file") # ENDIF(WIN32) # IF(WIN32) # LINK_LIBRARIES( # optimized ${XERCES_LIBRARY} optimized ${XALAN_LIBRARY} # debug "${XERCES_LIBRARY}D" debug "${XALAN_LIBRARY}D" # ) # ELSE(WIN32) # LINK_LIBRARIES( # ${XERCES_LIBRARY} ${XALAN_LIBRARY} # ) # ENDIF(WIN32) # ENDIF(USE_cmnXMLPath) # End of cmnXMLPath section # User options related to dependencies, eg: external libraries # Check for C NETLIB # OPTION(CISST_HAS_CNETLIB "Use the netlib.org sets of numerical methods in C (provided on cisst.org)." OFF) # IF(CISST_HAS_CNETLIB) # FIND_PACKAGE(CNetlib) # INCLUDE_DIRECTORIES(${CNETLIB_INCLUDE_DIR}) # ENDIF(CISST_HAS_CNETLIB) # # Check for Fortran NETLIB # OPTION(CISST_HAS_CISSTNETLIB "Use the netlib.org sets of numerical methods in Fortran (provided on cisst.org)." OFF) # IF(CISST_HAS_CISSTNETLIB) # FIND_PACKAGE(CisstNetlib) # INCLUDE_DIRECTORIES(${CISSTNETLIB_INCLUDE_DIR}) # ENDIF(CISST_HAS_CISSTNETLIB) # Variable to indicate that netlib is available, either version # IF(CISST_HAS_CNETLIB OR CISST_HAS_CISSTNETLIB) # SET(CISST_HAS_NETLIB ON CACHE BOOL "cisst has a version of netlib (Computed with CISST_HAS_CNETLIB OR CISST_HAS_CISSTNETLIB)" FORCE) # ELSE(CISST_HAS_CNETLIB OR CISST_HAS_CISSTNETLIB) # SET(CISST_HAS_NETLIB OFF CACHE BOOL "cisst has a version of netlib (Computed with CISST_HAS_CNETLIB OR CISST_HAS_CISSTNETLIB)" FORCE) # ENDIF(CISST_HAS_CNETLIB OR CISST_HAS_CISSTNETLIB) # MARK_AS_ADVANCED(CISST_HAS_NETLIB) # Extra link flag if for Apple IF(CISST_HAS_CISSTNETLIB AND APPLE AND CISST_BUILD_SHARED_LIBS) SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -single_module") ENDIF(CISST_HAS_CISSTNETLIB AND APPLE AND CISST_BUILD_SHARED_LIBS) # Make sure not both version of NETLIB have been selected # IF(CISST_HAS_CNETLIB AND CISST_HAS_CISSTNETLIB) # MESSAGE(FATAL_ERROR "You must choose either CISST_HAS_CNETLIB or CISST_HAS_CISSTNETLIB.") # ENDIF(CISST_HAS_CNETLIB AND CISST_HAS_CISSTNETLIB) # Check for RTAI # OPTION(CISST_HAS_LINUX_RTAI "Use the RTAI real time extensions for Linux." OFF) # IF(CISST_HAS_LINUX_RTAI) # FIND_PACKAGE(RTAI) # INCLUDE_DIRECTORIES(${RTAI_INCLUDE_DIR}) # ENDIF(CISST_HAS_LINUX_RTAI) # Determine if cmnThrow uses "throw" or "abort" OPTION(CMN_THROW_DOES_ABORT "cmnThrow uses abort() instead of throw" OFF) MARK_AS_ADVANCED(CMN_THROW_DOES_ABORT) IF(CMN_THROW_DOES_ABORT) ADD_DEFINITIONS(-DCMN_THROW_DOES_ABORT) ENDIF(CMN_THROW_DOES_ABORT) # Determine if CMN_ASSERT should be disabled OPTION(CMN_ASSERT_DISABLED "CMN_ASSERT is disabled, i.e. does not assert (for release mode)" OFF) MARK_AS_ADVANCED(CMN_ASSERT_DISABLED) IF(CMN_ASSERT_DISABLED) ADD_DEFINITIONS(-DCMN_ASSERT_DISABLED) ENDIF(CMN_ASSERT_DISABLED) # Determine if CMN_ASSERT should throw an exception instead of abort OPTION(CMN_ASSERT_THROWS_EXCEPTION "CMN_ASSERT throws an exception instead of abort" OFF) MARK_AS_ADVANCED(CMN_ASSERT_THROWS_EXCEPTION) IF(CMN_ASSERT_THROWS_EXCEPTION) ADD_DEFINITIONS(-DCMN_ASSERT_THROWS_EXCEPTION) ENDIF(CMN_ASSERT_THROWS_EXCEPTION) # Put "." in the rpath of all CISST shared libraries. LINK_DIRECTORIES(. ${LIBRARY_OUTPUT_PATH}) # Determine if we want to use rpath, no by default IF(UNIX) OPTION(CMAKE_SKIP_RPATH "Do NOT use rpath to hard code the path to dynamic libraries." ON) MARK_AS_ADVANCED(FORCE CMAKE_SKIP_RPATH) ENDIF(UNIX) # Add include directory SET(CISST_INCLUDE_DIR ${cisst_SOURCE_DIR}/libs/include ${cisst_BINARY_DIR}/libs/include) INCLUDE_DIRECTORIES(${CISST_INCLUDE_DIR}) # To have more warnings with gcc IF(CMAKE_COMPILER_IS_GNUCXX) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") ENDIF(CMAKE_COMPILER_IS_GNUCXX) # Find native threads FIND_PACKAGE(Threads REQUIRED) LINK_LIBRARIES(${CMAKE_THREAD_LIBS_INIT}) # Which libraries to build SET(CISST_LIBS_STABLE cisstCommon cisstVector cisstOSAbstraction ) # SET(CISST_LIBS_UNSTABLE # cisstNumerical # cisstImage # cisstInteractive # cisstOSAbstraction # cisstDeviceInterface # cisstRealTime # cisstTracker # cisstStereoVision # ) SET(CISST_LIBS ${CISST_LIBS_STABLE}) # ${CISST_LIBS_UNSTABLE}) # Build by default FOREACH(lib ${CISST_LIBS_STABLE}) OPTION(BUILD_LIBS_${lib} "Build ${lib}." ON) ENDFOREACH(lib) # FOREACH(lib ${CISST_LIBS_UNSTABLE}) # OPTION(BUILD_LIBS_${lib} "Build ${lib}." OFF) # ENDFOREACH(lib) # Finally, create lib targets SUBDIRS(libs) # List of libraries to be built FOREACH(lib ${CISST_LIBS}) IF(BUILD_LIBS_${lib}) SET(CISST_LIBRARIES ${lib} ${CISST_LIBRARIES}) ENDIF(BUILD_LIBS_${lib}) ENDFOREACH(lib) # Contional builds # IF(BUILD_TESTS) # # Settings for CTest # ENABLE_TESTING() # MARK_AS_ADVANCED(BUILD_TESTING) # INCLUDE(Dart) # # cisst Tests # SUBDIRS(tests) # ENDIF(BUILD_TESTS) IF(BUILD_EXAMPLES) SUBDIRS(examples) ENDIF(BUILD_EXAMPLES) # IF(BUILD_APPS) # SUBDIRS(apps) # ENDIF(BUILD_APPS) # IF(BUILD_DOC) # SUBDIRS(doc) # ENDIF(BUILD_DOC) # Create misc. config files SET(CISST_BUILD_INCLUDE_DIRECTORIES ${CISST_INCLUDE_DIR}) SET(CISST_BUILD_DOXYGEN_DIRECTORY ${cisst_SOURCE_DIR}/libs/include) SET(CISST_BUILD_LINK_DIRECTORIES ${cisst_LIBRARY_PATH}) SET(CISST_BUILD_CISSTNETLIB_LIBRARIES ${CISSTNETLIB_LIBRARIES} ${CISSTNETLIB_F95_LIBRARIES}) IF(NOT UNIX) SET(CISST_BUILD_CISSTNETLIB_LIBRARIES ${CISST_BUILD_CISSTNETLIB_LIBRARIES} ${CISSTNETLIB_GCC_LIBRARIES}) ENDIF(NOT UNIX) CONFIGURE_FILE(${cisst_SOURCE_DIR}/libs/cmake/cisstBuild.cmake.in ${cisst_BINARY_DIR}/cisstBuild.cmake @ONLY) SET(CISST_INSTALLED_INCLUDE_DIRECTORIES ${CMAKE_INSTALL_PREFIX}/include) SET(CISST_INSTALLED_DOXYGEN_DIRECTORY ${CMAKE_INSTALL_PREFIX}/include) SET(CISST_INSTALLED_LINK_DIRECTORIES ${CMAKE_INSTALL_PREFIX}/lib) CONFIGURE_FILE(${cisst_SOURCE_DIR}/libs/cmake/cisstInstalled.cmake.in ${cisst_BINARY_DIR}/cisstInstalled.cmake @ONLY) INSTALL_FILES(/share/cisst/cmake ".cmake" ${cisst_BINARY_DIR}/cisstInstalled.cmake) # Configuration file SET(CISST_BINARY_DIR ${cisst_BINARY_DIR}) CONFIGURE_FILE(${cisst_SOURCE_DIR}/libs/include/cisstConfig.h.in ${cisst_BINARY_DIR}/libs/include/cisstConfig.h @ONLY) INSTALL_FILES(/include ".h" ${cisst_BINARY_DIR}/libs/include/cisstConfig.h) # Environment variables for Windows IF(WIN32) # Script to set cisst environment variables CONFIGURE_FILE(${cisst_SOURCE_DIR}/libs/utils/cisstvars.bat.in ${cisst_BINARY_DIR}/cisstvars.bat) # Script to set Microsoft compiler environment variables GET_FILENAME_COMPONENT(BUILD_TOOL_DIRECTORY ${CMAKE_MAKE_PROGRAM} PATH) FIND_PROGRAM(VSVARS32_BAT NAMES vsvars32.bat PATHS ${BUILD_TOOL_DIRECTORY}/../../Common7/Tools) MARK_AS_ADVANCED(VSVARS32_BAT) CONFIGURE_FILE(${cisst_SOURCE_DIR}/libs/utils/cisstvsvars.bat.in ${cisst_BINARY_DIR}/cisstvsvars.bat) # If Visual Studio IF(CMAKE_GENERATOR MATCHES "Visual Studio*" ) FOREACH(config ${CMAKE_CONFIGURATION_TYPES}) CONFIGURE_FILE(${cisst_SOURCE_DIR}/libs/utils/visual-studio.bat.in ${cisst_BINARY_DIR}/visual-studio-${config}.bat) ENDFOREACH(config) ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio*" ) # Offer to register the cisst paths OPTION(CISST_PATH_REGISTER "Register the paths to cisst libraries" OFF) IF(CISST_PATH_REGISTER) # Set and test configuration (i.e. Debug, Release, ...) SET(CISST_PATH_CONFIGURATION CACHE STRING "Configuration used for the paths") SET(CISST_PATH_CONFIGURATION_VALID FALSE) FOREACH(config ${CMAKE_CONFIGURATION_TYPES}) IF("${config}" STREQUAL "CISST_PATH_CONFIGURATION") SET(CISST_PATH_CONFIGURATION_VALID TRUE) ENDIF("${config}" STREQUAL "CISST_PATH_CONFIGURATION") ENDFOREACH(config) # Configuration is valid, build the path and compare it to the current one IF(CISST_PATH_CONFIGURATION_VALID) # Initial settings for paths SET(CISST_PATH_CMAKE_FORMAT "${EXECUTABLE_OUTPUT_PATH}/${CISST_PATH_CONFIGURATION}" "${LIBRARY_OUTPUT_PATH}/${CISST_PATH_CONFIGURATION}") SET(CISST_PYTHONPATH_CMAKE_FORMAT "${EXECUTABLE_OUTPUT_PATH}" "${EXECUTABLE_OUTPUT_PATH}/${CISST_PATH_CONFIGURATION}" "${LIBRARY_OUTPUT_PATH}" "${LIBRARY_OUTPUT_PATH}/${CISST_PATH_CONFIGURATION}") # To find tests releated programs and libraries # IF(BUILD_TESTS) # SET(CISST_PATH_CMAKE_FORMAT # ${CISST_PATH_CMAKE_FORMAT} # "${cisst_BINARY_DIR}/tests/lib/${CISST_PATH_CONFIGURATION}" # "${cisst_BINARY_DIR}/tests/bin/${CISST_PATH_CONFIGURATION}") # SET(CISST_PYTHONPATH_CMAKE_FORMAT # ${CISST_PYTHONPATH_CMAKE_FORMAT} # "${cisst_BINARY_DIR}/tests/lib" "${cisst_BINARY_DIR}/tests/lib/${CISST_PATH_CONFIGURATION}" # "${cisst_BINARY_DIR}/tests/bin" "${cisst_BINARY_DIR}/tests/bin/${CISST_PATH_CONFIGURATION}") # ENDIF(BUILD_TESTS) # To find examples releated programs and libraries # IF(BUILD_EXAMPLES) # SET(CISST_PATH_CMAKE_FORMAT # ${CISST_PATH_CMAKE_FORMAT} # "${cisst_BINARY_DIR}/examples/lib/${CISST_PATH_CONFIGURATION}" # "${cisst_BINARY_DIR}/examples/bin/${CISST_PATH_CONFIGURATION}") # SET(CISST_PYTHONPATH_CMAKE_FORMAT # ${CISST_PYTHONPATH_CMAKE_FORMAT} # "${cisst_BINARY_DIR}/examples/lib" "${cisst_BINARY_DIR}/examples/lib/${CISST_PATH_CONFIGURATION}" # "${cisst_BINARY_DIR}/examples/bin" "${cisst_BINARY_DIR}/examples/bin/${CISST_PATH_CONFIGURATION}") # ENDIF(BUILD_EXAMPLES) # Convert to native format to be able to compare FILE(TO_NATIVE_PATH "${CISST_PATH_CMAKE_FORMAT}" CISST_PATH) FILE(TO_NATIVE_PATH "${CISST_PYTHONPATH_CMAKE_FORMAT}" CISST_PYTHONPATH) # Retrieve current path, little trick to read register key/value SET(CISST_PATH_REG_KEY "HKEY_CURRENT_USER\\Environment;CISST_PATH") GET_FILENAME_COMPONENT(CURRENT_CISST_PATH_CMAKE_FORMAT "[HKEY_CURRENT_USER\\Environment;CISST_PATH]\\dummy.dum" PATH) FILE(TO_NATIVE_PATH "${CURRENT_CISST_PATH_CMAKE_FORMAT}" CURRENT_CISST_PATH) SET(CISST_PYTHONPATH_REG_KEY "HKEY_CURRENT_USER\\Environment;CISST_PYTHONPATH") GET_FILENAME_COMPONENT(CURRENT_CISST_PYTHONPATH_CMAKE_FORMAT "[HKEY_CURRENT_USER\\Environment;CISST_PYTHONPATH]\\dummy.dum" PATH) FILE(TO_NATIVE_PATH "${CURRENT_CISST_PYTHONPATH_CMAKE_FORMAT}" CURRENT_CISST_PYTHONPATH) # If there is no existing path, add it IF("${CURRENT_CISST_PATH}" STREQUAL "\\registry") # not defined, add it to register using cmake -E EXEC_PROGRAM(${CMAKE_COMMAND} ARGS "-E write_regv \"${CISST_PATH_REG_KEY}\" \"${CISST_PATH}\"") ELSE("${CURRENT_CISST_PATH}" STREQUAL "\\registry") IF("${CISST_PATH}" STREQUAL "${CURRENT_CISST_PATH}") # MESSAGE("CISST_PATH is the same") ELSE("${CISST_PATH}" STREQUAL "${CURRENT_CISST_PATH}") # The variable already exists and is different OPTION(CISST_PATH_OVERWRITE "Overwrite existing CISST_PATH" OFF) IF(CISST_PATH_OVERWRITE) # add it to register using cmake -E EXEC_PROGRAM(${CMAKE_COMMAND} ARGS "-E write_regv \"${CISST_PATH_REG_KEY}\" \"${CISST_PATH}\"") # Set overwrite back to OFF by default. SET(CISST_PATH_OVERWRITE OFF CACHE BOOL "Overwrite existing CISST_PATH" FORCE) ELSE(CISST_PATH_OVERWRITE) # Display a message of information MESSAGE("A different CISST_PATH exists:\n ${CURRENT_CISST_PATH}\nTurn CISST_PATH_OVERWRITE \"ON\" or CISST_PATH_REGISTER \"OFF\"") ENDIF(CISST_PATH_OVERWRITE) ENDIF("${CISST_PATH}" STREQUAL "${CURRENT_CISST_PATH}") ENDIF("${CURRENT_CISST_PATH}" STREQUAL "\\registry") # Do the same for PYTHONPATH if wrappers are compiled IF(CISST_HAS_SWIG_PYTHON) # If there is no existing path, add it IF("${CURRENT_CISST_PYTHONPATH}" STREQUAL "\\registry") # not defined, add it to register using cmake -E EXEC_PROGRAM(${CMAKE_COMMAND} ARGS "-E write_regv \"${CISST_PYTHONPATH_REG_KEY}\" \"${CISST_PYTHONPATH}\"") ELSE("${CURRENT_CISST_PYTHONPATH}" STREQUAL "\\registry") IF("${CISST_PYTHONPATH}" STREQUAL "${CURRENT_CISST_PYTHONPATH}") # MESSAGE("CISST_PATH is the same") ELSE("${CISST_PYTHONPATH}" STREQUAL "${CURRENT_CISST_PYTHONPATH}") # The variable already exists and is different OPTION(CISST_PYTHONPATH_OVERWRITE "Overwrite existing CISST_PYTHONPATH" OFF) IF(CISST_PYTHONPATH_OVERWRITE) # Add it to register using cmake -E EXEC_PROGRAM(${CMAKE_COMMAND} ARGS "-E write_regv \"${CISST_PYTHONPATH_REG_KEY}\" \"${CISST_PYTHONPATH}\"") # Set overwrite back to OFF by default. SET(CISST_PYTHONPATH_OVERWRITE OFF CACHE BOOL "Overwrite existing CISST_PYTHONPATH" FORCE) ELSE(CISST_PYTHONPATH_OVERWRITE) # Display a message of information MESSAGE("A different CISST_PYTHONPATH exists:\n ${CURRENT_CISST_PYTHONPATH}\nTurn CISST_PYTHONPATH_OVERWRITE \"ON\" or CISST_PATH_REGISTER \"OFF\"") ENDIF(CISST_PYTHONPATH_OVERWRITE) ENDIF("${CISST_PYTHONPATH}" STREQUAL "${CURRENT_CISST_PYTHONPATH}") ENDIF("${CURRENT_CISST_PYTHONPATH}" STREQUAL "\\registry") ENDIF(CISST_HAS_SWIG_PYTHON) ELSE(CISST_PATH_CONFIGURATION_VALID) MESSAGE("CISST_PATH_CONFIGURATION must be one of ${CMAKE_CONFIGURATION_TYPES}") ENDIF(CISST_PATH_CONFIGURATION_VALID) ENDIF(CISST_PATH_REGISTER) ENDIF(WIN32) # Environment variables for Unix IF(UNIX) # Script to set cisst environment variables CONFIGURE_FILE(${cisst_SOURCE_DIR}/libs/utils/cisstvars.csh.in ${cisst_BINARY_DIR}/cisstvars.csh @ONLY) # Script to set cisst environment variables CONFIGURE_FILE(${cisst_SOURCE_DIR}/libs/utils/cisstvars.sh.in ${cisst_BINARY_DIR}/cisstvars.sh @ONLY) ENDIF(UNIX) # # $Log: CMakeLists.txt,v $ # Revision 1.28.2.2 2007/07/02 17:47:22 anton # More sections commented in main CMakeLists.txt # # Revision 1.28.2.1 2007/07/02 17:04:35 anton # Release 0.5.1 (internal release for MICCAI 07 workshop): Modified CMakeLists.txt # to reflect files removed in this distribution # # Revision 1.28 2007/06/10 02:50:17 anton # Main CMakeLists.txt and DartConfig.cmake: Updated license text and copyright dates # # Revision 1.27 2007/03/30 20:55:51 anton # Wrappers: Removed code related to Java wrappers as these were never # functional # # Revision 1.26 2007/03/30 20:27:36 anton # Main CMakeLists.txt: Always require shared libraries when compiling Python # wrappers. Recent gcc 4.0.3 on Linux started to complain about mixing static # libraries when linking the SWIG generated wrappers. This also matches the # requirements on Windows and Linux. # # Revision 1.25 2007/03/06 17:04:50 anton # Main CMakeLists.txt: Use FindPackage instead of INCLUDE. Allows to use # a path. # # Revision 1.24 2007/02/23 16:53:27 anton # Import code from Balazs for cisstStereoVision. Tested compilation of portable # code, not Linux nor Windows specific branches. Also missing support for IPP. # # Revision 1.23 2006/11/20 20:50:57 anton # Licensing: Applied new license to main CMakeLists.txt and DartConfig.cmake # # Revision 1.22 2006/10/06 14:34:34 anton # Main CMakeLists.txt: Typo in message re. skipping rpath # # Revision 1.21 2006/09/15 01:19:25 anton # Main CMakeLists.txt: Added -single_module for Apple shared libraries with # cisstNetlib (fix related to default libG95 not compiled using -fno-common). # # Revision 1.20 2006/09/12 21:27:06 anton # Main CMakeLists.txt: Added preliminary code to create CISST_PATH and # CISST_PYTHONPATH automatically (see #242). # # Revision 1.19 2006/07/31 15:37:06 anton # Main CMakeLists.txt: Modified default output directory for libraries to # solve bug #238. # # Revision 1.18 2006/07/17 16:52:21 pkaz # CMakeLists.txt: added OPTION to "Build applications.". # # Revision 1.17 2006/05/24 14:23:52 anton # cisstCommon wrappers: Attempt to use SWIG to generate Java wrappers. Work # in progress, currently untested and partial wrapping only. # # Revision 1.16 2006/05/02 19:28:04 anton # Build tools: Major update in output directories. Libraries and executables # are now organized within "libs", "examples" and "tests" directories. Paths # can be set using the cisstvars scripts generated during the configuration # (i.e. by CMake). See ticket #215. # # Revision 1.15 2006/03/30 20:21:48 anton # cisstImage: Added typedefs based on vctDynamicMatrix to handle pixmaps of # RGB pixels (defined as vctFixedSizeVector) and a simple PPM export function. # Also added a simple test program to check that the compiler doesn't pad our # pixels and a small example program (see imageTutorial). # # Revision 1.14 2006/02/13 22:20:39 ofri # main CMakeLists and cisstBuild export: include all the cisstNetlib libraries # into one variable CISSTNETLIB_LIBRARIES in the EXPORTED variables. # # Revision 1.13 2006/01/11 20:49:17 anton # cisstNumerical CMake: Added a variable to indicate that either netlib is # available and factor most of the CMake code (see CISST_HAS_NETLIB). # # Revision 1.12 2005/12/21 21:03:17 anton # CMake: Moved find package _PythonInterp_ to top level so that PYTHON_EXECUTABLE # is defined in all sub directories. # # Revision 1.11 2005/11/30 14:54:52 anton # CMakeLists: Use CMake thread functions to use native threads. # # Revision 1.10 2005/11/29 02:58:53 anton # Main CMakeLists.txt: Message with fatal error if both cnetlib and # cisstNetlib are selected at the same time. # # Revision 1.9 2005/11/21 23:27:09 kapoor # Extra newline in file causes problems for Cmake. # # Revision 1.8 2005/11/21 16:19:16 kapoor # LAPACK: Added CISST_HAS_CISSTCNETLIB flag to cmake, which can be used to # Compile code using the newer LAPACK3E. CLAPACK is still supported. See ticket #193. # # Revision 1.7 2005/11/17 22:52:36 anton # CMakeLists.txt for Xerces and Xalan: Cleanup the existing solution. Still # pending a final decision re. how to package Xerces and Xalan. # # Revision 1.6 2005/09/26 21:23:30 anton # cisstCommon: Updated CMN_ASSERT and cmnThrow. Variables are not defined in # cisstConfig.h anymore (user could not override). CMN_ASSERT can now be set # to throw an exception (user can set preference with CMake). # # Revision 1.5 2005/09/23 23:57:36 anton # cmnThrow: Added CMake option to force an abort() instead of throw. # # Revision 1.4 2005/09/07 08:04:36 anton # Main CMakeLists.txt: BUILD_LIBS_cisstNumerical is now OFF by default to # reflect the build instructions. # # Revision 1.3 2005/09/07 07:08:58 anton # Doc: Updated all CMakeLists work with ./CMakeLists.txt, added license, # corrected couple of issues re. CMake 2.0+. # # Revision 1.2 2005/09/06 02:08:14 anton # CMake configuration: Created a main CMakeLists.txt for the libs, tests and # examples. A lot of code has been "factorized" in the ./CMakeLists.txt. # Known problems: "doc" is not working yet. Dependencies on SWIG projects don't # work for parallel builds. If a lib is selected and then unselected, the tests # still appear ... # # Revision 1.1 2005/09/01 16:16:47 anton # Main CMakeLists.txt: Test addition to CVS repository. # #