-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tal Regev <[email protected]>
- Loading branch information
Showing
5 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 86b6169..bf7f532 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -59,7 +59,7 @@ add_library(${PROJECT_NAME} STATIC ${SOURCE_FILES} ${HEADER_FILES} ${PUBLIC_HEA | ||
${SDF_SOURCE_FILES} ${SDF_HEADER_FILES} | ||
${UTILS_SOURCE_FILES} ${UTILS_HEADER_FILES}) | ||
|
||
-target_include_directories(${PROJECT_NAME} PUBLIC include/) | ||
+target_include_directories(${PROJECT_NAME} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/> $<INSTALL_INTERFACE:include>) | ||
target_include_directories(${PROJECT_NAME} PRIVATE src/) | ||
|
||
# Add shaders | ||
@@ -236,3 +236,20 @@ if(SDFLIB_BUILD_DEBUG_APPS) | ||
# target_link_libraries(ImageQueryTime PUBLIC ${PROJECT_NAME} CGAL::CGAL OpenVDB::openvdb) | ||
target_link_libraries(ImageQueryTime PUBLIC ${PROJECT_NAME}) | ||
endif() | ||
+ | ||
+install(TARGETS ${PROJECT_NAME} icg EXPORT unofficial-${PROJECT_NAME}Config | ||
+ RUNTIME DESTINATION bin | ||
+ ARCHIVE DESTINATION lib | ||
+ LIBRARY DESTINATION lib | ||
+) | ||
+ | ||
+install(EXPORT unofficial-${PROJECT_NAME}Config | ||
+ NAMESPACE unofficial::${PROJECT_NAME}:: | ||
+ DESTINATION share/unofficial-sdflib | ||
+) | ||
+install( | ||
+ DIRECTORY "include/" # Trailing slash is important to copy only the contents | ||
+ DESTINATION include # Destination folder in the install directory | ||
+ FILES_MATCHING | ||
+ PATTERN "*.h" # Match header files | ||
+) | ||
diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt | ||
index 1fa9fe7..d1f5014 100644 | ||
--- a/libs/CMakeLists.txt | ||
+++ b/libs/CMakeLists.txt | ||
@@ -139,7 +139,7 @@ if(SDFLIB_BUILD_APPS OR SDFLIB_BUILD_DEBUG_APPS) | ||
|
||
# icg | ||
add_library(icg INTERFACE) | ||
-target_include_directories(icg INTERFACE InteractiveComputerGraphics) | ||
+target_include_directories(icg INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/InteractiveComputerGraphics> $<INSTALL_INTERFACE:include>) | ||
|
||
if(SDFLIB_BUILD_APPS OR SDFLIB_BUILD_DEBUG_APPS) | ||
# glfw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO UPC-ViRVIG/SdfLib | ||
REF c32eb7b133f8c05fee5605499b7f5bd36039dd08 | ||
SHA512 86c4aeb66da3f59c4110abd96ac659aadddb8f67eacb0c7a5557e3741aeb56c8f5ef464c0d7fbe5853c86b523198dd2876e87473e3903ba00e03e489684ae06f | ||
PATCHES | ||
add_export.patch | ||
) | ||
|
||
vcpkg_cmake_configure( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
OPTIONS | ||
-DSDFLIB_USE_ASSIMP=OFF | ||
-DSDFLIB_USE_OPENMP=OFF | ||
-DSDFLIB_USE_ENOKI=OFF | ||
-DSDFLIB_USE_SYSTEM_GLM=ON | ||
-DSDFLIB_USE_SYSTEM_SPDLOG=ON | ||
-DSDFLIB_USE_SYSTEM_CEREAL=ON | ||
) | ||
|
||
vcpkg_cmake_install() | ||
vcpkg_copy_pdbs() | ||
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-sdflib CONFIG_PATH share/unofficial-sdflib) | ||
|
||
file(READ "${CURRENT_PACKAGES_DIR}/share/unofficial-sdflib/unofficial-SdfLibConfig.cmake" SDFLIB_CONFIG) | ||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/unofficial-sdflib/unofficial-SdfLibConfig.cmake" " | ||
include(CMakeFindDependencyMacro) | ||
find_dependency(glm CONFIG) | ||
find_dependency(spdlog CONFIG) | ||
find_dependency(cereal CONFIG) | ||
${SDFLIB_CONFIG} | ||
") | ||
|
||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") | ||
|
||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "sdflib", | ||
"version-date": "2024-09-06", | ||
"description": "Library for accelerating the queries of signed distance fields from triangle meshes.", | ||
"homepage": "https://github.com/UPC-ViRVIG/SdfLib", | ||
"license": "MIT", | ||
"dependencies": [ | ||
"cereal", | ||
"glm", | ||
"spdlog", | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"versions": [ | ||
{ | ||
"git-tree": "8f8433aa1d7a084cd525c5bf86a4463164a20c65", | ||
"version-date": "2024-09-06", | ||
"port-version": 0 | ||
} | ||
] | ||
} |