~mydumper/mydumper/0.5

« back to all changes in this revision

Viewing changes to cmake/modules/FindMySQL.cmake

  • Committer: Domas Mituzas
  • Date: 2012-10-20 17:40:00 UTC
  • Revision ID: domas@fb.com-20121020174000-zhmfvt1m4l4l3nv3
* Don't fail on deprecated glib functions, I like this to build on older distros too
* Specify proper mysqlclient_r includes
* Import from Debian: fix RE in FindMySQL.cmake
* Import from Debian: fix some typos in messages
* Import from Debian: fix zlib type casts

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
 
48
48
        set(MYSQL_ADD_LIBRARIES "")
49
49
 
50
 
        string(REGEX MATCHALL "-l[^ ]*" MYSQL_LIB_LIST "${MY_TMP}")
 
50
        # prepend space in order to match separate words only (e.g. rather
 
51
        # than "-linux" from within "-L/usr/lib/i386-linux-gnu")
 
52
        string(REGEX MATCHALL " +-l[^ ]*" MYSQL_LIB_LIST " ${MY_TMP}")
51
53
        foreach(MY_LIB ${MYSQL_LIB_LIST})
52
54
            string(REGEX REPLACE "[ ]*-l([^ ]*)" "\\1" MY_LIB "${MY_LIB}")
53
55
            list(APPEND MYSQL_ADD_LIBRARIES "${MY_LIB}")
55
57
 
56
58
        set(MYSQL_ADD_LIBRARY_PATH "")
57
59
 
58
 
        string(REGEX MATCHALL "-L[^ ]*" MYSQL_LIBDIR_LIST "${MY_TMP}")
 
60
        string(REGEX MATCHALL " +-L[^ ]*" MYSQL_LIBDIR_LIST " ${MY_TMP}")
59
61
        foreach(MY_LIB ${MYSQL_LIBDIR_LIST})
60
62
            string(REGEX REPLACE "[ ]*-L([^ ]*)" "\\1" MY_LIB "${MY_LIB}")
61
63
            list(APPEND MYSQL_ADD_LIBRARY_PATH "${MY_LIB}")