summaryrefslogtreecommitdiffstats
path: root/src/core/configure.cmake
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2020-05-08 14:06:53 +0100
committerMike Krus <mike.krus@kdab.com>2020-05-22 08:53:50 +0100
commit22dd30949938083aceda8267c41c920c61c0d388 (patch)
treea49704414a853624006b860d1a92689bc4f5ca88 /src/core/configure.cmake
parent5596989f92fd36615e203215ef274bff80bb7e31 (diff)
Add support for building with CMake
Change-Id: If6c887c6356a160a5f3fb906d38a341fff0c7b29 Reviewed-by: Mike Krus <mike.krus@kdab.com>
Diffstat (limited to 'src/core/configure.cmake')
-rw-r--r--src/core/configure.cmake75
1 files changed, 75 insertions, 0 deletions
diff --git a/src/core/configure.cmake b/src/core/configure.cmake
new file mode 100644
index 000000000..77743dacf
--- /dev/null
+++ b/src/core/configure.cmake
@@ -0,0 +1,75 @@
+#### Inputs
+
+# input assimp
+set(INPUT_assimp "undefined" CACHE STRING "")
+set_property(CACHE INPUT_assimp PROPERTY STRINGS undefined qt system no)
+
+
+
+#### Libraries
+
+
+
+#### Tests
+
+
+
+#### Features
+
+qt_feature("qt3d_render" PUBLIC
+ SECTION "Aspects"
+ LABEL "Render aspect"
+ PURPOSE "Use the 3D Render Aspect library"
+)
+
+qt_feature("qt3d_input" PUBLIC
+ SECTION "Aspects"
+ LABEL "Input aspect"
+ PURPOSE "Use the 3D Input Aspect library"
+)
+
+qt_feature("qt3d_logic" PUBLIC
+ SECTION "Aspects"
+ LABEL "Logic aspect"
+ PURPOSE "Use the 3D Logic Aspect library"
+)
+
+qt_feature("qt3d_extras" PUBLIC
+ SECTION "Aspects"
+ LABEL "Extras aspect"
+ PURPOSE "Use the 3D Extra library"
+ CONDITION QT_FEATURE_qt3d_render AND QT_FEATURE_qt3d_input AND QT_FEATURE_qt3d_logic
+)
+
+qt_feature("qt3d_animation" PUBLIC
+ SECTION "Aspects"
+ LABEL "Animation aspect"
+ PURPOSE "Use the 3D Animation Aspect library"
+ CONDITION QT_FEATURE_qt3d_render
+)
+
+qt_feature("qt3d_simd_sse2" PRIVATE
+ LABEL "Use SSE2 instructions"
+ PURPOSE "Use SSE2 SIMD instructions to accelerate matrix operations"
+ AUTODETECT QT_FEATURE_sse2
+ ENABLE INPUT_qt3d_simd STREQUAL 'sse2' OR INPUT_qt3d_simd STREQUAL 'avx2'
+ DISABLE INPUT_qt3d_simd STREQUAL 'no' OR ( TEST_architecture_arch STREQUAL i386 )
+)
+
+qt_feature("qt3d_simd_avx2" PRIVATE
+ LABEL "Use AVX2 instructions"
+ PURPOSE "Use AVX2 SIMD instructions to accelerate matrix operations"
+ AUTODETECT TEST_arch_${TEST_architecture_arch}_subarch_avx2
+ ENABLE INPUT_qt3d_simd STREQUAL 'avx2'
+ DISABLE INPUT_qt3d_simd STREQUAL 'sse2' OR INPUT_qt3d_simd STREQUAL 'no' OR ( TEST_architecture_arch STREQUAL i386 )
+)
+
+qt_configure_add_summary_section(NAME "Qt3D Core")
+qt_configure_add_summary_entry(ARGS "qt3d_simd_sse2")
+qt_configure_add_summary_entry(ARGS "qt3d_simd_avx2")
+qt_configure_add_summary_entry(ARGS "qt3d_animation")
+qt_configure_add_summary_entry(ARGS "qt3d_extras")
+qt_configure_add_summary_entry(ARGS "qt3d_input")
+qt_configure_add_summary_entry(ARGS "qt3d_logic")
+qt_configure_add_summary_entry(ARGS "qt3d_render")
+qt_configure_end_summary_section() # end of "Qt3D" section