psemek/libs/gfx/CMakeLists.txt
lisyarus 68650da6f5
All checks were successful
Run tests / Run tests (push) Successful in 7m26s
Support margins & offsets in monospace_font, and add a new default 5x7 font
2026-07-24 15:52:04 +03:00

18 lines
1.1 KiB
CMake

find_file(KHR_PLATFORM_FILE KHR/khrplatform.h)
file(GLOB_RECURSE PSEMEK_GFX_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "include/*.hpp" "include/*.h")
file(GLOB_RECURSE PSEMEK_GFX_SOURCES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "source/*.cpp")
psemek_add_library(psemek-gfx ${PSEMEK_GFX_HEADERS} ${PSEMEK_GFX_SOURCES} "${CMAKE_CURRENT_SOURCE_DIR}/api/${PSEMEK_GL_API}/source/gl.cpp")
target_include_directories(psemek-gfx PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/api/${PSEMEK_GL_API}/include")
target_link_libraries(psemek-gfx PUBLIC psemek-util psemek-math psemek-cg psemek-random psemek-io psemek-log ${PSEMEK_GL_LIBRARIES} rapidjson)
if(NOT KHR_PLATFORM_FILE)
message(STATUS "KHR/khrplatform.h not found, using a substitute header")
target_include_directories(psemek-gfx PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/extra/khr/include")
endif()
psemek_add_public_resources(psemek-gfx
resources/font_5x7.png psemek/gfx/resource/font_5x7_png
resources/font_9x12.png psemek/gfx/resource/font_9x12_png
resources/font_10x12_bold.png psemek/gfx/resource/font_10x12_bold_png
)