---------- Forwarded message --------- From: Ross Maxx <mrroshan...@gmail.com> Date: Thu, Sep 28, 2023 at 1:41 PM Subject: Some patches to libgig. To: <c...@users.sf.net>
Hi from the LMMS team. I am a contributor there. We use libgig for our gig player plugin, which plays .gig files. I, along with some other devs, were working on getting gigplayer ported to MSVC and came to know that libgig is not there in vcpkg. So I opened a PR there to get it added. Here's the Pull Request link : [libgig] New Port by Rossmaxx · Pull Request #33255 · microsoft/vcpkg (github.com) <https://github.com/microsoft/vcpkg/pull/33255> While working with the port, we patched some stuff temporarily and would like to upstream some of those patches. patch 1 - fix ssize_t on MSVC. MSVC compiler doesn't contain `ssize_t` but it contains `SSIZE_T`. patch 2 - set minimum C++ 11 in Cmake. Missing condition, should be there. patch 3 - fix usage of libakai. There was an issue with cmake in libakai Hope you get back to me soon. (I originally sent this mail to Christian, who told me to forward this to the mailing list.)
diff --git a/src/Serialization.h b/src/Serialization.h index cccfc54..91a8fa4 100644 --- a/src/Serialization.h +++ b/src/Serialization.h @@ -40,6 +40,11 @@ #include <assert.h> #include <functional> +#ifdef _MSC_VER +#include <BaseTsd.h> +using ssize_t = SSIZE_T; +#endif + #ifndef __has_extension # define __has_extension(x) 0 #endif
diff --git a/CMakeLists.txt b/CMakeLists.txt index ae66913..ad9503a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,14 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.1) project(libgig) if(NOT MSVC) message(FATAL_ERROR "Please use configure and make, this cmake file is currently only to generate msvc solution files") endif() +#To force the compiler to use C++ 11 +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED TRUE) + #configuration options set(LIBGIG_BUILD_TOOLS ON CACHE BOOL "Build the extra tools")
diff --git a/CMakeLists.txt b/CMakeLists.txt index 893e3ea..2eef641 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -128,12 +128,11 @@ install(TARGETS libgig EXPORT libgig-config ARCHIVE DESTINATION lib RUNTIME DESTINATION bin PUBLIC_HEADER DESTINATION include/libgig) -install(EXPORT libgig-config NAMESPACE libgig:: DESTINATION share/libgig) -install(TARGETS libakai EXPORT libakai-config +install(TARGETS libakai EXPORT libgig-config LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin PUBLIC_HEADER DESTINATION include/libgig) -install(EXPORT libakai-config NAMESPACE libgig:: DESTINATION share/libgig) +install(EXPORT libgig-config NAMESPACE libgig:: DESTINATION share/libgig)
_______________________________________________ Linuxsampler-devel mailing list Linuxsampler-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel