fix build of downstream apps for static fluidsynth lib

fixes #341
This commit is contained in:
derselbst 2018-02-20 12:44:30 +01:00
parent 28a794a61c
commit 4ad3aa2307
3 changed files with 17 additions and 10 deletions

View file

@ -451,6 +451,8 @@ endif ( enable-readline )
# General configuration file
configure_file ( ${CMAKE_SOURCE_DIR}/src/config.cmake
${CMAKE_BINARY_DIR}/config.h )
configure_file ( ${CMAKE_SOURCE_DIR}/include/fluidsynth.cmake
${CMAKE_BINARY_DIR}/include/fluidsynth.h )
add_definitions ( -DHAVE_CONFIG_H )
# Process subdirectories

View file

@ -27,24 +27,29 @@
extern "C" {
#endif
#if defined(WIN32)
#if defined(FLUIDSYNTH_DLL_EXPORTS)
#define FLUIDSYNTH_API __declspec(dllexport)
#elif defined(FLUIDSYNTH_NOT_A_DLL)
#define FLUIDSYNTH_API
#else
#define FLUIDSYNTH_API __declspec(dllimport)
#endif
#cmakedefine01 BUILD_SHARED_LIBS
#if (BUILD_SHARED_LIBS == 0)
#define FLUIDSYNTH_API // building static lib? no visibility control then
#elif defined(WIN32)
#if defined(FLUIDSYNTH_NOT_A_DLL)
#define FLUIDSYNTH_API
#elif defined(FLUIDSYNTH_DLL_EXPORTS)
#define FLUIDSYNTH_API __declspec(dllexport)
#else
#define FLUIDSYNTH_API __declspec(dllimport)
#endif
#elif defined(MACOS9)
#define FLUIDSYNTH_API __declspec(export)
#elif defined(__GNUC__)
#define FLUIDSYNTH_API __attribute__ ((visibility ("default")))
#else
#define FLUIDSYNTH_API
#endif
#endif
#if defined(__GNUC__) || defined(__clang__)
# define FLUID_DEPRECATED __attribute__((deprecated))

View file

@ -201,7 +201,7 @@ set ( public_HEADERS
)
set ( public_main_HEADER
${CMAKE_SOURCE_DIR}/include/fluidsynth.h
${CMAKE_BINARY_DIR}/include/fluidsynth.h
)
if ( WIN32 AND NOT MINGW )