43 lines
1.1 KiB
Text
43 lines
1.1 KiB
Text
|
cmake_minimum_required(VERSION 3.13)
|
||
|
|
||
|
project(GRRLIB)
|
||
|
|
||
|
find_package(PkgConfig REQUIRED)
|
||
|
pkg_check_modules(PNG REQUIRED libpng)
|
||
|
pkg_check_modules(FREETYPE REQUIRED freetype2)
|
||
|
|
||
|
|
||
|
set(GRRLIB_DIR ./source/GRRLIB/GRRLIB)
|
||
|
set(PNGU_DIR ./source/GRRLIB/lib/pngu)
|
||
|
|
||
|
set (pngu_sources
|
||
|
${PNGU_DIR}/pngu.c
|
||
|
)
|
||
|
add_library(pngu ${pngu_sources})
|
||
|
target_link_libraries(pngu PRIVATE ${PNG_LIBRARIES})
|
||
|
target_include_directories(pngu PRIVATE ${PNG_INCLUDE_DIRS})
|
||
|
target_include_directories(pngu PUBLIC ${PNGU_DIR})
|
||
|
|
||
|
set(grrlib_sources
|
||
|
${GRRLIB_DIR}/GRRLIB_3D.c
|
||
|
${GRRLIB_DIR}/GRRLIB_bmf.c
|
||
|
${GRRLIB_DIR}/GRRLIB_bmfx.c
|
||
|
${GRRLIB_DIR}/GRRLIB_core.c
|
||
|
${GRRLIB_DIR}/GRRLIB_fbAdvanced.c
|
||
|
${GRRLIB_DIR}/GRRLIB_fileIO.c
|
||
|
${GRRLIB_DIR}/GRRLIB_gecko.c
|
||
|
${GRRLIB_DIR}/GRRLIB_print.c
|
||
|
${GRRLIB_DIR}/GRRLIB_render.c
|
||
|
${GRRLIB_DIR}/GRRLIB_snapshot.c
|
||
|
${GRRLIB_DIR}/GRRLIB_ttf.c
|
||
|
)
|
||
|
|
||
|
add_library(GRRLIB ${grrlib_sources})
|
||
|
target_link_libraries(GRRLIB PRIVATE pngu)
|
||
|
target_link_libraries(GRRLIB PRIVATE ${FREETYPE_LIBRARIES})
|
||
|
target_link_libraries(GRRLIB PRIVATE fat)
|
||
|
target_include_directories(GRRLIB PRIVATE ${FREETYPE_INCLUDE_DIRS})
|
||
|
|
||
|
target_include_directories(GRRLIB PUBLIC ${GRRLIB_DIR})
|
||
|
|