Commit b56270d28a59297518e91f85333a2e1a7fecdc9e

Juha Sointusalo 2018-12-13T21:38:23

fix building DLL on Windows Without FTGL_LIBRARY all symbols are declared to be imported instead of exported and linking the library fails.

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d6c5a57..6b230ce 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,6 +27,7 @@ ENDIF(NOT CMAKE_BUILD_TYPE)
 OPTION(BUILD_SHARED_LIBS "Build Shared Libraries" ON)
 IF(BUILD_SHARED_LIBS)
  	SET(LIB_TYPE SHARED)
+	ADD_DEFINITIONS(-DFTGL_LIBRARY)
 ELSE(BUILD_SHARED_LIBS)
 	SET(LIB_TYPE STATIC)
 	ADD_DEFINITIONS(-D FTGL_LIBRARY_STATIC)