From f983cdbf683925d942dd1d86edcfe4316bf9ed6c Mon Sep 17 00:00:00 2001 From: Frederik Carlier Date: Tue, 13 Feb 2024 11:43:22 +0100 Subject: [PATCH] MinGW: Remove manual setting of library prefix/suffix (#277) We no longer need to manually set these suffixes/prefixes as CMake in MSYS2 now knows about Objective C. See msys2/MINGW-packages#20028 See https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9244 See msys2/MINGW-packages#20024 (comment) --- CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 748b1b84..01f04c43 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,9 +21,8 @@ endif() enable_language(OBJC OBJCXX) if (MINGW) - set(CMAKE_IMPORT_LIBRARY_SUFFIX ".dll.a") - set(CMAKE_LINK_LIBRARY_SUFFIX "") - set(CMAKE_SHARED_LIBRARY_PREFIX "lib") + # Make sure ObjC++ source code uses the C++ implicit include directories. This is needed, for example, to make sure we use the right + # C++ headers when using clang but linking with libstdc++. set(CMAKE_OBJCXX_IMPLICIT_INCLUDE_DIRECTORIES ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}) endif ()