summaryrefslogtreecommitdiffstats
path: root/config/toolchain/build32.cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-05-15 18:18:57 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-05-15 18:18:57 (GMT)
commit1be2797e2c438a8c99dc1665460912e8bc2ddcf0 (patch)
tree571b26c5d33550b1301dc15ba2b89e3fd286397c /config/toolchain/build32.cmake
parent07728cc6d87a457890ba47beea56d11726184101 (diff)
downloadhdf5-1be2797e2c438a8c99dc1665460912e8bc2ddcf0.zip
hdf5-1be2797e2c438a8c99dc1665460912e8bc2ddcf0.tar.gz
hdf5-1be2797e2c438a8c99dc1665460912e8bc2ddcf0.tar.bz2
Correct mingw paths
Diffstat (limited to 'config/toolchain/build32.cmake')
-rw-r--r--config/toolchain/build32.cmake16
1 files changed, 10 insertions, 6 deletions
diff --git a/config/toolchain/build32.cmake b/config/toolchain/build32.cmake
index 207d03e..a2566c3 100644
--- a/config/toolchain/build32.cmake
+++ b/config/toolchain/build32.cmake
@@ -5,10 +5,11 @@ elseif(APPLE)
set (CMAKE_OSX_ARCHITECTURES "i386")
elseif(MINGW)
set (CMAKE_SYSTEM_NAME Windows)
- set (CMAKE_C_COMPILER i686-w64-mingw32-gcc)
- set (CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
- set (CMAKE_RC_COMPILER i686-w64-mingw32-windres)
- set (CMAKE_Fortran_COMPILER i686-w64-mingw32-gfortran)
+ set (TOOLCHAIN_PREFIX i686-w64-mingw32)
+ set (CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
+ set (CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
+ set (CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres)
+ set (CMAKE_Fortran_COMPILER ${TOOLCHAIN_PREFIX}-gfortran)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags")
@@ -34,11 +35,14 @@ elseif(MINGW)
set (ENV{PKG_CONFIG_LIBDIR} ${LIB32}/pkgconfig:/usr/share/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig)
endif ()
- set (CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32)
+ set (CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
- set (CMAKE_CROSSCOMPILING_EMULATOR wine32)
+ set (CMAKE_CROSSCOMPILING_EMULATOR wine)
+
+ include_directories(/usr/${TOOLCHAIN_PREFIX}/include)
+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS On CACHE BOOL "Export windows symbols")
else ()
set (CMAKE_SYSTEM_NAME Linux)