Commit 35ab6e41 authored by Jan Möbius's avatar Jan Möbius

Commit additional library dirs from plugins

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7446 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 3d34bef7
include (ACGCommon) include (ACGCommon)
set ( ADDITIONAL_PLUGINLIB_LIBS "") set ( ADDITIONAL_PLUGINLIB_LIBS "")
set ( ADDITIONAL_PLUGINLIB_INCS "") set ( ADDITIONAL_PLUGINLIB_INCS "")
set ( ADDITIONAL_PLUGINLIB_COMPILER_FLAGS "") set ( ADDITIONAL_PLUGINLIB_COMPILER_FLAGS "")
set ( ADDITIONAL_PLUGINLIB_LINK_DIRS "")
# search all ObjectTypes in the ObjectType directory for additional build information
file ( # search all ObjectTypes in the ObjectType directory for additional build information
GLOB _plugin_buildinfos file (
RELATIVE "${CMAKE_SOURCE_DIR}" GLOB _plugin_buildinfos
"${CMAKE_SOURCE_DIR}/ObjectTypes/*/CMakeLists.txt" RELATIVE "${CMAKE_SOURCE_DIR}"
) "${CMAKE_SOURCE_DIR}/ObjectTypes/*/CMakeLists.txt"
)
# include all cmake files fouund for objecttypes here
foreach ( _buildInfo ${_plugin_buildinfos}) # include all cmake files fouund for objecttypes here
include ("${CMAKE_SOURCE_DIR}/${_buildInfo}") foreach ( _buildInfo ${_plugin_buildinfos})
endforeach () include ("${CMAKE_SOURCE_DIR}/${_buildInfo}")
endforeach ()
include_directories (
.. include_directories (
${CMAKE_SOURCE_DIR}/OpenMesh/src ..
${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/OpenMesh/src
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
${OPENGL_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${GLEW_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}
${GLUT_INCLUDE_DIR} ${GLEW_INCLUDE_DIR}
${ADDITIONAL_PLUGINLIB_INCS} ${GLUT_INCLUDE_DIR}
) ${ADDITIONAL_PLUGINLIB_INCS}
)
link_directories (
${GLEW_LIBRARY_DIR} link_directories (
) ${GLEW_LIBRARY_DIR}
${ADDITIONAL_PLUGINLIB_LINK_DIRS}
# source code directories )
set (directories
../BasePlugin # source code directories
../ACGHelper set (directories
../common ../BasePlugin
../threads ../ACGHelper
../common/bsp ../common
../INIFile ../threads
../widgets/glWidget ../common/bsp
) ../INIFile
../widgets/glWidget
# generate dllexport macros on windows )
if (WIN32)
add_definitions ( # generate dllexport macros on windows
-DPLUGINLIBDLL if (WIN32)
) add_definitions (
endif () -DPLUGINLIBDLL
)
# define core version endif ()
add_definitions (
-DCORE_VERSION="${OPENFLIPPER_VERSION}" # define core version
) add_definitions (
-DCORE_VERSION="${OPENFLIPPER_VERSION}"
# collect all header,source and ui files )
acg_append_files (headers "*.hh" ${directories})
acg_append_files (sources "*.cc" ${directories}) # collect all header,source and ui files
acg_append_files (ui "*.ui" ${directories}) acg_append_files (headers "*.hh" ${directories})
acg_append_files (sources "*.cc" ${directories})
# add additional object type sources acg_append_files (ui "*.ui" ${directories})
acg_append_files_recursive (headers "*.hh" ${CMAKE_SOURCE_DIR}/ObjectTypes)
acg_append_files_recursive (sources "*.cc" ${CMAKE_SOURCE_DIR}/ObjectTypes) # add additional object type sources
acg_append_files_recursive (headers "*.hh" ${CMAKE_SOURCE_DIR}/ObjectTypes)
# remove template cc files from source file list acg_append_files_recursive (sources "*.cc" ${CMAKE_SOURCE_DIR}/ObjectTypes)
acg_drop_templates (sources)
# remove template cc files from source file list
# genereate uic and moc targets acg_drop_templates (sources)
acg_qt4_autouic (uic_targets ${ui})
acg_qt4_automoc (moc_targets ${headers}) # genereate uic and moc targets
acg_qt4_autouic (uic_targets ${ui})
acg_add_library (PluginLib SHARED ${uic_targets} ${sources} ${headers} ${moc_targets}) acg_qt4_automoc (moc_targets ${headers})
set_target_properties (
PluginLib PROPERTIES acg_add_library (PluginLib SHARED ${uic_targets} ${sources} ${headers} ${moc_targets})
COMPILE_FLAGS ${ADDITIONAL_PLUGINLIB_COMPILER_FLAGS} set_target_properties (
) PluginLib PROPERTIES
COMPILE_FLAGS ${ADDITIONAL_PLUGINLIB_COMPILER_FLAGS}
set (trans_files ${sources}) )
list (APPEND trans_files ${ui})
list (APPEND trans_files ${headers}) set (trans_files ${sources})
acg_add_translations (PluginLib "de_DE" "${trans_files}") list (APPEND trans_files ${ui})
list (APPEND trans_files ${headers})
target_link_libraries (PluginLib acg_add_translations (PluginLib "de_DE" "${trans_files}")
OpenMeshCore
OpenMeshTools target_link_libraries (PluginLib
ACG OpenMeshCore
${QT_LIBRARIES} OpenMeshTools
${OPENGL_LIBRARIES} ACG
${GLEW_LIBRARY} ${QT_LIBRARIES}
${GLUT_LIBRARIES} ${OPENGL_LIBRARIES}
${FTGL_LIBS} ${GLEW_LIBRARY}
${ADDITIONAL_PLUGINLIB_LIBS} ${GLUT_LIBRARIES}
) ${FTGL_LIBS}
${ADDITIONAL_PLUGINLIB_LIBS}
)
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