From: unknown Date: Tue, 27 Mar 2012 09:20:35 +0000 (+0200) Subject: Correctely find pcre.dll for windows X-Git-Tag: v3_7~196 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/3ef96d6db79ade4d775b71c7443844852e2f8f17 Correctely find pcre.dll for windows --- diff --git a/doc/HelloWorld/FindPcreWin.cmake b/doc/HelloWorld/FindPcreWin.cmake index f2e1ad3a41..226c0fe60d 100644 --- a/doc/HelloWorld/FindPcreWin.cmake +++ b/doc/HelloWorld/FindPcreWin.cmake @@ -6,7 +6,7 @@ find_library(PATH_PCRE_LIB $ENV{PCRE_LIBRARY_PATH} PATH_SUFFIXES bin/ GnuWin32/bin ) - + find_path(PATH_PCRE_H "pcre.h" HINTS $ENV{SIMGRID_PCRE_LIBRARY_PATH} @@ -33,7 +33,9 @@ if(PATH_PCRE_LIB AND PATH_PCRE_H) string(REGEX MATCH "-I${PATH_PCRE_H} " operation "${CMAKE_C_FLAGS}") if(NOT operation) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-I${PATH_PCRE_H} ") - endif(NOT operation) + endif(NOT operation) + string(REGEX REPLACE "/libpcre.dll" "" PATH_PCRE_LIB "${PATH_PCRE_LIB}") + link_directories(${PATH_PCRE_LIB}) else(PATH_PCRE_LIB) message(FATAL_ERROR "Please install the pcre package before using SimGrid.") endif(PATH_PCRE_LIB AND PATH_PCRE_H)