Skip to content

Commit adfc9ff

Browse files
authored
Update CMakeLists.txt
1 parent e84b2c4 commit adfc9ff

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ file(GLOB_RECURSE CppLinuxSerial_HEADERS
88

99
add_library(CppLinuxSerial ${CppLinuxSerial_SRC} ${CppLinuxSerial_HEADERS})
1010

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}>")
1213

1314
# On Linux, "sudo make install" will typically copy the library
1415
# into the folder /usr/local/bin

0 commit comments

Comments
 (0)