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.
This commit is contained in:
Chris Robinson
2014-08-10 05:10:11 -07:00
parent f173a67870
commit 357beb0570
+3
View File
@@ -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})