Skip to content

Commit 801ed91

Browse files
committed
Remove duplicate target_include_directories() where /include is now public
Thanks to @emmenlau
1 parent 76bd3b2 commit 801ed91

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

CMakeLists.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,10 @@ endif (UNIX)
240240

241241
target_include_directories(SQLiteCpp
242242
PRIVATE
243-
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
244243
$<$<BOOL:${SQLITECPP_INTERNAL_SQLITE}>:${CMAKE_CURRENT_SOURCE_DIR}/sqlite3>
245-
PUBLIC $<INSTALL_INTERFACE:include/>)
244+
PUBLIC
245+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
246+
$<INSTALL_INTERFACE:include/>)
246247

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

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

0 commit comments

Comments
 (0)