Skip to content

Cannot built application against installed engine becaues of incorrect Utility/DirectXMath header files location #1609

@ibbles

Description

@ibbles

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    supportSupport for general questions

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions