fix #88
Simply adds conditions for when it is being compiled from mingw, and get the appropiate libraries
Summary of changes
Added MinGW Condition: Introduced a condition to check if the build environment is MinGW using ${CMAKE_CXX_PLATFORM_ID}.
if ("${CMAKE_CXX_PLATFORM_ID}" STREQUAL "MinGW")
...
endif()
Specified Library Paths for MinGW: Within the new MinGW condition, set the paths for the DirectX libraries (libdinput8.a, libxinput.a, libdxguid.a) directly using the $ENV{MSYSTEM_PREFIX} environment variable.
Added Checks for Library Existence: For added robustness, checks were inserted to ensure that the specified libraries actually exist on the file system.
if (NOT EXISTS ${DINPUT8_LIBRARY})
MESSAGE(FATAL_ERROR "Could not locate dinput8 DirectX library")
endif()
...
Explicitly Linked Libraries for MinGW: Modified the target_link_libraries section to include a condition for MinGW, linking the libraries directly.
These changes aim to correctly configure and build the project when using MinGW, overriding any other settings that might point to incorrect paths for the DirectX libraries.
fix #88 Simply adds conditions for when it is being compiled from mingw, and get the appropiate libraries
Summary of changes
Added MinGW Condition: Introduced a condition to check if the build environment is MinGW using
${CMAKE_CXX_PLATFORM_ID}
.Specified Library Paths for MinGW: Within the new MinGW condition, set the paths for the DirectX libraries (
libdinput8.a
,libxinput.a
,libdxguid.a
) directly using the$ENV{MSYSTEM_PREFIX}
environment variable.Added Checks for Library Existence: For added robustness, checks were inserted to ensure that the specified libraries actually exist on the file system.
Explicitly Linked Libraries for MinGW: Modified the
target_link_libraries
section to include a condition for MinGW, linking the libraries directly.These changes aim to correctly configure and build the project when using MinGW, overriding any other settings that might point to incorrect paths for the DirectX libraries.