File tree Expand file tree Collapse file tree 5 files changed +19
-7
lines changed
thirdparty/game-music-emu Expand file tree Collapse file tree 5 files changed +19
-7
lines changed Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.13...3.19)
22
3+ set (CMAKE_C_VISIBILITY_PRESET hidden)
4+ set (CMAKE_CXX_VISIBILITY_PRESET hidden)
5+ set (CMAKE_VISIBILITY_INLINES_HIDDEN ON )
6+
37if (VCPKG_LIBSNDFILE)
48 list (APPEND VCPKG_MANIFEST_FEATURES "vcpkg-libsndfile" )
59endif ()
Original file line number Diff line number Diff line change 22# added as interface sources. Thus whatever links to zmusic-obj will be in
33# charge of compiling. As a result any properties set on zmusic-obj should be
44# interface.
5+
56add_library (zmusic-obj INTERFACE )
67target_sources (zmusic-obj
78INTERFACE
Original file line number Diff line number Diff line change 11#pragma once
22#define ZMUSIC_INTERNAL
33
4- #if defined(_MSC_VER ) && !defined(ZMUSIC_STATIC )
5- #define DLL_EXPORT __declspec(dllexport)
6- #define DLL_IMPORT __declspec(dllexport) // without this the compiler complains.
4+ #if !defined(ZMUSIC_STATIC )
5+ #if defined(_MSC_VER )
6+ #define DLL_EXPORT __declspec(dllexport)
7+ #define DLL_IMPORT __declspec(dllexport) // without this the compiler complains.
8+ #else
9+ #define DLL_EXPORT __attribute__((visibility("default")))
10+ #define DLL_IMPORT
11+ #endif
712#else
8- #define DLL_EXPORT
9- #define DLL_IMPORT
13+ #define DLL_EXPORT
14+ #define DLL_IMPORT
1015#endif
1116
1217typedef class MIDISource * ZMusic_MidiSource ;
Original file line number Diff line number Diff line change @@ -84,8 +84,9 @@ if (COMPILER_IS_GNUCXX_COMPATIBLE)
8484 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -W -Wextra" )
8585 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
8686
87- # Assume we have visibility support on any compiler that supports C++11
88- add_definitions (-DLIBGME_VISIBILITY)
87+ # Assume we have visibility support on any compiler that supports C++11
88+ # [ZMusic] we do not want to export this interface, so do not unhide the API functions.
89+ #add_definitions (-DLIBGME_VISIBILITY)
8990 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden" )
9091
9192 # Try to protect against undefined behavior from signed integer overflow
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ set(libgme_SRCS Blip_Buffer.cpp
88 Effects_Buffer.cpp
99 Fir_Resampler.cpp
1010 gme.cpp
11+ gme.h
1112 Gme_File.cpp
1213 M3u_Playlist.cpp
1314 Multi_Buffer.cpp
You can’t perform that action at this time.
0 commit comments