Commit 00e26847 authored by Jan Möbius's avatar Jan Möbius
parents e4a162e1 949706bb
......@@ -75,6 +75,7 @@ set (directories
# collect all header,source and ui files
acg_append_files (headers "*.hh" ${directories})
acg_append_files (sources "*.cc" ${directories})
acg_append_files (ui-files "*.ui" ${directories})
# remove template cc files from source file list
acg_drop_templates (sources)
......@@ -106,7 +107,7 @@ file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/static_plugins.cc" ";\n} /* namespace c
list(APPEND RC_SRC "${CMAKE_CURRENT_BINARY_DIR}/static_plugins.cc")
RECURSE_GROUPS( ${CMAKE_CURRENT_SOURCE_DIR}/../../ )
source_group(TREE ${CMAKE_SOURCE_DIR} FILES ${sources} ${headers} ${ui-files} )
if (WIN32)
# add app icon rc file to windows build
......
......@@ -110,6 +110,10 @@ set (directories
# collect all header,source and ui files
acg_append_files (headers "*.hh" ${directories})
acg_append_files (sources "*.cc" ${directories})
acg_append_files (ui-files "*.ui" ${directories})
source_group(TREE ${CMAKE_SOURCE_DIR} FILES ${sources} ${headers} ${ui-files} )
#=======================================================
# Cleanup
......@@ -121,7 +125,6 @@ acg_drop_templates (sources)
#=======================================================
# Create library
#=======================================================
RECURSE_GROUPS( ${CMAKE_CURRENT_SOURCE_DIR}/../../ )
if (QT5_FOUND)
acg_add_library (OpenFlipperPluginLib SHARED ${sources} ${headers} )
......
......@@ -18,8 +18,10 @@
# author Jan Woetzel 2004-2006
# www.mip.informatik.uni-kiel.de/~jw
FIND_PACKAGE(Doxygen)
# Guard the finder here, to avoid calling it multiple times
IF (NOT DOXYGEN_FOUND)
FIND_PACKAGE(Doxygen)
endif()
IF (DOXYGEN_FOUND)
......
# Force minimal cmake version
# Required 3.1 to set C++11
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
# Required 3.8 to use source_group TREE
cmake_minimum_required(VERSION 3.8.0 FATAL_ERROR)
file(SHA512 ${CMAKE_SOURCE_DIR}/CMakeLists.txt HASH_TOPLEVEL_CMAKEFILE)
file(SHA512 ${CMAKE_SOURCE_DIR}/OpenFlipper/cmake/CMakeLists.txt HASH_LATEST_CMAKEFILE)
......@@ -63,6 +63,8 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
#This finder takes very long, so call it once here to avoid calling it multiple times in the subprojects
FIND_PACKAGE(Doxygen)
# Include some of our OpenFlipper cmake macros
......
......@@ -11,26 +11,6 @@ if(${MSVC_GROUPING})
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif(${MSVC_GROUPING})
MACRO (RECURSE_GROUPS dirname)
if(${MSVC_GROUPING})
SET(ALL_FILES)
FILE(GLOB_RECURSE allfiles "${dirname}/*.*")
SET(ALL_FILES ${ALL_FILES} ${allfiles})
STRING(REGEX REPLACE ".*/([^/]*)" "\\1" maindir "${dirname}")
FOREACH(file ${allfiles})
STRING(REGEX REPLACE "${dirname}/(.*)/[^/]*" "\\1" loopdirname "${file}")
STRING(REGEX REPLACE "/" "\\\\" loopdirname "${loopdirname}")
IF(NOT "${file}" MATCHES "${dirname}/(.*)/[^/]*")
source_group("${maindir}" FILES ${file})
ELSE()
source_group("${maindir}\\${loopdirname}" FILES ${file})
ENDIF()
ENDFOREACH()
endif(${MSVC_GROUPING})
ENDMACRO (RECURSE_GROUPS)
MACRO (GROUP_PROJECT targetname groupname)
if(${MSVC_GROUPING})
set_target_properties(${targetname}
......
......@@ -612,9 +612,12 @@ function (_build_openflipper_plugin plugin)
acg_append_files (headers "*.hh" ${directories})
acg_append_files (sources "*.cc" ${directories})
acg_append_files (sources "*.cpp" ${directories})
acg_append_files (ui-files "*.ui" ${directories})
acg_append_files (sources "*.c" ${directories})
acg_append_files (qrc "*.qrc" ${directories})
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${sources} ${headers} ${ui-files} ${qrc})
# remove template cc files from source file list
acg_drop_templates (sources)
......@@ -834,8 +837,6 @@ macro (openflipper_plugin)
)
if (NOT DISABLE_PLUGIN_${_PLUGIN})
#group the files in msvc
RECURSE_GROUPS( ${CMAKE_CURRENT_SOURCE_DIR} )
_build_openflipper_plugin (${_plugin} ${ARGN})
set(LOADED_PACKAGES ${LOADED_PACKAGES} PARENT_SCOPE)
set(INSTALLDATA_DIRS ${INSTALLDATA_DIRS} PARENT_SCOPE)
......
include(ACGCommon)
include_directories (
..
${ACG_INCLUDE_DIR}
${OPENMESH_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${OPENGL_INCLUDE_DIR}
${GLEW_INCLUDE_DIR}
${GLUT_INCLUDE_DIR}
${ADDITIONAL_PLUGINLIB_INCS}
)
link_directories (
${GLEW_LIBRARY_DIR}
${ADDITIONAL_PLUGINLIB_LINK_DIRS}
......
......@@ -107,8 +107,11 @@ endif ()
# collect all header,source and ui files
acg_append_files (headers "*.hh" ${directories})
acg_append_files (sources "*.cc" ${directories})
acg_append_files (ui-files "*.ui" ${directories})
acg_append_files (qrc "*.qrc" ${directories} .)
source_group(TREE ${CMAKE_SOURCE_DIR} FILES ${sources} ${headers} ${ui-files} ${qrc})
# remove template cc files from source file list
acg_drop_templates (sources)
......@@ -128,8 +131,6 @@ endif ()
# display results
acg_print_configure_header (ACG "ACG")
RECURSE_GROUPS( ${CMAKE_CURRENT_SOURCE_DIR} )
if ( NOT WIN32 )
# Allow targets depending on ACG find the autogenerated header files
target_include_directories( ACG PUBLIC
......
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