Nicer formatting in main CMakeLists.txt
parent
0f6516dc3d
commit
1daac6baf0
|
@ -7,6 +7,10 @@ set (GTSAM_VERSION_MAJOR 2)
|
||||||
set (GTSAM_VERSION_MINOR 1)
|
set (GTSAM_VERSION_MINOR 1)
|
||||||
set (GTSAM_VERSION_PATCH 0)
|
set (GTSAM_VERSION_PATCH 0)
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Gather information, perform checks, set defaults
|
||||||
|
|
||||||
# Set the default install path to home
|
# Set the default install path to home
|
||||||
#set (CMAKE_INSTALL_PREFIX ${HOME} CACHE PATH "Install prefix for library")
|
#set (CMAKE_INSTALL_PREFIX ${HOME} CACHE PATH "Install prefix for library")
|
||||||
|
|
||||||
|
@ -36,6 +40,10 @@ else()
|
||||||
set(GTSAM_UNSTABLE_AVAILABLE 0)
|
set(GTSAM_UNSTABLE_AVAILABLE 0)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Set up options
|
||||||
|
|
||||||
# Configurable Options
|
# Configurable Options
|
||||||
option(GTSAM_BUILD_TESTS "Enable/Disable building of tests" ON)
|
option(GTSAM_BUILD_TESTS "Enable/Disable building of tests" ON)
|
||||||
option(GTSAM_BUILD_TIMING "Enable/Disable building of timing scripts" ON) # These do not currently work
|
option(GTSAM_BUILD_TIMING "Enable/Disable building of timing scripts" ON) # These do not currently work
|
||||||
|
@ -76,7 +84,6 @@ if(NOT GTSAM_TOOLBOX_INSTALL_PATH)
|
||||||
set(GTSAM_TOOLBOX_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/borg/toolbox")
|
set(GTSAM_TOOLBOX_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/borg/toolbox")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Flags for choosing default packaging tools
|
# Flags for choosing default packaging tools
|
||||||
set(CPACK_SOURCE_GENERATOR "TGZ" CACHE STRING "CPack Default Source Generator")
|
set(CPACK_SOURCE_GENERATOR "TGZ" CACHE STRING "CPack Default Source Generator")
|
||||||
set(CPACK_GENERATOR "TGZ" CACHE STRING "CPack Default Binary Generator")
|
set(CPACK_GENERATOR "TGZ" CACHE STRING "CPack Default Binary Generator")
|
||||||
|
@ -104,9 +111,10 @@ if (GTSAM_BUILD_TESTS)
|
||||||
include(CTest)
|
include(CTest)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
# Find boost
|
# Find boost
|
||||||
if(CYGWIN OR MSVC OR WIN32)
|
if(CYGWIN OR MSVC OR WIN32)
|
||||||
set(Boost_USE_STATIC_LIBS 1)
|
set(Boost_USE_STATIC_LIBS 1) # Use static libs on Windows
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# FIXME: Need to allow for requiring only components from 1.43, and optionally allow 1.47 components
|
# FIXME: Need to allow for requiring only components from 1.43, and optionally allow 1.47 components
|
||||||
|
@ -122,6 +130,10 @@ if(Boost_TIMER_LIBRARY)
|
||||||
set(GTSAM_BOOST_LIBRARIES ${GTSAM_BOOST_LIBRARIES} ${Boost_TIMER_LIBRARY})
|
set(GTSAM_BOOST_LIBRARIES ${GTSAM_BOOST_LIBRARIES} ${Boost_TIMER_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Global compile options
|
||||||
|
|
||||||
# General build settings
|
# General build settings
|
||||||
include_directories(
|
include_directories(
|
||||||
gtsam/3rdparty/UFconfig
|
gtsam/3rdparty/UFconfig
|
||||||
|
@ -131,6 +143,10 @@ include_directories(
|
||||||
${Boost_INCLUDE_DIR})
|
${Boost_INCLUDE_DIR})
|
||||||
link_directories(${Boost_LIBRARY_DIRS})
|
link_directories(${Boost_LIBRARY_DIRS})
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Add components
|
||||||
|
|
||||||
# Build CppUnitLite
|
# Build CppUnitLite
|
||||||
add_subdirectory(CppUnitLite)
|
add_subdirectory(CppUnitLite)
|
||||||
|
|
||||||
|
@ -172,7 +188,9 @@ if (DOXYGEN_FOUND)
|
||||||
add_subdirectory(doc)
|
add_subdirectory(doc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
## Set up CPack
|
|
||||||
|
###############################################################################
|
||||||
|
# Set up CPack
|
||||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "GTSAM")
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "GTSAM")
|
||||||
set(CPACK_PACKAGE_VENDOR "Frank Dellaert, Georgia Institute of Technology")
|
set(CPACK_PACKAGE_VENDOR "Frank Dellaert, Georgia Institute of Technology")
|
||||||
set(CPACK_PACKAGE_CONTACT "Frank Dellaert, dellaert@cc.gatech.edu")
|
set(CPACK_PACKAGE_CONTACT "Frank Dellaert, dellaert@cc.gatech.edu")
|
||||||
|
@ -194,7 +212,9 @@ set(CPACK_SOURCE_PACKAGE_FILE_NAME "gtsam-${GTSAM_VERSION_MAJOR}.${GTSAM_VERSION
|
||||||
set(CPACK_DEBIAN_PACKAGE_NAME "libgtsam-dev")
|
set(CPACK_DEBIAN_PACKAGE_NAME "libgtsam-dev")
|
||||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-dev (>= 1.43)") #Example: "libc6 (>= 2.3.1-6), libgcc1 (>= 1:3.4.2-12)")
|
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-dev (>= 1.43)") #Example: "libc6 (>= 2.3.1-6), libgcc1 (>= 1:3.4.2-12)")
|
||||||
|
|
||||||
# print configuration variables
|
|
||||||
|
###############################################################################
|
||||||
|
# Print configuration variables
|
||||||
message(STATUS "===============================================================")
|
message(STATUS "===============================================================")
|
||||||
message(STATUS "================ Configuration Options ======================")
|
message(STATUS "================ Configuration Options ======================")
|
||||||
message(STATUS "Build flags ")
|
message(STATUS "Build flags ")
|
||||||
|
|
Loading…
Reference in New Issue