Commit dab31c14 authored by Jan Möbius's avatar Jan Möbius

OM Finder improvements

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@17194 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 7982f7a0
......@@ -74,10 +74,8 @@ find_package (GLUT)
if (NOT GLUT_FOUND)
message (FATAL_ERROR "GLUT not found!")
endif ()
find_package (OpenMesh)
if (NOT OPENMESH_FOUND)
message (FATAL_ERROR "OpenMesh not found!")
endif ()
# OpenMesh is a dependent project (in libs_required) so no finder is needed.
#find_package (OpenMesh REQUIRED)
find_package (OpenVolumeMesh)
if (NOT OPENVOLUMEMESH_FOUND)
message (FATAL_ERROR "OpenVolumeMesh not found!")
......@@ -100,31 +98,6 @@ SET(OPENFLIPPER_TEST_BINARIES ${CMAKE_BINARY_DIR}/tests/testBinaries )
enable_testing()
# ========================================================================
# Core Library Components (Except the Core application)
# ========================================================================
add_subdirectory (ACG)
add_subdirectory (OpenFlipper/PluginLib)
# ========================================================================
# Tests
# ========================================================================
add_subdirectory (tests)
# ========================================================================
# Documentation generators
# ========================================================================
# Create dirs to make doxygen happy
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc )
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Help )
# Add the deocumentation targets
add_subdirectory (OpenFlipper/Documentation/DeveloperTarget)
add_subdirectory (OpenFlipper/Documentation/DeveloperQtHelpTarget)
add_subdirectory (OpenFlipper/Documentation/UserTarget)
add_subdirectory (OpenFlipper/Documentation/UserQtHelpTarget)
# ========================================================================
# Build all additional libraries
# ========================================================================
......@@ -134,11 +107,10 @@ add_subdirectory (OpenFlipper/Documentation/UserQtHelpTarget)
file (
GLOB _local_libs_in
RELATIVE "${CMAKE_SOURCE_DIR}"
"${CMAKE_SOURCE_DIR}/libs/*/CMakeLists.txt"
"${CMAKE_SOURCE_DIR}/libs_required/*/CMakeLists.txt"
"${CMAKE_SOURCE_DIR}/libs/*/CMakeLists.txt"
)
set( REMAINING_LOCAL_LIBS "" )
# Special Comiso case:
......@@ -186,6 +158,31 @@ foreach (_localLib ${REMAINING_LOCAL_LIBS})
endif()
endforeach ()
# ========================================================================
# Core Library Components (Except the Core application)
# ========================================================================
add_subdirectory (ACG)
add_subdirectory (OpenFlipper/PluginLib)
# ========================================================================
# Tests
# ========================================================================
add_subdirectory (tests)
# ========================================================================
# Documentation generators
# ========================================================================
# Create dirs to make doxygen happy
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc )
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Help )
# Add the deocumentation targets
add_subdirectory (OpenFlipper/Documentation/DeveloperTarget)
add_subdirectory (OpenFlipper/Documentation/DeveloperQtHelpTarget)
add_subdirectory (OpenFlipper/Documentation/UserTarget)
add_subdirectory (OpenFlipper/Documentation/UserQtHelpTarget)
# ========================================================================
# PolyLine extension special case
# ========================================================================
......
# - Try to findOPENMESH
#
# Try to find OPENMESH
# Once done this will define
#
# OPENMESH_FOUND - system has OPENMESH
# OPENMESH_INCLUDE_DIR - theOPENMESH include directory
# OPENMESH_LIBRARY - Link these to use OPENMESH
# OPENMESH_LIBRARY_DIR - Library DIR of OPENMESH
#
# OPENMESH_INCLUDE_DIRS - the OPENMESH include directories
# OPENMESH_LIBRARIES - Link these to use OPENMESH
#
# Copyright 2013 Computer Graphics Group, RWTH Aachen University
# Authors: Jan Möbius <moebius@cs.rwth-aachen.de>
# Hans-Christian Ebke <ebke@cs.rwth-aachen.de>
#
# This file is part of OpenMesh.
#===========================================================================
#
# OpenMesh
# Copyright (C) 2001-2012 by Computer Graphics Group, RWTH Aachen
# www.openmesh.org
#
#---------------------------------------------------------------------------
# This file is part of OpenMesh.
#
# OpenMesh is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version with the
# following exceptions:
#
# If other files instantiate templates or use macros
# or inline functions from this file, or you compile this file and
# link it with other files to produce an executable, this file does
# not by itself cause the resulting executable to be covered by the
# GNU Lesser General Public License. This exception does not however
# invalidate any other reasons why the executable file might be
# covered by the GNU Lesser General Public License.
#
# OpenMesh is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU LesserGeneral Public
# License along with OpenMesh. If not,
# see <http://www.gnu.org/licenses/>.
#
#===========================================================================
IF (OPENMESH_INCLUDE_DIR)
# Already in cache, be silent
......@@ -22,16 +60,20 @@ FIND_PATH(OPENMESH_INCLUDE_DIR OpenMesh/Core/Mesh/PolyMeshT.hh
/ACG/acgdev/gcc-4.0-x86_64/OM2/OpenMesh-2.0/installed/include
"C:\\Program Files\\OpenMesh 2.0\\include"
)
SET(OPENMESH_LIBRARY_DIR NOTFOUND CACHE PATH "The directory where the OpenMesh libraries can be found.")
SET(SEARCH_PATHS
"${OPENMESH_INCLUDE_DIR}/../lib"
"${OPENMESH_INCLUDE_DIR}/../lib/OpenMesh"
"${OPENMESH_LIBRARY_DIR}")
FIND_LIBRARY(OPENMESH_CORE_LIBRARY NAMES OpenMeshCored OpenMeshCore PATHS ${SEARCH_PATHS})
FIND_LIBRARY(OPENMESH_TOOLS_LIBRARY NAMES OpenMeshToolsd OpenMeshTools PATHS ${SEARCH_PATHS})
IF (OPENMESH_INCLUDE_DIR )
SET(OPENMESH_FOUND TRUE)
IF (WIN32)
SET(OPENMESH_LIBRARY_DIR "${OPENMESH_INCLUDE_DIR}/../lib")
ELSE (WIN32)
SET(OPENMESH_LIBRARY_DIR "${OPENMESH_INCLUDE_DIR}/../lib/OpenMesh")
ENDIF (WIN32)
SET(OPENMESH_LIBRARY "OpenMeshCore;OpenMeshTools")
ELSE (OPENMESH_INCLUDE_DIR)
SET(OPENMESH_FOUND FALSE )
ENDIF (OPENMESH_INCLUDE_DIR )
INCLUDE (FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenMesh DEFAULT_MSG OPENMESH_CORE_LIBRARY OPENMESH_TOOLS_LIBRARY OPENMESH_INCLUDE_DIR)
IF (OPENMESH_FOUND)
SET(OPENMESH_LIBRARIES "${OPENMESH_CORE_LIBRARY}" "${OPENMESH_TOOLS_LIBRARY}")
SET(OPENMESH_INCLUDE_DIRS "${OPENMESH_INCLUDE_DIR}")
ENDIF (OPENMESH_FOUND)
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