mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-01 15:43:36 +03:00
38 lines
1.4 KiB
Diff
38 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: aabajyan <arsen.abajyan@pm.me>
|
|
Date: Sun, 7 Mar 2021 22:30:13 +0400
|
|
Subject: [PATCH] Manually link against SDL2
|
|
|
|
---
|
|
CMakeLists.txt | 18 ++++++++++++------
|
|
1 file changed, 12 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 94ae8ef..a9a974c 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -1,11 +1,17 @@
|
|
cmake_minimum_required(VERSION 2.6)
|
|
-set(CMAKE_BUILD_TYPE "Debug")
|
|
-
|
|
|
|
INCLUDE(FindPkgConfig)
|
|
-PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2)
|
|
-INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIRS})
|
|
+find_package(SDL2 REQUIRED)
|
|
|
|
-set_source_files_properties( mem.cpp PROPERTIES COMPILE_FLAGS " -O0 -UNDEBUG " )
|
|
+set_source_files_properties( mem.cpp PROPERTIES COMPILE_FLAGS " -Og")
|
|
add_executable(genemu genemu.cpp cpu.cpp vdp.cpp mem.cpp state.cpp gfx.cpp ioports.cpp hw.c Z80/Z80.c m68k/m68kcpu.c m68k/m68kops.c m68k/m68kopac.c m68k/m68kopdm.c m68k/m68kopnz.c m68k/m68kdasm.c ym2612/ym2612.c)
|
|
-target_link_libraries(genemu ${SDL2_LIBRARIES})
|
|
+target_include_directories(genemu SYSTEM PRIVATE ${SDL2_INCLUDE_DIRS})
|
|
+
|
|
+if("${SDL2_LIBRARIES}" STREQUAL "")
|
|
+ message(WARNING "SDL2_LIBRARIES wasn't set, manually setting to SDL2::SDL2")
|
|
+ set(SDL2_LIBRARIES "SDL2::SDL2")
|
|
+endif()
|
|
+
|
|
+target_link_libraries(genemu PRIVATE ${SDL2_LIBRARIES})
|
|
+
|
|
+install(TARGETS genemu RUNTIME DESTINATION bin)
|