diff --git a/CMakeLists.txt b/CMakeLists.txt index 042cbeb2d5c3f870c8530493055492902833007d..1f8f7ea5d23abcf957f4a9db5a94141185f10d61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,6 @@ find_package(pegtl REQUIRED) if (CSG_CGAL_ENABLED) find_package(CGAL REQUIRED) - add_definitions(-DUSE_CGAL) endif() add_subdirectory(src/csg) @@ -34,3 +33,7 @@ target_include_directories(csg-eb ) target_compile_features(csg-eb PRIVATE cxx_std_17) + +if (CSG_CGAL_ENABLED) + target_compile_definitions(csg-eb PUBLIC USE_CGAL) +endif()