From 0760866176ce99b4e9d3a2c9c285b8437c2aab43 Mon Sep 17 00:00:00 2001 From: falsycat Date: Sun, 17 Sep 2023 23:05:53 +0900 Subject: [PATCH] add new thirdparty lib, SDL2 --- core/CMakeLists.txt | 1 + thirdparty/CMakeLists.txt | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index aab96e6..6eb0b34 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -5,6 +5,7 @@ target_link_libraries(nf7_core luajit nf7_config nf7_iface + SDL2 sqlite uvw ) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 38194a2..d76dc92 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -2,6 +2,15 @@ set(BUILD_TESTING OFF) include(FetchContent) +# ---- gtest (BSD-3-Clause) +FetchContent_Declare( + googletest + GIT_REPOSITORY https://github.com/google/googletest.git + GIT_TAG v1.13.0 +) +set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) +FetchContent_MakeAvailable(googletest) + # ---- luajit (MIT) FetchContent_Declare( luajit @@ -11,14 +20,9 @@ FetchContent_Declare( FetchContent_Populate(luajit) include(luajit.cmake) -# ---- gtest (BSD-3-Clause) -FetchContent_Declare( - googletest - GIT_REPOSITORY https://github.com/google/googletest.git - GIT_TAG v1.13.0 -) -set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) -FetchContent_MakeAvailable(googletest) +# ---- SDL2 (zlib) +find_package(SDL2 REQUIRED GLOBAL) +add_library(SDL2 ALIAS SDL2::SDL2) # ---- SQLite (public domain) FetchContent_Declare(