summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexei Podtelezhnikov <apodtele@gmail.com>2018-07-24 23:01:34 -0400
committerAlexei Podtelezhnikov <apodtele@gmail.com>2018-07-24 23:01:34 -0400
commit4b97ab98a8e90ae5403058b73c345974247bf01e (patch)
treee09d4f4d5844bbae1f598cbe721d993e228bfaed /CMakeLists.txt
parentd8ea52dee53defec67cbea8f467f1ad1e971ba25 (diff)
downloadfreetype2-4b97ab98a8e90ae5403058b73c345974247bf01e.tar.gz
[build] Fortify dllexport/dllimport attributes (#53969,#54330).
We no longer use predefined _DLL, which can be defined for static builds too with /MD. We use DLL_EXPORT and DLL_IMPORT instead, following libtool convention. * CMakeLists.txt [WIN32], builds/windows/vc2010/freetype.vcxproj: Define DLL_EXPORT manually. * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in, builds/vms/ftconfig.h, builds/windows/vc2010/index.html, src/base/ftver.rc: /_DLL/d, s/FT2_DLLIMPORT/DLL_IMPORT/.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f54e68871..3f583373a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -353,6 +353,10 @@ target_compile_definitions(
if (WIN32)
target_compile_definitions(
freetype PRIVATE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS)
+ if (BUILD_SHARED_LIBS)
+ target_compile_definitions(
+ freetype PRIVATE DLL_EXPORT)
+ endif ()
endif ()
if (BUILD_SHARED_LIBS)