Nadrin / Quartz

Vulkan RTX path tracer with a declarative ES7-like scene description language.
GNU Lesser General Public License v3.0
435 stars 23 forks source link

fail build in linux #2

Closed sl1pkn07 closed 5 years ago

sl1pkn07 commented 5 years ago

Hi

i try to build this project in my linux, and i found some problesms: (using CMake 3.14.0 and GCC 8.2.1)

seems assimp cmake configuration files is named with caps. because of this, cmake failed to find it because cmake is case sensitive

CMake Error at cmake/Findassimp.cmake:74 (message):
  Could not find asset importer library
Call Stack (most recent call first):
  src/raytrace/CMakeLists.txt:9 (find_package)

-- Configuring incomplete, errors occurred!

after fix the assim problem with rename assim to ASSIM in all cmake files, failed in some cmakefiles about missing Qt options

-- Configuring done
CMake Warning (dev) in 3rdparty/spirv_reflect/CMakeLists.txt:
  AUTOGEN: No valid Qt version found for target spirv_reflect.  AUTOMOC and
  AUTORCC disabled.  Consider adding:

    find_package(Qt<QTVERSION> COMPONENTS Core)

  to your CMakeLists.txt file.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in 3rdparty/stb/CMakeLists.txt:
  AUTOGEN: No valid Qt version found for target stb.  AUTOMOC and AUTORCC
  disabled.  Consider adding:

    find_package(Qt<QTVERSION> COMPONENTS Core)

  to your CMakeLists.txt file.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in 3rdparty/volk/CMakeLists.txt:
  AUTOGEN: No valid Qt version found for target volk.  AUTOMOC and AUTORCC
  disabled.  Consider adding:

    find_package(Qt<QTVERSION> COMPONENTS Core)

  to your CMakeLists.txt file.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in 3rdparty/vma/CMakeLists.txt:
  AUTOGEN: No valid Qt version found for target vma.  AUTOMOC and AUTORCC
  disabled.  Consider adding:

    find_package(Qt<QTVERSION> COMPONENTS Core)

  to your CMakeLists.txt file.
This warning is for project developers.  Use -Wno-dev to suppress it.

after adding the options find_package(Qt5 COMPONENTS Core) in the conflictive files, now start build, but:

[ 16%] Building CXX object src/raytrace/CMakeFiles/Qt3DRaytrace.dir/Qt3DRaytrace_autogen/mocs_compilation.cpp.o
In file included from /home/sl1pkn07/aplicaciones/quartz/Quartz/src/raytrace/renderers/vulkan/managers/scenemanager.h:12,
                 from /home/sl1pkn07/aplicaciones/quartz/Quartz/build/src/raytrace/Qt3DRaytrace_autogen/53G42B54XP/../../../../../src/raytrace/renderers/vulkan/renderer.h:18,
                 from /home/sl1pkn07/aplicaciones/quartz/Quartz/build/src/raytrace/Qt3DRaytrace_autogen/53G42B54XP/moc_renderer.cpp:9,
                 from /home/sl1pkn07/aplicaciones/quartz/Quartz/build/src/raytrace/Qt3DRaytrace_autogen/mocs_compilation.cpp:2:
/home/sl1pkn07/aplicaciones/quartz/Quartz/src/raytrace/renderers/vulkan/glsl.h: En el constructor ‘Qt3DRaytrace::Vulkan::mat4x4::mat4x4(const QMatrix4x4&)’:
/home/sl1pkn07/aplicaciones/quartz/Quartz/src/raytrace/renderers/vulkan/glsl.h:94:14: error: ‘memcpy’ no es un miembro de ‘std’
         std::memcpy(data, m.constData(), sizeof(*this));
              ^~~~~~
/home/sl1pkn07/aplicaciones/quartz/Quartz/src/raytrace/renderers/vulkan/glsl.h:94:14: nota: suggested alternative: ‘mem_fn’
         std::memcpy(data, m.constData(), sizeof(*this));
              ^~~~~~
              mem_fn
/home/sl1pkn07/aplicaciones/quartz/Quartz/src/raytrace/renderers/vulkan/glsl.h: En el constructor ‘Qt3DRaytrace::Vulkan::mat3x4::mat3x4(const QMatrix3x4&)’:
/home/sl1pkn07/aplicaciones/quartz/Quartz/src/raytrace/renderers/vulkan/glsl.h:104:14: error: ‘memcpy’ no es un miembro de ‘std’
         std::memcpy(data, m.constData(), sizeof(*this));
              ^~~~~~
