From aafc8d5f3f92b32fe101d3a018c8af3e002e1c86 Mon Sep 17 00:00:00 2001 From: abma Date: Sun, 17 Aug 2014 23:10:06 +0200 Subject: [PATCH] CMake: changed cached bools into "option" --- CMakeLists.txt | 23 ++++++++++++++--------- code/CMakeLists.txt | 2 +- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 31561864f..c5bbfdb1f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,8 +76,7 @@ SET( ASSIMP_INCLUDE_INSTALL_DIR "include" CACHE PATH "Path the header files are installed to." ) SET( ASSIMP_BIN_INSTALL_DIR "bin" CACHE PATH "Path the tool executables are installed to." ) -SET ( ASSIMP_BUILD_STATIC_LIB OFF CACHE BOOL - "Build a static (.a) version of the library" ) +option (ASSIMP_BUILD_STATIC_LIB "Build a static (.a) version of the library" OFF) SET(ASSIMP_DEBUG_POSTFIX "d" CACHE STRING "Debug Postfitx for lib, samples and tools") @@ -102,8 +101,9 @@ ENDIF() # Globally enable Boost resp. the Boost workaround – it is also needed by the # tools which include the Assimp headers. -SET ( ASSIMP_ENABLE_BOOST_WORKAROUND ON CACHE BOOL +option ( ASSIMP_ENABLE_BOOST_WORKAROUND "If a simple implementation of the used Boost functions is used. Slightly reduces functionality, but enables builds without Boost available." + ON ) IF ( ASSIMP_ENABLE_BOOST_WORKAROUND ) INCLUDE_DIRECTORIES( code/BoostWorkaround ) @@ -129,8 +129,9 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/assimp-config.cmake.in" "${C configure_file("${CMAKE_CURRENT_SOURCE_DIR}/assimp-config-version.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimp-config-version.cmake" @ONLY IMMEDIATE) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/assimp-config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/assimp-config-version.cmake" DESTINATION "${ASSIMP_LIB_INSTALL_DIR}/cmake/assimp-${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}" COMPONENT ${LIBASSIMP-DEV_COMPONENT}) -SET ( ASSIMP_NO_EXPORT OFF CACHE BOOL - "Disable Assimp's export functionality." +option ( ASSIMP_NO_EXPORT + "Disable Assimp's export functionality." + OFF ) # Search for external dependencies, and build them from source if not found @@ -186,8 +187,9 @@ ENDIF ( ASSIMP_BUILD_COMPILER STREQUAL "") MARK_AS_ADVANCED ( ASSIMP_BUILD_ARCHITECTURE ASSIMP_BUILD_COMPILER ) ADD_SUBDIRECTORY( code/ ) -SET ( ASSIMP_BUILD_ASSIMP_TOOLS ON CACHE BOOL +option ( ASSIMP_BUILD_ASSIMP_TOOLS "If the supplementary tools for Assimp are built in addition to the library." + ON ) IF ( ASSIMP_BUILD_ASSIMP_TOOLS ) IF ( WIN32 ) @@ -196,8 +198,9 @@ IF ( ASSIMP_BUILD_ASSIMP_TOOLS ) ADD_SUBDIRECTORY( tools/assimp_cmd/ ) ENDIF ( ASSIMP_BUILD_ASSIMP_TOOLS ) -SET ( ASSIMP_BUILD_SAMPLES OFF CACHE BOOL +option ( ASSIMP_BUILD_SAMPLES "If the official samples are built as well (needs Glut)." + OFF ) IF ( ASSIMP_BUILD_SAMPLES) @@ -208,8 +211,9 @@ IF ( ASSIMP_BUILD_SAMPLES) ENDIF ( ASSIMP_BUILD_SAMPLES ) IF ( WIN32 ) - SET ( ASSIMP_BUILD_TESTS ON CACHE BOOL + option ( ASSIMP_BUILD_TESTS "If the test suite for Assimp is built in addition to the library." + ON ) IF ( ASSIMP_BUILD_TESTS ) @@ -218,8 +222,9 @@ IF ( WIN32 ) ENDIF ( WIN32 ) IF(MSVC) - SET ( ASSIMP_INSTALL_PDB ON CACHE BOOL + option ( ASSIMP_INSTALL_PDB "Install MSVC debug files." + ON ) ENDIF(MSVC) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 4e05887ba..13e297be2 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -623,7 +623,7 @@ SOURCE_GROUP( unzip FILES ${unzip_SRCS}) # VC2010 fixes if(MSVC10) - OPTION( VC10_STDINT_FIX "Fix for VC10 Compiler regarding pstdint.h redefinition errors" OFF ) + option( VC10_STDINT_FIX "Fix for VC10 Compiler regarding pstdint.h redefinition errors" OFF ) if( VC10_STDINT_FIX ) ADD_DEFINITIONS( -D_STDINT ) endif( VC10_STDINT_FIX )