FIX: linker error with a 'make deps' library set and opencollada enabled.
authorRay Molenkamp <github@lazydodo.com>
Tue, 18 Sep 2018 00:06:02 +0000 (18:06 -0600)
committerRay Molenkamp <github@lazydodo.com>
Tue, 18 Sep 2018 00:06:02 +0000 (18:06 -0600)
PCRE_LIBRARIES was not being set if the pcre library was found but not the headers.

build_files/cmake/Modules/FindPCRE.cmake

index 20b5c1d5c28aef0a5809bafab1e11c466326ce30..1fd56dc1234564363b3db52e0e909350705fb2a2 100644 (file)
@@ -56,8 +56,13 @@ INCLUDE(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG
     PCRE_LIBRARY PCRE_INCLUDE_DIR)
 
+# With 'make deps' precompiled libs, opencollada ships with a copy of libpcre
+# but not the headers, ${PCRE_LIBRARY} will be valid in this case
+# but PCRE_FOUND will be FALSE. So we set this variable outside of
+# the IF(PCRE_FOUND) below to allow blender to successfully link.
+SET(PCRE_LIBRARIES ${PCRE_LIBRARY})
+
 IF(PCRE_FOUND)
-  SET(PCRE_LIBRARIES ${PCRE_LIBRARY})
   SET(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR})
 ENDIF(PCRE_FOUND)