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)