cJPEG/CMakeLists.txt

66 lines
1.2 KiB
CMake
Raw Normal View History

2022-05-09 18:30:57 +02:00
cmake_minimum_required(VERSION 3.16)
project(Libcjpg VERSION 1.5.30 LANGUAGES C)
set(SOURCES
jcapimin.c
jcapistd.c
jdapimin.c
jdapistd.c
jcomapi.c
jcparam.c
jctrans.c
jdtrans.c
jcinit.c
jcmaster.c
jcmainct.c
jcprepct.c
jccoefct.c
jccolor.c
jcsample.c
jcdctmgr.c
jfdctint.c
jfdctfst.c
jfdctflt.c
jchuff.c
jcarith.c
jcmarker.c
jdatadst.c
jdmaster.c
jdinput.c
jdmainct.c
jdcoefct.c
jdpostct.c
jdmarker.c
jdhuff.c
jdarith.c
jddctmgr.c
jidctint.c
jidctfst.c
jidctflt.c
jdsample.c
jdcolor.c
jdmerge.c
jquant1.c
jquant2.c
jdatasrc.c
jaricom.c
jerror.c
jmemmgr.c
jutils.c
jmemname.c
)
2022-08-29 21:15:46 +02:00
2022-05-09 18:30:57 +02:00
# Target name is "cJPG", output file is "libcJPG.a" (by default)
add_library(cJPG STATIC ${SOURCES})
2022-08-29 21:15:46 +02:00
target_compile_options(cJPG PRIVATE -Os -std=c11)
2022-05-09 18:30:57 +02:00
# After building, install the target (that is, libcJPG.a) in the compiler
2022-05-09 18:35:27 +02:00
install(TARGETS cJPG
2022-08-22 20:29:25 +02:00
DESTINATION "${FXSDK_LIB}")
2022-08-29 21:15:46 +02:00
# Install headers from the source dir
install(FILES jpeglib.h jconfig.h jmorecfg.h jerror.h
2022-08-22 20:29:25 +02:00
DESTINATION "${FXSDK_INCLUDE}")
2022-05-09 18:30:57 +02:00
# Install FindcPNG.cmake so that users can do find_package(LibcPNG)
install(FILES cmake/FindcJPG.cmake
DESTINATION "${FXSDK_CMAKE_MODULE_PATH}")