Commit 85cb88f4 authored by Mike Kremer's avatar Mike Kremer

Made OpenVolumeMesh be ready to be built as external library.

git-svn-id: http://www.openvolumemesh.org/svnrepo/OpenVolumeMesh/trunk@86 66977474-1d4b-4f09-8fe9-267525286df2
parent 93791b05
cmake_minimum_required (VERSION 2.6)
project (OpenVolumeMesh)
if("${PROJECT_NAME}" STREQUAL "")
message("Setting project name to OpenVolumeMesh")
project (OpenVolumeMesh)
endif()
# add our macro directory to cmake search path
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
......@@ -23,8 +26,13 @@ endif ()
# ========================================================================
add_subdirectory (src)
add_subdirectory (examples)
add_subdirectory (documentation)
# Only add examples and doc to build target if OpenVolumeMesh
# is not built as external library only
if(${PROJECT_NAME} MATCHES "OpenVolumeMesh")
add_subdirectory (examples)
add_subdirectory (documentation)
endif()
# ========================================================================
# Bundle generation (Targets exist, now configure them)
......
......@@ -64,7 +64,10 @@ install(DIRECTORY .
endif ()
# Add unittests target
add_subdirectory(Unittests)
# Only build unittests if not built as external library
if(${PROJECT_NAME} MATCHES "OpenVolumeMesh")
# Add unittests target
add_subdirectory(Unittests)
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