project name init

fix order of operations for setting the project naem to *after we either set it or default to null and spew a popup
This commit is contained in:
AzaezelX 2025-07-11 12:57:21 -05:00
parent 8ffe96a9a8
commit faf6b2794b

View file

@ -8,7 +8,6 @@ include("${CMAKE_SOURCE_DIR}/Tools/CMake/torque_configs.cmake")
# Ensure multi-core compilation is enabled for everything
add_compile_options($<$<CXX_COMPILER_ID:MSVC>:/MP>)
project(${TORQUE_APP_NAME})
# An application name must be set first
set(TORQUE_APP_NAME "" CACHE STRING "the app name")
@ -16,6 +15,8 @@ if("${TORQUE_APP_NAME}" STREQUAL "")
message(FATAL_ERROR "Please set TORQUE_APP_NAME first")
endif()
project(${TORQUE_APP_NAME})
# Once an app name is determined, we know what our project pathing structure should look like
set(TORQUE_APP_ROOT_DIRECTORY "${CMAKE_SOURCE_DIR}/My Projects/${TORQUE_APP_NAME}")
set(TORQUE_APP_GAME_DIRECTORY "${TORQUE_APP_ROOT_DIRECTORY}/game")