From ba32d259a0100b51babfea621b0a70527a2a3848 Mon Sep 17 00:00:00 2001 From: "Andreas.Fink85" Date: Sun, 13 Jun 2010 13:02:53 +0000 Subject: [PATCH] *fix* IMLIB2_LDFLAGS not FLAGS *fix* link_directories needs to be called before the target is created git-svn-id: http://tint2.googlecode.com/svn/trunk@498 121b4492-b84c-0410-8b4c-0d4edfb3f3cc --- CMakeLists.txt | 5 ++--- src/tint2conf/CMakeLists.txt | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b40a6c..4b51708 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ pkg_check_modules( GOBJECT2 REQUIRED gobject-2.0 ) pkg_check_modules( IMLIB2 REQUIRED imlib2 ) find_library( RT_LIBRARY rt ) -string( REPLACE ";" " " FLAGS_REPLACED "${FLAGS}" ) +string( REPLACE ";" " " FLAGS_REPLACED "${IMLIB2_LDFLAGS}" ) set( CMAKE_REQUIRED_FLAGS "${FLAGS_REPLACED}" ) check_library_exists( "${IMLIB2_LIBRARIES}" "imlib_context_set_display" "${IMLIB2_LIBRARY_DIRS}" IMLIB_BUILD_WITH_X ) if( NOT IMLIB_BUILD_WITH_X ) @@ -71,15 +71,14 @@ set( DOCDIR share/doc/tint2 CACHE PATH "Directory for documentation files" ) add_custom_target( version ALL "${PROJECT_SOURCE_DIR}/get_svnrev.sh" "\"${PROJECT_SOURCE_DIR}\"" ) -add_executable(tint2 ${SOURCES}) link_directories( ${X11_LIBRARY_DIRS} - ${X11_LIBRARY_DIRS} ${PANGOCAIRO_LIBRARY_DIRS} ${PANGO_LIBRARY_DIRS} ${CAIRO_LIBRARY_DIRS} ${GLIB2_LIBRARY_DIRS} ${GOBJECT2_LIBRARY_DIRS} ${IMLIB2_LIBRARY_DIRS} ) +add_executable(tint2 ${SOURCES}) target_link_libraries( tint2 ${X11_LIBRARIES} ${PANGOCAIRO_LIBRARIES} ${PANGO_LIBRARIES} diff --git a/src/tint2conf/CMakeLists.txt b/src/tint2conf/CMakeLists.txt index 815c1b7..fc15a24 100644 --- a/src/tint2conf/CMakeLists.txt +++ b/src/tint2conf/CMakeLists.txt @@ -21,6 +21,12 @@ set(SOURCES ../util/common.c main.c properties.c theme_view.c ) +link_directories( ${X11_LIBRARY_DIRS} + ${GLIB2_LIBRARY_DIRS} + ${GOBJECT2_LIBRARY_DIRS} + ${IMLIB2_LIBRARY_DIRS} + ${GTHREAD2_LIBRARY_DIRS} + ${GTK2_LIBRARY_DIRS} ) add_executable( tint2conf ${SOURCES} ) target_link_libraries( tint2conf ${X11_LIBRARIES} ${GLIB2_LIBRARIES}