diff --git a/CMakeLists.txt b/CMakeLists.txt index 8422328..a8012cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,6 +93,8 @@ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include ) +target_compile_definitions(msdfgen-ext PUBLIC MSDFGEN_CMAKE_BUILD) + if(MSDFGEN_USE_CPP11) target_compile_features(msdfgen-ext PUBLIC cxx_std_11) target_compile_definitions(msdfgen-ext PUBLIC MSDFGEN_USE_CPP11) diff --git a/ext/import-font.cpp b/ext/import-font.cpp index 8f23620..966bc00 100644 --- a/ext/import-font.cpp +++ b/ext/import-font.cpp @@ -7,7 +7,7 @@ #include FT_FREETYPE_H #include FT_OUTLINE_H -#ifdef _WIN32 +#if defined(_WIN32) && !defined(MSDFGEN_CMAKE_BUILD) #pragma comment(lib, "freetype.lib") #endif diff --git a/ext/resolve-shape-geometry.cpp b/ext/resolve-shape-geometry.cpp index 12e45a9..657018b 100644 --- a/ext/resolve-shape-geometry.cpp +++ b/ext/resolve-shape-geometry.cpp @@ -9,7 +9,7 @@ #include "../core/edge-segments.h" #include "../core/Contour.h" -#ifdef _WIN32 +#if defined(_WIN32) && !defined(MSDFGEN_CMAKE_BUILD) #pragma comment(lib, "skia.lib") #endif