Commit 8ee17002 authored by Jan Möbius's avatar Jan Möbius

Removed the very slow grouping

parent f103a72c
......@@ -73,8 +73,9 @@ set (directories
)
# collect all header,source and ui files
acg_append_files (headers "*.hh" ${directories})
acg_append_files (sources "*.cc" ${directories})
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
......
include (ACGCommon)
set ( ADDITIONAL_PLUGINLIB_LIBS "")
set ( ADDITIONAL_PLUGINLIB_INCS "")
set ( ADDITIONAL_PLUGINLIB_COMPILER_FLAGS "")
set ( ADDITIONAL_PLUGINLIB_LINK_DIRS "")
# search all ObjectTypes in the ObjectType directory for additional build information
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
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 ()
# search all lib directories in packages for OpenFlipper
file (
GLOB PACKAGE_DIRS
"${CMAKE_SOURCE_DIR}/Package-*"
)
include_directories (
..
${PACKAGE_DIRS}
${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}
${ADDITIONAL_PLUGINLIB_INCS}
${PACKAGE_INCLUDES}
)
link_directories (
${GLEW_LIBRARY_DIR}
${ADDITIONAL_PLUGINLIB_LINK_DIRS}
)
#=======================================================
# General defines
#=======================================================
# generate dllexport macros on windows
if (WIN32)
add_definitions (
-DPLUGINLIBDLL
-DACGDLL
-DUSEACG
-DFREEGLUT_LIB_PRAGMAS=0
)
endif ()
# define core version
add_definitions (
-DCORE_VERSION="${OPENFLIPPER_VERSION}"
)
# Mark this build part as building OpenFLippers Core
add_definitions(-DOPENFLIPPERPLUGINLIB )
#=======================================================
# Add possibility to debug OpenFlipperSettings
#=======================================================
if ( NOT DEFINED OPENFLIPPER_SETTINGS_DEBUG )
set( OPENFLIPPER_SETTINGS_DEBUG false CACHE BOOL "Enable or disable debugging of OpenFlipperSettings" )
mark_as_advanced(OPENFLIPPER_SETTINGS_DEBUG)
endif()
if ( OPENFLIPPER_SETTINGS_DEBUG )
add_definitions(-DOPENFLIPPER_SETTINGS_DEBUG )
endif()
#=======================================================
# Collect files to compile
#=======================================================
# source code directories
set (directories
../BasePlugin
../ACGHelper
../common
../threads
../common/bsp
../INIFile
../widgets/glWidget
../publicWidgets/objectSelectionWidget
../widgets/filePicker
../Utils/FileIO
../Utils/Memory
)
# collect all header,source and ui files
acg_append_files (headers "*.hh" ${directories})
acg_append_files (sources "*.cc" ${directories})
#=======================================================
# Cleanup
#=======================================================
# remove template cc files from source file list
acg_drop_templates (sources)
#=======================================================
# Create library
#=======================================================
RECURSE_GROUPS( ${CMAKE_CURRENT_SOURCE_DIR}/../../ )
if (QT5_FOUND)
acg_add_library (OpenFlipperPluginLib SHARED ${sources} ${headers} )
endif ()
if( ADDITIONAL_PLUGINLIB_COMPILER_FLAGS )
set_target_properties (
OpenFlipperPluginLib PROPERTIES
COMPILE_FLAGS ${ADDITIONAL_PLUGINLIB_COMPILER_FLAGS}
)
endif()
target_link_libraries (OpenFlipperPluginLib
${OPENMESH_LIBRARIES}
ACG
${QT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARY}
${GLUT_LIBRARIES}
${FTGL_LIBS}
${ADDITIONAL_PLUGINLIB_LIBS}
)
#=======================================================
# Setup translation files for OpenFlipperPluginLib
#=======================================================
set (trans_files ${sources})
list (APPEND trans_files ${ui})
list (APPEND trans_files ${headers})
acg_add_translations (OpenFlipperPluginLib "de_DE" "${trans_files}")
include (ACGCommon)
set ( ADDITIONAL_PLUGINLIB_LIBS "")
set ( ADDITIONAL_PLUGINLIB_INCS "")
set ( ADDITIONAL_PLUGINLIB_COMPILER_FLAGS "")
set ( ADDITIONAL_PLUGINLIB_LINK_DIRS "")
# search all ObjectTypes in the ObjectType directory for additional build information
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
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 ()
# search all lib directories in packages for OpenFlipper
file (
GLOB PACKAGE_DIRS
"${CMAKE_SOURCE_DIR}/Package-*"
)
include_directories (
..
${PACKAGE_DIRS}
${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}
${ADDITIONAL_PLUGINLIB_INCS}
${PACKAGE_INCLUDES}
)
link_directories (
${GLEW_LIBRARY_DIR}
${ADDITIONAL_PLUGINLIB_LINK_DIRS}
)
#=======================================================
# General defines
#=======================================================
# generate dllexport macros on windows
if (WIN32)
add_definitions (
-DPLUGINLIBDLL
-DACGDLL
-DUSEACG
-DFREEGLUT_LIB_PRAGMAS=0
)
endif ()
# define core version
add_definitions (
-DCORE_VERSION="${OPENFLIPPER_VERSION}"
)
# Mark this build part as building OpenFLippers Core
add_definitions(-DOPENFLIPPERPLUGINLIB )
#=======================================================
# Add possibility to debug OpenFlipperSettings
#=======================================================
if ( NOT DEFINED OPENFLIPPER_SETTINGS_DEBUG )
set( OPENFLIPPER_SETTINGS_DEBUG false CACHE BOOL "Enable or disable debugging of OpenFlipperSettings" )
mark_as_advanced(OPENFLIPPER_SETTINGS_DEBUG)
endif()
if ( OPENFLIPPER_SETTINGS_DEBUG )
add_definitions(-DOPENFLIPPER_SETTINGS_DEBUG )
endif()
#=======================================================
# Collect files to compile
#=======================================================
# source code directories
set (directories
../BasePlugin
../ACGHelper
../common
../threads
../common/bsp
../INIFile
../widgets/glWidget
../publicWidgets/objectSelectionWidget
../widgets/filePicker
../Utils/FileIO
../Utils/Memory
)
# 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
#=======================================================
# remove template cc files from source file list
acg_drop_templates (sources)
#=======================================================
# Create library
#=======================================================
if (QT5_FOUND)
acg_add_library (OpenFlipperPluginLib SHARED ${sources} ${headers} )
endif ()
if( ADDITIONAL_PLUGINLIB_COMPILER_FLAGS )
set_target_properties (
OpenFlipperPluginLib PROPERTIES
COMPILE_FLAGS ${ADDITIONAL_PLUGINLIB_COMPILER_FLAGS}
)
endif()
target_link_libraries (OpenFlipperPluginLib
${OPENMESH_LIBRARIES}
ACG
${QT_LIBRARIES}
${OPENGL_LIBRARIES}
${GLEW_LIBRARY}
${GLUT_LIBRARIES}
${FTGL_LIBS}
${ADDITIONAL_PLUGINLIB_LIBS}
)
#=======================================================
# Setup translation files for OpenFlipperPluginLib
#=======================================================
set (trans_files ${sources})
list (APPEND trans_files ${ui})
list (APPEND trans_files ${headers})
acg_add_translations (OpenFlipperPluginLib "de_DE" "${trans_files}")
......@@ -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}
......
......@@ -609,11 +609,14 @@ function (_build_openflipper_plugin plugin)
# collect all header,source and ui files
acg_append_files (headers "*.hh" ${directories})
acg_append_files (sources "*.cc" ${directories})
acg_append_files (sources "*.cpp" ${directories})
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)
......
......@@ -105,9 +105,12 @@ if (WIN32)
endif ()
# collect all header,source and ui files
acg_append_files (headers "*.hh" ${directories})
acg_append_files (sources "*.cc" ${directories})
acg_append_files (qrc "*.qrc" ${directories} .)
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