Files
4JLibs2/CMakeLists.txt
2026-07-21 21:11:35 -04:00

34 lines
714 B
CMake

cmake_minimum_required(VERSION 3.24 FATAL_ERROR)
project(4JLibs LANGUAGES CXX)
add_library(4JLibs.Globals INTERFACE)
target_include_directories(4JLibs.Globals INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/inc
)
target_link_libraries(4JLibs.Globals INTERFACE SDL3::SDL3)
set(CMAKE_DEBUG_POSTFIX "_d")
# msvc specific flags
if(MSVC)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
include(FetchContent)
FetchContent_Declare(
SDL3
GIT_REPOSITORY https://github.com/libsdl-org/SDL.git
GIT_TAG release-3.2.4
)
FetchContent_MakeAvailable(SDL3)
if(WIN32)
add_subdirectory(impls/Windows_Libs)
else()
message(FATAL_ERROR "Unsupported platform.")
endif()