-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathCMakeLists.txt
2248 lines (1811 loc) · 73 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
# Note: Release builds are treated as production builds
# and will take a lot longer to build due to link-time optimizations.
#
# Unless you are indeed releasing a binary, use Debug or RelWithDebInfo.
cmake_minimum_required(VERSION 3.2)
project(Hypersomnia)
enable_language(C ASM)
# Sanity logs.
message("CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}")
message("CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}")
message("CMAKE_LINKER: ${CMAKE_LINKER}")
message("Hypersomnia project source dir: ${PROJECT_SOURCE_DIR}")
message("Hypersomnia project binary dir: ${PROJECT_BINARY_DIR}")
message("Hypersomnia current binary dir: ${CMAKE_CURRENT_BINARY_DIR}")
# Determine the used compiler.
# In case of MSVC, CMake sets the MSVC variable to ON on its own.
# Important note:
# MSVC build is currently hardcoded to be statically linked.
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
message("Building with Clang.")
set(CLANG ON)
set(FUSE_LD_FLAG "-fuse-ld=lld")
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
message("Building with AppleClang.")
set(CLANG ON)
set(USE_GLFW ON)
include_directories("/usr/local/include")
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
message("Building with gcc.")
set(GCC ON)
else()
message("Unknown compiler: ${CMAKE_CXX_COMPILER_ID}")
endif()
if(CLANG)
EXECUTE_PROCESS( COMMAND ${CMAKE_CXX_COMPILER} --version OUTPUT_VARIABLE clang_full_version_string )
message("Clang full version string: ${clang_full_version_string}")
string (REGEX REPLACE ".*clang version ([0-9]+\\.[0-9]+).*" "\\1" CLANG_VERSION_STRING ${clang_full_version_string})
message("Clang version: ${CLANG_VERSION_STRING}")
endif()
if(MSVC)
set(USE_GLFW ON)
if(CLANG)
message("Building with Clang on Windows.")
else()
set(MSVC_SPECIFIC ON)
message("Building with MSVC specifically.")
endif()
endif()
if(UNIX)
message("Building for UNIX systems.")
if (NOT APPLE)
set(LINUX ON)
endif()
if(NOT ARCHITECTURE)
message(FATAL_ERROR "Architecture type was not specified.")
endif()
if(${ARCHITECTURE} STREQUAL "x86")
message("Building for x86 architecture.")
elseif(${ARCHITECTURE} STREQUAL "x64")
message("Building for x64 architecture.")
elseif(${ARCHITECTURE} STREQUAL "Web")
message("Building for Web.")
set(BUILD_FOR_WEB ON)
else()
message(FATAL_ERROR "Unknown architecture: ${ARCHITECTURE}")
endif()
elseif(MSVC)
message("Building for Windows systems.")
# Unlike makefiles, architecture is determined by the generator used.
else()
message(FATAL_ERROR "Unknown system.")
endif()
if(CLANG)
set(XCLANG_STR "-Xclang")
else()
set(XCLANG_STR "")
endif()
if(BUILD_FOR_WEB)
# We're pre-building the tools
if(NOT INTROSPECTOR_GENERATOR_PATH)
message(FATAL_ERROR "INTROSPECTOR_GENERATOR_PATH not set for WebAssembly build")
endif()
if(NOT VERSION_FILE_GENERATOR_PATH)
message(FATAL_ERROR "VERSION_FILE_GENERATOR_PATH not set for WebAssembly build")
endif()
else()
set(INTROSPECTOR_GENERATOR_PATH Introspector-generator)
set(VERSION_FILE_GENERATOR_PATH version_file_generator)
endif()
##################################################
### ALL CUSTOMIZABLE BUILD SWITCHES BEGIN HERE ###
# If it is your first time building Hypersomnia and you get some errors,
# you might want to try turning HYPERSOMNIA_BARE on to build the minimal possible working Hypersomnia runtime.
# Then, try to work from there.
# The game should still run, even not having these features, although obviously, you won't see or hear anything.
set(DEFAULT_OPT ON)
set(DEFAULT_NET_OPT ON)
set(HAS_HEAD YES)
if (BUILD_FOR_WEB)
set(DEFAULT_OPT OFF)
set(DEFAULT_NET_OPT OFF)
endif()
if (HYPERSOMNIA_BARE)
message("Building Hypersomnia without... anything")
set(DEFAULT_OPT OFF)
set(DEFAULT_NET_OPT OFF)
set(HEADLESS ON)
endif()
if (HEADLESS)
message("Building a minimal executable required to run a dedicated server or a masterserver.")
set(HAS_HEAD OFF)
set(DEFAULT_OPT OFF)
endif()
# In the future, the switches will also differ depending on whether the target application is a client or a server.
# If you're a developer, you might also want to disable some functionality to have faster builds for quicker iteration.
## These variables are used by the archiver to know which files are to be included with the executable,
## and also for Visual Studio to properly set the working directory.
set(HYPERSOMNIA_RESOURCES_FOLDER_NAME "hypersomnia")
set(HYPERSOMNIA_EXE_RESOURCES_DIR "${PROJECT_SOURCE_DIR}/${HYPERSOMNIA_RESOURCES_FOLDER_NAME}")
## Application packaging switches.
option(ADD_APPLICATION_ICON "Add application icon." ${DEFAULT_OPT})
## Building switches for functionality using 3rdparty libraries.
## If off, will simply build steam_integration.cpp in the project
## with null interface.
option(OUTPUT_TO_HYPERSOMNIA_FOLDER "If enabled, the executable with its dll files will be copied to hypersomnia folder to prepare it for packaging." OFF)
## Before enabling this option, first call:
## cmake/build_steam_integration.sh, or
## cmake/build_nonsteam_integration.sh
## to generate a suitable library that either interfaces with libsteam_api.so or provides a non-Steam version of the game.
## The built library will be output to cmake/steam_integration/bin/linux/libsteam_integration.so,
## and later copied from there to the executable folder every time you build - executable will have its RPATH set to $ORIGIN.
##
## Note: cmake/build_steam_integration.sh will only work
## if you have Steamworks SDK downloaded into cmake/steam_integration/steamworks/sdk.
## The libsteam_integration.so/.dll/.dylib libraries that come with this repo (in cmake/steam_integration/steamworks/bin)
## are already built against Steamworks SDK - they were built with cmake/build_steam_integration.sh.
option(LINK_STEAM_INTEGRATION "Link against libsteam_integration.so/dll. This allows the same executable to dynamically switch between a Steam and Non-Steam version. It will also set the executable's RPATH to ORIGIN on all platforms." OFF)
## This is only a convenience developer option.
option(DEVELOP_STEAM_INTEGRATION "Enable this ONLY if you're developing integration with Steamworks. This will call add_subdirectory for libsteam_integration.so with -DBUILD_STEAM=1. This will also create steam_appid.txt next to the executable, preventing it from restarting through Steam." OFF)
if (HEADLESS OR BUILD_FOR_WEB)
set(LINK_STEAM_INTEGRATION OFF)
set(DEVELOP_STEAM_INTEGRATION OFF)
endif()
if (BUILD_FOR_WEB)
set(USE_SDL2 ON)
set(CMAKE_EXECUTABLE_SUFFIX ".html")
endif()
option(BUILD_OPENAL "Build OpenAL Soft." ${DEFAULT_OPT})
option(BUILD_OPENGL "Build OpenGL-related code." ${DEFAULT_OPT})
option(BUILD_NETWORKING "Build networking." ${DEFAULT_NET_OPT})
option(BUILD_MASTERSERVER "Build the masterserver." ${DEFAULT_NET_OPT})
option(BUILD_NATIVE_SOCKETS "Native socket operations like ping and NAT traversal. Disabled for the web." ${DEFAULT_NET_OPT})
option(BUILD_WEBRTC "Build WebRTC for client and server. This will enable networking on the Web and cross-play between web and native clients." ${DEFAULT_NET_OPT})
option(BUILD_OPENSSL "Build SSL support. Required for secure automatic application updates." ${DEFAULT_NET_OPT})
option(BUILD_FREETYPE "Build FreeType library responsible for loading fonts." ${DEFAULT_OPT})
option(BUILD_WINDOW_FRAMEWORK "Build code specific to a given platfom, e.g. window management done by WinAPI." ${DEFAULT_OPT})
option(BUILD_UNIT_TESTS "Build unit tests that are run on game startup." ${DEFAULT_NET_OPT})
option(BUILD_SOUND_FORMAT_DECODERS "Build stb_vorbis. If this is off, ogg files won't be loaded." ${DEFAULT_OPT})
## Switches for functionality originating from the Hypersomnia codebase.
option(BUILD_VERSION_FILE_GENERATOR "Build version file generator to generate commit information." ON)
option(BUILD_TEST_SCENES "Build built-in official content (legacy flag - should always be on)" ON)
option(BUILD_STENCIL_BUFFER "Build stencil buffer related code. Will be disabled in MMO setups, so everybody is equal in having wallhacks." ON)
option(USE_SYSTEM_FREETYPE "Use system FreeType library instead of building it." OFF)
option(STATIC_LINK_STDLIB "Statically link the C++ standard library." OFF)
option(PREFER_LIBCXX "Use llvm's implementation of the C++ standard library." ON)
option(BUILD_CRAZYGAMES "Use CrazyGames web shell." OFF)
set(BUILD_IN_CONSOLE_MODE OFF CACHE STRING "0")
## Build optimization switches.
## These may speed up build times.
option(USE_O3 "Use -O3 switch in Release." OFF)
option(LINK_TIME_OPTIMIZATION "Perform link-time optimization. Can drastically increase the build time." OFF)
## Debug information.
option(GENERATE_DEBUG_INFORMATION "Generate source-level debug information. If 0, -g flag will be removed to speed up the build." OFF)
option(BUILD_DEBUGGER_SETUP "Build debugger setup. Due to hardcore templates, this takes amazingly long time to build, so it makes sense to turn it off sometimes." OFF)
## Thread sanitizer.
option(ENABLE_THREADSANITIZER "Enable ThreadSanitizer." OFF)
option(ENABLE_ADRRESSSANITIZER "Enable AddressSanitizer." OFF)
if (ENABLE_THREADSANITIZER)
message("Game will build with the thread sanitizer.")
set(GENERATE_DEBUG_INFORMATION ON)
message("Forcing GENERATE_DEBUG_INFORMATION to ON.")
endif()
if (GENERATE_DEBUG_INFORMATION)
message("Generating debug information. Compilation will take a while.")
else()
message("Not generating debug information.")
endif()
if (BUILD_DEBUGGER_SETUP)
message("Building with debugger setup. Compilation will take a while.")
else()
message("Building without debugger setup.")
endif()
if (NOT BUILD_NETWORKING)
set(BUILD_WEBRTC OFF)
endif()
if (BUILD_FOR_WEB)
# Slowly enabling one by one
set(BUILD_FREETYPE ON)
set(BUILD_SOUND_FORMAT_DECODERS ON)
set(BUILD_OPENGL ON)
set(BUILD_OPENAL ON)
set(BUILD_WINDOW_FRAMEWORK ON)
set(BUILD_NETWORKING ON)
set(BUILD_WEBRTC ON)
set(BUILD_MASTERSERVER OFF)
set(BUILD_NATIVE_SOCKETS OFF)
set(BUILD_UNIT_TESTS OFF)
set(USE_O3 ON)
endif()
## Static allocation switches. Possible values are one or zero.
# If this variable is nonzero, the cosmos will use a statically allocated number
# of entities, drastically improving access performance. Might be very useful for a sever application.
# Pros:
# + Dereferencing entities with speed of light
# Cons:
# - Compilation might be longer due to component includes needed everywhere
# - Can't tweak maximum number of entities at runtime
# - Even empty game worlds occupy as much space as those filled to the maximum
set(STATICALLY_ALLOCATE_ENTITIES OFF CACHE STRING "Statically allocate entities in the cosmos")
# If this variable is nonzero, the cosmos common will use a statically allocated number
# of entity flavours, drastically improving access performance. Might be very useful for a sever application.
# Pros:
# + Operating on entities with speed of light
# Cons:
# - Compilation might be longer due to component includes needed everywhere
# - Can't tweak maximum number of entity flavours at runtime
# - Even empty game worlds occupy as much space as those filled to the maximum
set(STATICALLY_ALLOCATE_ENTITY_FLAVOURS OFF CACHE STRING "Statically allocate entity flavours in the cosmos common")
## Internal build flags for programmers' use.
## Don't set them manually without a good reason.
if (UNIX)
set(OpenGL_GL_PREFERENCE "LEGACY")
endif()
### ALL CUSTOMIZABLE BUILD SWITCHES END HERE ###
################################################
# Here we automatically adjust some of the switches,
# based on what was set by the user.
if (UNIX)
# Honestly I don't know why we need that,
# there is some weird CMAKE_AR-NOTFOUND error without this line.
set(CMAKE_AR "ar")
endif()
set(BUILD_GLAD ${BUILD_OPENGL})
if (GCC)
set(ADD_MCMODEL_LARGE_FLAG ON CACHE STRING "Needed to suppress some crazy linker errors")
else()
set(ADD_MCMODEL_LARGE_FLAG OFF CACHE STRING "Needed to suppress some crazy linker errors")
endif()
if (NOT BUILD_WINDOW_FRAMEWORK)
set(BUILD_IN_CONSOLE_MODE "1")
endif()
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
#####################################################
### SPECIFICATION OF ALL SOURCE FILES BEGINS HERE ###
# We will be building Box2D manually, as it is hacked to the utmost.
set(HYPERSOMNIA_BOX2D_CPPS
"src/3rdparty/Box2D/Collision/b2BroadPhase.cpp"
"src/3rdparty/Box2D/Collision/b2CollideCircle.cpp"
"src/3rdparty/Box2D/Collision/b2CollideEdge.cpp"
"src/3rdparty/Box2D/Collision/b2CollidePolygon.cpp"
"src/3rdparty/Box2D/Collision/b2Collision.cpp"
"src/3rdparty/Box2D/Collision/b2Distance.cpp"
"src/3rdparty/Box2D/Collision/b2DynamicTree.cpp"
"src/3rdparty/Box2D/Collision/b2TimeOfImpact.cpp"
"src/3rdparty/Box2D/Collision/Shapes/b2ChainShape.cpp"
"src/3rdparty/Box2D/Collision/Shapes/b2CircleShape.cpp"
"src/3rdparty/Box2D/Collision/Shapes/b2EdgeShape.cpp"
"src/3rdparty/Box2D/Collision/Shapes/b2PolygonShape.cpp"
"src/3rdparty/Box2D/Common/b2BlockAllocator.cpp"
"src/3rdparty/Box2D/Common/b2Draw.cpp"
"src/3rdparty/Box2D/Common/b2Math.cpp"
"src/3rdparty/Box2D/Common/b2Settings.cpp"
"src/3rdparty/Box2D/Common/b2StackAllocator.cpp"
"src/3rdparty/Box2D/Common/b2Timer.cpp"
"src/3rdparty/Box2D/Dynamics/b2Body.cpp"
"src/3rdparty/Box2D/Dynamics/b2ContactManager.cpp"
"src/3rdparty/Box2D/Dynamics/b2Fixture.cpp"
"src/3rdparty/Box2D/Dynamics/b2Island.cpp"
"src/3rdparty/Box2D/Dynamics/b2World.cpp"
"src/3rdparty/Box2D/Dynamics/b2WorldCallbacks.cpp"
"src/3rdparty/Box2D/Dynamics/Contacts/b2ChainAndCircleContact.cpp"
"src/3rdparty/Box2D/Dynamics/Contacts/b2ChainAndPolygonContact.cpp"
"src/3rdparty/Box2D/Dynamics/Contacts/b2CircleContact.cpp"
"src/3rdparty/Box2D/Dynamics/Contacts/b2Contact.cpp"
"src/3rdparty/Box2D/Dynamics/Contacts/b2ContactSolver.cpp"
"src/3rdparty/Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.cpp"
"src/3rdparty/Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.cpp"
"src/3rdparty/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.cpp"
"src/3rdparty/Box2D/Dynamics/Contacts/b2PolygonContact.cpp"
"src/3rdparty/Box2D/Dynamics/Joints/b2DistanceJoint.cpp"
"src/3rdparty/Box2D/Dynamics/Joints/b2FrictionJoint.cpp"
"src/3rdparty/Box2D/Dynamics/Joints/b2GearJoint.cpp"
"src/3rdparty/Box2D/Dynamics/Joints/b2Joint.cpp"
"src/3rdparty/Box2D/Dynamics/Joints/b2MotorJoint.cpp"
"src/3rdparty/Box2D/Dynamics/Joints/b2MouseJoint.cpp"
"src/3rdparty/Box2D/Dynamics/Joints/b2PrismaticJoint.cpp"
"src/3rdparty/Box2D/Dynamics/Joints/b2PulleyJoint.cpp"
"src/3rdparty/Box2D/Dynamics/Joints/b2RevoluteJoint.cpp"
"src/3rdparty/Box2D/Dynamics/Joints/b2RopeJoint.cpp"
"src/3rdparty/Box2D/Dynamics/Joints/b2WeldJoint.cpp"
"src/3rdparty/Box2D/Dynamics/Joints/b2WheelJoint.cpp"
"src/3rdparty/Box2D/Rope/b2Rope.cpp"
)
# Test scene sources whose inclusion is conditional on the value of BUILD_TEST_SCENES.
set(HYPERSOMNIA_TEST_SCENES_CPPS
"src/test_scenes/ingredients/artificial_life.cpp"
"src/test_scenes/ingredients/backpack.cpp"
"src/test_scenes/ingredients/car.cpp"
"src/test_scenes/ingredients/guns.cpp"
"src/test_scenes/ingredients/ingredients.cpp"
"src/test_scenes/ingredients/melee_weapons.cpp"
"src/test_scenes/ingredients/obstacles.cpp"
"src/test_scenes/ingredients/decorations.cpp"
"src/test_scenes/ingredients/wsad_player.cpp"
"src/test_scenes/ingredients/grenades.cpp"
"src/test_scenes/test_scene_images.cpp"
"src/test_scenes/test_scene_particle_effects.cpp"
"src/test_scenes/test_scene_physical_materials.cpp"
"src/test_scenes/test_scene_sentience_properties.cpp"
"src/test_scenes/test_scene_animations.cpp"
"src/test_scenes/test_scene_sounds.cpp"
"src/test_scenes/test_scene_recoil_players.cpp"
"src/test_scenes/test_scene_flavours.cpp"
"src/test_scenes/scenes/minimal_scene.cpp"
"src/test_scenes/scenes/minimal_scene.cpp"
"src/test_scenes/scenes/testbed.cpp"
)
# Order is important inasmuch as multi-threaded builds are concerned.
# Put intensive cpps to the very beginning.
# These cpps will be included as the first to speed up multithreaded build times.
set(HYPERSOMNIA_CPU_INTENSIVE_CPPS
# This should be the first one to build to catch errors early
"src/main.cpp"
"src/work.cpp"
)
set(HYPERSOMNIA_SELF_UPDATER_CPP
"src/application/main/self_updater.cpp"
)
if(NOT BUILD_FOR_WEB)
list(APPEND HYPERSOMNIA_CPU_INTENSIVE_CPPS ${HYPERSOMNIA_SELF_UPDATER_CPP})
endif()
if(HAS_HEAD)
list(APPEND HYPERSOMNIA_CPU_INTENSIVE_CPPS
"src/view/rendering_scripts/illuminated_rendering.cpp"
"src/application/tests_of_traits.cpp"
)
endif()
if(BUILD_DEBUGGER_SETUP)
set(HYPERSOMNIA_DEBUGGER_SETUP_CPPS
"src/application/setups/debugger/gui/debugger_fae_gui.cpp"
"src/application/setups/debugger/debugger_setup.cpp"
"src/application/setups/debugger/gui/debugger_common_state_gui.cpp"
"src/application/setups/debugger/commands/change_property_command.cpp"
"src/application/setups/debugger/gui/debugger_history_gui.cpp"
"src/application/setups/debugger/gui/debugger_go_to_gui.cpp"
"src/application/setups/debugger/debugger_camera.cpp"
"src/application/setups/debugger/debugger_command_input.cpp"
"src/application/setups/debugger/commands/fill_with_test_scene_command.cpp"
"src/application/setups/debugger/commands/delete_entities_command.cpp"
"src/application/setups/debugger/commands/move_entities_command.cpp"
"src/application/setups/debugger/gui/debugger_entity_selector.cpp"
"src/application/setups/debugger/property_debugger/fae/fae_tree_structs.cpp"
"src/application/setups/debugger/commands/paste_entities_command.cpp"
"src/application/setups/debugger/commands/duplicate_entities_command.cpp"
"src/application/setups/debugger/commands/change_grouping_command.cpp"
"src/application/setups/debugger/debugger_selection_groups.cpp"
"src/application/setups/debugger/gui/debugger_selection_groups_gui.cpp"
"src/application/setups/debugger/gui/debugger_summary_gui.cpp"
"src/application/setups/debugger/gui/debugger_entity_mover.cpp"
"src/application/setups/debugger/debugger_folder.cpp"
"src/application/setups/debugger/debugger_recent_paths.cpp"
"src/application/setups/debugger/gui/debugger_layers_gui.cpp"
"src/application/setups/debugger/debugger_autosave.cpp"
"src/application/setups/debugger/debugger_paths.cpp"
"src/application/setups/debugger/debugger_history.cpp"
"src/application/setups/debugger/debugger_view.cpp"
"src/application/setups/debugger/gui/debugger_pathed_asset_gui.cpp"
"src/application/setups/debugger/commands/asset_commands.cpp"
"src/application/setups/debugger/gui/asset_path_browser_settings.cpp"
"src/application/setups/debugger/commands/flavour_commands.cpp"
"src/application/setups/debugger/gui/debugger_unpathed_asset_gui.cpp"
"src/application/setups/debugger/property_debugger/widgets/frames_prologue_widget.cpp"
"src/application/setups/debugger/property_debugger/property_debugger_structs.cpp"
"src/application/setups/debugger/property_debugger/update_size_if_tex_changed.cpp"
"src/application/setups/debugger/gui/debugger_player_gui.cpp"
"src/application/setups/debugger/gui/debugger_modes_gui.cpp"
"src/application/setups/debugger/debugger_player.cpp"
"src/application/setups/debugger/gui/debugger_tutorial_gui.cpp"
)
else()
set(HYPERSOMNIA_DEBUGGER_SETUP_CPPS "")
endif()
macro(file_flag path flags)
set_source_files_properties(${path} PROPERTIES COMPILE_FLAGS ${flags})
endmacro()
if(BUILD_NETWORKING)
set(HYPERSOMNIA_NETWORKING_CPPS
"src/application/setups/server/server_setup.cpp"
"src/application/network/network_adapters.cpp"
"src/augs/network/network_types.cpp"
)
if (BUILD_NATIVE_SOCKETS)
list(APPEND HYPERSOMNIA_NETWORKING_CPPS
"src/application/nat/nat_detection_session.cpp"
"src/application/nat/nat_traversal_session.cpp"
"src/application/setups/server/server_nat_traversal.cpp"
)
endif()
if (BUILD_MASTERSERVER)
list(APPEND HYPERSOMNIA_NETWORKING_CPPS
"src/application/masterserver/masterserver.cpp"
)
endif()
if(HAS_HEAD)
list(APPEND HYPERSOMNIA_NETWORKING_CPPS
"src/application/setups/client/client_setup.cpp"
"src/application/gui/browse_servers_gui.cpp"
)
endif()
endif()
if(HAS_HEAD)
set(HYPERSOMNIA_EDITOR_CPPS
"src/application/setups/editor/commands/toggle_active_commands.cpp"
"src/application/setups/editor/commands/clone_nodes_command.cpp"
"src/application/setups/editor/commands/delete_nodes_command.cpp"
"src/application/setups/editor/mover/editor_node_mover.cpp"
"src/application/setups/editor/commands/node_transform_commands.cpp"
"src/application/setups/editor/selector/editor_entity_selector.cpp"
"src/application/setups/editor/editor_camera.cpp"
"src/application/setups/editor/gui/editor_history_gui.cpp"
"src/application/setups/editor/editor_setup.cpp"
"src/application/setups/editor/editor_setup_imgui.cpp"
"src/application/setups/editor/gui/editor_inspector_gui.cpp"
"src/application/setups/editor/gui/editor_filesystem_gui.cpp"
"src/application/setups/editor/gui/editor_layers_gui.cpp"
"src/application/setups/editor/gui/editor_toolbar_gui.cpp"
)
set(HYPERSOMNIA_AUDIOVISUAL_CPPS
"src/view/audiovisual_state/systems/particles_simulation_system.cpp"
"src/view/audiovisual_state/systems/past_infection_system.cpp"
"src/view/audiovisual_state/systems/pure_color_highlight_system.cpp"
"src/view/audiovisual_state/systems/sound_system.cpp"
"src/view/audiovisual_state/systems/thunder_system.cpp"
"src/view/audiovisual_state/systems/damage_indication_system.cpp"
"src/view/game_gui/elements/action_button.cpp"
"src/view/game_gui/elements/character_gui.cpp"
"src/view/game_gui/elements/drag_and_drop.cpp"
"src/view/game_gui/elements/gui_grid.cpp"
"src/view/game_gui/elements/gui_positioning.cpp"
"src/view/game_gui/elements/hotbar_button.cpp"
"src/view/game_gui/elements/item_button.cpp"
"src/view/game_gui/elements/pixel_line_connector.cpp"
"src/view/game_gui/elements/drag_and_drop_target_drop_item.cpp"
"src/view/game_gui/elements/game_gui_root.cpp"
"src/view/game_gui/elements/value_bar.cpp"
"src/view/game_gui/elements/slot_button.cpp"
"src/view/game_gui/game_gui_system.cpp"
"src/view/viewables/particle_effect.cpp"
"src/view/audiovisual_state/aabb_highlighter.cpp"
"src/view/audiovisual_state/systems/exploding_ring_system.cpp"
"src/view/audiovisual_state/systems/light_system.cpp"
"src/view/rendering_scripts/draw_sentiences_hud.cpp"
"src/view/rendering_scripts/draw_explosion_body_highlights.cpp"
"src/view/rendering_scripts/draw_crosshair_lasers.cpp"
"src/view/rendering_scripts/draw_circular_progresses.cpp"
"src/augs/image/font.cpp"
"src/view/viewables/regeneration/desaturations.cpp"
"src/view/viewables/regeneration/buttons_with_corners.cpp"
"src/view/viewables/regeneration/images_from_commands.cpp"
"src/view/viewables/regeneration/neon_maps.cpp"
"src/augs/gui/button_corners.cpp"
"src/augs/gui/clipboard.cpp"
"src/augs/gui/gui_traversal_structs.cpp"
"src/augs/gui/formatted_string.cpp"
"src/augs/gui/rect.cpp"
"src/augs/gui/appearance_detector.cpp"
"src/augs/misc/imgui/simple_popup.cpp"
"src/application/gui/settings_gui.cpp"
"src/application/gui/start_client_gui.cpp"
"src/application/gui/start_server_gui.cpp"
"src/view/mode_gui/arena/arena_mode_gui.cpp"
"src/view/mode_gui/arena/arena_scoreboard_gui.cpp"
"src/view/mode_gui/arena/arena_choose_team_gui.cpp"
"src/view/mode_gui/arena/arena_buy_menu_gui.cpp"
"src/view/mode_gui/arena/arena_spectator_gui.cpp"
"src/application/gui/client/chat_gui.cpp"
"src/application/gui/client/client_gui_state.cpp"
"src/application/gui/leaderboards_gui.cpp"
"src/application/gui/social_sign_in_gui.cpp"
"src/view/hud_messages/hud_messages_gui.cpp"
"src/application/gui/map_catalogue_gui.cpp"
"src/augs/gui/dragger.cpp"
"src/augs/gui/rect_world.cpp"
"src/augs/gui/text/caret.cpp"
"src/augs/gui/text/drafter.cpp"
"src/augs/gui/text/draft_redrawer.cpp"
"src/augs/gui/text/printer.cpp"
"src/augs/gui/text/word_separator.cpp"
"src/augs/graphics/texture.cpp"
"src/augs/graphics/fbo.cpp"
"src/augs/graphics/renderer.cpp"
"src/augs/graphics/renderer_backend.cpp"
"src/augs/graphics/shader.cpp"
"src/augs/graphics/vertex.cpp"
"src/view/audiovisual_state/world_camera.cpp"
"src/view/audiovisual_state/audiovisual_state.cpp"
"src/view/audiovisual_state/audiovisual_profiler.cpp"
"src/view/audiovisual_state/systems/randomizing_system.cpp"
"src/augs/audio/audio_context.cpp"
"src/augs/audio/sound_buffer.cpp"
"src/augs/audio/sound_source.cpp"
"src/augs/audio/audio_backend.cpp"
"src/augs/audio/sound_data.cpp"
"src/augs/misc/imgui/path_tree_structs.cpp"
"src/game/debug_draw.cpp"
"src/application/setups/project_selector/project_selector_setup.cpp"
"src/augs/texture_atlas/bake_fresh_atlas.cpp"
"src/view/necessary_resources.cpp"
"src/view/frame_profiler.cpp"
"src/augs/texture_atlas/atlas_profiler.cpp"
"src/view/viewables/streaming/viewables_streaming.cpp"
"src/view/viewables/streaming/viewables_streaming_profiler.cpp"
"src/view/viewables/avatar_atlas.cpp"
"src/augs/math/snapping_grid.cpp"
"src/augs/templates/history.cpp"
"src/application/main/imgui_pass.cpp"
"src/application/main/draw_debug_lines.cpp"
"src/application/main/draw_debug_details.cpp"
"src/application/main/release_flags.cpp"
"src/augs/gui/bbcode.cpp"
"src/augs/misc/imgui/imgui_utils.cpp"
"src/augs/misc/imgui/imgui_controls.cpp"
"src/augs/misc/imgui/imgui_control_wrappers.cpp"
"src/augs/window_framework/window.cpp"
"src/application/setups/test_scene_setup.cpp"
"src/application/setups/main_menu_setup.cpp"
"src/application/setups/client/https_file_uploader.cpp"
"src/augs/drawing/drawing.cpp"
"src/game/detail/describers.cpp"
"src/game/detail/names_and_descriptions.cpp"
"src/view/viewables/loaded_sounds_map.cpp"
"src/view/viewables/standard_atlas_distribution.cpp"
"src/application/network/simulation_receiver.cpp"
"src/application/main/miniature_generator.cpp"
)
endif()
set(HYPERSOMNIA_CODEBASE_CPPS
${HYPERSOMNIA_CPU_INTENSIVE_CPPS}
${HYPERSOMNIA_NETWORKING_CPPS}
${HYPERSOMNIA_DEBUGGER_SETUP_CPPS}
${HYPERSOMNIA_EDITOR_CPPS}
${HYPERSOMNIA_AUDIOVISUAL_CPPS}
"src/augs/window_framework/event.cpp"
"src/view/viewables/image_cache.cpp"
"src/application/setups/editor/official/create_official_resources.cpp"
"src/augs/window_framework/platform_utils.cpp"
"src/view/audiovisual_state/systems/interpolation_system.cpp"
"src/view/viewables/image_definition.cpp"
"src/augs/misc/value_meter.cpp"
"src/game/debug_drawing_settings.cpp"
"src/augs/image/image.cpp"
"src/augs/graphics/rgba.cpp"
"src/augs/misc/secure_hash.cpp"
"src/augs/string/path_sanitization.cpp"
"src/application/config_json_table.cpp"
"src/game/stateless_systems/destruction_system.cpp"
"src/game/stateless_systems/demolitions_system.cpp"
"src/game/stateless_systems/melee_system.cpp"
"src/game/stateless_systems/particles_existence_system.cpp"
"src/game/stateless_systems/sound_existence_system.cpp"
"src/game/stateless_systems/behaviour_tree_system.cpp"
"src/game/stateless_systems/car_system.cpp"
"src/game/stateless_systems/crosshair_system.cpp"
"src/game/stateless_systems/missile_system.cpp"
"src/game/stateless_systems/deletion_system.cpp"
"src/game/stateless_systems/driver_system.cpp"
"src/game/stateless_systems/force_joint_system.cpp"
"src/game/stateless_systems/gun_system.cpp"
"src/game/stateless_systems/input_system.cpp"
"src/game/stateless_systems/intent_contextualization_system.cpp"
"src/game/stateless_systems/item_system.cpp"
"src/game/stateless_systems/movement_system.cpp"
"src/game/stateless_systems/pathfinding_system.cpp"
"src/game/stateless_systems/sentience_system.cpp"
"src/game/stateless_systems/trace_system.cpp"
"src/game/stateless_systems/visibility_system.cpp"
"src/game/stateless_systems/physics_system.cpp"
"src/game/stateless_systems/portal_system.cpp"
"src/application/setups/editor/project/editor_project_readwrite.cpp"
"src/application/setups/editor/project/editor_project_paths.cpp"
"src/application/gui/headless_map_catalogue.cpp"
"src/view/viewables/all_viewables_defs.cpp"
"src/augs/ensure.cpp"
"src/augs/window_framework/shell.cpp"
"src/augs/misc/action_list/action_list.cpp"
"src/augs/misc/enum/enum_bitset.cpp"
"src/augs/misc/readable_bytesize.cpp"
"src/augs/misc/action_list/standard_actions.cpp"
"src/augs/readwrite/memory_stream.cpp"
"src/augs/misc/date_time.cpp"
"src/augs/string/typesafe_sprintf.cpp"
"src/augs/string/typesafe_sscanf.cpp"
"src/game/assets/animation.cpp"
"src/game/assets/behaviour_tree.cpp"
"src/game/assets/physical_material.cpp"
"src/game/components/flags_component.cpp"
"src/game/components/light_component.cpp"
"src/game/components/rigid_body_component.cpp"
"src/game/components/sentience_component.cpp"
"src/game/detail/standard_explosion.cpp"
"src/game/detail/inventory/inventory_slot.cpp"
"src/game/detail/inventory/inventory_slot_id.cpp"
"src/game/detail/inventory/inventory_utils.cpp"
"src/game/detail/physics/contact_listener.cpp"
"src/game/detail/physics/physics_friction_fields.cpp"
"src/game/detail/physics/ray_casts.cpp"
"src/game/detail/physics/physics_scripts.cpp"
"src/game/detail/visible_entities.cpp"
"src/game/detail/inventory/wielding_result.cpp"
"src/game/enums/attitude_type.cpp"
"src/game/enums/item_category.cpp"
"src/game/enums/slot_physical_behaviour.cpp"
"src/game/detail/ai/create_standard_behaviour_trees.cpp"
"src/game/inferred_caches/physics_world_cache.cpp"
"src/game/inferred_caches/tree_of_npo_cache.cpp"
"src/game/other_unit_tests.cpp"
"src/game/cosmos/cosmic_entropy.cpp"
"src/game/cosmos/data_living_one_step.cpp"
"src/augs/filesystem/directory.cpp"
"src/augs/misc/timing/delta.cpp"
"src/augs/misc/timing/stepped_timing.cpp"
"src/game/components/car_component.cpp"
"src/game/components/container_component.cpp"
"src/game/components/missile_component.cpp"
"src/game/components/movement_component.cpp"
"src/game/components/pathfinding_component.cpp"
"src/game/cosmos/cosmos.cpp"
"src/game/detail/ai/behaviours.cpp"
"src/game/detail/ai/behaviours/explore_in_search_for_last_seen_target.cpp"
"src/game/detail/ai/behaviours/immediate_evasion.cpp"
"src/game/detail/ai/behaviours/minimize_recoil_through_movement.cpp"
"src/game/detail/ai/behaviours/navigate_to_last_seen_position_of_target.cpp"
"src/game/detail/ai/behaviours/pull_trigger.cpp"
"src/game/detail/ai/behaviours/target_closest_enemy.cpp"
"src/game/detail/entity_scripts.cpp"
"src/game/enums/filters.cpp"
"src/game/cosmos/cosmos_solvable_significant.cpp"
"src/application/web_daemon/session_report.cpp"
"src/augs/global_libraries.cpp"
"src/augs/math/rects.cpp"
"src/augs/math/math.cpp"
"src/augs/misc/timing/fixed_delta_timer.cpp"
"src/augs/misc/randomization.cpp"
"src/augs/misc/smooth_value_field.cpp"
"src/augs/misc/timing/timer.cpp"
"src/augs/log.cpp"
"src/game/inferred_caches/relational_cache.cpp"
"src/game/components/motor_joint_component.cpp"
"src/augs/misc/enum/enum_boolset.cpp"
"src/augs/string/string_templates.cpp"
"src/game/components/sender_component.cpp"
"src/game/inferred_caches/flavour_id_cache.cpp"
"src/game/detail/spells/electric_shield.cpp"
"src/game/detail/spells/electric_triad.cpp"
"src/game/detail/spells/fury_of_the_aeons.cpp"
"src/game/detail/spells/haste.cpp"
"src/game/detail/spells/ultimate_wrath_of_the_aeons.cpp"
"src/game/detail/spells/exaltation.cpp"
"src/game/detail/spells/echoes_of_the_higher_realms.cpp"
"src/test_scenes/test_scenes_content.cpp"
"src/game/assets/recoil_player.cpp"
"src/augs/unit_tests.cpp"
"src/game/cosmos/cosmic_profiler.cpp"
"src/application/session_profiler.cpp"
"src/application/intercosm.cpp"
"src/augs/readwrite/readwrite_tests.cpp"
"src/game/components/trace_component.cpp"
"src/game/cosmos/solvers/standard_solver.cpp"
"src/game/cosmos/cosmos_solvable.cpp"
"src/game/cosmos/cosmos_common.cpp"
"src/game/detail/inventory/perform_transfer.cpp"
"src/game/cosmos/cosmic_functions.cpp"
"src/game/detail/view_input/particle_effect_input.cpp"
"src/game/detail/view_input/sound_effect_input.cpp"
"src/game/detail/spells/spell_logic_input.cpp"
"src/game/inferred_caches/processing_lists_cache.cpp"
"src/game/cosmos/entity_id.cpp"
"src/augs/misc/children_vector_tracker.cpp"
"src/augs/templates/container_templates.cpp"
"src/game/cosmos/state_tests.cpp"
"src/build_info.cpp"
"src/augs/misc/pool/pool.cpp"
"src/game/detail/sentience_shake.cpp"
"src/augs/string/get_type_name.cpp"
"src/game/stateless_systems/movement_path_system.cpp"
"src/game/stateless_systems/animation_system.cpp"
"src/game/detail/organisms/startle_nearbly_organisms.cpp"
"src/game/stateless_systems/remnant_system.cpp"
"src/game/modes/test_mode.cpp"
"src/game/components/hand_fuse_component.cpp"
"src/game/detail/explosive/detonate.cpp"
"src/game/modes/arena_mode.cpp"
"src/view/asset_funcs.cpp"
"src/game/detail/sentience/sentience_logic.cpp"
"src/game/cosmos/cosmos_global_solvable.cpp"
"src/augs/misc/enum/enum_map.cpp"
"src/game/detail/flavour_scripts.cpp"
"src/game/modes/mode_entropy.cpp"
"src/application/input/adjust_game_motions.cpp"
"src/application/arena/arena_paths.cpp"
"src/application/arena/intercosm_paths.cpp"
"src/augs/misc/compress.cpp"
"src/fp_consistency_tests.cpp"
"src/game/inferred_caches/organism_cache.cpp"
"src/augs/window_framework/create_process.cpp"
"src/application/setups/client/arena_downloading_session.cpp"
"src/application/setups/client/https_file_downloader.cpp"
)
if (BUILD_CRAZYGAMES)
list(APPEND HYPERSOMNIA_CODEBASE_CPPS
"src/augs/misc/profanity_filter.cpp"
)
endif()
# The rest of 3rdparty libraries with minimal amount of source files.
set(HYPERSOMNIA_TRIVIAL_3RDPARTY_CPPS
"src/3rdparty/polypartition/src/polypartition.cpp"
"src/3rdparty/crc32/crc32.c"
"src/3rdparty/lodepng/lodepng.cpp"
)
if (HAS_HEAD)
list(APPEND HYPERSOMNIA_TRIVIAL_3RDPARTY_CPPS
"src/3rdparty/imgui/imgui.cpp"
"src/3rdparty/imgui/imgui_widgets.cpp"
"src/3rdparty/imgui/imgui_tables.cpp"
"src/3rdparty/imgui/imgui_draw.cpp"
"src/3rdparty/imgui/imgui_demo.cpp"
"src/augs/misc/imgui/addons/imguitabwindow/imguitabwindow.cpp"
)
endif()
file_flag("src/3rdparty/imgui/imgui.cpp" "-Wno-error")
file_flag("src/augs/misc/imgui/addons/imguitabwindow/imguitabwindow.cpp" "-Wno-error")
# These headers will be input to the Introspector-generator.
file(GLOB_RECURSE HYPERSOMNIA_HEADERS_WITH_INTROSPECTED_CLASSES
"src/hypersomnia_version.h"
"src/fp_consistency_tests.h"
"src/augs/*.h"
"src/game/*.h"
"src/view/*.h"
"src/test_scenes/*.h"
"src/application/*.h"
"src/3rdparty/Box2D/Common/*.h"
"src/3rdparty/Box2D/Dynamics/*.h"
"src/application/tests_of_traits.cpp"
"src/augs/templates/introspect.cpp"
)
# Source files that are included conditionally.
# Conditional inclusion of source files happens here.
set(USING_X_WINDOW_SYSTEM OFF)
if(BUILD_WINDOW_FRAMEWORK)
list(APPEND HYPERSOMNIA_CODEBASE_CPPS
"src/augs/window_framework/window_explorer_utils.cpp"
)
if(USE_SDL2)
message("Using SDL as the window framework.")
list(APPEND HYPERSOMNIA_CODEBASE_CPPS
"src/augs/window_framework/window_sdl2.cpp"
)
elseif(USE_GLFW)
message("Using GLFW as the window framework.")
list(APPEND HYPERSOMNIA_CODEBASE_CPPS
"src/augs/window_framework/window_glfw.cpp"
)
elseif(UNIX)
set(USING_X_WINDOW_SYSTEM ON)
list(APPEND HYPERSOMNIA_CODEBASE_CPPS
"src/augs/window_framework/window_x.cpp"
"src/augs/window_framework/print_x_devices.cpp"
)
endif()
else()
if(HAS_HEAD)
list(APPEND HYPERSOMNIA_CODEBASE_CPPS
"src/augs/window_framework/window_stubs.cpp"
)
endif()
endif()
if(BUILD_OPENGL)
list(APPEND HYPERSOMNIA_CODEBASE_CPPS
"src/augs/graphics/OpenGL_error.cpp"
)
endif()
if(BUILD_OPENAL)
list(APPEND HYPERSOMNIA_CODEBASE_CPPS
"src/augs/audio/OpenAL_error.cpp"
)
endif()
if(BUILD_TEST_SCENES)
list(APPEND HYPERSOMNIA_CODEBASE_CPPS
${HYPERSOMNIA_TEST_SCENES_CPPS}
)
message("Building of test scenes is enabled.")
endif()
set(STEAM_INTEGRATION_DIR ${PROJECT_SOURCE_DIR}/cmake/steam_integration)
include_directories(${STEAM_INTEGRATION_DIR})
if(NOT LINK_STEAM_INTEGRATION AND NOT DEVELOP_STEAM_INTEGRATION)
message("Steam integration will NOT be linked at all. Building stubs directly.")
## Build stubs
list(APPEND HYPERSOMNIA_CODEBASE_CPPS
"cmake/steam_integration/steam_integration.cpp"
)
elseif (DEVELOP_STEAM_INTEGRATION)
message("DEVELOP_STEAM_INTEGRATION is set. Adding it directly as a target.")
add_subdirectory(${STEAM_INTEGRATION_DIR})
endif()
# natvis files for easier debugging in Visual Studio.
if(MSVC_SPECIFIC)
set(HYPERSOMNIA_NATVIS_FILES
"src/game/cosmos/entity_handle.natvis"
"src/game/detail/inventory/inventory_slot_handle.natvis"
"src/augs/misc/pool/pooled_object_id.natvis"
)
endif()
if(BUILD_GLAD AND NOT BUILD_FOR_WEB)
list(APPEND HYPERSOMNIA_TRIVIAL_3RDPARTY_CPPS
"src/3rdparty/glad/glad.c"
)
endif()
if(BUILD_NETWORKING)
file(GLOB_RECURSE YOJIMBO_SOURCE_FILES
"src/3rdparty/yojimbo/source/*.cpp"
)
list(APPEND HYPERSOMNIA_TRIVIAL_3RDPARTY_CPPS
${YOJIMBO_SOURCE_FILES}
"src/3rdparty/yojimbo/tlsf/tlsf.c"
"src/3rdparty/yojimbo/reliable/reliable.c"
)
endif()
# Project resource files, e.g. an icon.
if(ADD_APPLICATION_ICON)
if(MSVC)
set(HYPERSOMNIA_RC_FILES
"${CMAKE_MODULE_PATH}/Hypersomnia.rc"
)
endif()
endif()
### SPECIFICATION OF ALL SOURCE FILES END HERE ###
##################################################
# We arrange the directories for the generated sources paths.
set(GENERATORS_OUTPUT_PATH "${PROJECT_BINARY_DIR}/generators_output")
set(GENERATED_SOURCES_PATH "${GENERATORS_OUTPUT_PATH}/generated")
file(MAKE_DIRECTORY ${GENERATED_SOURCES_PATH})