From a46060495d9b2d51580a28f4f67272264e615e7c Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Wed, 3 Jul 2019 13:41:42 +0200 Subject: Update CMake README file for cross compilation Add linker flags to create "native" Windows executables. --- README.CMake.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.CMake.txt b/README.CMake.txt index 88c48d679..775a32de2 100644 --- a/README.CMake.txt +++ b/README.CMake.txt @@ -380,6 +380,8 @@ build tools are. The CMake website is a good source of information on this file. Here's one for MinGW under Linux. ---- +# CMake Toolchain File for MinGW Cross Compilation + # the name of the target operating system set(CMAKE_SYSTEM_NAME Windows) @@ -399,6 +401,11 @@ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CMAKE_INSTALL_PREFIX ${CMAKE_FIND_ROOT_PATH}/usr CACHE FILEPATH "install path prefix") + +# initialize required linker flags +set(CMAKE_EXE_LINKER_FLAGS_INIT "-static-libgcc -static-libstdc++") + +# end of toolchain file ---- Not too tough. The other thing you need is a native installation of FLTK -- cgit v1.2.3