/home/sl1pkn07/aplicaciones/quartz/Quartz/src/raytrace/renderers/vulkan/glsl.h:104:14: nota: suggested alternative: ‘mem_fn’
         std::memcpy(data, m.constData(), sizeof(*this));
              ^~~~~~
              mem_fn
make[2]: *** [src/raytrace/CMakeFiles/Qt3DRaytrace.dir/build.make:78: src/raytrace/CMakeFiles/Qt3DRaytrace.dir/Qt3DRaytrace_autogen/mocs_compilation.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:501: src/raytrace/CMakeFiles/Qt3DRaytrace.dir/all] Error 2

adding #include <cstrings> in the src/raytrace/renderers/vulkan/glsl.h file solved the error, but now:

[ 22%] Building CXX object src/raytrace/CMakeFiles/Qt3DRaytrace.dir/frontend/qmaterial.cpp.o
In file included from /home/sl1pkn07/aplicaciones/quartz/Quartz/src/raytrace/frontend/qmaterial.cpp:8:
/home/sl1pkn07/aplicaciones/quartz/Quartz/src/raytrace/frontend/qabstracttexture_p.h:32:72: error: ‘unique_ptr’ no es un miembro de ‘std’
 using QTextureImageChange = Qt3DCore::QTypedPropertyUpdatedChange<std::unique_ptr<QTextureImage>>;
                                                                        ^~~~~~~~~~
/home/sl1pkn07/aplicaciones/quartz/Quartz/src/raytrace/frontend/qabstracttexture_p.h:32:72: nota: ‘std::unique_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include <memory>’?
/home/sl1pkn07/aplicaciones/quartz/Quartz/src/raytrace/frontend/qabstracttexture_p.h:10:1:
+#include <memory>
 #include <Qt3DCore/private/qnode_p.h>
/home/sl1pkn07/aplicaciones/quartz/Quartz/src/raytrace/frontend/qabstracttexture_p.h:32:72:
 using QTextureImageChange = Qt3DCore::QTypedPropertyUpdatedChange<std::unique_ptr<QTextureImage>>;
                                                                        ^~~~~~~~~~
/home/sl1pkn07/aplicaciones/quartz/Quartz/src/raytrace/frontend/qabstracttexture_p.h:32:72: error: ‘unique_ptr’ no es un miembro de ‘std’
/home/sl1pkn07/aplicaciones/quartz/Quartz/src/raytrace/frontend/qabstracttexture_p.h:32:72: nota: ‘std::unique_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include <memory>’?
/home/sl1pkn07/aplicaciones/quartz/Quartz/src/raytrace/frontend/qabstracttexture_p.h:32:83: error: el argumento de plantilla 1 es no válido
 using QTextureImageChange = Qt3DCore::QTypedPropertyUpdatedChange<std::unique_ptr<QTextureImage>>;
                                                                                   ^~~~~~~~~~~~~
/home/sl1pkn07/aplicaciones/quartz/Quartz/src/raytrace/frontend/qabstracttexture_p.h:33:78: error: ‘unique_ptr’ no es un miembro de ‘std’
 using QTextureImageChangePtr = Qt3DCore::QTypedPropertyUpdatedChangePtr<std::unique_ptr<QTextureImage>>;
                                                                              ^~~~~~~~~~
/home/sl1pkn07/aplicaciones/quartz/Quartz/src/raytrace/frontend/qabstracttexture_p.h:33:78: nota: ‘std::unique_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include <memory>’?
/home/sl1pkn07/aplicaciones/quartz/Quartz/src/raytrace/frontend/qabstracttexture_p.h:33:78: error: ‘unique_ptr’ no es un miembro de ‘std’
/home/sl1pkn07/aplicaciones/quartz/Quartz/src/raytrace/frontend/qabstracttexture_p.h:33:78: nota: ‘std::unique_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include <memory>’?
/home/sl1pkn07/aplicaciones/quartz/Quartz/src/raytrace/frontend/qabstracttexture_p.h:33:89: error: el argumento de plantilla 1 es no válido
 using QTextureImageChangePtr = Qt3DCore::QTypedPropertyUpdatedChangePtr<std::unique_ptr<QTextureImage>>;
                                                                                         ^~~~~~~~~~~~~
