mirror of
https://github.com/rizinorg/cutter.git
synced 2024-11-23 12:59:59 +00:00
Show a nice folder structure in Visual Studio (#2890)
This commit is contained in:
parent
8ad700a6dc
commit
0624cd1d19
@ -43,6 +43,12 @@ set(CUTTER_VERSION_FULL "${CUTTER_VERSION_MAJOR}.${CUTTER_VERSION_MINOR}.${CUTTE
|
||||
|
||||
project(Cutter VERSION "${CUTTER_VERSION_FULL}")
|
||||
|
||||
# Enable solution folder support
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
# Put Qt files in a separate folder
|
||||
set_property(GLOBAL PROPERTY AUTOGEN_SOURCE_GROUP "Generated Files")
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
include(CutterInstallDirs)
|
||||
|
@ -442,8 +442,11 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
|
||||
set_source_files_properties(${BINDINGS_SOURCE} PROPERTIES COMPILE_FLAGS -w)
|
||||
endif()
|
||||
|
||||
# Make a source group for Visual Studio
|
||||
set(CUTTER_SOURCES ${OPTIONS} ${UI_FILES} ${QRC_FILES} ${PLATFORM_RESOURCES} ${SOURCES} ${HEADER_FILES})
|
||||
source_group(TREE "${CMAKE_CURRENT_LIST_DIR}" FILES ${CUTTER_SOURCES})
|
||||
|
||||
add_executable(Cutter ${OPTIONS} ${UI_FILES} ${QRC_FILES} ${PLATFORM_RESOURCES} ${SOURCES} ${HEADER_FILES} ${BINDINGS_SOURCE})
|
||||
add_executable(Cutter ${CUTTER_SOURCES} ${BINDINGS_SOURCE})
|
||||
set_target_properties(Cutter PROPERTIES
|
||||
OUTPUT_NAME cutter
|
||||
RUNTIME_OUTPUT_DIRECTORY ..
|
||||
@ -452,6 +455,9 @@ set_target_properties(Cutter PROPERTIES
|
||||
CXX_VISIBILITY_PRESET hidden)
|
||||
target_compile_definitions(Cutter PRIVATE CUTTER_SOURCE_BUILD)
|
||||
|
||||
# Set Cutter as the startup project in Visual Studio
|
||||
set_property(DIRECTORY ${PROJECT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT Cutter)
|
||||
|
||||
set(CUTTER_INCLUDE_DIRECTORIES core widgets common plugins menus .)
|
||||
foreach(_dir ${CUTTER_INCLUDE_DIRECTORIES})
|
||||
target_include_directories(Cutter PUBLIC
|
||||
|
Loading…
Reference in New Issue
Block a user