From 788395329059c7e6a96bb69afb14684136f856f2 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Thu, 1 Sep 2016 11:40:49 +0200 Subject: [PATCH] Do not find PCRE in default paths on Windows --- cmake/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index a56b8b8e19..dcab4adbf6 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -266,8 +266,12 @@ IF(COLLADA_SUPPORT) list(APPEND OPENCOLLADA_LIBRARIES "${lib_path}") endforeach() - IF("${PCRE_LIBRARY_DIR}" STREQUAL "") - find_library(pcre_library NAMES pcre PATHS ${OPENCOLLADA_LIBRARY_DIR}) + if("${PCRE_LIBRARY_DIR}" STREQUAL "") + if(WIN32) + find_library(pcre_library NAMES pcre PATHS ${OPENCOLLADA_LIBRARY_DIR} NO_DEFAULT_PATH) + else() + find_library(pcre_library NAMES pcre PATHS ${OPENCOLLADA_LIBRARY_DIR}) + endif() GET_FILENAME_COMPONENT(PCRE_LIBRARY_DIR ${pcre_library} PATH) else() find_library(pcre_library NAMES pcre PATHS ${PCRE_LIBRARY_DIR} NO_DEFAULT_PATH)