From 8e9072560958a4e10d359c1904acdbcc5fa53943 Mon Sep 17 00:00:00 2001 From: Mike Kremer Date: Wed, 18 Jan 2012 09:48:05 +0000 Subject: [PATCH] Prepared OpenMesh for external build. git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@504 fdac6126-5c0c-442c-9429-916003d36597 --- CMakeLists.txt | 7 ++++++- src/OpenMesh/Core/CMakeLists.txt | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 85c0aa64..7abe75e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,7 +55,12 @@ endif() add_subdirectory (src/OpenMesh/Core) add_subdirectory (src/OpenMesh/Tools) add_subdirectory (src/OpenMesh/Apps) -add_subdirectory (src/Unittests) + +# Do not build unit tests when build as external library +if(${PROJECT_NAME} MATCHES "OpenMesh") + add_subdirectory (src/Unittests) +endif() + add_subdirectory (Doc) # ======================================================================== diff --git a/src/OpenMesh/Core/CMakeLists.txt b/src/OpenMesh/Core/CMakeLists.txt index 0d3740a0..cd9c5531 100644 --- a/src/OpenMesh/Core/CMakeLists.txt +++ b/src/OpenMesh/Core/CMakeLists.txt @@ -3,6 +3,7 @@ include (ACGCommon) include_directories ( ../.. ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/src ) # source code directories