57 lines
1.7 KiB
CMake
Raw Normal View History

2021-01-27 16:26:19 -05:00
project(libreborn)
2022-06-09 21:31:40 -04:00
# Config
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/include/libreborn")
configure_file(include/libreborn/config.h.in "${CMAKE_CURRENT_BINARY_DIR}/include/libreborn/config.h" ESCAPE_QUOTES @ONLY)
# Util
add_library(reborn-util SHARED
2024-11-17 22:48:25 -05:00
src/util/exec.cpp
src/util/string.cpp
src/util/util.cpp
src/util/log.cpp
src/util/cp437.cpp
2024-11-17 22:48:25 -05:00
src/util/env.cpp
2024-11-21 23:44:25 -05:00
src/util/config.cpp
2024-11-21 22:07:50 -05:00
src/util/flags/node.cpp
src/util/flags/flags.cpp
src/util/flags/available-feature-flags # Show In IDE
)
2024-11-21 22:07:50 -05:00
embed_resource(reborn-util src/util/flags/available-feature-flags)
2023-11-11 01:33:19 -05:00
target_link_libraries(reborn-util PRIVATE utf8cpp)
2024-11-20 12:22:36 -05:00
if(TARGET glfw)
target_sources(reborn-util PRIVATE src/util/glfw.cpp)
target_link_libraries(reborn-util PRIVATE glfw)
endif()
2024-11-19 19:57:43 -05:00
setup_header_dirs(reborn-util
"${CMAKE_CURRENT_SOURCE_DIR}/include"
"${CMAKE_CURRENT_BINARY_DIR}/include"
)
setup_library(reborn-util TRUE TRUE)
2021-01-27 16:26:19 -05:00
2022-06-09 21:31:40 -04:00
# Patch
2021-06-17 17:32:24 -04:00
if(BUILD_ARM_COMPONENTS)
add_library(reborn-patch SHARED
src/patch/patch.cpp
src/patch/segments.cpp
src/patch/code-block.cpp
src/patch/instruction.cpp
)
2022-05-13 22:36:12 -04:00
target_link_libraries(reborn-patch dl pthread reborn-util)
2024-11-19 19:57:43 -05:00
target_compile_definitions(reborn-patch PUBLIC REBORN_HAS_PATCH_CODE)
2021-06-17 17:32:24 -04:00
# Install
2024-11-19 19:57:43 -05:00
setup_library(reborn-patch TRUE TRUE)
2021-06-17 17:32:24 -04:00
endif()
2023-11-11 00:44:26 -05:00
2024-06-04 18:29:13 -04:00
# Fake LibPNG To Satisfy Symbol Versioning Requirement
2023-11-11 00:44:26 -05:00
if(BUILD_ARM_COMPONENTS)
2024-01-16 03:08:34 -05:00
add_library(fake-libpng SHARED src/fake-libpng/empty.c)
2023-11-11 00:44:26 -05:00
set_target_properties(fake-libpng PROPERTIES
OUTPUT_NAME "png12"
SOVERSION 0
)
2024-06-04 18:29:13 -04:00
target_link_options(fake-libpng PRIVATE "LINKER:--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/fake-libpng/empty.vers")
2023-11-11 00:44:26 -05:00
# Install
2024-11-19 19:57:43 -05:00
setup_library(fake-libpng TRUE FALSE)
2023-11-11 00:44:26 -05:00
endif()