File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.13 )
2+
3+ project (citro2d
4+ LANGUAGES C ASM
5+ )
6+
7+ include (GNUInstallDirs )
8+
9+ if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
10+ set (CMAKE_INSTALL_PREFIX "${CTR_ROOT} " CACHE PATH "" FORCE )
11+ endif ()
12+
13+ # Define static library target
14+ add_library (citro2d STATIC )
15+ set_target_properties (citro2d PROPERTIES DEBUG_POSTFIX "d" )
16+
17+ # Add compiler flags
18+ target_compile_options (citro2d PRIVATE
19+ -Wall -Werror -DCITRO2D_BUILD
20+ )
21+
22+ # Add include directories
23+ target_include_directories (citro2d PRIVATE include )
24+
25+ target_sources (citro2d PRIVATE
26+ source /base.c
27+ source /font.c
28+ source /spritesheet.c
29+ source /text.c
30+ )
31+
32+ ctr_add_shader_library (render2d
33+ source /render2d.v.pica
34+ )
35+
36+ dkp_add_embedded_binary_library (c2d_shaders
37+ render2d
38+ )
39+
40+ target_link_libraries (citro2d PRIVATE c2d_shaders )
41+
42+ # Install the library
43+ install (
44+ TARGETS citro2d
45+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
46+ )
47+
48+ # Install headers
49+ install (
50+ DIRECTORY ${PROJECT_SOURCE_DIR} /include/
51+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
52+ FILES_MATCHING
53+ PATTERN "*.h"
54+ )
Original file line number Diff line number Diff line change 1+ catnip_package (citro2d DEFAULT all )
2+
3+ catnip_add_preset (release TOOLSET 3DS BUILD_TYPE Release )
4+ catnip_add_preset (debug TOOLSET 3DS BUILD_TYPE Debug )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments