From 92f7e85d7287d97523e59bf487ef60165d7f887b Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 20 Aug 2015 00:44:41 -0700 Subject: [PATCH] build: generate def file when building with mingw --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 95b1447..9cb03b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -184,6 +184,12 @@ configure_file ( ${CONFIGURE_OUT_FILE} ) +if(MINGW) + set(LIB_LINK_FLAGS "-Wl,--output-def,libsoundio.def") +else() + set(LIB_LINK_FLAGS " ") +endif() + add_library(libsoundio_shared SHARED ${LIBSOUNDIO_SOURCES}) set_target_properties(libsoundio_shared PROPERTIES OUTPUT_NAME soundio @@ -191,6 +197,7 @@ set_target_properties(libsoundio_shared PROPERTIES VERSION ${LIBSOUNDIO_VERSION} COMPILE_FLAGS ${LIB_CFLAGS} LINKER_LANGUAGE C + LINK_FLAGS ${LIB_LINK_FLAGS} ) include_directories( ${CMAKE_SOURCE_DIR}