Skip to content

Commit

Permalink
fix: set target_include_directory
Browse files Browse the repository at this point in the history
  • Loading branch information
russkel authored and dtrugman committed Apr 14, 2024
1 parent bb0be73 commit 5f68a66
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ option (pfs_BUILD_TESTS "Build tests" ON)

add_compile_options (-std=c++11 -Wall -Wextra -pedantic -Werror)

include_directories (include)

set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out)
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
Expand All @@ -45,6 +43,11 @@ aux_source_directory (${pfs_ROOT_SOURCE_DIR}/parsers pfs_PARSERS_SOURCES)
set (SOURCES ${pfs_ROOT_SOURCES} ${pfs_PARSERS_SOURCES})

add_library (pfs ${pfs_SHARED_OR_STATIC} ${SOURCES})
target_include_directories(
pfs PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)

if (pfs_BUILD_COVERAGE)
set (pfs_BUILD_COVERAGE_FLAGS -O0 --coverage)
Expand Down

0 comments on commit 5f68a66

Please sign in to comment.