Commit adfc9ff67a7a9ca728414b223b01ccd0bf16569c
Committed by
GitHub
1 parent
e84b2c48
Update CMakeLists.txt
Showing
1 changed file
with
2 additions
and
1 deletions
src/CMakeLists.txt
| @@ -8,7 +8,8 @@ file(GLOB_RECURSE CppLinuxSerial_HEADERS | @@ -8,7 +8,8 @@ file(GLOB_RECURSE CppLinuxSerial_HEADERS | ||
| 8 | 8 | ||
| 9 | add_library(CppLinuxSerial ${CppLinuxSerial_SRC} ${CppLinuxSerial_HEADERS}) | 9 | add_library(CppLinuxSerial ${CppLinuxSerial_SRC} ${CppLinuxSerial_HEADERS}) |
| 10 | 10 | ||
| 11 | -target_include_directories(CppLinuxSerial PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) | 11 | +target_include_directories(${PROJECT_NAME} PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>" |
| 12 | + "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}>") | ||
| 12 | 13 | ||
| 13 | # On Linux, "sudo make install" will typically copy the library | 14 | # On Linux, "sudo make install" will typically copy the library |
| 14 | # into the folder /usr/local/bin | 15 | # into the folder /usr/local/bin |