2021-06-17 21:32:24 +00:00
|
|
|
project(media-layer-core)
|
|
|
|
|
2024-06-15 12:52:15 +00:00
|
|
|
# SDL Re-Implementation Using GLFW
|
|
|
|
set(CORE_SRC
|
|
|
|
src/base.cpp
|
|
|
|
src/media.cpp
|
2024-10-20 05:19:08 +00:00
|
|
|
src/cursor.cpp
|
|
|
|
src/util.cpp
|
|
|
|
src/events.cpp
|
2024-10-26 06:00:16 +00:00
|
|
|
src/offscreen.cpp
|
2024-06-15 12:52:15 +00:00
|
|
|
src/audio/api.cpp
|
|
|
|
src/audio/engine.c
|
|
|
|
src/audio/file.cpp
|
|
|
|
)
|
2021-06-17 21:32:24 +00:00
|
|
|
|
|
|
|
# Build
|
2023-11-11 05:44:26 +00:00
|
|
|
add_library(media-layer-core-real SHARED ${CORE_SRC}) # Dependencies Are Setup Later
|
|
|
|
set_target_properties(media-layer-core-real PROPERTIES OUTPUT_NAME "media-layer-core")
|
|
|
|
if(BUILD_NATIVE_COMPONENTS)
|
|
|
|
add_library(media-layer-core ALIAS media-layer-core-real)
|
2022-07-08 04:25:01 +00:00
|
|
|
endif()
|
2023-11-11 05:44:26 +00:00
|
|
|
# Install
|
|
|
|
install(TARGETS media-layer-core-real DESTINATION "${MCPI_LIB_DIR}")
|
2021-06-17 21:32:24 +00:00
|
|
|
|
2022-07-02 22:14:23 +00:00
|
|
|
# Link
|
2024-06-15 12:52:15 +00:00
|
|
|
find_library(OPENAL_LIBRARY NAMES openal REQUIRED)
|
|
|
|
target_link_libraries(media-layer-core-real
|
|
|
|
PUBLIC media-layer-headers
|
|
|
|
PUBLIC reborn-util
|
|
|
|
PRIVATE "${OPENAL_LIBRARY}"
|
|
|
|
PRIVATE m
|
|
|
|
PRIVATE glfw
|
|
|
|
PUBLIC GLESv1_CM
|
|
|
|
PRIVATE LIB_LIEF
|
|
|
|
PUBLIC dl
|
|
|
|
)
|