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