diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 12:08:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 12:08:18 +0000 |
commit | 5da14042f70711ea5cf66e034699730335462f66 (patch) | |
tree | 0f6354ccac934ed87a2d555f45be4c831cf92f4a /src/fluent-bit/lib/luajit-cmake/Utils/windows.toolchain.cmake | |
parent | Releasing debian version 1.44.3-2. (diff) | |
download | netdata-5da14042f70711ea5cf66e034699730335462f66.tar.xz netdata-5da14042f70711ea5cf66e034699730335462f66.zip |
Merging upstream version 1.45.3+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/fluent-bit/lib/luajit-cmake/Utils/windows.toolchain.cmake')
-rw-r--r-- | src/fluent-bit/lib/luajit-cmake/Utils/windows.toolchain.cmake | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/fluent-bit/lib/luajit-cmake/Utils/windows.toolchain.cmake b/src/fluent-bit/lib/luajit-cmake/Utils/windows.toolchain.cmake new file mode 100644 index 000000000..e3b937ba4 --- /dev/null +++ b/src/fluent-bit/lib/luajit-cmake/Utils/windows.toolchain.cmake @@ -0,0 +1,38 @@ +SET(CMAKE_SYSTEM_NAME Windows) + +IF(DEFINED ENV{USE_64BITS}) + SET(USE_64BITS $ENV{USE_64BITS}) +ENDIF() + +IF(USE_64BITS OR CMAKE_SIZEOF_VOID_P STREQUAL 8) + SET(CROSSCOMPILER x86_64-w64-mingw32-) +ELSE() + SET(CROSSCOMPILER i686-w64-mingw32-) +ENDIF() + +IF($ENV{CROSSCOMPILER}) + SET(CROSSCOMPILER $ENV{CROSSCOMPILER}) +ENDIF() + + +SET(CMAKE_C_COMPILER ${CROSSCOMPILER}gcc) +SET(CMAKE_CXX_COMPILER ${CROSSCOMPILER}g++) +SET(CMAKE_STRIP ${CROSSCOMPILER}strip) +SET(CMAKE_RC_COMPILER ${CROSSCOMPILER}windres) + + +IF($ENV{CMAKE_FIND_ROOT_PATH}) + SET(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH}) +ELSE() + EXECUTE_PROCESS(COMMAND + ${CMAKE_C_COMPILER} --print-sysroot OUTPUT_VARIABLE SYSROOT) + IF($ENV{SYSROOT}) + SET(SYSROOT $ENV{SYSROOT}) + ENDIF() + SET(CMAKE_FIND_ROOT_PATH ${SYSROOT}) +ENDIF() + +SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + |