@@ -8,10 +8,6 @@ project(vpkedit
88set (CMAKE_CXX_STANDARD 20)
99set (CMAKE_CXX_STANDARD_REQUIRED ON )
1010
11- # options
12- option (VPKEDIT_BUILD_FOR_STRATA_SOURCE "Build VPKEdit with the intent of the CLI/GUI going into the bin folder of a Strata Source game" OFF )
13- option (VPKEDIT_BUILD_INSTALLER "Build installer for VPKEdit GUI application" ON )
14-
1511# add helpers
1612list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR } /cmake/helpers" )
1713include (CS_All )
@@ -23,6 +19,11 @@ cs_version_pretty() # PROJECT_VERSION_PRETTY
2319set (PROJECT_ORGANIZATION_NAME "craftablescience" CACHE INTERNAL "" FORCE )
2420set (PROJECT_HOMEPAGE_URL_API "https://api.github.com/repos/craftablescience/VPKEdit" CACHE INTERNAL "" FORCE )
2521
22+ # options
23+ option (VPKEDIT_BUILD_FOR_STRATA_SOURCE "Build ${PROJECT_NAME_PRETTY} for Strata Source games" OFF )
24+ option (VPKEDIT_BUILD_GUI "Build ${PROJECT_NAME_PRETTY} GUI" ON )
25+ option (VPKEDIT_BUILD_INSTALLER "Build ${PROJECT_NAME_PRETTY} installer" ON )
26+
2627# initial VS integration
2728cs_setup_vs_defaults (STARTUP_PROJECT "${PROJECT_NAME } " )
2829
@@ -76,15 +77,17 @@ endfunction()
7677cs_include_directory (src/cli )
7778
7879# vpkedit
79- cs_include_directory (src/gui )
80+ if (VPKEDIT_BUILD_GUI)
81+ cs_include_directory (src/gui )
8082
81- # installer
82- if (VPKEDIT_BUILD_INSTALLER)
83- cs_include_directory (install )
83+ # installer
84+ if (VPKEDIT_BUILD_INSTALLER)
85+ cs_include_directory (install )
86+ endif ()
8487endif ()
8588
8689# VS setup
87- if (WIN32 )
90+ if (WIN32 AND VPKEDIT_BUILD_GUI )
8891 set_target_properties (
8992 ${PROJECT_NAME } PROPERTIES
9093 VS_DEBUGGER_ENVIRONMENT "PATH=%PATH%;${QT_BASEDIR} /bin;" )
0 commit comments