make[2]: *** [src/raytrace/CMakeFiles/Qt3DRaytrace.dir/build.make:156: src/raytrace/CMakeFiles/Qt3DRaytrace.dir/frontend/qmaterial.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:501: src/raytrace/CMakeFiles/Qt3DRaytrace.dir/all] Error 2

and finaly after fix the error adding #include <memory> to src/raytrace/frontend/qabstracttexture_p.h:

[ 20%] Building CXX object src/raytrace/CMakeFiles/Qt3DRaytrace.dir/backend/abstracttexture.cpp.o
/home/sl1pkn07/aplicaciones/quartz/Quartz/apps/scene2qml/importer.cpp: En la función miembro ‘Entity* Importer::processScene(const aiScene*)’:
/home/sl1pkn07/aplicaciones/quartz/Quartz/apps/scene2qml/importer.cpp:67:60: error: ‘const struct aiTexture’ has no member named ‘mFilename’
         textureComponent.name = QString::fromUtf8(texture->mFilename.C_Str());
                                                            ^~~~~~~~~
make[2]: *** [apps/scene2qml/CMakeFiles/scene2qml.dir/build.make:89: apps/scene2qml/CMakeFiles/scene2qml.dir/importer.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1046: apps/scene2qml/CMakeFiles/scene2qml.dir/all] Error 2

i'm stuck here. how i can fix this? my coder skill is lower than poor :/. can you help me?

i can upload a PR with the finded fixes

greetings

sl1pkn07 commented 5 years ago

ok, seems need use Assimp from GIT (my distro use the stable 4.1.0 version)

now the error is gone (need keep the cmake ASSIMP name workground), but explode in other site

[ 89%] Linking CXX executable raytrace-cpp
/usr/bin/ld: ../../src/raytrace/libQt53DRaytrace.so: undefined reference to `Qt3DRaytrace::Vulkan::qInitResources_vulkan_shaders()'
collect2: error: ld returned 1 exit status
make[2]: *** [examples/raytrace-qml/CMakeFiles/raytrace-qml.dir/build.make:150: examples/raytrace-qml/raytrace-qml] Error 1
make[1]: *** [CMakeFiles/Makefile2:1257: examples/raytrace-qml/CMakeFiles/raytrace-qml.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: ../../src/raytrace/libQt53DRaytrace.so: undefined reference to `Qt3DRaytrace::Vulkan::qInitResources_vulkan_shaders()'
collect2: error: ld returned 1 exit status
make[2]: *** [examples/raytrace-cpp/CMakeFiles/raytrace-cpp.dir/build.make:149: examples/raytrace-cpp/raytrace-cpp] Error 1
make[1]: *** [CMakeFiles/Makefile2:1161: examples/raytrace-cpp/CMakeFiles/raytrace-cpp.dir/all] Error 2
/usr/bin/ld: ../../src/raytrace/libQt53DRaytrace.so: undefined reference to `Qt3DRaytrace::Vulkan::qInitResources_vulkan_shaders()'
collect2: error: ld returned 1 exit status
make[2]: *** [apps/quartz/CMakeFiles/quartz.dir/build.make:157: apps/quartz/quartz] Error 1
make[1]: *** [CMakeFiles/Makefile2:956: apps/quartz/CMakeFiles/quartz.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
Nadrin commented 5 years ago

Hi, thanks for reporting this. I've been a bit busy lately but I'll look into this issue soon. Thanks for the patience!

fjallraven commented 5 years ago

Getting exactly the same linker issue here

undefined reference to `Qt3DRaytrace::Vulkan::qInitResources_vulkan_shaders()'

Thanks!

Reon90 commented 5 years ago

@Nadrin do you have any updates about this issue?

yay commented 5 years ago

I've changed this part in Findassimp.cmake:

         find_path(
      assimp_INCLUDE_DIRS
      NAMES postprocess.h scene.h version.h config.h cimport.h
      PATHS /usr/local/include/
    )

to

    find_path(
      assimp_INCLUDE_DIRS
      NAMES postprocess.h scene.h version.h config.h cimport.h
      PATHS /usr/local/include/assimp/
    )

After that cmake .. completed without errors, but make failed:

