Commit 8698692f authored by Jan Möbius's avatar Jan Möbius

Created common cmake file for types

parent a475c111
include(ACGCommon)
include(type)
include_directories (
..
${ACG_INCLUDE_DIR}
${OPENMESH_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${OPENGL_INCLUDE_DIR}
${GLEW_INCLUDE_DIR}
${GLUT_INCLUDE_DIR}
)
link_directories (
${GLEW_LIBRARY_DIR}
${ADDITIONAL_PLUGINLIB_LINK_DIRS}
)
#=======================================================
# General defines
#=======================================================
# generate dllexport macros on windows
if (WIN32)
add_definitions (
-DPLUGINLIBDLL
-DUSEPLUGINLIBDLL
-DBUILDOBJECTTYPEDLL
-DACGDLL
-DUSEACG
)
endif ()
#=======================================================
# Cleanup
#=======================================================
# collect all header,source files
acg_append_files (headers "*.hh" . )
acg_append_files (sources "*.cc" . )
acg_qt5_automoc (moc_targets ${headers})
# Match our current directory name
string (REGEX MATCH "[^/\\]*$" TYPENAME ${CMAKE_CURRENT_SOURCE_DIR})
string(TOUPPER ${TYPENAME} TYPENAME )
include_directories (
..
${ACG_INCLUDE_DIR}
${OPENMESH_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../..
${CMAKE_CURRENT_BINARY_DIR}
${OPENGL_INCLUDE_DIR}
${GLEW_INCLUDE_DIR}
${GLUT_INCLUDE_DIR}
)
# remove template cc files from source file list
acg_drop_templates (sources)
acg_add_library ( ${TYPENAME} SHARED ${sources} ${headers} ${moc_targets})
set_target_properties ( ${TYPENAME} PROPERTIES MACOSX_RPATH 0 )
add_dependencies( ${TYPENAME} OpenMeshCore OpenMeshTools ACG OpenFlipperPluginLib)
target_link_libraries (${TYPENAME}
${OPENMESH_LIBRARIES}
ACG
${QT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARY}
${GLUT_LIBRARIES}
OpenFlipperPluginLib
)
include(ACGCommon)
include(type)
include_directories (
..
${ACG_INCLUDE_DIR}
${OPENMESH_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${OPENGL_INCLUDE_DIR}
${GLEW_INCLUDE_DIR}
${GLUT_INCLUDE_DIR}
)
link_directories (
${GLEW_LIBRARY_DIR}
${ADDITIONAL_PLUGINLIB_LINK_DIRS}
)
#=======================================================
# General defines
#=======================================================
# generate dllexport macros on windows
if (WIN32)
add_definitions (
-DPLUGINLIBDLL
-DUSEPLUGINLIBDLL
-DBUILDOBJECTTYPEDLL
-DACGDLL
-DUSEACG
)
endif ()
#=======================================================
# Cleanup
#=======================================================
# collect all header,source files
acg_append_files (headers "*.hh" . )
acg_append_files (sources "*.cc" . )
acg_qt5_automoc (moc_targets ${headers})
# Match our current directory name
string (REGEX MATCH "[^/\\]*$" TYPENAME ${CMAKE_CURRENT_SOURCE_DIR})
string(TOUPPER ${TYPENAME} TYPENAME )
include_directories (
..
${ACG_INCLUDE_DIR}
${OPENMESH_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../..
${CMAKE_CURRENT_BINARY_DIR}
${OPENGL_INCLUDE_DIR}
${GLEW_INCLUDE_DIR}
${GLUT_INCLUDE_DIR}
)
# remove template cc files from source file list
acg_drop_templates (sources)
acg_add_library ( ${TYPENAME} SHARED ${sources} ${headers} ${moc_targets})
set_target_properties ( ${TYPENAME} PROPERTIES MACOSX_RPATH 0 )
add_dependencies( ${TYPENAME} OpenMeshCore OpenMeshTools ACG OpenFlipperPluginLib)
target_link_libraries (${TYPENAME}
${OPENMESH_LIBRARIES}
ACG
${QT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARY}
${GLUT_LIBRARIES}
OpenFlipperPluginLib
)
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