mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-26 16:24:35 +01:00
Remove SDL2 dependency from libopenrct2
This commit is contained in:
@@ -11,9 +11,6 @@ endif ()
|
||||
# CMake dependencies
|
||||
include(FindPkgConfig)
|
||||
|
||||
# Third party libraries (which we want to eventually remove from openrct2-cli)
|
||||
PKG_CHECK_MODULES(SDL2 REQUIRED sdl2)
|
||||
|
||||
# Sources
|
||||
file(GLOB_RECURSE OPENRCT2_CLI_SOURCES
|
||||
"${CMAKE_CURRENT_LIST_DIR}/*.c"
|
||||
@@ -29,8 +26,7 @@ add_executable(${PROJECT} EXCLUDE_FROM_ALL ${OPENRCT2_CLI_SOURCES})
|
||||
target_link_libraries(${PROJECT} "libopenrct2")
|
||||
|
||||
# Includes
|
||||
target_include_directories(${PROJECT} PRIVATE "${CMAKE_CURRENT_LIST_DIR}/.."
|
||||
${SDL2_INCLUDE_DIRS})
|
||||
target_include_directories(${PROJECT} PRIVATE "${CMAKE_CURRENT_LIST_DIR}/..")
|
||||
|
||||
# Compiler flags
|
||||
if (FORCE32)
|
||||
|
||||
@@ -56,7 +56,6 @@ if (NOT DISABLE_NETWORK)
|
||||
endif ()
|
||||
|
||||
# Third party libraries (which we want to eventually remove from libopenrct2)
|
||||
PKG_CHECK_MODULES(SDL2 REQUIRED sdl2)
|
||||
PKG_CHECK_MODULES(SPEEX REQUIRED speexdsp)
|
||||
if (NOT DISABLE_TTF)
|
||||
if (UNIX AND NOT APPLE)
|
||||
@@ -150,15 +149,13 @@ endif ()
|
||||
|
||||
# Libraries
|
||||
if (STATIC)
|
||||
target_link_libraries(${PROJECT} ${SDL2_STATIC_LIBRARIES}
|
||||
${JANSSON_STATIC_LIBRARIES}
|
||||
target_link_libraries(${PROJECT} ${JANSSON_STATIC_LIBRARIES}
|
||||
${SPEEX_STATIC_LIBRARIES}
|
||||
${PNG_STATIC_LIBRARIES}
|
||||
${ZLIB_STATIC_LIBRARIES}
|
||||
${LIBZIP_STATIC_LIBRARIES})
|
||||
else ()
|
||||
target_link_libraries(${PROJECT} ${SDL2_LIBRARIES}
|
||||
${JANSSON_LIBRARIES}
|
||||
target_link_libraries(${PROJECT} ${JANSSON_LIBRARIES}
|
||||
${SPEEX_LIBRARIES}
|
||||
${PNG_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
@@ -204,8 +201,7 @@ endif()
|
||||
|
||||
# Includes
|
||||
target_include_directories(${PROJECT} SYSTEM PRIVATE ${LIBZIP_INCLUDE_DIRS})
|
||||
target_include_directories(${PROJECT} PRIVATE ${SDL2_INCLUDE_DIRS}
|
||||
${FREETYPE_INCLUDE_DIRS}
|
||||
target_include_directories(${PROJECT} PRIVATE ${FREETYPE_INCLUDE_DIRS}
|
||||
${JANSSON_INCLUDE_DIRS}
|
||||
${SPEEX_INCLUDE_DIRS}
|
||||
${PNG_INCLUDE_DIRS}
|
||||
|
||||
Reference in New Issue
Block a user