mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-04 13:14:26 +02:00
use target_include_directories instead of include_directories
This commit is contained in:
committed by
Howard Hinnant
parent
c2e139ef53
commit
d3b8d4af8d
@@ -35,8 +35,6 @@ set( HEADER_FOLDER "include" )
|
||||
set( SOURCE_FOLDER "src" )
|
||||
set( TEST_FOLDER "test" )
|
||||
|
||||
include_directories( ${HEADER_FOLDER} )
|
||||
|
||||
# This is needed so IDE's live MSVC show header files
|
||||
set( HEADER_FILES
|
||||
${HEADER_FOLDER}/date/chrono_io.h
|
||||
@@ -57,6 +55,16 @@ endif( )
|
||||
set_property(TARGET tz PROPERTY CXX_STANDARD 14)
|
||||
target_link_libraries( tz ${CMAKE_THREAD_LIBS_INIT} ${OPTIONAL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} )
|
||||
|
||||
# add include folders to the library and targets that consume it
|
||||
target_include_directories(tz PUBLIC
|
||||
$<BUILD_INTERFACE:
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${HEADER_FOLDER}
|
||||
>
|
||||
$<INSTALL_INTERFACE:
|
||||
include
|
||||
>
|
||||
)
|
||||
|
||||
install( TARGETS tz DESTINATION lib )
|
||||
install( DIRECTORY ${HEADER_FOLDER}/ DESTINATION include/ )
|
||||
|
||||
|
Reference in New Issue
Block a user