forked from marusinp/3dsoftviz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
1841 lines (1548 loc) · 58.1 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 ) 2013-2016 3DSoftviz.
# Created by Peter Kapec
# Redistribution and use of this file is allowed
# according to the terms of the MIT license.
# For details see the COPYRIGHT file distributed with 3DSoftviz.
project( 3DSoftviz C CXX )
cmake_minimum_required( VERSION 2.8.11 )
# --------------
# 3DSoftviz Info
# --------------
set( 3DSOFTVIZ_NAME "3DSoftviz" )
set( 3DSOFTVIZ_LONGNAME "3DSoftviz - Generic 3D graph visualization tool for software visualization" )
set( 3DSOFTVIZ_VERSION_MAJOR "0" )
set( 3DSOFTVIZ_VERSION_MINOR "0" )
set( 3DSOFTVIZ_VERSION_PATCH "0" )
set( 3DSOFTVIZ_VERSION_BUILD "1" )
set( 3DSOFTVIZ_VERSION "${3DSOFTVIZ_VERSION_MAJOR}.${3DSOFTVIZ_VERSION_MINOR}.${3DSOFTVIZ_VERSION_PATCH}" )
set( 3DSOFTVIZ_VENDOR "3DSoftviz Dev Team" )
set( 3DSOFTVIZ_COPYRIGHT_YEAR "2016" )
set( 3DSOFTVIZ_DOMAIN_FIRST "stuba" )
set( 3DSOFTVIZ_DOMAIN_SECOND "sk" )
set( 3DSOFTVIZ_DOMAIN "${3DSOFTVIZ_DOMAIN_FIRST}.${3DSOFTVIZ_DOMAIN_SECOND}" )
# --------------
# Build settings
# --------------
# Additional CMake scripts
set( CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/cmake"
${CMAKE_MODULE_PATH} )
# Enable C++11 features
set(CMAKE_CXX_STANDARD 11)
# Warnings for Debug mode
option( USE_STRICT_COMPILE_WARNINGS "Use strict compilation warnings in debug mode." ON )
if( USE_STRICT_COMPILE_WARNINGS )
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
# using Clang
set( FLAGS_FOR_DEBUG
-Weverything
-Wno-c++98-compat -Wno-documentation -Wno-shadow -Wno-padded -Wno-covered-switch-default
-pedantic -Wall -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wconversion -Wctor-dtor-privacy -Wdisabled-optimization -Wextra -Wfloat-equal -Wformat -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wformat=2 -Wimport -Winit-self -Winline -Winvalid-pch -Wlong-long -Wmissing-braces -Wmissing-declarations -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wpacked -Wparentheses -Wpointer-arith -Wredundant-decls -Wreturn-type -Wsequence-point -Wsign-compare -Wsign-promo -Wstack-protector -Wstrict-aliasing=2 -Wstrict-overflow=5 -Wswitch -Wswitch-default -Wswitch-enum -Wtrigraphs -Wundef -Wuninitialized -Wunknown-pragmas -Wunreachable-code -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wno-unused-parameter -Wno-unused -Wno-documentation-unknown-command )
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR CMAKE_COMPILER_IS_GNUCXX)
# using GCC
set( FLAGS_FOR_DEBUG -pedantic -Wall -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wconversion -Wctor-dtor-privacy -Wdisabled-optimization -Wextra -Wfloat-equal -Wformat -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wformat=2 -Wimport -Winit-self -Winline -Winvalid-pch -Wlogical-op -Wlong-long -Wmissing-braces -Wmissing-declarations -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wnoexcept -Wpacked -Wparentheses -Wpointer-arith -Wredundant-decls -Wreturn-type -Wsequence-point -Wsign-compare -Wsign-promo -Wstack-protector -Wstrict-aliasing=2 -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch -Wswitch-default -Wswitch-enum -Wtrigraphs -Wundef -Wuninitialized -Wunknown-pragmas -Wunreachable-code -Wunsafe-loop-optimizations -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wold-style-cast -Woverloaded-virtual -Wuseless-cast -Wsign-conversion -Wno-unused-parameter -Wno-unused )
# to suppress warnings for unused stuff use: -Wno-unused-parameter -Wno-unused-result
# not used:
# too much warnings in Qt headers: NULL vs 0 pointers: -Wzero-as-null-pointer-constant
# too much warnings: -Wshadow -Waggregate-return
# class size optimizations ( not really needed ): -Wpadded
# style guidelines from Scott Meyers' Effective C++ books: -Weffc++
# only for C: -Wold-style-definition -Wstrict-prototypes -Wmissing-prototypes
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# using Visual Studio C++
set( FLAGS_FOR_DEBUG "/W3")
endif()
endif()
# Default build type
if( NOT CMAKE_BUILD_TYPE )
set( CMAKE_BUILD_TYPE "Debug" CACHE STRING "" FORCE )
endif()
# RPath functionality
set( CMAKE_SKIP_BUILD_RPATH FALSE CACHE STRING "" FORCE )
# next line adds "$ORIGIN/../lib" to RPath:
set( CMAKE_BUILD_WITH_INSTALL_RPATH TRUE CACHE STRING "" FORCE )
set( CMAKE_INSTALL_RPATH "$ORIGIN/../lib;$ORIGIN" CACHE STRING "" FORCE )
# next line adds additional link paths to RPath (e.g. for qscintilla when not in system):
set( CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE STRING "" FORCE )
set( CMAKE_INSTALL_NAME_DIR "@executable_path/../lib" CACHE STRING "" FORCE )
# Use ld.gold if it is available and isn't disabled explicitly
option(USE_LD_GOLD "Use GNU gold linker" ON)
if (USE_LD_GOLD)
execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
if ("${LD_VERSION}" MATCHES "GNU gold")
message(STATUS "GNU gold linker found.")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fuse-ld=gold" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold" CACHE STRING "" FORCE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold -Wl,--disable-new-dtags" CACHE STRING "" FORCE)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=gold -Wl,--disable-new-dtags" CACHE STRING "" FORCE)
else ()
message(STATUS "GNU gold linker isn't available, using the default system linker.")
endif ()
endif ()
# --------------
# Build settings - COTIRE module
# --------------
include( cotire )
if(COMMAND cotire )
if( NOT COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES )
include( ProcessorCount )
ProcessorCount( N )
if( NOT N EQUAL 0 )
# check for physical memmory
cmake_host_system_information(RESULT PHYSICAL_MEMORY QUERY TOTAL_PHYSICAL_MEMORY)
math(EXPR PHYSICAL_MEMORY_GB "${PHYSICAL_MEMORY}/1024")
# if physical memmory is less than 4GB, then split unity builds
# note: less than 4GB RAM causes swapping
if(${PHYSICAL_MEMORY_GB} LESS "4")
math(EXPR JOBS "${N}*2")
else()
set(JOBS ${N})
endif()
# set number of parallel unity builds to processor count
message(STATUS "Cotire parallel unity jobs: ${JOBS}")
set( COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES "-j${JOBS}" )
endif()
endif()
set( COTIRE_VERBOSE FALSE )
set( COTIRE_DEBUG FALSE )
### Fix virtual memory range
if( MSVC )
set (COTIRE_PCH_MEMORY_SCALING_FACTOR "280")
endif()
# fix for Diluculum and LuaJIT on 64bit OSX: Lua new_state returned NULL, LuaJIT needs following flags
#if( APPLE )
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pagezero_size 10000 -image_base 100000000" CACHE STRING "" FORCE)
#endif()
endif()
# ------------------------------------------------------------
# Dependencies - Searching external dependencies
# ------------------------------------------------------------
# ------------------------------ Qt -------------------------------
set( ALL_SYSTEM_HEADERS )
set( ALL_COMPILE_DEFINITIONS )
set( CMAKE_AUTOMOC ON )
set( CMAKE_INCLUDE_CURRENT_DIR ON )
# Find Qt4
find_package( Qt4 REQUIRED )
set( QT_USE_QTOPENGL 1 )
set( QT_USE_QTSQL 1 )
set( QT_USE_QTWEBKIT 1 )
set( QT_USE_QTXML 1 )
set( QT_USE_QTNETWORK 1 )
include( ${QT_USE_FILE} )
if ( NOT Qt4_FOUND )
# Find Qt5
find_package( Qt5Core QUIET )
find_package( Qt5Widgets QUIET )
find_package( Qt5OpenGL QUIET )
find_package( Qt5Sql QUIET )
find_package( Qt5WebEngine QUIET )
find_package( Qt5WebEngineWidgets QUIET )
find_package( Qt5Xml QUIET )
find_package( Qt5Network QUIET )
endif()
if ( Qt5Core_FOUND )
message(STATUS "Using Qt5 packages")
elseif( Qt4_FOUND )
message(STATUS "Using Qt4 packages")
else()
message(STATUS "No suitable Qt packages found")
endif()
# add special flag to GCC compiler when using Qt 4.6.x with GCC >4.6
if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND
"${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}" VERSION_LESS "4.7" AND
${CMAKE_C_COMPILER_VERSION} VERSION_GREATER "4.6" )
set( CMAKE_CXX_FLAGS "-fpermissive" )
endif()
# ------------------------------ OpenSceneGraph -------------------------------
# Find OpenSceneGraph
find_package( OpenSceneGraph COMPONENTS
osgGA
osgUtil
OpenThreads
osg
osgAnimation
osgDB
osgFX
#osgIntrospection
osgManipulator
osgParticle
osgShadow
osgSim
osgTerrain
osgText
osgVolume
osgWidget
)
find_package( osgViewer )
find_package( osgQt )
list( APPEND ALL_SYSTEM_HEADERS
${OPENSCENEGRAPH_INCLUDE_DIRS}
${OSGVIEWER_INCLUDE_DIR}
${OSGQT_INCLUDE_DIR}
)
if( MSVC )
list( APPEND ALL_COMPILE_DEFINITIONS -DOSG_LIBRARY_STATIC )
endif()
# ------------------------------ OpenCV -------------------------------
# Find OpenCV
find_package( OpenCV )
if( OpenCV_FOUND )
if( WIN32 )
list( APPEND ALL_COMPILE_DEFINITIONS -DNOMINMAX )
endif()
#list( APPEND ALL_SYSTEM_HEADERS ${OpenCV_INCLUDE_DIRS} )
list( APPEND ALL_COMPILE_DEFINITIONS -DOPENCV_FOUND )
message( STATUS "OpenCV Found:" )
message( STATUS "OpenCV_LIB_DIR=${OpenCV_LIB_DIR}" )
message( STATUS "OpenCV_LIB_DIR=${OpenCV_LIBS}" )
else()
message( STATUS "OpenCV NOT FOUND" )
endif()
# ------------------------------ OpenNI2 and Nite -------------------------------
# Find OPENNI2
find_package( OPENNI2 )
if( OPENNI2_FOUND )
list( APPEND ALL_SYSTEM_HEADERS ${OPENNI2_INCLUDE_DIRS} )
list( APPEND ALL_COMPILE_DEFINITIONS -DOPENNI2_FOUND )
message( STATUS "OpenNI2 Found:" )
message( STATUS "OPENNI2_INCLUDE_DIRS=${OPENNI2_INCLUDE_DIRS}" )
message( STATUS "OPENNI2_LIBRARIES=${OPENNI2_LIBRARIES}" )
else( OPENNI2_FOUND )
message( STATUS "OpenNI2 NOT FOUND" )
endif()
# Find NITE2
find_package( NITE2 )
if( NITE2_FOUND )
list( APPEND ALL_SYSTEM_HEADERS ${NITE2_INCLUDE_DIRS} ${NITE2_OPENNI2_DRIVER_DIRS} )
list( APPEND ALL_COMPILE_DEFINITIONS -DNITE2_FOUND )
message( STATUS "NITE2 Found:" )
message( STATUS "NITE2_INCLUDE_DIRS=${NITE2_INCLUDE_DIRS}" )
message( STATUS "NITE2_LIBRARIES=${NITE2_LIBRARIES}" )
else( NITE2_FOUND )
message ( STATUS "NITE2 NOT FOUND" )
endif()
# ------------------------------ FREENECT2 -------------------------------
find_package( FREENECT2 )
if( FREENECT2_FOUND )
list( APPEND ALL_SYSTEM_HEADERS ${FREENECT2_INCLUDE_DIRS} )
list( APPEND ALL_COMPILE_DEFINITIONS -DFREENECT2_FOUND )
message( STATUS "FREENECT2 Found:" )
message( STATUS "FREENECT2_INCLUDE_DIRS=${FREENECT2_INCLUDE_DIRS}" )
message( STATUS "FREENECT2_LIBRARIES=${FREENECT2_LIBRARIES}" )
else( FREENECT2_FOUND )
message( STATUS "FREENECT2 NOT FOUND" )
endif()
# ------------------------------- KINECT SDK ----------------------------------
if( WIN32 AND MSVC )
find_package( KINECTSDK )
if( KINECTSDK_FOUND )
list( APPEND ALL_SYSTEM_HEADERS ${KINECTSDK_INCLUDE_DIRS} )
list( APPEND ALL_COMPILE_DEFINITIONS -DKINECTSDK_FOUND )
# find_package( SPEECHSDK )
# if( SPEECHSDK_FOUND )
# include_directories( SYSTEM ${SPEECHSDK_INCLUDE_DIRS} )
# add_definitions( -DSPEECHSDK_FOUND )
# message( STATUS "SPEECHSDK FOUND" )
# else( SPEECHSDK_FOUND )
# message ( STATUS "SPEECHSDK NOT FOUND" )
# endif()
message( STATUS "KINECTSDK Found:" )
message( STATUS "KINECTSDK_INCLUDE_DIRS=${KINECTSDK_INCLUDE_DIRS}" )
message( STATUS "KINECTSDK_LIBRARIES=${KINECTSDK_LIBRARIES}" )
else( KINECTSDK_FOUND )
message ( STATUS "KINECTSDK NOT FOUND" )
endif()
endif()
# ------------------------------ BOOST -------------------------------
# Find Boost
set( Boost_USE_STATIC_LIBS OFF )
find_package( Boost 1.39 REQUIRED )
#add_definitions( -DBOOST_ALL_DYN_LINK )
# Include directories
list( APPEND ALL_SYSTEM_HEADERS ${Boost_INCLUDE_DIRS} )
# ------------------------------ LEAP -------------------------------
#enable leap orion on windows
if( WIN32 )
set( USE_LEAP_ORION ON )
endif()
# Find leap
find_package( LEAP )
if( LEAP_FOUND )
list( APPEND ALL_COMPILE_DEFINITIONS -DLEAP_FOUND )
list( APPEND ALL_SYSTEM_HEADERS ${LEAP_INCLUDE_DIRS} )
message( STATUS "LEAP Found:" )
message( STATUS "LEAP_INCLUDE_DIRS=${LEAP_INCLUDE_DIRS}" )
message( STATUS "LEAP_LIB_DIR=${LEAP_LIBRARIES}" )
else()
message( STATUS "LEAP Not Found" )
endif()
# ------------------------------ FGLOVE -------------------------------
# Find fglove
# find_package( FGLOVE )
# if( FGLOVE_FOUND )
# add_definitions( -DFGLOVE_FOUND )
# include_directories( SYSTEM
# ${FGLOVE_INCLUDE_DIRS}
# )
# message( STATUS "FGLOVE_LIB_DIR=${FGLOVE_LIBRARIES}" )
# else()
# message( STATUS "FGLOVE Not Found" )
# endif()
# ------------------------------ MOUSE3D -------------------------------
# Find MOUSE3D
find_package( MOUSE3D )
if( WIN32 )
if( MOUSE3D_FOUND )
include_directories( SYSTEM ${MOUSE3D_INCLUDE_DIRS} )
add_definitions( -DMOUSE3D_FOUND )
message( STATUS "3DMouse FOUND" )
endif()
elseif( APPLE )
if( MOUSE3D_FOUND )
include_directories( SYSTEM ${MOUSE3D_INCLUDE_DIRS} )
add_definitions( -DMOUSE3D_FOUND )
message( STATUS "3DMouse FOUND" )
endif()
elseif( UNIX )
set (MOUSE3D_FOUND TRUE)
include_directories( SYSTEM include/Mouse3d/LibMouse3d/Unix )
find_package( X11 REQUIRED )
include_directories( SYSTEM ${X11_INCLUDE_DIR} )
add_definitions( -DMOUSE3D_FOUND )
message( STATUS "3DMouse FOUND" )
elseif()
message( STATUS "3DMouse NOT FOUND" )
endif()
# ------------------------------ DOXYGEN -------------------------------
# Find Doxygen
find_package(Doxygen)
option(BUILD_DOCUMENTATION "Create and install the HTML based API documentation (requires Doxygen)" ${DOXYGEN_FOUND})
#message( STATUS "Doxygen found: " ${DOXYGEN_EXECUTABLE} )
if(BUILD_DOCUMENTATION)
if(NOT DOXYGEN_FOUND)
message(FATAL_ERROR "Doxygen is needed to build the documentation.")
endif()
set(doxyfile_in ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
set(doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
configure_file(${doxyfile_in} ${doxyfile} @ONLY)
add_custom_target(doxygen
COMMAND ${DOXYGEN_EXECUTABLE} ${doxyfile}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen"
VERBATIM)
install(DIRECTORY DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/html)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION share/doc)
endif()
# ------------------------------------------------------------
# Dependencies - External projects
# ------------------------------------------------------------
# Build dependencies by default
option( USE_BUILTIN_DEPENDENCIES "Use builtin dependencies." ON )
# Build dependencies
if( USE_BUILTIN_DEPENDENCIES )
# to use Gold linker add following flags to ExternalProject_Add command, to CMAKE_ARGS (TODO: needs more testing):
#-DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
#-DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}
include( ExternalProject )
# set search paths to the dependencies
set( DEP_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/dependencies )
set( DEP_BIN ${CMAKE_CURRENT_BINARY_DIR}/dependencies )
set( CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${DEP_BIN}/lib ${DEP_BIN}/bin )
set( CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${DEP_BIN}/include )
# Generate cache
configure_file( config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/config.cmake )
# Build libnoise
ExternalProject_Add( dep_libnoise
PREFIX libnoise
SOURCE_DIR ${DEP_SOURCE}/libnoise
BINARY_DIR libnoise
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-C ${CMAKE_CURRENT_BINARY_DIR}/config.cmake
)
# add libnoise library
add_library( libnoise SHARED IMPORTED )
add_dependencies( libnoise dep_libnoise )
set_target_properties( libnoise PROPERTIES
IMPORTED_LOCATION ${DEP_BIN}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}noise${CMAKE_SHARED_LIBRARY_SUFFIX} )
if( WIN32 )
set_target_properties( libnoise PROPERTIES
IMPORTED_LOCATION ${DEP_BIN}/bin/${CMAKE_SHARED_LIBRARY_PREFIX}noise${CMAKE_SHARED_LIBRARY_SUFFIX}
IMPORTED_IMPLIB ${DEP_BIN}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}noise${CMAKE_STATIC_LIBRARY_SUFFIX} )
if( MSVC )
# set "lib" prefix for MSVC, because libnoise.def file requires that the library is named "libnoise"
set( MISS_MSVC_PREFIX lib )
set_target_properties( libnoise PROPERTIES
IMPORTED_LOCATION ${DEP_BIN}/bin/${CMAKE_SHARED_LIBRARY_PREFIX}${MISS_MSVC_PREFIX}noise${CMAKE_SHARED_LIBRARY_SUFFIX}
IMPORTED_IMPLIB ${DEP_BIN}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}${MISS_MSVC_PREFIX}noise${CMAKE_STATIC_LIBRARY_SUFFIX} )
endif()
endif()
# Aruco
if( OpenCV_FOUND )
# Build aruco
include( ExternalProject )
ExternalProject_Add( dep_aruco
PREFIX aruco
SOURCE_DIR ${DEP_SOURCE}/aruco
BINARY_DIR aruco
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-C ${CMAKE_CURRENT_BINARY_DIR}/config.cmake
)
add_library( aruco SHARED IMPORTED )
add_dependencies( aruco dep_aruco )
set_target_properties( aruco PROPERTIES
IMPORTED_LOCATION ${DEP_BIN}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}aruco${CMAKE_SHARED_LIBRARY_SUFFIX} )
if( WIN32 AND MSVC )
set_target_properties( aruco PROPERTIES
IMPORTED_LOCATION ${DEP_BIN}/bin/${CMAKE_SHARED_LIBRARY_PREFIX}aruco${CMAKE_SHARED_LIBRARY_SUFFIX}
IMPORTED_IMPLIB ${DEP_BIN}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}aruco${CMAKE_STATIC_LIBRARY_SUFFIX} )
endif()
endif() # OpenCV_FOUND
# Build osgModeling
ExternalProject_Add( dep_osgModeling
PREFIX osgModeling
SOURCE_DIR ${DEP_SOURCE}/osgModeling
BINARY_DIR osgModeling
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DBUILD_PLUGINS=ON
-C ${CMAKE_CURRENT_BINARY_DIR}/config.cmake
)
add_library( osgModeling SHARED IMPORTED )
add_dependencies( osgModeling dep_osgModeling )
set_target_properties( osgModeling PROPERTIES
IMPORTED_LOCATION ${DEP_BIN}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}osgModeling${CMAKE_SHARED_LIBRARY_SUFFIX} )
if( WIN32 AND MSVC )
set_target_properties( osgModeling PROPERTIES
IMPORTED_LOCATION ${DEP_BIN}/bin/${CMAKE_SHARED_LIBRARY_PREFIX}osgModeling${CMAKE_SHARED_LIBRARY_SUFFIX}
IMPORTED_IMPLIB ${DEP_BIN}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}osgModeling${CMAKE_STATIC_LIBRARY_SUFFIX} )
endif()
# Build igloo
ExternalProject_Add( dep_igloo
PREFIX igloo
SOURCE_DIR ${DEP_SOURCE}/igloo
BINARY_DIR igloo
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DBUILD_TESTS=ON
-C ${CMAKE_CURRENT_BINARY_DIR}/config.cmake
# little trick:
# this solves building igloo twice (building normal target and building unity target)
# prevent building the default target (make install)
BUILD_COMMAND ""
# force building the install_unity target
INSTALL_COMMAND "${CMAKE_COMMAND}" --build . --target install_unity# -- "-j${N}"
)
add_library( igloo INTERFACE IMPORTED )
add_dependencies( igloo dep_igloo )
# Building Lua or LuaJIT
if ( MSVC OR APPLE )
# Build Lua
ExternalProject_Add ( dep_lua
PREFIX lua
SOURCE_DIR ${DEP_SOURCE}/lua
BINARY_DIR lua
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-C ${CMAKE_CURRENT_BINARY_DIR}/config.cmake
)
# add lua library
add_library( lua SHARED IMPORTED )
add_dependencies( lua dep_lua )
set_target_properties( lua PROPERTIES
IMPORTED_LOCATION ${DEP_BIN}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}lua${CMAKE_SHARED_LIBRARY_SUFFIX} )
if( WIN32 AND MSVC )
set_target_properties( lua PROPERTIES
IMPORTED_LOCATION ${DEP_BIN}/bin/${CMAKE_SHARED_LIBRARY_PREFIX}lua${CMAKE_SHARED_LIBRARY_SUFFIX}
IMPORTED_IMPLIB ${DEP_BIN}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}lua${CMAKE_STATIC_LIBRARY_SUFFIX} )
endif()
else ()
# NOTE: Diluculum requires luaconf.h from original Lua, so original Lua headers must be available
# Build LuaJIT
ExternalProject_Add ( dep_luajit
PREFIX luajit
SOURCE_DIR ${DEP_SOURCE}/luajit
BINARY_DIR luajit
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-C ${CMAKE_CURRENT_BINARY_DIR}/config.cmake
)
# add lua library
add_library( lua SHARED IMPORTED )
add_dependencies( lua dep_luajit )
set_target_properties( lua PROPERTIES
IMPORTED_LOCATION ${DEP_BIN}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}lua${CMAKE_SHARED_LIBRARY_SUFFIX} )
if( WIN32 AND MSVC )
set_target_properties( lua PROPERTIES
IMPORTED_LOCATION ${DEP_BIN}/bin/${CMAKE_SHARED_LIBRARY_PREFIX}lua${CMAKE_SHARED_LIBRARY_SUFFIX}
IMPORTED_IMPLIB ${DEP_BIN}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}lua${CMAKE_STATIC_LIBRARY_SUFFIX} )
endif()
endif()
if( NOT MSVC )
# NOTE: on MSVC Diluculum code is directly inserted
# Build Diluculum
ExternalProject_Add ( dep_diluculum
PREFIX diluculum
SOURCE_DIR ${DEP_SOURCE}/diluculum
BINARY_DIR diluculum
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
)
# add diluculum library
add_library( diluculum SHARED IMPORTED )
add_dependencies( diluculum dep_diluculum )
set_target_properties( diluculum PROPERTIES
IMPORTED_LOCATION ${DEP_BIN}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}diluculum${CMAKE_SHARED_LIBRARY_SUFFIX} )
if( WIN32 AND MSVC )
set_target_properties( diluculum PROPERTIES
IMPORTED_LOCATION ${DEP_BIN}/bin/${CMAKE_SHARED_LIBRARY_PREFIX}diluculum${CMAKE_SHARED_LIBRARY_SUFFIX}
IMPORTED_IMPLIB ${DEP_BIN}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}diluculum${CMAKE_STATIC_LIBRARY_SUFFIX} )
endif()
endif()
# Build lpeg
ExternalProject_Add ( dep_lpeg
PREFIX lpeg
SOURCE_DIR ${DEP_SOURCE}/lpeg
BINARY_DIR lpeg
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
)
# Build leg
ExternalProject_Add ( dep_leg
PREFIX leg
SOURCE_DIR ${DEP_SOURCE}/leg
BINARY_DIR leg
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
)
# Build luametrics
ExternalProject_Add ( dep_luametrics
PREFIX luametrics
SOURCE_DIR ${DEP_SOURCE}/luametrics
BINARY_DIR luametrics
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
)
# Build luafilesystem
ExternalProject_Add ( dep_luafilesystem
PREFIX luafilesystem
SOURCE_DIR ${DEP_SOURCE}/luafilesystem
BINARY_DIR luafilesystem
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
)
# Build lualogging
ExternalProject_Add ( dep_lualogging
PREFIX lualogging
SOURCE_DIR ${DEP_SOURCE}/lualogging
BINARY_DIR lualogging
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
)
# Build StackTracePlus
ExternalProject_Add ( dep_StackTracePlus
PREFIX StackTracePlus
SOURCE_DIR ${DEP_SOURCE}/StackTracePlus
BINARY_DIR StackTracePlus
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
)
# Build luasocket
ExternalProject_Add ( dep_luasocket
PREFIX luasocket
SOURCE_DIR ${DEP_SOURCE}/luasocket
BINARY_DIR luasocket
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
)
# Build mobdebug
ExternalProject_Add ( dep_mobdebug
PREFIX mobdebug
SOURCE_DIR ${DEP_SOURCE}/mobdebug
BINARY_DIR mobdebug
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
)
# Build luacov
ExternalProject_Add ( dep_luacov
PREFIX luacov
SOURCE_DIR ${DEP_SOURCE}/luacov
BINARY_DIR luacov
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
)
# Build luacheck
ExternalProject_Add ( dep_luacheck
PREFIX luacheck
SOURCE_DIR ${DEP_SOURCE}/luacheck
BINARY_DIR luacheck
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
)
# Build lua_cliargs
ExternalProject_Add ( dep_lua_cliargs
PREFIX lua_cliargs
SOURCE_DIR ${DEP_SOURCE}/lua_cliargs
BINARY_DIR lua_cliargs
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
)
# Build luasystem
ExternalProject_Add ( dep_luasystem
PREFIX luasystem
SOURCE_DIR ${DEP_SOURCE}/luasystem
BINARY_DIR luasystem
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
)
# Build dkjson
ExternalProject_Add ( dep_dkjson
PREFIX dkjson
SOURCE_DIR ${DEP_SOURCE}/dkjson
BINARY_DIR dkjson
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
)
# Build say
ExternalProject_Add ( dep_say
PREFIX say
SOURCE_DIR ${DEP_SOURCE}/say
BINARY_DIR say
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
)
# Build luassert
ExternalProject_Add ( dep_luassert
PREFIX luassert
SOURCE_DIR ${DEP_SOURCE}/luassert
BINARY_DIR luassert
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
)
# Build lua-term
ExternalProject_Add ( dep_lua-term
PREFIX lua-term
SOURCE_DIR ${DEP_SOURCE}/lua-term
BINARY_DIR lua-term
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
)
# Build penlight
ExternalProject_Add ( dep_penlight
PREFIX penlight
SOURCE_DIR ${DEP_SOURCE}/penlight
BINARY_DIR penlight
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
)
# Build mediator_lua
ExternalProject_Add ( dep_mediator_lua
PREFIX mediator_lua
SOURCE_DIR ${DEP_SOURCE}/mediator_lua
BINARY_DIR mediator_lua
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
)
# Build busted
ExternalProject_Add ( dep_busted
PREFIX busted
SOURCE_DIR ${DEP_SOURCE}/busted
BINARY_DIR busted
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:PATH=${DEP_BIN}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
)
# Ensure correct order of build (dependencies between external dependencies)
if( MSVC OR APPLE )
set( WHICH_LUA dep_lua )
else()
set( WHICH_LUA dep_luajit )
endif()
add_dependencies( dep_lpeg ${WHICH_LUA} )
add_dependencies( dep_leg ${WHICH_LUA} )
add_dependencies( dep_luametrics ${WHICH_LUA} )
add_dependencies( dep_luafilesystem ${WHICH_LUA} )
add_dependencies( dep_StackTracePlus ${WHICH_LUA} )
add_dependencies( dep_luasocket ${WHICH_LUA} )
add_dependencies( dep_mobdebug ${WHICH_LUA} )
add_dependencies( dep_luacov ${WHICH_LUA} )
add_dependencies( dep_luacheck ${WHICH_LUA} )
add_dependencies( dep_lua_cliargs ${WHICH_LUA} )
add_dependencies( dep_luasystem ${WHICH_LUA} )
add_dependencies( dep_dkjson ${WHICH_LUA} )
add_dependencies( dep_say ${WHICH_LUA} )
add_dependencies( dep_luassert ${WHICH_LUA} )
add_dependencies( dep_lua-term ${WHICH_LUA} )
add_dependencies( dep_penlight ${WHICH_LUA} )
add_dependencies( dep_mediator_lua ${WHICH_LUA} )
add_dependencies( dep_busted ${WHICH_LUA} )
if( NOT MSVC )
add_dependencies( dep_diluculum ${WHICH_LUA} )
endif()
# path to include directory where external dependencies deploy headers
set( DEPENDENCIES_INCLUDE_DIR ${DEP_BIN}/include )
else()
# Find Lua implementation, assuming lpeg is installed by other means
#find_package( Lua51 REQUIRED )
endif()
# ---------------------------------------------------------------
# 3DSoftviz sources
# ---------------------------------------------------------------
#-------------------------------- Source files -------------------------------
set( SRC_MAIN "src/main.cpp" )
file( GLOB_RECURSE SRC_APP "src/Application/*.cpp" )
file( GLOB_RECURSE SRC_CORE "src/Core/*.cpp" )
file( GLOB_RECURSE SRC_DATA "src/Data/*.cpp" )
file( GLOB_RECURSE SRC_IMPORTER "src/Importer/*.cpp" )
file( GLOB_RECURSE SRC_LAYOUT "src/Layout/*.cpp" )
file( GLOB_RECURSE SRC_LUAGRAPH "src/LuaGraph/*.cpp")
file( GLOB_RECURSE SRC_LUAINTERFACE "src/LuaInterface/*.cpp")
file( GLOB_RECURSE SRC_LUATYPES "src/LuaTypes/*.cpp")
file( GLOB_RECURSE SRC_MANAGER "src/Manager/*.cpp" )
file( GLOB_RECURSE SRC_MATH "src/Math/*.cpp" )
file( GLOB_RECURSE SRC_MODEL "src/Model/*.cpp" )
file( GLOB_RECURSE SRC_NETWORK "src/Network/*.cpp" )
file( GLOB_RECURSE SRC_OSGQTBROWSER "src/OsgQtBrowser/*.cpp" )
file( GLOB_RECURSE SRC_QOSG "src/QOSG/*.cpp" )
file( GLOB_RECURSE SRC_UTIL "src/Util/*.cpp" )
file( GLOB_RECURSE SRC_VIEWER "src/Viewer/*.cpp" )
file( GLOB_RECURSE SRC_CLUSTERING "src/Clustering/*.cpp")
file( GLOB SRC_REPOSITORY "src/Repository/Git/*.cpp" )
file( GLOB_RECURSE SRC_GITLIB "src/Repository/Git/GitLib/*.cpp" )
file( GLOB_RECURSE SRC_SPECIALMATRIX "src/SpecialMatrix/*.cpp" )
file( GLOB_RECURSE SRC_CITY "src/City/*.cpp" )
file( GLOB_RECURSE SRC_SHAPES "src/Shapes/*.cpp" )
file( GLOB_RECURSE SRC_MODULEGRAPH "src/ModuleGraph/*.cpp" )
# OpenCV
file( GLOB_RECURSE SRC_OPENCV "src/OpenCV/*.cpp" )
file( GLOB_RECURSE SRC_QOPENCV "src/QOpenCV/*.cpp" )
# Aruco
file( GLOB_RECURSE SRC_ARUCO "src/Aruco/*.cpp" )
# Kinect
file( GLOB_RECURSE SRC_KINECT "src/Kinect/*.cpp" )
# SpeechSDK
file( GLOB_RECURSE SRC_SPEECH "src/Speech/*.cpp" )
# FGlove
# file ( GLOB_RECURSE SRC_FGLOVE "src/FGlove/*.cpp" )
# Leap
file ( GLOB SRC_LEAP "src/Leap/*.cpp" )
file ( GLOB_RECURSE SRC_LEAPLIB "src/Leap/LeapLib/*.cpp" )
file ( GLOB_RECURSE SRC_HANDMODULE "src/Leap/HandModule/*.cpp" )
# MOUSE3D
set ( SRC_MOUSE3D
src/Mouse3d/Connector.cpp
src/Mouse3d/LibMouse3d/EventThread.cpp
src/Mouse3d/LibMouse3d/Mouse3dDevices.cpp
)
if( WIN32 )
list(APPEND SRC_MOUSE3D
src/Mouse3d/LibMouse3d/Windows/Mouse3DInput.cpp
src/Mouse3d/LibMouse3d/Windows/MouseParameters.cpp
)
elseif( APPLE )
list(APPEND SRC_MOUSE3D
src/Mouse3d/LibMouse3d/Mac/Mouse3dMacDevice.cpp
)
elseif( UNIX )
list(APPEND SRC_MOUSE3D
src/Mouse3d/LibMouse3d/Unix/ApplicationEmitter.cpp
src/Mouse3d/LibMouse3d/Unix/Mouse3dUnixDevice.cpp
)
endif()
# All source files
set( SRC
${SRC_APP}
${SRC_CORE}
${SRC_MANAGER}
${SRC_DATA}
${SRC_CLUSTERING}
${SRC_IMPORTER}
${SRC_LAYOUT}
${SRC_LUAGRAPH}
${SRC_LUAINTERFACE}
${SRC_LUATYPES}
${SRC_MATH}
${SRC_NETWORK}
${SRC_MODEL}
${SRC_OSGQTBROWSER}
${SRC_QOSG}
${SRC_VIEWER}
${SRC_UTIL}
${SRC_REPOSITORY}
${SRC_SPECIALMATRIX}
${SRC_CITY}
${SRC_SHAPES}
${SRC_MODULEGRAPH}
)
if( OpenCV_FOUND )
list( APPEND SRC ${SRC_OPENCV} ${SRC_QOPENCV} ${SRC_ARUCO} )
endif()
# add Kinect if Nite, Openni and Opencv
if( OPENNI2_FOUND AND OpenCV_FOUND )
list( APPEND SRC ${SRC_KINECT} )
endif()
if( KINECTSDK_FOUND AND SPEECHSDK_FOUND )
list( APPEND SRC ${SRC_SPEECH} )
endif()
# add Gloves if Fgloves
# if( FGLOVE_FOUND )
# list( APPEND SRC ${SRC_FGLOVE} )
# endif()
# add Leap
if( LEAP_FOUND )
# WORKAROUND GARAJ comment
list( APPEND SRC ${SRC_LEAP} )
list( APPEND SRC ${SRC_HANDMODULE} )
endif()
# add MOUSE3D if found
if( MOUSE3D_FOUND )
list( APPEND SRC ${SRC_MOUSE3D} )
endif()
# add diluculum code directly due to MSVC problems
if( MSVC )
include_directories( SYSTEM dependencies/diluculum/include )
file( GLOB_RECURSE SRC_DILUCULUM "dependencies/diluculum/Sources/*.cpp" )
list( APPEND SRC ${SRC_DILUCULUM} )
endif()
#-------------------------------- Header files -------------------------------
file( GLOB_RECURSE HEADER_APP "include/Application/*.h" )
file( GLOB_RECURSE HEADER_CORE "include/Core/*.h" )
file( GLOB_RECURSE HEADER_DATA "include/Data/*.h" )
file( GLOB_RECURSE HEADER_IMPORTER "include/Importer/*.h" )
file( GLOB_RECURSE HEADER_LAYOUT "include/Layout/*.h" )
file( GLOB_RECURSE HEADER_LUAGRAPH "include/LuaGraph/*.h")
file( GLOB_RECURSE HEADER_LUAINTERFACE "include/LuaInterface/*.h")
file( GLOB_RECURSE HEADER_LUATYPES "include/LuaTypes/*.h")
file( GLOB_RECURSE HEADER_MANAGER "include/Manager/*.h" )
file( GLOB_RECURSE HEADER_MATH "include/Math/*.h" )
file( GLOB_RECURSE HEADER_MODEL "include/Model/*.h" )
file( GLOB_RECURSE HEADER_NETWORK "include/Network/*.h" )
file( GLOB_RECURSE HEADER_OSGQTBROWSER "include/OsgQtBrowser/*.h" )
file( GLOB_RECURSE HEADER_QOSG "include/QOSG/*.h" )
file( GLOB_RECURSE HEADER_UTIL "include/Util/*.h" )
file( GLOB_RECURSE HEADER_VIEWER "include/Viewer/*.h" )
file( GLOB_RECURSE HEADER_CLUSTERING "include/Clustering/*.h")