BUILD: fix cmake list parsing
authorhasufell <hasufell@posteo.de>
Fri, 3 Jan 2014 15:15:14 +0000 (16:15 +0100)
committerIlya Zhuravlev <zhuravlevilya@ya.ru>
Sun, 5 Jan 2014 16:58:40 +0000 (20:58 +0400)
because cmake is unable to parse it's own lists properly

src/CMakeLists.txt
src/cguittfont/CMakeLists.txt

index f2c1e166a5add05619476a9faa0e43cfe736c366..4bc9f890c92bfe57dac0d9126c677ff23e0ae157 100644 (file)
@@ -185,6 +185,9 @@ if(USE_FREETYPE)
                        if(FREETYPE_FOUND)
                                SET(FREETYPE_PKGCONFIG_FOUND TRUE)
                                SET(FREETYPE_LIBRARY ${FREETYPE_LIBRARIES})
+                               # because cmake is idiotic
+                               string(REPLACE ";" " " FREETYPE_CFLAGS_STR ${FREETYPE_CFLAGS})
+                               string(REPLACE ";" " " FREETYPE_LDFLAGS_STR ${FREETYPE_LDFLAGS})
                        endif(FREETYPE_FOUND)
                endif(PKG_CONFIG_FOUND)
        endif(UNIX)
@@ -466,7 +469,7 @@ if(BUILD_CLIENT)
                if(FREETYPE_PKGCONFIG_FOUND)
                        set_target_properties(${PROJECT_NAME}
                                PROPERTIES
-                               COMPILE_FLAGS "${FREETYPE_CFLAGS}"
+                               COMPILE_FLAGS "${FREETYPE_CFLAGS_STR}"
                        )
                endif(FREETYPE_PKGCONFIG_FOUND)
                target_link_libraries(
index d2647ba694da53b97eb0a65a7ad5ec55779783b6..21448ecb81661055552367aabfde6d560e89b201 100644 (file)
@@ -7,8 +7,8 @@ add_library(cguittfont xCGUITTFont.cpp)
 if(FREETYPE_PKGCONFIG_FOUND)
        set_target_properties(cguittfont
                PROPERTIES
-               COMPILE_FLAGS "${FREETYPE_CFLAGS}"
-               LINK_FLAGS "${FREETYPE_LDFLAGS}"
+               COMPILE_FLAGS "${FREETYPE_CFLAGS_STR}"
+               LINK_FLAGS "${FREETYPE_LDFLAGS_STR}"
        )
 
        include_directories(