Commit 987ebc52 authored by Martin Heistermann's avatar Martin Heistermann

cmake: always add targets, but exclude them from ALL if we are not the main project

parent adf9a36e
......@@ -16,6 +16,7 @@ else()
set(OVM_STANDALONE_BUILD FALSE)
endif()
set(OVM_ENABLE_APPLICATIONS ${OVM_STANDALONE_BUILD} CACHE BOOL "Build OpenVolumeMesh applications in 'all' target")
set(OVM_ENABLE_UNITTESTS ${OVM_STANDALONE_BUILD} CACHE BOOL "Build OpenVolumeMesh unit tests in 'all' target")
set(OVM_ENABLE_EXAMPLES ${OVM_STANDALONE_BUILD} CACHE BOOL "Build OpenVolumeMesh examples in 'all' target")
set(OVM_BUILD_DOCUMENTATION ${OVM_STANDALONE_BUILD} CACHE BOOL "Build OpenVolumeMesh documentation in 'all' target")
......@@ -40,12 +41,12 @@ enable_testing()
add_subdirectory (src)
if (OVM_ENABLE_EXAMPLES)
add_subdirectory (examples)
add_subdirectory(examples)
else()
add_subdirectory(examples EXCLUDE_FROM_ALL)
endif()
if (OVM_BUILD_DOCUMENTATION)
add_subdirectory (documentation)
endif()
add_subdirectory(documentation)
#export(PACKAGE OpenVolumeMesh)
......
......@@ -198,15 +198,15 @@ export(EXPORT OpenVolumeMeshTargets
NAMESPACE OpenVolumeMesh::)
export(PACKAGE OpenVolumeMesh)
# copy library to correct folder for building as subdirectory of other projects,
# such as OpenFlipper
#add_subdirectory(FileConverter)
if (OVM_ENABLE_APPLICATIONS)
add_subdirectory(FileConverter)
else()
add_subdirectory(FileConverter EXCLUDE_FROM_ALL)
endif()
if (OVM_ENABLE_UNITTESTS)
add_subdirectory(Unittests)
else()
# currently this clashes for an in-tree OF build
#add_subdirectory(Unittests EXCLUDE_FROM_ALL)
add_subdirectory(Unittests EXCLUDE_FROM_ALL)
endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment