cgal/Installation/cmake/modules/CGAL_SetupLEDA.cmake

22 lines
634 B
CMake

if(CGAL_SetupLEDA_included)
return()
endif()
set(CGAL_SetupLEDA_included TRUE)
find_package(LEDA)
function(use_CGAL_LEDA_support target)
if(ARGV1 STREQUAL INTERFACE)
set(keyword INTERFACE)
else()
set(keyword PUBLIC)
endif()
if(NOT LEDA_FOUND)
message(FATAL_ERROR "use_CGAL_LEDA_support is use whereas LEDA_FOUND is false.")
return()
endif()
target_compiles_options(${target} ${keyword} ${LEDA_CXX_FLAGS} ${LEDA_DEFINITIONS})
target_include_directories(${target} SYSTEM ${keyword} ${LEDA_INCLUDE_DIR})
target_link_libraries(${target} ${keyword} ${LEDA_LIBRARIES} ${LEDA_LINKER_FLAGS})
endfunction()