~/projects/Quartz/build$ make -j4
Scanning dependencies of target vma
Scanning dependencies of target stb
Scanning dependencies of target volk
Scanning dependencies of target spirv_reflect
[  1%] Building C object 3rdparty/stb/CMakeFiles/stb.dir/libstb.c.o
[  2%] Building CXX object 3rdparty/vma/CMakeFiles/vma.dir/vk_mem_alloc.cpp.o
[  3%] Building C object 3rdparty/spirv_reflect/CMakeFiles/spirv_reflect.dir/spirv_reflect.c.o
[  4%] Building C object 3rdparty/volk/CMakeFiles/volk.dir/volk.c.o
[  5%] Linking C static library libvolk.a
[  5%] Built target volk
Scanning dependencies of target scene2qml_autogen
[  6%] Automatic MOC for target scene2qml
[  6%] Built target scene2qml_autogen
Scanning dependencies of target scene2qml
[  7%] Linking C static library libspirv_reflect.a
[  8%] Building CXX object apps/scene2qml/CMakeFiles/scene2qml.dir/main.cpp.o
[  8%] Built target spirv_reflect
[  9%] Building CXX object apps/scene2qml/CMakeFiles/scene2qml.dir/importer.cpp.o
[ 10%] Linking C static library libstb.a
[ 10%] Built target stb
[ 11%] Building CXX object apps/scene2qml/CMakeFiles/scene2qml.dir/exporter.cpp.o
/home/vitaly/projects/Quartz/apps/scene2qml/importer.cpp: In member function ‘Entity* Importer::processScene(const aiScene*)’:
/home/vitaly/projects/Quartz/apps/scene2qml/importer.cpp:67:60: error: ‘const struct aiTexture’ has no member named ‘mFilename’
         textureComponent.name = QString::fromUtf8(texture->mFilename.C_Str());
                                                            ^~~~~~~~~
[ 12%] Building CXX object apps/scene2qml/CMakeFiles/scene2qml.dir/scene2qml_autogen/mocs_compilation.cpp.o
[ 13%] Linking CXX static library libvma.a
make[2]: *** [apps/scene2qml/CMakeFiles/scene2qml.dir/build.make:76: apps/scene2qml/CMakeFiles/scene2qml.dir/importer.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 13%] Built target vma
Scanning dependencies of target Qt3DRaytrace_autogen
[ 14%] Automatic MOC for target Qt3DRaytrace
/home/vitaly/projects/Quartz/apps/scene2qml/exporter.cpp: In member function ‘QString Exporter::colorString(const Color&) const’:
/home/vitaly/projects/Quartz/apps/scene2qml/exporter.cpp:590:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
[ 14%] Built target Qt3DRaytrace_autogen
Scanning dependencies of target Qt3DRaytrace
make[1]: *** [CMakeFiles/Makefile2:914: apps/scene2qml/CMakeFiles/scene2qml.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 15%] Building CXX object src/raytrace/CMakeFiles/Qt3DRaytrace.dir/frontend/qgeometry.cpp.o
[ 16%] Building CXX object src/raytrace/CMakeFiles/Qt3DRaytrace.dir/qt3draytracecontext.cpp.o
[ 17%] Building CXX object src/raytrace/CMakeFiles/Qt3DRaytrace.dir/frontend/qgeometryrenderer.cpp.o
[ 18%] Building CXX object src/raytrace/CMakeFiles/Qt3DRaytrace.dir/qraytraceaspect.cpp.o
[ 19%] Building CXX object src/raytrace/CMakeFiles/Qt3DRaytrace.dir/frontend/qmesh.cpp.o
[ 20%] Building CXX object src/raytrace/CMakeFiles/Qt3DRaytrace.dir/frontend/qmaterial.cpp.o
[ 21%] Building CXX object src/raytrace/CMakeFiles/Qt3DRaytrace.dir/frontend/qdistantlight.cpp.o
In file included from /home/vitaly/projects/Quartz/src/raytrace/renderers/vulkan/managers/scenemanager.h:12,
                 from /home/vitaly/projects/Quartz/src/raytrace/renderers/vulkan/renderer.h:18,
                 from /home/vitaly/projects/Quartz/src/raytrace/qraytraceaspect.cpp:25:
