commit 867a84906e08320ac526370f29734f6d96d7ee77
parent 3acf204a2f85aaa62eafdb50248caa9d6d1cd018
Author: MTRNord <mtrnord1@gmail.com>
Date: Sat, 4 Sep 2021 01:45:32 +0200
try to crosscompile to windows. Likely not possible due to tensorflow
Diffstat:
3 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -32,7 +32,7 @@
*.app
# Build directories
-build
+build*
# Libtensorflow
libtensorflow
diff --git a/CMakeLists.txt b/CMakeLists.txt
@@ -12,7 +12,9 @@ set(TENSORFLOW_SOURCE_DIR "" CACHE PATH
"Directory that contains the TensorFlow project" )
if(NOT TENSORFLOW_SOURCE_DIR)
get_filename_component(TENSORFLOW_SOURCE_DIR
- "${CMAKE_CURRENT_LIST_DIR}/tensorflow" ABSOLUTE)
+ "${CMAKE_CURRENT_LIST_DIR}/tensorflow"
+ ABSOLUTE
+ )
endif()
add_subdirectory(
@@ -50,10 +52,12 @@ endif()
add_executable(pothole_analyzer
main.cpp)
+
target_include_directories(pothole_analyzer PRIVATE
${CMAKE_CURRENT_LIST_DIR}/boinc/api/
${CMAKE_CURRENT_LIST_DIR}/boinc/lib/
${CMAKE_CURRENT_LIST_DIR}/boinc/)
+
target_link_libraries (pothole_analyzer PRIVATE
tensorflow-lite
-L${CMAKE_CURRENT_LIST_DIR}/boinc/lib
diff --git a/cmake/x86_64-w64-mingw32.cmake b/cmake/x86_64-w64-mingw32.cmake
@@ -0,0 +1,14 @@
+# Define the environment for cross-compiling with 64-bit MinGW-w64 GCC
+SET(CMAKE_SYSTEM_NAME Windows) # Target system name
+SET(CMAKE_SYSTEM_VERSION 1)
+SET(CMAKE_SYSTEM_PROCESSOR AMD64)
+SET(CMAKE_C_COMPILER "x86_64-w64-mingw32-gcc")
+SET(CMAKE_CXX_COMPILER "x86_64-w64-mingw32-g++")
+SET(CMAKE_RC_COMPILER "x86_64-w64-mingw32-windres")
+SET(CMAKE_RANLIB "x86_64-w64-mingw32-ranlib")
+
+# Configure the behaviour of the find commands
+SET(CMAKE_FIND_ROOT_PATH "/usr/x86_64-w64-mingw32")
+SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)