mirror of https://github.com/CGAL/cgal
Replace the name of the variable to enable header only mode in CGAL_HEADERS_ONLY
This commit is contained in:
parent
0f0aa9f764
commit
94f2565c6a
|
|
@ -32,12 +32,12 @@ endif()
|
|||
# -= HEADER ONLY =-
|
||||
#
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
option(ENABLE_HEADER_ONLY "Enable the header only version of CGAL" OFF )
|
||||
option(CGAL_HEADERS_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)
|
||||
if (CGAL_HEADERS_ONLY)
|
||||
set(CGAL_HEADERS_ONLY TRUE CACHE BOOL "Enable cgal header only" FORCE)
|
||||
add_definitions(-DCGAL_HEADER_ONLY)
|
||||
endif (ENABLE_HEADER_ONLY)
|
||||
endif (CGAL_HEADERS_ONLY)
|
||||
|
||||
#--------------------------------------------------------------------------------------------------
|
||||
#
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ set(CGAL_INCLUDE_DIRS "@CGAL_INCLUDE_DIRS@" )
|
|||
set(CGAL_MODULES_DIR "@CGAL_MODULES_DIR@" )
|
||||
set(CGAL_LIBRARIES_DIR "@CGAL_LIBRARIES_DIR@" )
|
||||
|
||||
set(ENABLE_HEADER_ONLY "@ENABLE_HEADER_ONLY@" )
|
||||
set(CGAL_HEADER_ONLY "@CGAL_HEADER_ONLY@" )
|
||||
set(CGAL_QT5_QTMOCCMAKE_FILES "@CGAL_QT5_QTMOCCMAKE_FILES@")
|
||||
|
||||
set(CGAL_VERSION "${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}.${CGAL_BUILD_VERSION}")
|
||||
|
|
@ -127,9 +127,9 @@ macro(check_cgal_component COMPONENT)
|
|||
set( CHECK_CGAL_ERROR_TAIL "" )
|
||||
else()
|
||||
if ( WITH_${CGAL_LIB} )
|
||||
if(TARGET CGAL::${CGAL_LIB} OR ENABLE_HEADER_ONLY)
|
||||
if(TARGET CGAL::${CGAL_LIB} OR CGAL_HEADERS_ONLY)
|
||||
set( ${CGAL_LIB}_FOUND TRUE )
|
||||
if ("${CGAL_LIB}" STREQUAL "CGAL_Qt5" AND ENABLE_HEADER_ONLY)
|
||||
if ("${CGAL_LIB}" STREQUAL "CGAL_Qt5" AND CGAL_HEADERS_ONLY)
|
||||
if ("${CGAL_LIB}" STREQUAL "CGAL_Qt5")
|
||||
find_package( OpenGL )
|
||||
find_package (Qt5 COMPONENTS OpenGL Gui Core Script ScriptTools)
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ macro(check_cgal_component COMPONENT)
|
|||
endif()
|
||||
|
||||
if ( WITH_${CGAL_LIB} )
|
||||
if(TARGET CGAL::${CGAL_LIB} OR ENABLE_HEADER_ONLY )
|
||||
if(TARGET CGAL::${CGAL_LIB} OR CGAL_HEADERS_ONLY )
|
||||
set( ${CGAL_LIB}_FOUND TRUE )
|
||||
else()
|
||||
set( ${CGAL_LIB}_FOUND FALSE )
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ if ( NOT CGAL_GENERATOR_SPECIFIC_SETTINGS_FILE_INCLUDED )
|
|||
|
||||
message( STATUS "Targetting ${CMAKE_GENERATOR}")
|
||||
|
||||
if ( MSVC AND NOT ENABLE_HEADER_ONLY )
|
||||
if ( MSVC AND NOT CGAL_HEADERS_ONLY )
|
||||
message( STATUS "Target build enviroment supports auto-linking" )
|
||||
set(CGAL_AUTO_LINK_ENABLED TRUE)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ 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)
|
||||
if (CGAL_HEADERS_ONLY)
|
||||
add_definitions(-DCGAL_HEADER_ONLY)
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ link_directories(${CGAL_3RD_PARTY_LIBRARIES_DIRS})
|
|||
|
||||
collect_cgal_library(CGAL "")
|
||||
|
||||
if(NOT ENABLE_HEADER_ONLY)
|
||||
if(NOT CGAL_HEADERS_ONLY)
|
||||
target_link_libraries(CGAL ${CGAL_3RD_PARTY_LIBRARIES})
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ function (collect_cgal_library LIBRARY_NAME ADDITIONAL_FILES)
|
|||
set(rc_file )
|
||||
endif()
|
||||
|
||||
if (NOT ENABLE_HEADER_ONLY)
|
||||
if (NOT CGAL_HEADER_ONLY)
|
||||
add_library (${LIBRARY_NAME}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/all_files.cpp
|
||||
${rc_file}
|
||||
|
|
@ -51,7 +51,7 @@ function (collect_cgal_library LIBRARY_NAME ADDITIONAL_FILES)
|
|||
endif()
|
||||
|
||||
if(CGAL_AUTO_LINK_ENABLED)
|
||||
if (NOT ENABLE_HEADER_ONLY)
|
||||
if (NOT CGAL_HEADERS_ONLY)
|
||||
set_target_properties( ${LIBRARY_NAME} PROPERTIES
|
||||
OUTPUT_NAME_DEBUG "${DEBUG_MANGLED_NAME}"
|
||||
OUTPUT_NAME_RELEASE "${RELEASE_MANGLED_NAME}"
|
||||
|
|
@ -67,7 +67,7 @@ function (collect_cgal_library LIBRARY_NAME ADDITIONAL_FILES)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT ENABLE_HEADER_ONLY)
|
||||
if (NOT CGAL_HEADER_ONLY)
|
||||
install(TARGETS ${LIBRARY_NAME} EXPORT ${LIBRARY_NAME}Exports
|
||||
RUNTIME DESTINATION "${CGAL_INSTALL_BIN_DIR}"
|
||||
LIBRARY DESTINATION "${CGAL_INSTALL_LIB_DIR}"
|
||||
|
|
@ -194,7 +194,7 @@ CGAL_add_if_target(CGAL_Core)
|
|||
CGAL_add_if_target(CGAL_ImageIO)
|
||||
CGAL_add_if_target(CGAL_Qt5)
|
||||
|
||||
#if (NOT ENABLE_HEADER_ONLY) # TODO Check on windows these exports
|
||||
#if (NOT CGAL_HEADERS_ONLY) # TODO Check on windows these exports
|
||||
export(TARGETS ${CGAL_ACTUAL_CONFIGURED_LIBRARIES} NAMESPACE CGAL:: FILE "${CMAKE_BINARY_DIR}/CGALExports.cmake")
|
||||
#endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ macro(create_link_to_program COMPONENT )
|
|||
link_directories( ${${COMPONENT}_3RD_PARTY_LIBRARIES_DIRS})
|
||||
|
||||
# Link the executable to CGAL and third-party libraries
|
||||
if ( CGAL_AUTO_LINK_ENABLED OR ENABLE_HEADER_ONLY)
|
||||
if ( CGAL_AUTO_LINK_ENABLED OR CGAL_HEADERS_ONLY)
|
||||
target_link_libraries(link_to_${COMPONENT} ${CGAL_3RD_PARTY_LIBRARIES} ${${COMPONENT}_3RD_PARTY_LIBRARIES} )
|
||||
else()
|
||||
target_link_libraries(link_to_${COMPONENT} CGAL::${COMPONENT} ${CGAL_3RD_PARTY_LIBRARIES} ${${COMPONENT}_3RD_PARTY_LIBRARIES} )
|
||||
|
|
@ -69,7 +69,7 @@ if ( CGAL_FOUND )
|
|||
find_package(Qt5 QUIET)
|
||||
if( Qt5_FOUND )
|
||||
create_link_to_program(CGAL_Qt5)
|
||||
if (ENABLE_HEADER_ONLY)
|
||||
if (CGAL_HEADERS_ONLY)
|
||||
qt5_use_modules(link_to_CGAL_Qt5)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Reference in New Issue