-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-windows.cmake
More file actions
29 lines (24 loc) · 1.11 KB
/
build-windows.cmake
File metadata and controls
29 lines (24 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Windows / MinGW configuration. Supports two layouts:
# 1) Project-local "lib/" and "include/" populated with the SDL2 dev libs
# (the legacy CLion flow described in README.md).
# 2) System-installed packages on MSYS2 / MinGW64 (used by CI).
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")
# Project-local layout, if present.
if(EXISTS "${CMAKE_SOURCE_DIR}/include")
include_directories(${CMAKE_SOURCE_DIR}/include)
endif()
if(EXISTS "${CMAKE_SOURCE_DIR}/lib")
link_directories(${CMAKE_SOURCE_DIR}/lib)
endif()
# Pick up system-installed SDL2 headers (MSYS2 puts them in
# /mingw64/include/SDL2). Harmless when the project-local layout is in use.
find_path(SDL2_SYS_INCLUDE_DIR SDL.h PATH_SUFFIXES SDL2)
if(SDL2_SYS_INCLUDE_DIR)
include_directories(${SDL2_SYS_INCLUDE_DIR})
endif()
# SDL2_gfx removed — circle primitives are inlined in RenderSystem.cpp so the
# same code base targets iOS without an extra library. Boost removed —
# replaced by std::filesystem (C++17).
link_libraries(mingw32 SDL2main SDL2 SDL2_image SDL2_ttf SDL2_mixer)
function(bloonstd_configure_target tgt)
endfunction()