Commit 2fa08786 authored by Jan Möbius's avatar Jan Möbius

Handle additional global dependencies in CoreApp

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11787 383ad7c9-94d9-4d36-a494-682f7c89f535
parent af94728c
......@@ -100,6 +100,36 @@ if (WIN32)
-DUSEACG )
endif ()
# ====================================================================================
# Get list of ll plugin dependencies and handle special ones
# where we need to link the library directly into the core to prevent
# linker problems
# ====================================================================================
# Get the property containing the list of all dependencies of the plugins
# List is created when the plugins are added
get_property( global_dependency_list GLOBAL PROPERTY GLOBAL_PLUGIN_DEPENDENCIES_LIST)
set(COREAPP_ADDITIONAL_LINK_LIBRARIES "")
# Special Handling for mpi
list( FIND global_dependency_list "MPI" found)
if ( NOT found EQUAL -1 )
find_package(MPI)
list(APPEND COREAPP_ADDITIONAL_LINK_LIBRARIES ${MPI_LIBRARIES})
endif()
# Special Handling for openni
list( FIND global_dependency_list "OPENNI" found)
if ( NOT found EQUAL -1 )
find_package(OPENNI)
list(APPEND COREAPP_ADDITIONAL_LINK_LIBRARIES ${OPENNI_LIBRARY})
endif()
# ====================================================================================
# Linker Dependencies for Core app
# ====================================================================================
target_link_libraries (OpenFlipper
OpenMeshCore
OpenMeshTools
......@@ -110,7 +140,7 @@ target_link_libraries (OpenFlipper
${GLEW_LIBRARY}
${GLUT_LIBRARIES}
${FTGL_LIBS}
/usr/lib/libOpenNI.so
${COREAPP_ADDITIONAL_LINK_LIBRARIES}
)
if (APPLE)
......
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