Skip to content

Commit

Permalink
build: detect and work around broken cmake_path (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
Steveice10 authored Oct 4, 2023
1 parent f815f62 commit b4d3060
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cryptopp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1376,6 +1376,10 @@ target_compile_definitions(
$<INSTALL_INTERFACE:CRYPTOPP_INCLUDE_PREFIX=${CRYPTOPP_INCLUDE_PREFIX}>
)
cmake_path(GET cryptopp_SOURCE_DIR PARENT_PATH CRYPTOPP_PREFIXED_INCLUDE_DIR)
if (cryptopp_SOURCE_DIR STREQUAL CRYPTOPP_PREFIXED_INCLUDE_DIR)
# Work around a CMake bug when built using certain toolchains, where cmake_path returns the same path.
get_filename_component(CRYPTOPP_PREFIXED_INCLUDE_DIR "${cryptopp_SOURCE_DIR}" DIRECTORY)
endif()
target_include_directories(
cryptopp
PUBLIC
Expand Down

0 comments on commit b4d3060

Please sign in to comment.