View Single Post
Old 03-28-2020, 07:20 AM   #11
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,761
Karma: 731681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
So basically it should be easy enough, but it will require a lot of drudgery along these general lines:

Code:
diff --git a/thirdparty/cmake_modules/CMakeCross.cmake b/thirdparty/cmake_modules/CMakeCross.cmake
index f583885..97c4fbb 100644
--- a/thirdparty/cmake_modules/CMakeCross.cmake
+++ b/thirdparty/cmake_modules/CMakeCross.cmake
@@ -33,6 +33,10 @@ if($ENV{CROSS_TC} MATCHES "^arm-.*")
        set(CMAKE_SYSTEM_PROCESSOR arm)
 endif()
 
+if($ENV{WIN32})
+    set(CMAKE_SYSTEM_NAME Windows)
+endif()
+
 # set compiler name
 set(CMAKE_C_COMPILER $ENV{CROSS_TC}-gcc)
 set(CMAKE_CXX_COMPILER $ENV{CROSS_TC}-g++)
diff --git a/thirdparty/libjpeg-turbo/CMakeLists.txt b/thirdparty/libjpeg-turbo/CMakeLists.txt
index 4e11a6b..feb8fbe 100644
--- a/thirdparty/libjpeg-turbo/CMakeLists.txt
+++ b/thirdparty/libjpeg-turbo/CMakeLists.txt
@@ -31,6 +31,10 @@ if(DEFINED ENV{ANDROID})
        list(APPEND CMAKE_ARGS "-DCMAKE_SYSTEM_VERSION=1")
 endif()
 
+if(DEFINED ENV{WIN32})
+    list(APPEND CMAKE_ARGS "-DCMAKE_SYSTEM_NAME=Windows")
+endif()
+
 # And, finally, the actual libjpeg-turbo build options
 list(APPEND CMAKE_ARGS "-DENABLE_STATIC=OFF")
 list(APPEND CMAKE_ARGS "-DENABLE_SHARED=ON")
If you compile natively in Windows it might mostly Just Work™, however.
Frenzie is offline   Reply With Quote