libimg/CMakeLists.txt

28 lines
659 B
CMake
Raw Normal View History

2021-01-27 16:04:19 +01:00
# Build system for the libimg library for gint
cmake_minimum_required(VERSION 3.18)
project(libimg VERSION 2.2.1 LANGUAGES C)
find_package(Gint 2.2.1 REQUIRED)
add_compile_options(-Wall -Wextra -std=c11 -Os)
include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
set(SOURCES
src/alloc.c
src/brightness.c
src/dye.c
src/flip.c
src/render.c
src/rotate-ip.c
src/rotate.c
src/upscale.c
)
set(NAME "img-${FXSDK_PLATFORM}")
add_library("${NAME}" STATIC ${SOURCES})
target_link_libraries("${NAME}" Gint::Gint)
install(TARGETS "${NAME}" DESTINATION "${FXSDK_COMPILER_INSTALL}")
install(FILES libimg.h DESTINATION "${FXSDK_COMPILER_INSTALL}/include")