/home/vitaly/projects/Quartz/src/raytrace/renderers/vulkan/glsl.h: In constructor ‘Qt3DRaytrace::Vulkan::mat4x4::mat4x4(const QMatrix4x4&)’:
/home/vitaly/projects/Quartz/src/raytrace/renderers/vulkan/glsl.h:94:14: error: ‘memcpy’ is not a member of ‘std’
         std::memcpy(data, m.constData(), sizeof(*this));
              ^~~~~~
/home/vitaly/projects/Quartz/src/raytrace/renderers/vulkan/glsl.h:94:14: note: suggested alternative: ‘mem_fn’
         std::memcpy(data, m.constData(), sizeof(*this));
              ^~~~~~
              mem_fn
/home/vitaly/projects/Quartz/src/raytrace/renderers/vulkan/glsl.h: In constructor ‘Qt3DRaytrace::Vulkan::mat3x4::mat3x4(const QMatrix3x4&)’:
/home/vitaly/projects/Quartz/src/raytrace/renderers/vulkan/glsl.h:104:14: error: ‘memcpy’ is not a member of ‘std’
         std::memcpy(data, m.constData(), sizeof(*this));
              ^~~~~~
/home/vitaly/projects/Quartz/src/raytrace/renderers/vulkan/glsl.h:104:14: note: suggested alternative: ‘mem_fn’
         std::memcpy(data, m.constData(), sizeof(*this));
              ^~~~~~
              mem_fn
[ 22%] Building CXX object src/raytrace/CMakeFiles/Qt3DRaytrace.dir/frontend/qcamera.cpp.o
In file included from /home/vitaly/projects/Quartz/src/raytrace/frontend/qmaterial.cpp:8:
/home/vitaly/projects/Quartz/src/raytrace/frontend/qabstracttexture_p.h:32:72: error: ‘unique_ptr’ is not a member of ‘std’
 using QTextureImageChange = Qt3DCore::QTypedPropertyUpdatedChange<std::unique_ptr<QTextureImage>>;
                                                                        ^~~~~~~~~~
/home/vitaly/projects/Quartz/src/raytrace/frontend/qabstracttexture_p.h:32:72: note: ‘std::unique_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include <memory>’?
/home/vitaly/projects/Quartz/src/raytrace/frontend/qabstracttexture_p.h:10:1:
+#include <memory>
 #include <Qt3DCore/private/qnode_p.h>
/home/vitaly/projects/Quartz/src/raytrace/frontend/qabstracttexture_p.h:32:72:
 using QTextureImageChange = Qt3DCore::QTypedPropertyUpdatedChange<std::unique_ptr<QTextureImage>>;
                                                                        ^~~~~~~~~~
/home/vitaly/projects/Quartz/src/raytrace/frontend/qabstracttexture_p.h:32:72: error: ‘unique_ptr’ is not a member of ‘std’
/home/vitaly/projects/Quartz/src/raytrace/frontend/qabstracttexture_p.h:32:72: note: ‘std::unique_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include <memory>’?
/home/vitaly/projects/Quartz/src/raytrace/frontend/qabstracttexture_p.h:32:83: error: template argument 1 is invalid
 using QTextureImageChange = Qt3DCore::QTypedPropertyUpdatedChange<std::unique_ptr<QTextureImage>>;
                                                                                   ^~~~~~~~~~~~~
/home/vitaly/projects/Quartz/src/raytrace/frontend/qabstracttexture_p.h:33:78: error: ‘unique_ptr’ is not a member of ‘std’
 using QTextureImageChangePtr = Qt3DCore::QTypedPropertyUpdatedChangePtr<std::unique_ptr<QTextureImage>>;
                                                                              ^~~~~~~~~~
/home/vitaly/projects/Quartz/src/raytrace/frontend/qabstracttexture_p.h:33:78: note: ‘std::unique_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include <memory>’?
/home/vitaly/projects/Quartz/src/raytrace/frontend/qabstracttexture_p.h:33:78: error: ‘unique_ptr’ is not a member of ‘std’
/home/vitaly/projects/Quartz/src/raytrace/frontend/qabstracttexture_p.h:33:78: note: ‘std::unique_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include <memory>’?
/home/vitaly/projects/Quartz/src/raytrace/frontend/qabstracttexture_p.h:33:89: error: template argument 1 is invalid
 using QTextureImageChangePtr = Qt3DCore::QTypedPropertyUpdatedChangePtr<std::unique_ptr<QTextureImage>>;
                                                                                         ^~~~~~~~~~~~~
