From 29b6637fe6d9b289c95675b428e58793a45fc4bc Mon Sep 17 00:00:00 2001 From: iWas-Coder Date: Thu, 5 Sep 2024 01:20:00 +0200 Subject: [PATCH] Added basic support for cross-compilation to MinGW [WIP] --- cmake/cross-mingw.cmake | 7 +++++++ vendor/CMakeLists.txt | 1 + 2 files changed, 8 insertions(+) create mode 100644 cmake/cross-mingw.cmake diff --git a/cmake/cross-mingw.cmake b/cmake/cross-mingw.cmake new file mode 100644 index 0000000..4c671ef --- /dev/null +++ b/cmake/cross-mingw.cmake @@ -0,0 +1,7 @@ +set(CMAKE_SYSTEM_NAME Windows) +set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) +set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++) +set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32) +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) diff --git a/vendor/CMakeLists.txt b/vendor/CMakeLists.txt index f53dd39..b14329b 100644 --- a/vendor/CMakeLists.txt +++ b/vendor/CMakeLists.txt @@ -11,6 +11,7 @@ add_library(yaml_cpp OBJECT ${YAML_CPP_SRCS}) add_library(imgui_impl_raylib OBJECT ${IMGUI_IMPL_RAYLIB_SRCS}) target_compile_definitions(raylib PRIVATE PLATFORM_DESKTOP) +target_compile_definitions(yaml_cpp PRIVATE YAML_CPP_STATIC_DEFINE) target_include_directories(imguizmo SYSTEM PUBLIC imgui) target_include_directories(imgui_impl_raylib SYSTEM PUBLIC imgui)