Some project structure fixes
This commit is contained in:
@@ -2,8 +2,21 @@ add_executable(game
|
||||
"src/main.cpp"
|
||||
)
|
||||
|
||||
target_compile_features(game PRIVATE cxx_std_23)
|
||||
|
||||
target_link_libraries(game PRIVATE engine)
|
||||
|
||||
# On Windows with dynamic linking, copy SDL3.dll next to the game executable.
|
||||
# $<TARGET_FILE_DIR:game> always resolves correctly regardless of build layout.
|
||||
if(WIN32 AND SDL_LINK_TYPE STREQUAL "dynamic")
|
||||
add_custom_command(TARGET game POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
$<TARGET_FILE:SDL3::SDL3>
|
||||
$<TARGET_FILE_DIR:game>
|
||||
COMMENT "Copying SDL3.dll to game output directory"
|
||||
)
|
||||
endif()
|
||||
|
||||
# On Windows, use the WINDOWS subsystem (no console) for release only
|
||||
if(WIN32)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
|
||||
Reference in New Issue
Block a user