Skip to content
Snippets Groups Projects
Commit 93e0c1bf authored by Jan Möbius's avatar Jan Möbius
Browse files

First preparation of the new packages

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@21190 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 5e69619d
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,8 @@ file (
GLOB _plugin_buildinfos
RELATIVE "${CMAKE_SOURCE_DIR}"
"${CMAKE_SOURCE_DIR}/ObjectTypes/*/CMakeLists.txt"
"${CMAKE_SOURCE_DIR}/Package*/ObjectTypes/*/CMakeLists.txt"
)
# include all cmake files found for objecttypes here
......@@ -17,6 +19,13 @@ foreach ( _buildInfo ${_plugin_buildinfos})
include ("${CMAKE_SOURCE_DIR}/${_buildInfo}")
endforeach ()
# Find all packages and include their Paths here like the toplevel would be
file(GLOB OF_PACKAGES RELATIVE "${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/Package*" )
foreach ( OF_PACKAGE ${OF_PACKAGES})
list(APPEND PACKAGE_INCLUDES "${CMAKE_SOURCE_DIR}/${OF_PACKAGES}")
endforeach ()
include_directories (
..
${OPENMESH_INCLUDE_DIRS}
......@@ -27,6 +36,7 @@ include_directories (
${GLEW_INCLUDE_DIR}
${GLUT_INCLUDE_DIR}
${ADDITIONAL_PLUGINLIB_INCS}
${PACKAGE_INCLUDES}
)
link_directories (
......@@ -92,14 +102,40 @@ acg_append_files (headers "*.hh" ${directories})
acg_append_files (sources "*.cc" ${directories})
acg_append_files (ui "*.ui" ${directories})
# add additional object type sources
####################################################################################
# Object Type stuff
####################################################################################
#########################################################
# add additional toplevel object type sources
#########################################################
acg_append_files_recursive (headers "*.hh" ${CMAKE_SOURCE_DIR}/ObjectTypes)
acg_append_files_recursive (sources "*.cc" ${CMAKE_SOURCE_DIR}/ObjectTypes)
acg_append_files_recursive (ui "*.ui" ${CMAKE_SOURCE_DIR}/ObjectTypes)
#########################################################
# Find all packages and include their Object types
#########################################################
file(GLOB PACKAGES RELATIVE "${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/Package*" )
foreach ( OF_PACKAGE ${PACKAGES})
acg_append_files_recursive (headers "*.hh" ${CMAKE_SOURCE_DIR}/${OF_PACKAGE})
acg_append_files_recursive (sources "*.cc" ${CMAKE_SOURCE_DIR}/${OF_PACKAGE})
acg_append_files_recursive (ui "*.ui" ${CMAKE_SOURCE_DIR}/${OF_PACKAGE})
endforeach ()
#=======================================================
# Cleanup
#=======================================================
# remove template cc files from source file list
acg_drop_templates (sources)
#=======================================================
# Moc/UIC handling
#=======================================================
# genereate uic and moc targets
if (QT5_FOUND)
acg_qt5_autouic (uic_targets ${ui})
......
......@@ -40,6 +40,8 @@ function (of_add_plugins)
RELATIVE "${CMAKE_SOURCE_DIR}"
"${CMAKE_SOURCE_DIR}/Plugin-*/CMakeLists.txt"
"${CMAKE_SOURCE_DIR}/PluginCollection-*/Plugin-*/CMakeLists.txt"
"${CMAKE_SOURCE_DIR}/Package*/Plugin-*/CMakeLists.txt"
"${CMAKE_SOURCE_DIR}/Package*/PluginCollection-*/Plugin-*/CMakeLists.txt"
)
foreach (_plugin ${_plugins_in})
......
......@@ -448,6 +448,13 @@ function (_build_openflipper_plugin plugin)
if (${_PLUGIN}_HAS_DEPS)
# Find all packages and include their Paths here as they would be in the toplevel
file(GLOB OF_PACKAGES RELATIVE "${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/Package*" )
foreach ( OF_PACKAGE ${OF_PACKAGES})
list(APPEND PACKAGE_INCLUDES "${CMAKE_SOURCE_DIR}/${OF_PACKAGES}")
endforeach ()
include_directories (
.
${CMAKE_SOURCE_DIR}
......@@ -460,6 +467,7 @@ function (_build_openflipper_plugin plugin)
${GLEW_INCLUDE_DIR}
${GLUT_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/OpenFlipper/PluginLib
${PACKAGE_INCLUDES}
)
# Linking for apple is special here as the linker pulls in the dependencies, we have to set them like in PluginLib!
......@@ -470,6 +478,7 @@ function (_build_openflipper_plugin plugin)
GLOB _plugin_buildinfos
RELATIVE "${CMAKE_SOURCE_DIR}"
"${CMAKE_SOURCE_DIR}/ObjectTypes/*/CMakeLists.txt"
"${CMAKE_SOURCE_DIR}/Package*/ObjectTypes/*/CMakeLists.txt"
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment