Browse Source

Guard library pragma comments out of cmake builds (#120)

Luminiscental 4 years ago
parent
commit
b681ec6527
3 changed files with 4 additions and 2 deletions
  1. 2 0
      CMakeLists.txt
  2. 1 1
      ext/import-font.cpp
  3. 1 1
      ext/resolve-shape-geometry.cpp

+ 2 - 0
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)

+ 1 - 1
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
 

+ 1 - 1
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