2025-11-16 02:51:02 +09:00
|
|
|
cmake_minimum_required(VERSION 3.25)
|
|
|
|
|
project(
|
|
|
|
|
mdelibs
|
|
|
|
|
)
|
2025-11-16 03:01:29 +09:00
|
|
|
|
2025-11-22 02:29:49 +09:00
|
|
|
include(GNUInstallDirs)
|
|
|
|
|
macro(setup_lib dir name)
|
2025-11-22 17:36:48 +09:00
|
|
|
project(
|
|
|
|
|
mde${dir}
|
|
|
|
|
)
|
|
|
|
|
|
2025-11-22 02:29:49 +09:00
|
|
|
file(
|
|
|
|
|
GLOB
|
|
|
|
|
MDE${name}_SRC
|
2025-11-22 17:36:48 +09:00
|
|
|
*.c
|
2025-11-22 02:29:49 +09:00
|
|
|
)
|
2025-11-16 03:01:29 +09:00
|
|
|
|
2025-11-22 02:29:49 +09:00
|
|
|
add_library(
|
|
|
|
|
MDE${name}
|
|
|
|
|
SHARED
|
|
|
|
|
${MDE${name}_SRC}
|
|
|
|
|
)
|
2025-11-16 03:01:29 +09:00
|
|
|
|
2025-11-22 02:29:49 +09:00
|
|
|
target_include_directories(
|
|
|
|
|
MDE${name}
|
|
|
|
|
PUBLIC
|
2025-11-22 17:36:48 +09:00
|
|
|
../include
|
2025-11-22 02:29:49 +09:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
install(
|
|
|
|
|
TARGETS MDE${name}
|
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
|
)
|
|
|
|
|
endmacro()
|
|
|
|
|
|
2025-11-22 17:36:48 +09:00
|
|
|
add_subdirectory(core)
|
|
|
|
|
add_subdirectory(audio)
|
2025-11-16 03:01:29 +09:00
|
|
|
|
|
|
|
|
install(
|
2025-11-16 04:14:54 +09:00
|
|
|
DIRECTORY include/
|
2025-11-16 03:01:29 +09:00
|
|
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
|
|
|
|
FILES_MATCHING PATTERN "*.h"
|
|
|
|
|
)
|