martinmoene / variant-lite

variant lite - A C++17-like variant, a type-safe union for C++98, C++11 and later in a single-file header-only library
Boost Software License 1.0
239 stars 25 forks source link

Bug in CMakeLists.txt, include_source_dir not set #25

Closed Manu343726 closed 5 years ago

Manu343726 commented 5 years ago

The cmake target references a include_source_dir variable as its include directories when building, variable that's not set in the script. This makes that the library include dir is not passed to the target.

project( variant_lite LANGUAGES CXX )

include( GNUInstallDirs )

set( package_name "variant-lite" )

# Interface library:

add_library(
    ${package_name} INTERFACE )

target_include_directories(
    ${package_name} INTERFACE "$<BUILD_INTERFACE:${include_source_dir}>" )
martinmoene commented 5 years ago

Fixed in 20d36d608377a7475c62573298c259073a97d8a9