Skip to content

Commit

Permalink
cmake: Include include directory for subtree builds
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Apr 27, 2023
1 parent 5431b9d commit 71f746c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ endif()
get_target_property(use_pic secp256k1 POSITION_INDEPENDENT_CODE)
set_target_properties(secp256k1_precomputed PROPERTIES POSITION_INDEPENDENT_CODE ${use_pic})

target_include_directories(secp256k1 PUBLIC
target_include_directories(secp256k1 INTERFACE
# Add the include path for parent projects so that they don't have to manually add it.
$<BUILD_INTERFACE:$<$<NOT:$<BOOL:${PROJECT_IS_TOP_LEVEL}>>:${PROJECT_SOURCE_DIR}/include>>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
set_target_properties(secp256k1 PROPERTIES
Expand Down

0 comments on commit 71f746c

Please sign in to comment.