make[2]: *** [src/raytrace/CMakeFiles/Qt3DRaytrace.dir/build.make:63: src/raytrace/CMakeFiles/Qt3DRaytrace.dir/qraytraceaspect.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [src/raytrace/CMakeFiles/Qt3DRaytrace.dir/build.make:128: src/raytrace/CMakeFiles/Qt3DRaytrace.dir/frontend/qmaterial.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:369: src/raytrace/CMakeFiles/Qt3DRaytrace.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
Nadrin commented 5 years ago

Building for Linux should now be fixed! Please give it a go and don't hesitate to report any problems in separate issues.

Again, thanks for your patience folks! Sometimes life happens and one doesn't have much time to work on side projects. Things are much less busy for me now so I should be more responsive from now on. :)

sl1pkn07 commented 5 years ago

Hi @Nadrin

fail build in my system. seems is incomplete, because this fail is named in the issue

└───╼  cmake .
-- The C compiler identification is GNU 9.1.0
-- The CXX compiler identification is GNU 9.1.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Vulkan: /usr/lib/libvulkan.so  
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.6.3") 
-- Checking for module 'assimp'
--   Found assimp, version 4.1.0
-- Found asset importer library: assimp
CMake Warning (dev) at src/raytrace/renderers/vulkan/CMakeLists.txt:2 (target_sources):
  Policy CMP0076 is not set: target_sources() command converts relative paths
  to absolute.  Run "cmake --help-policy CMP0076" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

  A private source from a directory other than that of target "Qt3DRaytrace"
  has a relative path.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at src/raytrace/renderers/vulkan/CMakeLists.txt:56 (target_sources):
  Policy CMP0076 is not set: target_sources() command converts relative paths
  to absolute.  Run "cmake --help-policy CMP0076" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

  A private source from a directory other than that of target "Qt3DRaytrace"
  has a relative path.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found asset importer library: assimp
-- Configuring done
CMake Warning (dev) in 3rdparty/spirv_reflect/CMakeLists.txt:
  AUTOGEN: No valid Qt version found for target spirv_reflect.  AUTOMOC and
  AUTORCC disabled.  Consider adding:

    find_package(Qt<QTVERSION> COMPONENTS Core)

  to your CMakeLists.txt file.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in 3rdparty/stb/CMakeLists.txt:
  AUTOGEN: No valid Qt version found for target stb.  AUTOMOC and AUTORCC
  disabled.  Consider adding:

    find_package(Qt<QTVERSION> COMPONENTS Core)

  to your CMakeLists.txt file.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in 3rdparty/volk/CMakeLists.txt:
  AUTOGEN: No valid Qt version found for target volk.  AUTOMOC and AUTORCC
  disabled.  Consider adding:

    find_package(Qt<QTVERSION> COMPONENTS Core)

  to your CMakeLists.txt file.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in 3rdparty/vma/CMakeLists.txt:
  AUTOGEN: No valid Qt version found for target vma.  AUTOMOC and AUTORCC
  disabled.  Consider adding:

    find_package(Qt<QTVERSION> COMPONENTS Core)

  to your CMakeLists.txt file.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /home/sl1pkn07/aplicaciones/Quartz
sl1pkn07 commented 5 years ago

after patch with this:

diff --git a/3rdparty/spirv_reflect/CMakeLists.txt b/3rdparty/spirv_reflect/CMakeLists.txt
index 6f7e926..98f151b 100644
--- a/3rdparty/spirv_reflect/CMakeLists.txt
+++ b/3rdparty/spirv_reflect/CMakeLists.txt
@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.8)
 project(spirv_reflect)

 find_package(Vulkan REQUIRED)
+find_package(Qt5 COMPONENTS Core)

 add_library(spirv_reflect STATIC spirv_reflect.c spirv_reflect.h)
 target_include_directories(spirv_reflect PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/3rdparty/stb/CMakeLists.txt b/3rdparty/stb/CMakeLists.txt
index b0dcfda..7f9d125 100644
--- a/3rdparty/stb/CMakeLists.txt
+++ b/3rdparty/stb/CMakeLists.txt
@@ -1,6 +1,8 @@
 cmake_minimum_required(VERSION 3.8)
 project(libstb)

+find_package(Qt5 COMPONENTS Core)
+
 add_library(stb STATIC
     libstb.c
     stb_image.h
diff --git a/3rdparty/vma/CMakeLists.txt b/3rdparty/vma/CMakeLists.txt
index f8f8269..cbebfb9 100644
--- a/3rdparty/vma/CMakeLists.txt
+++ b/3rdparty/vma/CMakeLists.txt
@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.8)
 project(vma)

 find_package(Vulkan REQUIRED)
+find_package(Qt5 COMPONENTS Core)

 add_library(vma STATIC vk_mem_alloc.cpp vk_mem_alloc.h)
 target_include_directories(vma PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/3rdparty/volk/CMakeLists.txt b/3rdparty/volk/CMakeLists.txt
index 4c3cef5..9f27598 100644
--- a/3rdparty/volk/CMakeLists.txt
+++ b/3rdparty/volk/CMakeLists.txt
@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.8)
 project(volk)

 find_package(Vulkan REQUIRED)
+find_package(Qt5 COMPONENTS Core)

 add_library(volk STATIC volk.c volk.h)
 target_include_directories(volk PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

seems done, with little warnings

└───╼  cmake .
-- Found asset importer library: assimp
CMake Warning (dev) at src/raytrace/renderers/vulkan/CMakeLists.txt:2 (target_sources):
  Policy CMP0076 is not set: target_sources() command converts relative paths
  to absolute.  Run "cmake --help-policy CMP0076" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

  A private source from a directory other than that of target "Qt3DRaytrace"
  has a relative path.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at src/raytrace/renderers/vulkan/CMakeLists.txt:56 (target_sources):
  Policy CMP0076 is not set: target_sources() command converts relative paths
  to absolute.  Run "cmake --help-policy CMP0076" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

  A private source from a directory other than that of target "Qt3DRaytrace"
  has a relative path.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found asset importer library: assimp
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sl1pkn07/aplicaciones/Quartz

the build is done!

Nadrin commented 5 years ago

Hey @sl1pkn07,

if you look closely at the output your previous configure actually succeeded and all of those issues are only warnings.

Also, none of the included 3rd party libs require Qt or need it for building. I'll look into how to resolve those warning soon. Anyway, thanks for reporting!

sl1pkn07 commented 5 years ago

Hi

EDITED: my fault do'h

also, the project lacks a option for install the components with make install

greetings

Nadrin commented 5 years ago

Hm... this is not the case for me with CMake 3.10. Which version are you using?

As for make install - yeah, unfortunately I don't have proper deployment for neither Linux nor Windows at this point. This is a bit of a bigger issue I need to tackle some day. :)

sl1pkn07 commented 5 years ago

my fault. (i've forget remove the cmakecache.txt file) sorry (edited)

greetings

sl1pkn07 commented 5 years ago

with my little kwedge. i'm sure is possible inprove, but:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 016e4c7..d69d12a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,8 @@
 cmake_minimum_required(VERSION 3.8)
 project(Quartz)

+include(GNUInstallDirs)
+
 option(BUILD_SHARED_LIBS "Build shared libraries" ON)
 option(BUILD_APPS "Build the standalone renderer & supplemental tools" ON)
 option(BUILD_EXAMPLES "Build example programs" ON)
@@ -29,3 +31,6 @@ if(BUILD_EXAMPLES)
 endif()

 set(QML_IMPORT_PATH "${PROJECT_BINARY_DIR}/qml")
+
+install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/Qt3DRaytrace DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/qt)
+install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/Qt3DRaytraceExtras DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/qt)
\ No newline at end of file
diff --git a/apps/quartz/CMakeLists.txt b/apps/quartz/CMakeLists.txt
index 9e5b76d..bc1da51 100644
--- a/apps/quartz/CMakeLists.txt
+++ b/apps/quartz/CMakeLists.txt
@@ -20,3 +20,5 @@ endif()
 target_compile_features(${APP_NAME} PRIVATE cxx_std_14)
 target_include_directories(${APP_NAME} PRIVATE ${QUARTZ_3RDPARTY})
 target_link_libraries(${APP_NAME} Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Qml Qt3DRaytrace Qt3DRaytraceExtras stb)
+
+install(TARGETS ${APP_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
\ No newline at end of file
diff --git a/apps/scene2qml/CMakeLists.txt b/apps/scene2qml/CMakeLists.txt
index aac6496..86cf8aa 100644
--- a/apps/scene2qml/CMakeLists.txt
+++ b/apps/scene2qml/CMakeLists.txt
@@ -21,3 +21,5 @@ target_include_directories(${APP_NAME}

 target_compile_features(${APP_NAME} PRIVATE cxx_std_14)
 target_link_libraries(${APP_NAME} Qt5::Core ${assimp_LIBRARIES})
+
+install(TARGETS ${APP_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
diff --git a/src/extras/CMakeLists.txt b/src/extras/CMakeLists.txt
index 4f313f2..c22591a 100644
--- a/src/extras/CMakeLists.txt
+++ b/src/extras/CMakeLists.txt
@@ -37,4 +37,7 @@ if(BUILD_SHARED_LIBS)
         PUBLIC QUARTZ_SHARED
         PRIVATE QT3DRAYTRACEEXTRAS_LIBRARY
     )
+    install(TARGETS ${MODULE_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+else()
+    install(TARGETS ${MODULE_NAME} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
 endif()
diff --git a/src/qml/quick3draytrace/CMakeLists.txt b/src/qml/quick3draytrace/CMakeLists.txt
index eecc1b8..eba9d28 100644
--- a/src/qml/quick3draytrace/CMakeLists.txt
+++ b/src/qml/quick3draytrace/CMakeLists.txt
@@ -32,3 +32,11 @@ add_custom_command(
 if(DUMP_QML_TYPEINFO)
     qml_typeinfo("Qt3D.Raytrace" "1.0" "Qt3D/Raytrace/plugins.qmltypes")
 endif()
+
+set(URI Qt3D)
+string(REPLACE "." "/" TARGETPATH ${URI})
+execute_process(COMMAND qmake -query QT_INSTALL_QML OUTPUT_VARIABLE QT_INSTALL_QML_RAW)
+string(REPLACE "\n" "" QT_INSTALL_QML ${QT_INSTALL_QML_RAW})
+set(QMLDIR "${QT_INSTALL_QML}/${TARGETPATH}")
+
+install(DIRECTORY "${PROJECT_BINARY_DIR}/qml/Qt3D/Raytrace" DESTINATION ${QMLDIR})
diff --git a/src/qml/quick3draytraceextras/CMakeLists.txt b/src/qml/quick3draytraceextras/CMakeLists.txt
index 0bb6c77..21d6b0d 100644
--- a/src/qml/quick3draytraceextras/CMakeLists.txt
+++ b/src/qml/quick3draytraceextras/CMakeLists.txt
@@ -32,3 +32,11 @@ add_custom_command(
 if(DUMP_QML_TYPEINFO)
     qml_typeinfo("Qt3D.RaytraceExtras" "1.0" "Qt3D/RaytraceExtras/plugins.qmltypes")
 endif()
+
+set(URI Qt3D)
+string(REPLACE "." "/" TARGETPATH ${URI})
+execute_process(COMMAND qmake -query QT_INSTALL_QML OUTPUT_VARIABLE QT_INSTALL_QML_RAW)
+string(REPLACE "\n" "" QT_INSTALL_QML ${QT_INSTALL_QML_RAW})
+set(QMLDIR "${QT_INSTALL_QML}/${TARGETPATH}")
+
+install(DIRECTORY "${PROJECT_BINARY_DIR}/qml/Qt3D/RaytraceExtras" DESTINATION ${QMLDIR})
diff --git a/src/raytrace/CMakeLists.txt b/src/raytrace/CMakeLists.txt
index 60e3d04..65d6541 100644
--- a/src/raytrace/CMakeLists.txt
+++ b/src/raytrace/CMakeLists.txt
@@ -126,4 +126,7 @@ if(BUILD_SHARED_LIBS)
         PUBLIC QUARTZ_SHARED
         PRIVATE QT3DRAYTRACE_LIBRARY
     )
+    install(TARGETS ${MODULE_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+else()
+    install(TARGETS ${MODULE_NAME} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
 endif()

follow the file structure in release release zip

tested in linux

EDIT: other approach taked from https://github.com/4rtzel/cmake-qml-plugin-example/issues/1#issuecomment-414146511

EDIT2: include includes EDIT3: missing install libraries :/

greetings