xo-flatstring: build: install examples if XO_ENABLE_EXAMPLES
This commit is contained in:
parent
abf3330d69
commit
ddf2ca08e4
2 changed files with 12 additions and 9 deletions
|
|
@ -38,6 +38,12 @@ xo_install_library4(${SELF_LIB} ${PROJECT_NAME}Targets)
|
|||
# provide find_package() support for projects using this library
|
||||
xo_export_cmake_config(${PROJECT_NAME} ${PROJECT_VERSION} ${PROJECT_NAME}Targets)
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
|
||||
if (XO_ENABLE_EXAMPLES)
|
||||
install(TARGETS flatstring_ex1)
|
||||
endif()
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# docs targets depend on all the other library/utest targets
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,15 +1,12 @@
|
|||
# xo-flatstring/example/ex1/CMakeLists.txt
|
||||
|
||||
set(SELF_EXE xo_flatstring_ex1)
|
||||
set(SELF_EXE flatstring_ex1)
|
||||
set(SELF_SRCS ex1.cpp)
|
||||
|
||||
add_executable(${SELF_EXE} ${SELF_SRCS})
|
||||
xo_include_options2(${SELF_EXE})
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# dependencies..
|
||||
|
||||
xo_self_headeronly_dependency(${SELF_EXE} xo_flatstring)
|
||||
#xo_dependency(${SELF_EXE} reflect)
|
||||
if (XO_ENABLE_EXAMPLES)
|
||||
add_executable(${SELF_EXE} ${SELF_SRCS})
|
||||
xo_include_options2(${SELF_EXE})
|
||||
xo_self_headeronly_dependency(${SELF_EXE} xo_flatstring)
|
||||
endif()
|
||||
|
||||
# end CMakeLists.txt
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue