I'm trying to build my first application using Wicked Engine. I started following the instructions at https://github.com/turanszkij/WickedEngine/blob/master/Content/Documentation/WickedEngine-Documentation.md#building-and-linking but they were somewhat lacking. After using target_include_directories to point to the header files and target_link_libraries to point to libWickedEngine.a during building I got errors such as SDL_GetWindowSize not being declared, invalid conversions from void* to SDL_Window*, and error: inlining failed in call to ‘always_inline’ ‘__m128i _mm_cvtps_ph(__m128, int)’: target specific option mismatch which I have no idea what it means. And probably more I don't remember and didn't write down.
As Wicked Engine is a CMake project I instead tried the regular CMake procedure of setting CMAKE_INSTALL_PREFIX for Wicked Engine and building with cmake --build . --target install, then adding list(APPEND CMAKE_PREFIX_PATH "/path/to/WickedEngineInstall") and target_link_libraries(wicked_engine_app PRIVATE WickedEngine::WickedEngine) to my application's CMakeLists.txt. That adds a bunch of compiler and linker flags that I hope will resolved the errors described above, but I also got WickedEngine/wiMath.h:29:10: fatal error: Utility/DirectXMath/DirectXMath.h: No such file or directory which sounds more like a packaging problem than a compiler command line flags problem.
I think the source of the problem is in WickedEngine/Utility/CMakeLists.txt:8 and line 29 in the same file. These do a GLOB_RECURSE to gather up all the Utility header files and then dumps them in "${CMAKE_INSTALL_INCLUDEDIR}/WickedEngine/Utility/. This means that DirectXMath.h, which is in Utility/DirectXMath/ in the repository, ends up in Utility/ (no DirectXMath/) in the installed package. This causes all other Utility files that include Utility/DirectXMath/DirectXMath.h to fail to compile.
I don't see how I can resolve this from the consumer / application side, I think this needs a fix in Wicked Engine.
I'm trying to build my first application using Wicked Engine. I started following the instructions at https://github.com/turanszkij/WickedEngine/blob/master/Content/Documentation/WickedEngine-Documentation.md#building-and-linking but they were somewhat lacking. After using
target_include_directoriesto point to the header files andtarget_link_librariesto point tolibWickedEngine.aduring building I got errors such asSDL_GetWindowSizenot being declared, invalid conversions fromvoid*toSDL_Window*, anderror: inlining failed in call to ‘always_inline’ ‘__m128i _mm_cvtps_ph(__m128, int)’: target specific option mismatchwhich I have no idea what it means. And probably more I don't remember and didn't write down.As Wicked Engine is a CMake project I instead tried the regular CMake procedure of setting
CMAKE_INSTALL_PREFIXfor Wicked Engine and building withcmake --build . --target install, then addinglist(APPEND CMAKE_PREFIX_PATH "/path/to/WickedEngineInstall")andtarget_link_libraries(wicked_engine_app PRIVATE WickedEngine::WickedEngine)to my application'sCMakeLists.txt. That adds a bunch of compiler and linker flags that I hope will resolved the errors described above, but I also gotWickedEngine/wiMath.h:29:10: fatal error: Utility/DirectXMath/DirectXMath.h: No such file or directorywhich sounds more like a packaging problem than a compiler command line flags problem.I think the source of the problem is in
WickedEngine/Utility/CMakeLists.txt:8and line 29 in the same file. These do aGLOB_RECURSEto gather up all theUtilityheader files and then dumps them in"${CMAKE_INSTALL_INCLUDEDIR}/WickedEngine/Utility/. This means thatDirectXMath.h, which is inUtility/DirectXMath/in the repository, ends up inUtility/(noDirectXMath/) in the installed package. This causes all otherUtilityfiles that includeUtility/DirectXMath/DirectXMath.hto fail to compile.I don't see how I can resolve this from the consumer / application side, I think this needs a fix in Wicked Engine.