From 09a39d52a8324b02e07ab8a36f560c54cb454a97 Mon Sep 17 00:00:00 2001 From: Deepak Rangarajan Date: Fri, 20 May 2022 17:12:57 -0400 Subject: [PATCH 1/4] set INTERFACE_LINK_LIBRARIES explicitly --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e845572..62b85ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,6 +41,10 @@ install(FILES ${headers} DESTINATION include ) +set_property(TARGET csg-eb + PROPERTY INTERFACE_LINK_LIBRARIES + csg-eb) + install(TARGETS csg-eb EXPORT CsgEbConfig ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -- GitLab From 86f6b5f8ec5084f851a72370e489b117b4682356 Mon Sep 17 00:00:00 2001 From: Deepak Rangarajan Date: Fri, 20 May 2022 23:25:48 -0400 Subject: [PATCH 2/4] try a cleaner cmake installation --- CMakeLists.txt | 6 +----- src/csg/CMakeLists.txt | 13 +++++++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 62b85ee..dc67843 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,17 +41,13 @@ install(FILES ${headers} DESTINATION include ) -set_property(TARGET csg-eb - PROPERTY INTERFACE_LINK_LIBRARIES - csg-eb) - install(TARGETS csg-eb EXPORT CsgEbConfig ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} 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/src/csg/CMakeLists.txt b/src/csg/CMakeLists.txt index 4990c8b..a76a7a9 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() -- GitLab From 6dd42474fcb2fdbe3d01e90763956b62b2752be0 Mon Sep 17 00:00:00 2001 From: Deepak Rangarajan Date: Sun, 22 May 2022 19:58:00 -0400 Subject: [PATCH 3/4] also fix spack --- .spack/repo/packages/csg-eb/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.spack/repo/packages/csg-eb/package.py b/.spack/repo/packages/csg-eb/package.py index 5667497..b90897b 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 [ -- GitLab From c81437d96927da0f84775322ed6a1b1676c7ff44 Mon Sep 17 00:00:00 2001 From: Deepak Rangarajan Date: Sun, 22 May 2022 22:10:41 -0400 Subject: [PATCH 4/4] docker package needed for spack CI job --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 7266b82..993fcdd 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.* \ -- GitLab