diff --git a/.spack/repo/packages/csg-eb/package.py b/.spack/repo/packages/csg-eb/package.py index 56674970281f2b107b1be5295ad4be02887cb47c..b90897bf84878d41dc076ad8439afa58279cca28 100644 --- a/.spack/repo/packages/csg-eb/package.py +++ b/.spack/repo/packages/csg-eb/package.py @@ -20,7 +20,7 @@ class CsgEb(CMakePackage): depends_on("pegtl") depends_on("catch2") - depends_on("cgal", when="+cgal") + depends_on("cgal header_only=True", when="+cgal") def cmake_args(self): return [ diff --git a/CMakeLists.txt b/CMakeLists.txt index e845572831fa6957bf8c2dab6d7a9c51a9c41448..dc67843029e2d208dd956d4e387b28a13292ff11 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,7 +47,7 @@ install(TARGETS csg-eb LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) -export(TARGETS csg-eb +export(TARGETS csg-eb csg-eb-pi NAMESPACE CsgEb:: FILE "${CMAKE_CURRENT_BINARY_DIR}/CsgEbConfig.cmake" ) diff --git a/Dockerfile b/Dockerfile index 7266b82c4cec8dd52378cc4c28ee176b2b35ebad..993fcdd35643ad941305d657a52835e3e2c14680 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,7 @@ RUN apt-get -qq update \ && apt-get -qq -y install --no-install-recommends \ build-essential=12.* \ git=1:2.* \ + file=1:5.* \ openscad=2019.* \ pkg-config=0.29.* \ python3-pip=20.* \ diff --git a/src/csg/CMakeLists.txt b/src/csg/CMakeLists.txt index 4990c8b737d6ea7c634c6d75859720fd0db92782..a76a7a9ee98788fc8d7445823b1a1b7f0a2148c8 100644 --- a/src/csg/CMakeLists.txt +++ b/src/csg/CMakeLists.txt @@ -19,17 +19,22 @@ if (CSG_CGAL_ENABLED) ) endif() -add_library(csg-eb ${csg-eb_SOURCES}) -add_library(CsgEb::csg-eb ALIAS csg-eb) +## Create a private interface library +add_library(csg-eb-pi INTERFACE) -target_link_libraries(csg-eb PRIVATE +target_link_libraries(csg-eb-pi INTERFACE stdc++fs taocpp::pegtl ) if (CSG_CGAL_ENABLED) - target_link_libraries(csg-eb PRIVATE CGAL::CGAL) + target_link_libraries(csg-eb-pi INTERFACE CGAL::CGAL) endif() +# Create a static library +add_library(csg-eb ${csg-eb_SOURCES}) +add_library(CsgEb::csg-eb ALIAS csg-eb) +target_link_libraries(csg-eb PRIVATE "$") + if (BUILD_TESTING) add_subdirectory(tests) endif()