Use correct target

Also, fix the formatting in the generator expressions. For some reason, the previous
formatting caused this error:

  Target "date_interface" INTERFACE_INCLUDE_DIRECTORIES property contains
  path:

  ...

  which is prefixed in the source directory.
This commit is contained in:
Tommy Nguyen
2018-01-10 17:03:14 -05:00
committed by Howard Hinnant
parent 3e5a57467a
commit a4ce4bc2d3

View File

@@ -85,16 +85,12 @@ add_library(date_interface INTERFACE) # an interface (not a library), to enable
# add include folders to the INTERFACE and targets that consume it
target_include_directories(date_interface INTERFACE
$<BUILD_INTERFACE:
${CMAKE_CURRENT_SOURCE_DIR}/${HEADER_FOLDER}
>
$<INSTALL_INTERFACE:
include
>
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
$<INSTALL_INTERFACE:include>
)
install( TARGETS date_prj EXPORT DateConfig )
install( TARGETS date_interface EXPORT DateConfig )
install( EXPORT DateConfig DESTINATION lib/cmake/date )
install( TARGETS tz DESTINATION lib )
install( DIRECTORY ${HEADER_FOLDER}/ DESTINATION include/ )