CMakeLists.txt: turn BUILD_PKGCONFIG_FILES ON by default on Windows if compiler is GCC
authorEven Rouault <even.rouault@spatialys.com>
Sat, 14 Oct 2017 20:42:12 +0000 (22:42 +0200)
committerEven Rouault <even.rouault@spatialys.com>
Sat, 14 Oct 2017 20:42:12 +0000 (22:42 +0200)
CMakeLists.txt

index ff70a06fb98ec798bcb98e63ecb055f9eb746397..cb5456664beeb63a631f7ee346ce7faaf2b12203 100644 (file)
@@ -351,8 +351,8 @@ include (cmake/OpenJPEGCPack.cmake)
 
 #-----------------------------------------------------------------------------
 # pkgconfig support
-# enabled by default on Unix, disabled by default on other platforms
-if(UNIX)
+# enabled by default on Unix or if using GCC, disabled by default on other platforms
+if(UNIX OR CMAKE_COMPILER_IS_GNUCC)
   option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" ON)
 else()
   option(BUILD_PKGCONFIG_FILES "Build and install pkg-config files" OFF)