Skip to content

Commit 5315b86

Browse files
committed
cmake: use PROJECT_SOURCE_DIR is more acurrate
1 parent 11cc7fc commit 5315b86

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ target_compile_definitions(
1818
)
1919

2020
# include path
21-
target_include_directories(libchen PUBLIC ${CMAKE_SOURCE_DIR}/include) # todo maybe PROJECT_SOURCE_DIR
21+
target_include_directories(libchen PUBLIC ${PROJECT_SOURCE_DIR}/include)
2222

2323
# source codes
2424
file(GLOB_RECURSE CHEN_SRC *.cpp) # I hate to list all the files
@@ -36,7 +36,7 @@ install(
3636
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
3737
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
3838
)
39-
install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/chen DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
39+
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/chen DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
4040

4141
# code coverage
4242
option(CHEN_CODE_COVERAGE "Enable libchen code coverage." OFF)

0 commit comments

Comments
 (0)