Skip to content

Commit

Permalink
Use toplevel unit_name (#56)
Browse files Browse the repository at this point in the history
Also fix target_include_directories() for parent directory.
  • Loading branch information
martinmoene committed Oct 15, 2022
1 parent 072b10d commit 54e4ced
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions file/example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif()

project( example LANGUAGES CXX )

set( unit_name "XXX" )
# unit_name provided by toplevel CMakeLists.txt [set( unit_name "xxx" )]
set( PACKAGE ${unit_name}-lite )
set( PROGRAM ${unit_name}-lite )

Expand Down Expand Up @@ -75,8 +75,8 @@ function( make_target name no_exceptions )
ternary( ne no_exceptions "-ne" "" )

add_executable ( ${PROGRAM}-${name}${ne} ${name}.cpp )
target_include_directories ( ${PROGRAM}-${name}${ne} PRIVATE ../../variant-lite/include )
target_link_libraries ( ${PROGRAM}-${name}${ne} PRIVATE ${PACKAGE} )
target_include_directories ( ${PROGRAM}-${name}${ne} PRIVATE ../include )
# target_link_libraries ( ${PROGRAM}-${name}${ne} PRIVATE ${PACKAGE} )
if ( no_exceptions )
target_compile_options ( ${PROGRAM}-${name}${ne} PRIVATE ${NO_EXCEPTIONS_OPTIONS} )
else()
Expand Down

0 comments on commit 54e4ced

Please sign in to comment.