Skip to content

Commit

Permalink
Remove duplicate target_include_directories() where /include is now p…
Browse files Browse the repository at this point in the history
…ublic

Thanks to @emmenlau
  • Loading branch information
SRombauts committed Jan 29, 2020
1 parent 76bd3b2 commit 801ed91
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,10 @@ endif (UNIX)

target_include_directories(SQLiteCpp
PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<$<BOOL:${SQLITECPP_INTERNAL_SQLITE}>:${CMAKE_CURRENT_SOURCE_DIR}/sqlite3>
PUBLIC $<INSTALL_INTERFACE:include/>)
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include/>)

# Allow the library to be installed via "make install" and found with "find_package"

Expand All @@ -252,9 +253,6 @@ install(TARGETS SQLiteCpp
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT libraries)
target_include_directories(SQLiteCpp PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include/>)
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT headers FILES_MATCHING REGEX ".*\\.(hpp|h)$")
install(EXPORT ${PROJECT_NAME}Targets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})

Expand Down

0 comments on commit 801ed91

Please sign in to comment.