MINGW-packages/mingw-w64-openbabel/001-fix-build-on-mingw.patch
مهدي شينون (Mehdi Chinoune) 297b63daa5 [new-package] openbabel 3.1.1
2024-07-13 21:28:04 +01:00

45 lines
1.3 KiB
Diff

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -44,7 +44,7 @@
set(BIN_INSTALL_DIR "bin"
CACHE PATH "Install dir for binaries")
set(LIB_SUFFIX "" CACHE STRING "Suffix of the directory name, e.g. 64 for lib64")
-if(UNIX)
+if(UNIX OR MINGW)
set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}"
CACHE PATH "Install dir for libraries")
if(ENABLE_VERSIONED_FORMATS)
@@ -218,6 +218,9 @@
check_include_file(strings.h HAVE_STRINGS_H)
check_include_file(rpc/xdr.h HAVE_RPC_XDR_H)
check_include_file(regex.h HAVE_REGEX_H)
+if(MINGW)
+ set(HAVE_REGEX_H FALSE)
+endif()
check_include_file_cxx(sstream HAVE_SSTREAM)
check_symbol_exists(rint "math.h" HAVE_RINT)
@@ -309,12 +312,6 @@
endif()
endif()
-# To avoid warnings when linking the plugins and exes
-if(MINGW)
- set (CMAKE_MODULE_LINKER_FLAGS "-Wl,--enable-auto-import ${CMAKE_MODULE_LINKER_FLAGS}")
- set (CMAKE_EXE_LINKER_FLAGS "-Wl,--enable-auto-import ${CMAKE_EXE_LINKER_FLAGS}")
-endif()
-
message(STATUS "Checking available shared pointer...")
include(CheckCXXSourceCompiles)
check_cxx_source_compiles("#include <memory>
--- a/src/formats/formats.cmake
+++ b/src/formats/formats.cmake
@@ -128,7 +128,6 @@
opendxformat
outformat
pcmodelformat
- pdbqtformat
pointcloudformat
posformat
pqrformat