Commit e6c634a7 authored by Martin Schultz's avatar Martin Schultz

Added project folders in MSVC when grouping is enabled

required libs are not yet grouped
parent ba3ec20d
Pipeline #2035 passed with stage
in 82 minutes and 25 seconds
......@@ -77,6 +77,8 @@ function (of_add_plugins)
# dependency of the plugin target.
add_custom_target(RSRC-${_plugin} DEPENDS ${DATA_FILES})
add_dependencies(Plugin-${_plugin} RSRC-${_plugin})
# group by folder on msvc
GROUP_PROJECT(RSRC-${_plugin} "Ressources")
endif()
endforeach ()
......
......@@ -609,6 +609,10 @@ function (_build_openflipper_plugin plugin)
add_library (Plugin-${plugin} MODULE ${uic_targets} ${sources} ${headers} ${moc_targets} ${qrc_targets} ${${_PLUGIN}_ADDSRC})
#group projects by parent folder name on MSVC (used for e.g. plugincollection)
get_filename_component(PARENT_DIR ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
get_filename_component(PARENT_DIR_NAME "${PARENT_DIR}" NAME)
GROUP_PROJECT(Plugin-${plugin} ${PARENT_DIR_NAME})
# add this plugin to build plugin list for dependency tracking
acg_set (OPENFLIPPER_PLUGINS "${OPENFLIPPER_PLUGINS};Plugin-${plugin}")
acg_set (OPENFLIPPER_${_PLUGIN}_BUILD "1")
......
include (MSVCMacros)
if (EXISTS ${CMAKE_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.cmake)
include (${CMAKE_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.cmake)
endif ()
......@@ -38,6 +39,7 @@ endif ()
if ( NOT TARGET doc )
ADD_CUSTOM_TARGET( doc )
SET_TARGET_PROPERTIES( doc PROPERTIES EchoString "Building Documentation" )
GROUP_PROJECT(doc Documentation)
endif()
# read version from file
......@@ -945,6 +947,7 @@ function (acg_add_translations _target _languages _sources)
# create a target for the translation files ( and object files )
# Use this target, to update only the translations
add_custom_target (translations_target_${_target} DEPENDS ${_qm_files})
GROUP_PROJECT( translations_target_${_target} "Translations")
# Build translations with the application
add_dependencies(${_target} translations_target_${_target} )
......
......@@ -103,6 +103,8 @@ IF (DOXYGEN_FOUND)
ENDIF(EXISTS "${DOC_DIRECTORY}/doxy.config.in")
ADD_CUSTOM_TARGET(${target} ${DOXYGEN_EXECUTABLE} ${DOXY_CONFIG})
# Group by folders on MSVC
GROUP_PROJECT( ${target} "Documentation")
add_dependencies( ${DOC_DEPENDENCY} ${target} )
......
if(MSVC_MACROS_INCLUDED)
return()
endif(MSVC_MACROS_INCLUDED)
set(MSVC_MACROS_INCLUDED TRUE)
set (MSVC_GROUPING ON CACHE BOOL "Group Files by folder structure on MSVC.")
# Enable project folders to group targets in solution folders on MSVC.
if(${MSVC_GROUPING})
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif(${MSVC_GROUPING})
MACRO (RECURSE_GROUPS dirname)
if(${MSVC_GROUPING})
SET(ALL_FILES)
......@@ -17,4 +29,12 @@ if(${MSVC_GROUPING})
ENDIF()
ENDFOREACH()
endif(${MSVC_GROUPING})
ENDMACRO (RECURSE_GROUPS)
\ No newline at end of file
ENDMACRO (RECURSE_GROUPS)
MACRO (GROUP_PROJECT targetname groupname)
if(${MSVC_GROUPING})
set_target_properties(${targetname}
PROPERTIES
FOLDER "${groupname}")
endif(${MSVC_GROUPING})
ENDMACRO (GROUP_PROJECT)
\ No newline at end of file
......@@ -15,11 +15,11 @@ if(BUILD_TESTING)
copy_if_different
${OPENFLIPPER_TEST_BINARIES}/${CMAKE_CFG_INTDIR}/minimalExecTest.exe
${OPENFLIPPER_TEST_BINARIES}/minimalExecTest.exe)
GROUP_PROJECT(minimalExecutionTest Tests)
endif()
ADD_TEST(NAME "Minimal_Execution_Test"
COMMAND ${OPENFLIPPER_TEST_BINARIES}/minimalExecTest )
set_tests_properties( Minimal_Execution_Test PROPERTIES
TIMEOUT 10
)
......
......@@ -12,6 +12,8 @@ ENDIF()
add_executable (compareTool compareTool.cc )
GROUP_PROJECT(compareTool Tests)
target_link_libraries (compareTool
${QT_LIBRARIES}
)
......
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