Replies: 5 comments 1 reply
-
Hmm, @pca006132 do you know what's going on here? Maybe related to #696? |
Beta Was this translation helpful? Give feedback.
-
Can you show the complete build log? I suspect that you already have |
Beta Was this translation helpful? Give feedback.
-
Here's the output. It doesn't seem to find an installed glm. If you need a more verbose log, remind me what flag to give cmake to get it. This is from 'cmake .' using the cached stuff. The options I used in the first build were -DBUILD_SHARED_LIBS=ON and -DMANIFOLD_PAR=TBB . Note that I have separately downloaded and installed oneTBB, as that wasn't installed by your cmake config either (though perhaps that is intentional?). -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) When I do a 'sudo cmake --install .' I get this (Note, I've already installed so this mostly just notes that it doesn't have to do it again, but also note that ther is no status noted about glm in any of the include direrectories (though it does note that /usr/local/lib/libglm.dylib is up to date). I believe the glm header tree belongs in /usr/local/include/ . -- Install configuration: "Release" If I try a simple project that includes "manifold.h" with /usr/local/include/manifold in the include search path, I get: In file included from /Users/howardtrickey/src/try_manifold/try_manifold.cc:3: If I download a copy the header files for glm into /usr/local/include/ , then my sample project builds correctly. |
Beta Was this translation helpful? Give feedback.
-
Can you try if this patch works? diff --git a/manifoldDeps.cmake b/manifoldDeps.cmake
index 182145b..47e6cb5 100644
--- a/manifoldDeps.cmake
+++ b/manifoldDeps.cmake
@@ -1,8 +1,8 @@
include(FetchContent)
include(GNUInstallDirs)
-find_package(PkgConfig)
+find_package(PkgConfig QUIET)
if(MANIFOLD_PAR STREQUAL "TBB")
- find_package(TBB)
+ find_package(TBB QUIET)
endif()
if (PKG_CONFIG_FOUND)
pkg_check_modules(Clipper2 Clipper2)
@@ -37,15 +37,15 @@ else()
endif()
endif()
-FetchContent_Declare(glm
- GIT_REPOSITORY https://github.com/g-truc/glm.git
- GIT_TAG b06b775c1c80af51a1183c0e167f9de3b2351a79
- GIT_PROGRESS TRUE
- FIND_PACKAGE_ARGS NAMES glm
-)
-FetchContent_MakeAvailable(glm)
-
+find_package(glm QUIET)
if(NOT glm_FOUND)
+ set(GLM_BUILD_INSTALL "ON" CACHE STRING "install glm")
+ FetchContent_Declare(glm
+ GIT_REPOSITORY https://github.com/g-truc/glm.git
+ GIT_TAG b06b775c1c80af51a1183c0e167f9de3b2351a79
+ GIT_PROGRESS TRUE
+ )
+ FetchContent_MakeAvailable(glm)
message(STATUS "glm not found, downloading from source")
if(NOT EMSCRIPTEN)
install(TARGETS glm EXPORT glmTargets)
diff --git a/src/utilities/CMakeLists.txt b/src/utilities/CMakeLists.txt
index bdd2253..46c463a 100644
--- a/src/utilities/CMakeLists.txt
+++ b/src/utilities/CMakeLists.txt
@@ -60,7 +60,7 @@ endif()
target_include_directories(${PROJECT_NAME} INTERFACE
$<INSTALL_INTERFACE:include/${CMAKE_PROJECT_NAME}>
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>)
-target_link_libraries(${PROJECT_NAME} INTERFACE glm::glm)
+target_link_libraries(${PROJECT_NAME} INTERFACE $<BUILD_INTERFACE:glm::glm>)
if(NOT DEFINED thrust_SOURCE_DIR)
set(thrust_SOURCE_DIR ${_THRUST_INCLUDE_DIR}) |
Beta Was this translation helpful? Give feedback.
-
Yes! |
Beta Was this translation helpful? Give feedback.
-
I tried to do a 'cmake --install .' after a build and it installed things into /usr/local, as I expexted, but it did not install the glm include files in the installation, so that trying to include manifold.h from /usr/loca/include/manifold failed (the crossection include file includes some glm files). Am I doing something wrong?
Beta Was this translation helpful? Give feedback.
All reactions