aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-08-10 05:10:11 -0700
committerChris Robinson <[email protected]>2014-08-10 05:10:11 -0700
commit357beb0570e414bf32cf6e37cd3f42e60a990df4 (patch)
tree0b37f2d2baa9cbcd96be12f1e36af4f665a4f102
parentf173a6787082e577a6bb8de08577980118bcd029 (diff)
Create a .def file when building with MinGW
Preferably we'd tell CMake to make it itself instead of specifiying compiler- specific flags, but there doesn't seem to be a way to.
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2374cfce..96e342f9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1040,6 +1040,9 @@ SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES VERSION ${LIB_VERSION}
IF(WIN32 AND NOT LIBTYPE STREQUAL "STATIC")
SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES PREFIX "")
ENDIF()
+IF(MINGW)
+ SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES LINK_FLAGS "-Wl,--output-def,${LIBNAME}.def")
+ENDIF()
TARGET_LINK_LIBRARIES(${LIBNAME} common ${EXTRA_LIBS})