Linux cmake build fixes/improvments for autobuild builds. (!standalone)

Instead of letting the linker search for libs, use cmake to find the prebuilt libs so that the linker will only link to said
libs and not any system libs it may have found.
TODO: Expand this to other prebuilt libs instead of the UI ones.
master
Techwolf Lupindo 2014-02-16 19:00:02 -05:00
parent b046413723
commit 28031ba0e6
1 changed files with 13 additions and 3 deletions

View File

@ -34,13 +34,13 @@ if (STANDALONE)
else (STANDALONE)
use_prebuilt_binary(gtk-atk-pango-glib)
if (LINUX)
set(UI_LIBRARIES
set(UI_LIB_NAMES
freetype
atk-1.0
gdk-x11-2.0
gdk_pixbuf-2.0
Xinerama
glib-2.0
gio-2.0
gmodule-2.0
gobject-2.0
gthread-2.0
@ -49,8 +49,18 @@ else (STANDALONE)
pangoft2-1.0
pangox-1.0
pangoxft-1.0
${FREETYPE_LIBRARIES}
)
foreach(libname ${UI_LIB_NAMES})
find_library(UI_LIB_${libname}
NAMES ${libname}
PATHS
debug ${LIBS_PREBUILT_DIR}/lib/debug
optimized ${LIBS_PREBUILT_DIR}/lib/release
NO_DEFAULT_PATH
)
set(UI_LIBRARIES ${UI_LIBRARIES} ${UI_LIB_${libname}})
endforeach(uilibname)
set(UI_LIBRARIES ${UI_LIBRARIES} Xinerama)
endif (LINUX)
include_directories (