Skip to content

Commit b9112aa

Browse files
committed
cmake: Include include directory for subtree builds
1 parent 636d0b6 commit b9112aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ endif()
3131
get_target_property(use_pic secp256k1 POSITION_INDEPENDENT_CODE)
3232
set_target_properties(secp256k1_precomputed PROPERTIES POSITION_INDEPENDENT_CODE ${use_pic})
3333

34-
target_include_directories(secp256k1 PUBLIC
34+
target_include_directories(secp256k1 INTERFACE
35+
$<BUILD_INTERFACE:$<$<NOT:$<BOOL:${PROJECT_IS_TOP_LEVEL}>>:${PROJECT_SOURCE_DIR}/include>>
3536
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
3637
)
3738
set_target_properties(secp256k1 PROPERTIES

0 commit comments

Comments
 (0)