|
@@ -6,12 +6,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
|
|
|
|
include(FetchContent)
|
|
|
-FetchContent_Declare(
|
|
|
- Boost
|
|
|
- GIT_REPOSITORY https://github.com/boostorg/boost.git
|
|
|
- GIT_TAG a7090e8ce184501cfc9e80afa6cafb5bfd3b371c # boost-1.74.0
|
|
|
- FIND_PACKAGE_ARGS 1.74.0 REQUIRED COMPONENTS serialization program_options system
|
|
|
-)
|
|
|
FetchContent_Declare(
|
|
|
SDL2
|
|
|
GIT_REPOSITORY https://github.com/libsdl-org/SDL.git
|
|
@@ -30,9 +24,14 @@ FetchContent_Declare(
|
|
|
GIT_TAG 89d1692fd8fe91a679bb943d377bfbd709b52c23 # release-2.20.2
|
|
|
FIND_PACKAGE_ARGS
|
|
|
)
|
|
|
-FetchContent_MakeAvailable(SDL2 SDL2_image SDL2_ttf Boost)
|
|
|
+FetchContent_MakeAvailable(SDL2 SDL2_image SDL2_ttf)
|
|
|
+
|
|
|
+set(Boost_USE_MULTITHREADED ON)
|
|
|
+set(Boost_USE_STATIC_LIBS ON)
|
|
|
+set(Boost_USE_STATIC_RUNTIME OFF)
|
|
|
+find_package(Boost 1.74.0 REQUIRED COMPONENTS serialization program_options)
|
|
|
|
|
|
-add_executable(Snake WIN32
|
|
|
+add_executable(Snake WIN32 MACOSX_BUNDLE
|
|
|
main.cxx
|
|
|
SDL.cxx SDL.hxx
|
|
|
SDLWindow.cxx SDLWindow.hxx
|
|
@@ -54,8 +53,8 @@ add_executable(Snake WIN32
|
|
|
)
|
|
|
|
|
|
target_link_libraries(Snake PRIVATE
|
|
|
- SDL2::SDL2 SDL2::SDL2main
|
|
|
- SDL2_image::SDL2_image
|
|
|
- SDL2_ttf::SDL2_ttf
|
|
|
+ SDL2::SDL2-static SDL2::SDL2main
|
|
|
+ SDL2_image::SDL2_image-static
|
|
|
+ SDL2_ttf::SDL2_ttf-static
|
|
|
Boost::headers Boost::serialization Boost::program_options
|
|
|
)
|