Make enable_header_only option persistent

This commit is contained in:
Guillaume Damiand 2015-10-14 17:47:26 +02:00
parent 9a61b23b55
commit d56092753a
3 changed files with 5 additions and 0 deletions

View File

@ -35,6 +35,7 @@ endif()
option(ENABLE_HEADER_ONLY "Enable the header only version of CGAL" OFF )
if (ENABLE_HEADER_ONLY)
set(ENABLE_HEADER_ONLY TRUE CACHE BOOL "Enable cgal header only" FORCE)
add_definitions(-DCGAL_HEADER_ONLY)
endif (ENABLE_HEADER_ONLY)

View File

@ -456,6 +456,7 @@ if( NOT CGAL_MACROS_FILE_INCLUDED )
endforeach()
file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "set(ENABLE_HEADER_ONLY \"${ENABLE_HEADER_ONLY}\" CACHE BOOL \"Enable cgal header only\" FORCE)\n")
endmacro()
macro ( fetch_env_var VAR )

View File

@ -56,5 +56,8 @@ if(NOT USE_CGAL_FILE_INCLUDED)
link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} )
link_libraries ( ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
if (ENABLE_HEADER_ONLY)
add_definitions(-DCGAL_HEADER_ONLY)
endif()
endif()