Skip to content

Commit

Permalink
[cdt] Fix boost feature
Browse files Browse the repository at this point in the history
  • Loading branch information
ex-purple committed Feb 15, 2023
1 parent 6ceb000 commit 11da2f0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
9 changes: 9 additions & 0 deletions ports/cdt/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ vcpkg_cmake_configure(
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH cmake)

if(CDT_USE_BOOST)
set(CDT_USE_BOOST_STR "#if 1")
else()
set(CDT_USE_BOOST_STR "#if 0")
endif()
foreach(FILE CDTUtils.h Triangulation.hpp)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/${FILE}" "#ifdef CDT_USE_BOOST" "${CDT_USE_BOOST_STR}")
endforeach()

if (CDT_USE_AS_COMPILED_LIBRARY)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
endif()
Expand Down
5 changes: 4 additions & 1 deletion ports/cdt/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
"description": "Templates for float and double will be instantiated and compiled into a library"
},
"boost": {
"description": "Boost is used as a fall-back for features missing in C++98 and performance tweaks"
"description": "Boost is used as a fall-back for features missing in C++98 and performance tweaks",
"dependencies": [
"boost-container"
]
}
}
}
2 changes: 1 addition & 1 deletion versions/c-/cdt.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"versions": [
{
"git-tree": "6c5e64273872865966ab48229f73fe9b69be0dc1",
"git-tree": "002b5841cd0600e2104188e9c6d2f27b74caab1a",
"version": "1.2.0",
"port-version": 0
}
Expand Down

0 comments on commit 11da2f0

Please sign in to comment.