forked from love2d/love
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
2195 lines (1980 loc) · 67.5 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#
# Copyright (c) 2006-2024 LOVE Development Team
#
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liable for any damages
# arising from the use of this software.
#
# Permission is granted to anyone to use this software for any purpose,
# including commercial applications, and to alter it and redistribute it
# freely, subject to the following restrictions:
#
# 1. The origin of this software must not be misrepresented; you must not
# claim that you wrote the original software. If you use this software
# in a product, an acknowledgment in the product documentation would be
# appreciated but is not required.
# 2. Altered source versions must be plainly marked as such, and must not be
# misrepresented as being the original software.
# 3. This notice may not be removed or altered from any source distribution.
#
if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
# Protip: run cmake like this: cmake -G "<generator>" -H. -Bbuild
message(FATAL_ERROR "Prevented in-tree build.")
endif()
cmake_minimum_required(VERSION 3.16)
project(love)
set(CMAKE_MODULE_PATH "${love_SOURCE_DIR}/extra/cmake" ${CMAKE_MODULE_PATH})
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) # Needed for shared libs on Linux. (-fPIC).
set(CMAKE_CXX_STANDARD 17)
set_property(GLOBAL PROPERTY USE_FOLDERS ON) # Allow grouping projects in Visual Studio
if(APPLE)
message(WARNING "CMake is not an officially supported build system for love on Apple platforms.")
message(WARNING "Use the prebuilt .app or the xcode project in platform/xcode/ instead.")
endif()
if(MINGW)
message(WARNING "MinGW is not an officially supported build system for love.")
message(WARNING "Use megasource with Visual Studio instead.")
message(WARNING "Please see https://github.com/love2d/megasource")
endif()
include(LoveMacros)
# Extract version.h contents.
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/src/common/version.h LOVE_VERSION_FILE_CONTENTS)
# Extract one of LOVE_VERSION_MAJOR/MINOR/REV.
function(match_version ARG_STRING OUT_VAR)
string(REGEX MATCH "VERSION_${ARG_STRING} = ([0-9]+);" TMP_VER "${LOVE_VERSION_FILE_CONTENTS}")
string(REGEX MATCH "[0-9]+" TMP_VER "${TMP_VER}")
set(${OUT_VAR} ${TMP_VER} PARENT_SCOPE)
endfunction()
match_version("MAJOR" LOVE_VERSION_MAJOR)
match_version("MINOR" LOVE_VERSION_MINOR)
match_version("REV" LOVE_VERSION_REV)
set(LOVE_VERSION_STR "${LOVE_VERSION_MAJOR}.${LOVE_VERSION_MINOR}")
message(STATUS "Version: ${LOVE_VERSION_STR}")
set(LOVE_EXE_NAME love CACHE STRING "The name of the executable, usually 'love'")
set(LOVE_DEFAULT_LIB_NAME liblove)
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
set(LOVE_DEFAULT_LIB_NAME "${LOVE_EXE_NAME}-${LOVE_VERSION_STR}")
endif()
set(LOVE_LIB_NAME ${LOVE_DEFAULT_LIB_NAME} CACHE STRING "The name of the lua library, usually 'liblove' or 'love'")
set(LOVE_CONSOLE_EXE_NAME "${LOVE_EXE_NAME}c" CACHE STRING "The name of the console version of the executable, usually 'lovec'")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(LOVE_X64 TRUE)
set(LOVE_TARGET_PLATFORM x64)
else()
set(LOVE_X86 TRUE)
set(LOVE_TARGET_PLATFORM x86)
endif()
if(APPLE)
set(LOVE_DEFAULT_JIT FALSE)
else()
set(LOVE_DEFAULT_JIT TRUE)
endif()
option(LOVE_JIT "Use LuaJIT" ${LOVE_DEFAULT_JIT})
if(LOVE_JIT)
if(APPLE)
message(WARNING "JIT not supported yet on Mac.")
endif()
message(STATUS "LuaJIT: Enabled")
else()
message(STATUS "LuaJIT: Disabled")
endif()
message(STATUS "Target platform: ${LOVE_TARGET_PLATFORM}")
add_library(lovedep::SDL INTERFACE IMPORTED)
add_library(lovedep::Freetype INTERFACE IMPORTED)
add_library(lovedep::Harfbuzz INTERFACE IMPORTED)
add_library(lovedep::OpenAL INTERFACE IMPORTED)
add_library(lovedep::Modplug INTERFACE IMPORTED)
add_library(lovedep::Theora INTERFACE IMPORTED)
add_library(lovedep::Vorbis INTERFACE IMPORTED)
add_library(lovedep::Ogg INTERFACE IMPORTED)
add_library(lovedep::Zlib INTERFACE IMPORTED)
add_library(lovedep::Lua INTERFACE IMPORTED)
if(MEGA)
# LOVE_MSVC_DLLS contains runtime DLLs that should be bundled with the love
# binary (in e.g. the installer). Example: msvcp140.dll.
set(LOVE_MSVC_DLLS ${MEGA_MSVC_DLLS})
if(APPLE)
# Some files do #include <SDL2/SDL.h>, but building with megasource
# requires #include <SDL.h>.
add_definitions(-DLOVE_MACOSX_SDL_DIRECT_INCLUDE)
endif ()
# SDL2 links with some DirectX libraries, and we apparently also
# pull those libraries in for linkage because we link with SDL2.
set(LOVE_LINK_DIRS ${SDL_LINK_DIR})
# These DLLs are moved next to the love binary in a post-build step to
# love runnable from inside Visual Studio.
#
# LOVE_MOVE_DLLS can contain CMake targets, in which case the target's
# output is assumed to be a DLL, or it can contain paths to actual files.
# We detect whether or not each item is a target, and take the appropriate
# action.
set(LOVE_MOVE_DLLS
${MEGA_SDL2}
${MEGA_SDL3}
${MEGA_OPENAL}
)
# LOVE_EXTRA_DLLS are non-runtime DLLs which should be bundled with the
# love binary in installers, etc. It's only needed for external
# (non-CMake) targets, i.e. LuaJIT.
if(NOT DEFINED LOVE_EXTRA_DLLS)
set(LOVE_EXTRA_DLLS)
endif()
target_link_libraries(lovedep::SDL INTERFACE ${MEGA_SDL2} ${MEGA_SDL2MAIN} ${MEGA_SDL3})
target_link_libraries(lovedep::Freetype INTERFACE ${MEGA_FREETYPE})
target_link_libraries(lovedep::Harfbuzz INTERFACE ${MEGA_HARFBUZZ})
target_link_libraries(lovedep::OpenAL INTERFACE ${MEGA_OPENAL})
target_link_libraries(lovedep::Modplug INTERFACE ${MEGA_MODPLUG})
target_link_libraries(lovedep::Theora INTERFACE ${MEGA_LIBTHEORA})
target_link_libraries(lovedep::Vorbis INTERFACE ${MEGA_LIBVORBIS} ${MEGA_LIBVORBISFILE})
target_link_libraries(lovedep::Ogg INTERFACE ${MEGA_LIBOGG})
target_link_libraries(lovedep::Zlib INTERFACE ${MEGA_ZLIB})
if(LOVE_JIT)
target_include_directories(lovedep::Lua INTERFACE ${MEGA_LUAJIT_INCLUDE})
target_link_libraries(lovedep::Lua INTERFACE ${MEGA_LUAJIT_LIB})
set(LOVE_EXTRA_DLLS ${LOVE_EXTRA_DLLS} ${MEGA_LUAJIT_DLL})
set(LOVE_EXTRA_DEPENDECIES luajit)
set(LOVE_MOVE_DLLS
${LOVE_MOVE_DLLS}
${MEGA_LUAJIT_DLL}
)
else()
# MEGA_LUA51 is a CMake target, so includes are handled
# automatically.
target_link_libraries(lovedep::Lua INTERFACE ${MEGA_LUA51})
set(LOVE_MOVE_DLLS
${LOVE_MOVE_DLLS}
${MEGA_LUA51}
)
endif()
else()
if(MSVC OR ANDROID)
message(FATAL_ERROR "
It is currently only possible to build with megasource on Windows and Android.
Please see https://github.com/love2d/megasource
")
endif()
# required for enet
add_definitions(-D HAS_SOCKLEN_T)
if(LOVE_USE_SDL3)
find_package(SDL3 3.1.3 REQUIRED CONFIG)
target_include_directories(lovedep::SDL INTERFACE ${SDL3_INCLUDE_DIRS})
target_link_libraries(lovedep::SDL INTERFACE ${SDL3_LIBRARIES})
else()
find_package(SDL2 2.0.9 REQUIRED CONFIG COMPONENTS SDL2main)
target_include_directories(lovedep::SDL INTERFACE ${SDL2_INCLUDE_DIRS})
target_link_libraries(lovedep::SDL INTERFACE ${SDL2_LIBRARIES})
endif()
find_package(Freetype REQUIRED)
target_include_directories(lovedep::Freetype INTERFACE ${FREETYPE_INCLUDE_DIRS})
target_link_libraries(lovedep::Freetype INTERFACE ${FREETYPE_LIBRARY})
find_package(Harfbuzz REQUIRED)
target_include_directories(lovedep::Harfbuzz INTERFACE ${HARFBUZZ_INCLUDE_DIR})
target_link_libraries(lovedep::Harfbuzz INTERFACE ${HARFBUZZ_LIBRARY})
find_package(OpenAL REQUIRED)
target_include_directories(lovedep::OpenAL INTERFACE ${OPENAL_INCLUDE_DIR})
target_link_libraries(lovedep::OpenAL INTERFACE ${OPENAL_LIBRARY})
find_package(ModPlug REQUIRED)
target_include_directories(lovedep::Modplug INTERFACE ${MODPLUG_INCLUDE_DIR})
target_link_libraries(lovedep::Modplug INTERFACE ${MODPLUG_LIBRARY})
find_package(Theora REQUIRED)
target_include_directories(lovedep::Theora INTERFACE ${THEORA_INCLUDE_DIR})
target_link_libraries(lovedep::Theora INTERFACE ${THEORA_LIBRARY} ${THEORADEC_LIBRARY})
find_package(Vorbis REQUIRED)
target_include_directories(lovedep::Vorbis INTERFACE ${VORBIS_INCLUDE_DIR})
target_link_libraries(lovedep::Vorbis INTERFACE ${VORBISFILE_LIBRARY})
find_package(Ogg REQUIRED)
target_include_directories(lovedep::Ogg INTERFACE ${OGG_INCLUDE_DIR})
target_link_libraries(lovedep::Ogg INTERFACE ${OGG_LIBRARY})
find_package(ZLIB REQUIRED)
target_include_directories(lovedep::Zlib INTERFACE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(lovedep::Zlib INTERFACE ${ZLIB_LIBRARY})
if(LOVE_JIT)
find_package(LuaJIT REQUIRED)
target_include_directories(lovedep::Lua INTERFACE ${LUAJIT_INCLUDE_DIR})
target_link_libraries(lovedep::Lua INTERFACE ${LUAJIT_LIBRARY})
else()
find_package(Lua51 REQUIRED)
target_include_directories(lovedep::Lua INTERFACE ${LUA_INCLUDE_DIR})
target_link_libraries(lovedep::Lua INTERFACE ${LUA_LIBRARY})
endif()
endif()
###
### No Megasource-specific stuff beyond this point!
###
if(MSVC)
set(DISABLE_WARNING_FLAG -W0)
else()
set(DISABLE_WARNING_FLAG -w)
endif()
function(love_disable_warnings ARG_TARGET)
target_compile_options(${ARG_TARGET} PRIVATE ${DISABLE_WARNING_FLAG})
endfunction()
#
# common
#
add_library(love_common STATIC
src/common/android.cpp
src/common/android.h
src/common/b64.cpp
src/common/b64.h
src/common/Color.h
src/common/config.h
src/common/Data.cpp
src/common/Data.h
src/common/delay.cpp
src/common/delay.h
src/common/deprecation.cpp
src/common/deprecation.h
src/common/EnumMap.h
src/common/Exception.cpp
src/common/Exception.h
src/common/floattypes.cpp
src/common/floattypes.h
src/common/int.h
src/common/math.h
src/common/Matrix.cpp
src/common/Matrix.h
src/common/memory.cpp
src/common/memory.h
src/common/Module.cpp
src/common/Module.h
src/common/Object.cpp
src/common/Object.h
src/common/Optional.h
src/common/pixelformat.cpp
src/common/pixelformat.h
src/common/Range.h
src/common/Reference.cpp
src/common/Reference.h
src/common/runtime.cpp
src/common/runtime.h
src/common/Stream.cpp
src/common/Stream.h
src/common/StringMap.cpp
src/common/StringMap.h
src/common/types.cpp
src/common/types.h
src/common/utf8.cpp
src/common/utf8.h
src/common/Variant.cpp
src/common/Variant.h
#src/common/Vector.cpp # Vector.cpp is empty.
src/common/Vector.h
src/common/version.h
)
target_link_libraries(love_common PUBLIC
lovedep::Lua
lovedep::SDL
)
if (APPLE)
target_sources(love_common PRIVATE
src/common/apple.mm
)
target_link_libraries(love_common PUBLIC
objc
"-framework CoreFoundation"
)
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
target_sources(love_common PRIVATE
src/common/macos.mm
)
target_link_libraries(love_common PUBLIC
"-framework AppKit"
)
else()
target_sources(love_common PRIVATE
src/common/ios.mm
)
target_link_libraries(love_common PUBLIC
"-framework UIKit"
)
endif()
endif()
#
# love.audio
#
add_library(love_audio_root STATIC
src/modules/audio/Audio.cpp
src/modules/audio/Audio.h
src/modules/audio/Source.cpp
src/modules/audio/Source.h
src/modules/audio/RecordingDevice.cpp
src/modules/audio/RecordingDevice.h
src/modules/audio/Filter.cpp
src/modules/audio/Filter.h
src/modules/audio/Effect.cpp
src/modules/audio/Effect.h
src/modules/audio/wrap_Audio.cpp
src/modules/audio/wrap_Audio.h
src/modules/audio/wrap_Source.cpp
src/modules/audio/wrap_Source.h
src/modules/audio/wrap_RecordingDevice.cpp
src/modules/audio/wrap_RecordingDevice.h
)
target_link_libraries(love_audio_root PUBLIC
lovedep::Lua
lovedep::OpenAL
)
add_library(love_audio_null STATIC
src/modules/audio/null/Audio.cpp
src/modules/audio/null/Audio.h
src/modules/audio/null/Source.cpp
src/modules/audio/null/Source.h
src/modules/audio/null/RecordingDevice.cpp
src/modules/audio/null/RecordingDevice.h
)
add_library(love_audio_openal STATIC
src/modules/audio/openal/Audio.cpp
src/modules/audio/openal/Audio.h
src/modules/audio/openal/Pool.cpp
src/modules/audio/openal/Pool.h
src/modules/audio/openal/Source.cpp
src/modules/audio/openal/Source.h
src/modules/audio/openal/RecordingDevice.cpp
src/modules/audio/openal/RecordingDevice.h
src/modules/audio/openal/Filter.cpp
src/modules/audio/openal/Filter.h
src/modules/audio/openal/Effect.cpp
src/modules/audio/openal/Effect.h
)
target_link_libraries(love_audio_openal PUBLIC
lovedep::OpenAL
)
add_library(love_audio INTERFACE)
target_link_libraries(love_audio INTERFACE
love_audio_root
love_audio_null
love_audio_openal
)
#
# love.data
#
add_library(love_data STATIC
src/modules/data/ByteData.cpp
src/modules/data/ByteData.h
src/modules/data/CompressedData.cpp
src/modules/data/CompressedData.h
src/modules/data/Compressor.cpp
src/modules/data/Compressor.h
src/modules/data/DataModule.cpp
src/modules/data/DataModule.h
src/modules/data/DataStream.cpp
src/modules/data/DataStream.h
src/modules/data/DataView.cpp
src/modules/data/DataView.h
src/modules/data/HashFunction.cpp
src/modules/data/HashFunction.h
src/modules/data/wrap_ByteData.cpp
src/modules/data/wrap_ByteData.h
src/modules/data/wrap_CompressedData.cpp
src/modules/data/wrap_CompressedData.h
src/modules/data/wrap_Data.cpp
src/modules/data/wrap_Data.h
src/modules/data/wrap_Data.lua
src/modules/data/wrap_DataModule.cpp
src/modules/data/wrap_DataModule.h
src/modules/data/wrap_DataView.cpp
src/modules/data/wrap_DataView.h
)
target_link_libraries(love_data PUBLIC
lovedep::Lua
lovedep::Zlib
)
#
# love.event
#
add_library(love_event_root STATIC
src/modules/event/Event.cpp
src/modules/event/Event.h
src/modules/event/wrap_Event.cpp
src/modules/event/wrap_Event.h
src/modules/event/wrap_Event.lua
)
target_link_libraries(love_event_root PUBLIC
lovedep::Lua
lovedep::SDL
)
add_library(love_event_sdl STATIC
src/modules/event/sdl/Event.cpp
src/modules/event/sdl/Event.h
)
target_link_libraries(love_event_sdl PUBLIC
lovedep::SDL
)
add_library(love_event INTERFACE)
target_link_libraries(love_event INTERFACE
love_event_root
love_event_sdl
)
#
# love.filesystem
#
add_library(love_filesystem_root STATIC
src/modules/filesystem/File.cpp
src/modules/filesystem/File.h
src/modules/filesystem/FileData.cpp
src/modules/filesystem/FileData.h
src/modules/filesystem/Filesystem.cpp
src/modules/filesystem/Filesystem.h
src/modules/filesystem/NativeFile.cpp
src/modules/filesystem/NativeFile.h
src/modules/filesystem/wrap_File.cpp
src/modules/filesystem/wrap_File.h
src/modules/filesystem/wrap_FileData.cpp
src/modules/filesystem/wrap_FileData.h
src/modules/filesystem/wrap_Filesystem.cpp
src/modules/filesystem/wrap_Filesystem.h
src/modules/filesystem/wrap_NativeFile.cpp
src/modules/filesystem/wrap_NativeFile.h
)
target_link_libraries(love_filesystem_root PUBLIC
lovedep::Lua
lovedep::SDL
)
add_library(love_filesystem_physfs STATIC
src/modules/filesystem/physfs/File.cpp
src/modules/filesystem/physfs/File.h
src/modules/filesystem/physfs/Filesystem.cpp
src/modules/filesystem/physfs/Filesystem.h
src/modules/filesystem/physfs/PhysfsIo.h
src/modules/filesystem/physfs/PhysfsIo.cpp
)
if(ANDROID)
target_link_libraries(love_filesystem_physfs PUBLIC
lovedep::SDL
)
endif()
add_library(love_filesystem INTERFACE)
target_link_libraries(love_filesystem INTERFACE
love_filesystem_root
love_filesystem_physfs
)
#
# love.font
#
add_library(love_font_root STATIC
src/modules/font/BMFontRasterizer.cpp
src/modules/font/BMFontRasterizer.h
src/modules/font/Font.cpp
src/modules/font/Font.h
src/modules/font/GenericShaper.cpp
src/modules/font/GenericShaper.h
src/modules/font/GlyphData.cpp
src/modules/font/GlyphData.h
src/modules/font/ImageRasterizer.cpp
src/modules/font/ImageRasterizer.h
src/modules/font/Rasterizer.cpp
src/modules/font/Rasterizer.h
src/modules/font/TextShaper.cpp
src/modules/font/TextShaper.h
src/modules/font/TrueTypeRasterizer.cpp
src/modules/font/TrueTypeRasterizer.h
src/modules/font/wrap_Font.cpp
src/modules/font/wrap_Font.h
src/modules/font/wrap_GlyphData.cpp
src/modules/font/wrap_GlyphData.h
src/modules/font/wrap_Rasterizer.cpp
src/modules/font/wrap_Rasterizer.h
)
target_link_libraries(love_font_root PUBLIC
lovedep::Lua
lovedep::Freetype
)
add_library(love_font_freetype STATIC
src/modules/font/freetype/Font.cpp
src/modules/font/freetype/Font.h
src/modules/font/freetype/HarfbuzzShaper.cpp
src/modules/font/freetype/HarfbuzzShaper.h
src/modules/font/freetype/TrueTypeRasterizer.cpp
src/modules/font/freetype/TrueTypeRasterizer.h
)
target_link_libraries(love_font_freetype PUBLIC
lovedep::Freetype
lovedep::Harfbuzz
)
add_library(love_font INTERFACE)
target_link_libraries(love_font INTERFACE
love_font_root
love_font_freetype
)
#
# love.graphics
#
add_library(love_graphics_root STATIC
src/modules/graphics/Buffer.cpp
src/modules/graphics/Buffer.h
src/modules/graphics/Deprecations.cpp
src/modules/graphics/Deprecations.h
src/modules/graphics/Drawable.cpp
src/modules/graphics/Drawable.h
src/modules/graphics/Font.cpp
src/modules/graphics/Font.h
src/modules/graphics/Graphics.cpp
src/modules/graphics/Graphics.h
src/modules/graphics/GraphicsReadback.cpp
src/modules/graphics/GraphicsReadback.h
src/modules/graphics/Mesh.cpp
src/modules/graphics/Mesh.h
src/modules/graphics/ParticleSystem.cpp
src/modules/graphics/ParticleSystem.h
src/modules/graphics/Polyline.cpp
src/modules/graphics/Polyline.h
src/modules/graphics/Quad.cpp
src/modules/graphics/Quad.h
src/modules/graphics/renderstate.cpp
src/modules/graphics/renderstate.h
src/modules/graphics/Resource.h
src/modules/graphics/Shader.cpp
src/modules/graphics/Shader.h
src/modules/graphics/ShaderStage.cpp
src/modules/graphics/ShaderStage.h
src/modules/graphics/SpriteBatch.cpp
src/modules/graphics/SpriteBatch.h
src/modules/graphics/StreamBuffer.cpp
src/modules/graphics/StreamBuffer.h
src/modules/graphics/TextBatch.cpp
src/modules/graphics/TextBatch.h
src/modules/graphics/Texture.cpp
src/modules/graphics/Texture.h
src/modules/graphics/vertex.cpp
src/modules/graphics/vertex.h
src/modules/graphics/Video.cpp
src/modules/graphics/Video.h
src/modules/graphics/Volatile.cpp
src/modules/graphics/Volatile.h
src/modules/graphics/wrap_Buffer.cpp
src/modules/graphics/wrap_Buffer.h
src/modules/graphics/wrap_Font.cpp
src/modules/graphics/wrap_Font.h
src/modules/graphics/wrap_Graphics.cpp
src/modules/graphics/wrap_Graphics.h
src/modules/graphics/wrap_Graphics.lua
src/modules/graphics/wrap_GraphicsReadback.cpp
src/modules/graphics/wrap_GraphicsReadback.h
src/modules/graphics/wrap_Mesh.cpp
src/modules/graphics/wrap_Mesh.h
src/modules/graphics/wrap_ParticleSystem.cpp
src/modules/graphics/wrap_ParticleSystem.h
src/modules/graphics/wrap_Quad.cpp
src/modules/graphics/wrap_Quad.h
src/modules/graphics/wrap_Shader.cpp
src/modules/graphics/wrap_Shader.h
src/modules/graphics/wrap_SpriteBatch.cpp
src/modules/graphics/wrap_SpriteBatch.h
src/modules/graphics/wrap_Texture.cpp
src/modules/graphics/wrap_Texture.h
src/modules/graphics/wrap_TextBatch.cpp
src/modules/graphics/wrap_TextBatch.h
src/modules/graphics/wrap_Video.cpp
src/modules/graphics/wrap_Video.h
src/modules/graphics/wrap_Video.lua
)
target_link_libraries(love_graphics_root PUBLIC
lovedep::Lua
)
add_library(love_graphics_opengl STATIC
src/modules/graphics/opengl/Buffer.cpp
src/modules/graphics/opengl/Buffer.h
src/modules/graphics/opengl/FenceSync.cpp
src/modules/graphics/opengl/FenceSync.h
src/modules/graphics/opengl/Graphics.cpp
src/modules/graphics/opengl/Graphics.h
src/modules/graphics/opengl/GraphicsReadback.cpp
src/modules/graphics/opengl/GraphicsReadback.h
src/modules/graphics/opengl/OpenGL.cpp
src/modules/graphics/opengl/OpenGL.h
src/modules/graphics/opengl/Shader.cpp
src/modules/graphics/opengl/Shader.h
src/modules/graphics/opengl/ShaderStage.cpp
src/modules/graphics/opengl/ShaderStage.h
src/modules/graphics/opengl/StreamBuffer.cpp
src/modules/graphics/opengl/StreamBuffer.h
src/modules/graphics/opengl/Texture.cpp
src/modules/graphics/opengl/Texture.h
)
target_link_libraries(love_graphics_opengl PUBLIC
lovedep::SDL
)
add_library(love_graphics INTERFACE)
target_link_libraries(love_graphics INTERFACE
love_graphics_root
love_graphics_opengl
)
if(APPLE)
add_library(love_graphics_metal STATIC
src/modules/graphics/metal/Buffer.h
src/modules/graphics/metal/Buffer.mm
src/modules/graphics/metal/Graphics.h
src/modules/graphics/metal/Graphics.mm
src/modules/graphics/metal/GraphicsReadback.h
src/modules/graphics/metal/GraphicsReadback.mm
src/modules/graphics/metal/Metal.h
src/modules/graphics/metal/Metal.mm
src/modules/graphics/metal/Shader.h
src/modules/graphics/metal/Shader.mm
src/modules/graphics/metal/ShaderStage.h
src/modules/graphics/metal/ShaderStage.mm
src/modules/graphics/metal/StreamBuffer.h
src/modules/graphics/metal/StreamBuffer.mm
src/modules/graphics/metal/Texture.h
src/modules/graphics/metal/Texture.mm
)
target_link_libraries(love_graphics_metal PUBLIC
objc
"-framework Metal"
"-framework QuartzCore"
)
target_link_libraries(love_graphics INTERFACE
love_graphics_metal
)
else()
add_library(love_graphics_vulkan STATIC
src/modules/graphics/vulkan/Graphics.h
src/modules/graphics/vulkan/Graphics.cpp
src/modules/graphics/vulkan/GraphicsReadback.h
src/modules/graphics/vulkan/GraphicsReadback.cpp
src/modules/graphics/vulkan/Shader.h
src/modules/graphics/vulkan/Shader.cpp
src/modules/graphics/vulkan/ShaderStage.h
src/modules/graphics/vulkan/ShaderStage.cpp
src/modules/graphics/vulkan/StreamBuffer.h
src/modules/graphics/vulkan/StreamBuffer.cpp
src/modules/graphics/vulkan/Buffer.h
src/modules/graphics/vulkan/Buffer.cpp
src/modules/graphics/vulkan/Texture.h
src/modules/graphics/vulkan/Texture.cpp
src/modules/graphics/vulkan/Vulkan.h
src/modules/graphics/vulkan/Vulkan.cpp
src/modules/graphics/vulkan/VulkanWrapper.h
)
target_link_libraries(love_graphics_vulkan PUBLIC
lovedep::SDL
)
target_link_libraries(love_graphics INTERFACE
love_graphics_vulkan
)
endif()
#
# love.image
#
add_library(love_image_root STATIC
src/modules/image/CompressedImageData.cpp
src/modules/image/CompressedImageData.h
src/modules/image/CompressedSlice.cpp
src/modules/image/CompressedSlice.h
src/modules/image/FormatHandler.cpp
src/modules/image/FormatHandler.h
src/modules/image/Image.cpp
src/modules/image/Image.h
src/modules/image/ImageData.cpp
src/modules/image/ImageData.h
src/modules/image/ImageDataBase.cpp
src/modules/image/ImageDataBase.h
src/modules/image/wrap_CompressedImageData.cpp
src/modules/image/wrap_CompressedImageData.h
src/modules/image/wrap_Image.cpp
src/modules/image/wrap_Image.h
src/modules/image/wrap_ImageData.cpp
src/modules/image/wrap_ImageData.h
src/modules/image/wrap_ImageData.lua
)
target_link_libraries(love_image_root PUBLIC
lovedep::Lua
)
add_library(love_image_magpie STATIC
src/modules/image/magpie/ASTCHandler.cpp
src/modules/image/magpie/ASTCHandler.h
src/modules/image/magpie/ddsHandler.cpp
src/modules/image/magpie/ddsHandler.h
src/modules/image/magpie/EXRHandler.cpp
src/modules/image/magpie/EXRHandler.h
src/modules/image/magpie/KTXHandler.cpp
src/modules/image/magpie/KTXHandler.h
src/modules/image/magpie/PKMHandler.cpp
src/modules/image/magpie/PKMHandler.h
src/modules/image/magpie/PNGHandler.cpp
src/modules/image/magpie/PNGHandler.h
src/modules/image/magpie/PVRHandler.cpp
src/modules/image/magpie/PVRHandler.h
src/modules/image/magpie/STBHandler.cpp
src/modules/image/magpie/STBHandler.h
)
target_link_libraries(love_image_magpie PUBLIC
lovedep::Zlib
)
add_library(love_image INTERFACE)
target_link_libraries(love_image INTERFACE
love_image_root
love_image_magpie
)
#
# love.joystick
#
add_library(love_joystick_root STATIC
src/modules/joystick/Joystick.cpp
src/modules/joystick/Joystick.h
src/modules/joystick/JoystickModule.h
src/modules/joystick/wrap_Joystick.cpp
src/modules/joystick/wrap_Joystick.h
src/modules/joystick/wrap_JoystickModule.cpp
src/modules/joystick/wrap_JoystickModule.h
)
target_link_libraries(love_joystick_root PUBLIC
lovedep::Lua
)
add_library(love_joystick_sdl STATIC
src/modules/joystick/sdl/Joystick.cpp
src/modules/joystick/sdl/Joystick.h
src/modules/joystick/sdl/JoystickModule.cpp
src/modules/joystick/sdl/JoystickModule.h
)
target_link_libraries(love_joystick_sdl PUBLIC
lovedep::SDL
)
add_library(love_joystick INTERFACE)
target_link_libraries(love_joystick INTERFACE
love_joystick_root
love_joystick_sdl
)
#
# love.keyboard
#
add_library(love_keyboard_root STATIC
src/modules/keyboard/Keyboard.cpp
src/modules/keyboard/Keyboard.h
src/modules/keyboard/wrap_Keyboard.cpp
src/modules/keyboard/wrap_Keyboard.h
)
target_link_libraries(love_keyboard_root PUBLIC
lovedep::Lua
lovedep::SDL
)
add_library(love_keyboard_sdl STATIC
src/modules/keyboard/sdl/Keyboard.cpp
src/modules/keyboard/sdl/Keyboard.h
)
target_link_libraries(love_keyboard_sdl PUBLIC
lovedep::SDL
)
add_library(love_keyboard INTERFACE)
target_link_libraries(love_keyboard INTERFACE
love_keyboard_root
love_keyboard_sdl
)
#
# love.math
#
add_library(love_math STATIC
src/modules/math/BezierCurve.cpp
src/modules/math/BezierCurve.h
src/modules/math/MathModule.cpp
src/modules/math/MathModule.h
src/modules/math/RandomGenerator.cpp
src/modules/math/RandomGenerator.h
src/modules/math/Transform.cpp
src/modules/math/Transform.h
src/modules/math/wrap_BezierCurve.cpp
src/modules/math/wrap_BezierCurve.h
src/modules/math/wrap_Math.cpp
src/modules/math/wrap_Math.h
src/modules/math/wrap_Math.lua
src/modules/math/wrap_RandomGenerator.cpp
src/modules/math/wrap_RandomGenerator.h
src/modules/math/wrap_RandomGenerator.lua
src/modules/math/wrap_Transform.cpp
src/modules/math/wrap_Transform.h
)
target_link_libraries(love_math PUBLIC
lovedep::Lua
)
#
# love.mouse
#
add_library(love_mouse_root STATIC
src/modules/mouse/Cursor.cpp
src/modules/mouse/Cursor.h
src/modules/mouse/Mouse.h
src/modules/mouse/wrap_Cursor.cpp
src/modules/mouse/wrap_Cursor.h
src/modules/mouse/wrap_Mouse.cpp
src/modules/mouse/wrap_Mouse.h
)
target_link_libraries(love_mouse_root PUBLIC
lovedep::Lua
lovedep::SDL
)
add_library(love_mouse_sdl STATIC
src/modules/mouse/sdl/Cursor.cpp
src/modules/mouse/sdl/Cursor.h
src/modules/mouse/sdl/Mouse.cpp
src/modules/mouse/sdl/Mouse.h
)
target_link_libraries(love_mouse_sdl PUBLIC
lovedep::SDL
)
add_library(love_mouse INTERFACE)
target_link_libraries(love_mouse INTERFACE
love_mouse_root
love_mouse_sdl
)
#
# love.physics
#
add_library(love_physics_root STATIC
src/modules/physics/Body.cpp
src/modules/physics/Body.h
src/modules/physics/Joint.cpp
src/modules/physics/Joint.h
src/modules/physics/Shape.cpp
src/modules/physics/Shape.h
)
add_library(love_physics_box2d STATIC
src/modules/physics/box2d/Body.cpp
src/modules/physics/box2d/Body.h
src/modules/physics/box2d/ChainShape.cpp
src/modules/physics/box2d/ChainShape.h
src/modules/physics/box2d/CircleShape.cpp
src/modules/physics/box2d/CircleShape.h
src/modules/physics/box2d/Contact.cpp
src/modules/physics/box2d/Contact.h
src/modules/physics/box2d/DistanceJoint.cpp
src/modules/physics/box2d/DistanceJoint.h
src/modules/physics/box2d/EdgeShape.cpp
src/modules/physics/box2d/EdgeShape.h
src/modules/physics/box2d/FrictionJoint.cpp
src/modules/physics/box2d/FrictionJoint.h
src/modules/physics/box2d/GearJoint.cpp
src/modules/physics/box2d/GearJoint.h
src/modules/physics/box2d/Joint.cpp
src/modules/physics/box2d/Joint.h
src/modules/physics/box2d/MotorJoint.cpp
src/modules/physics/box2d/MotorJoint.h
src/modules/physics/box2d/MouseJoint.cpp
src/modules/physics/box2d/MouseJoint.h
src/modules/physics/box2d/Physics.cpp
src/modules/physics/box2d/Physics.h
src/modules/physics/box2d/PolygonShape.cpp
src/modules/physics/box2d/PolygonShape.h
src/modules/physics/box2d/PrismaticJoint.cpp
src/modules/physics/box2d/PrismaticJoint.h
src/modules/physics/box2d/PulleyJoint.cpp
src/modules/physics/box2d/PulleyJoint.h
src/modules/physics/box2d/RevoluteJoint.cpp
src/modules/physics/box2d/RevoluteJoint.h
src/modules/physics/box2d/RopeJoint.cpp
src/modules/physics/box2d/RopeJoint.h
src/modules/physics/box2d/Shape.cpp
src/modules/physics/box2d/Shape.h
src/modules/physics/box2d/WeldJoint.cpp
src/modules/physics/box2d/WeldJoint.h
src/modules/physics/box2d/WheelJoint.cpp
src/modules/physics/box2d/WheelJoint.h
src/modules/physics/box2d/World.cpp
src/modules/physics/box2d/World.h
src/modules/physics/box2d/wrap_Body.cpp
src/modules/physics/box2d/wrap_Body.h
src/modules/physics/box2d/wrap_ChainShape.cpp
src/modules/physics/box2d/wrap_ChainShape.h
src/modules/physics/box2d/wrap_CircleShape.cpp
src/modules/physics/box2d/wrap_CircleShape.h
src/modules/physics/box2d/wrap_Contact.cpp
src/modules/physics/box2d/wrap_Contact.h
src/modules/physics/box2d/wrap_DistanceJoint.cpp
src/modules/physics/box2d/wrap_DistanceJoint.h
src/modules/physics/box2d/wrap_EdgeShape.cpp
src/modules/physics/box2d/wrap_EdgeShape.h
src/modules/physics/box2d/wrap_FrictionJoint.cpp
src/modules/physics/box2d/wrap_FrictionJoint.h
src/modules/physics/box2d/wrap_GearJoint.cpp
src/modules/physics/box2d/wrap_GearJoint.h
src/modules/physics/box2d/wrap_Joint.cpp
src/modules/physics/box2d/wrap_Joint.h
src/modules/physics/box2d/wrap_MotorJoint.cpp
src/modules/physics/box2d/wrap_MotorJoint.h
src/modules/physics/box2d/wrap_MouseJoint.cpp
src/modules/physics/box2d/wrap_MouseJoint.h
src/modules/physics/box2d/wrap_Physics.cpp
src/modules/physics/box2d/wrap_Physics.h
src/modules/physics/box2d/wrap_PolygonShape.cpp
src/modules/physics/box2d/wrap_PolygonShape.h
src/modules/physics/box2d/wrap_PrismaticJoint.cpp
src/modules/physics/box2d/wrap_PrismaticJoint.h
src/modules/physics/box2d/wrap_PulleyJoint.cpp
src/modules/physics/box2d/wrap_PulleyJoint.h
src/modules/physics/box2d/wrap_RevoluteJoint.cpp
src/modules/physics/box2d/wrap_RevoluteJoint.h
src/modules/physics/box2d/wrap_RopeJoint.cpp
src/modules/physics/box2d/wrap_RopeJoint.h
src/modules/physics/box2d/wrap_Shape.cpp
src/modules/physics/box2d/wrap_Shape.h