Skip to content

Commit 50ea4b0

Browse files
authored
Changed INTERFACE location to CMAKE_CURRENT_SOURCE_DIR for package manager compatibility. (#298)
CMAKE_SOURCE_DIR points to the top-level CMakeLists.txt, not to the subdir CMakeLists.txt, so when cpp-peglib is included in a project, the INTERFACE/include directory points to the wrong location.
1 parent f01a5e6 commit 50ea4b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
1818
endif()
1919

2020
add_library(peglib INTERFACE)
21-
target_include_directories(peglib INTERFACE ${CMAKE_SOURCE_DIR})
21+
target_include_directories(peglib INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
2222

2323
option(BUILD_TESTS "Build cpp-peglib tests" ON)
2424
option(PEGLIB_BUILD_LINT "Build cpp-peglib lint utility" OFF)

0 commit comments

Comments
 (0)