This file is part of MXE. See LICENSE.md for licensing information. Contains ad hoc patches for cross building. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Tue, 10 Oct 2017 13:15:27 +1100 Subject: [PATCH 1/2] fix deprecated WIN32 definition taken from: https://github.com/ossimlabs/ossim/issues/153 diff --git a/src/util/ossimBatchTest.cpp b/src/util/ossimBatchTest.cpp index 1111111..2222222 100644 --- a/src/util/ossimBatchTest.cpp +++ b/src/util/ossimBatchTest.cpp @@ -72,7 +72,7 @@ bool ossimBatchTest::initialize(ossimArgumentParser& ap) } // Initialize environment: -#if defined(WIN32) || defined(_MSC_VER) && !defined(__CYGWIN__) && !defined(__MWERKS__) +#if defined(_WIN32) || defined(_MSC_VER) && !defined(__CYGWIN__) && !defined(__MWERKS__) _putenv("DEL_CMD=del /Q"); // For backwards compatiblity. _putenv("DIFF_CMD=fc /W"); _putenv("COPY_CMD=copy /Y"); From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Tue, 10 Oct 2017 13:26:49 +1100 Subject: [PATCH 2/2] set windows shared/static defs using cmake options taken from: https://github.com/ossimlabs/ossim/issues/153 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1111111..2222222 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -34,7 +34,14 @@ ELSE (OSSIM_HAS_HDF5) message( STATUS "HDF5 components are being excluded from the build." ) ENDIF (OSSIM_HAS_HDF5) -ADD_DEFINITIONS("-DOSSIMMAKINGDLL") +IF (WIN32) + IF (BUILD_SHARED) + ADD_DEFINITIONS("-DOSSIMMAKINGDLL") + ELSE (BUILD_SHARED) + ADD_DEFINITIONS("-DOSSIM_STATIC") + ENDIF (BUILD_SHARED) +ENDIF (WIN32) + ############################### GRAB HEADERS ##################################### FILE(GLOB ossim_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../include/ossim/*.h") FILE(GLOB ossim_base_HDRS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../include/ossim/base/*.h")