0027402: Fix Compilation with MinGw and Additional Libraries
authorBenjamin Bihler <benjamin.bihler@compositence.de>
Tue, 19 Apr 2016 13:03:03 +0000 (16:03 +0300)
committerbugmaster <bugmaster@opencascade.com>
Wed, 27 Apr 2016 10:09:09 +0000 (13:09 +0300)
Setting CSF_GL2PS in occt_csf.cmake in the same way as CSF_FREETYPE is set.

Added MinGw library suffix to a in 3rdparty_macro.cmake, freetype.cmake and tbb.cmake.

Removed redundant CSF_GL2PS definition for non-Win32 configurations

adm/cmake/3rdparty_macro.cmake
adm/cmake/freetype.cmake
adm/cmake/occt_csf.cmake
adm/cmake/tbb.cmake

index 8061ab1..e773782 100644 (file)
@@ -115,7 +115,7 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME LIBRARY_NAME_DEB
   if (BUILD_SHARED_LIBS)
     # library
     if (NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
-      set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib)
+      set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
 
       set (${PRODUCT_NAME}_PATH_SUFFIXES lib)
       if (ANDROID)
index 63720e1..f3bc8df 100644 (file)
@@ -220,7 +220,7 @@ endif()
 # freetype library
 if (BUILD_SHARED_LIBS)
   if (NOT 3RDPARTY_FREETYPE_LIBRARY OR NOT EXISTS "${3RDPARTY_FREETYPE_LIBRARY}")
-    set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib)
+    set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
 
     set (FREETYPE_PATH_SUFFIXES lib)
     if (ANDROID)
index ebc505a..26eb8a5 100644 (file)
@@ -44,6 +44,12 @@ if (WIN32)
     set (CSF_FREETYPE)
   endif()
 
+  if (USE_GL2PS)
+    set (CSF_GL2PS "gl2ps.lib")
+  else()
+    set (CSF_GL2PS)
+  endif()
+
   if (USE_FREEIMAGE)
     set (CSF_FreeImagePlus "freeimage.lib freeimageplus.lib")
   else()
index be418a2..8c9d12a 100644 (file)
@@ -129,7 +129,7 @@ macro (TBB_PRODUCT_SEARCH PRODUCT_NAME)
   # tbb/tbbmalloc library
   if (NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
     
-    set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib)
+    set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
     set (PRODUCT_PATH_SUFFIXES lib ${lower_PRODUCT_NAME})
 
     # set 3RDPARTY_${PRODUCT_NAME}_LIBRARY as notfound, otherwise find_library can't assign a new value to 3RDPARTY_${PRODUCT_NAME}_LIBRARY