From: Andreas Fink Date: Sat, 12 Jun 2010 21:21:06 +0000 (+0000) Subject: *fix* change the default location of tintwizard.py to ${CMAKE_INSTALL_PREFIX}/bin... X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=7c0dfec2441c4a7da72150978425b6594a2b91a5;p=chaz%2Ftint2 *fix* change the default location of tintwizard.py to ${CMAKE_INSTALL_PREFIX}/bin/tintwizard.py (issue 264) --- diff --git a/CMakeLists.txt b/CMakeLists.txt index a5ded33..8ef88ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,7 +57,7 @@ if( ENABLE_BATTERY ) endif( ENABLE_BATTERY ) if( ENABLE_TINT2CONF ) - add_definitions( -DBUILD_CMAKE ) + add_definitions( -DHAVE_VERSION_H ) add_subdirectory( src/tint2conf ) add_dependencies( tint2conf version ) endif( ENABLE_TINT2CONF ) diff --git a/src/tint2conf/CMakeLists.txt b/src/tint2conf/CMakeLists.txt index d527d86..a9a8e2a 100644 --- a/src/tint2conf/CMakeLists.txt +++ b/src/tint2conf/CMakeLists.txt @@ -28,6 +28,7 @@ target_link_libraries( tint2conf ${X11_LIBRARIES} ${GTHREAD2_LIBRARIES} ${GTK2_LIBRARIES} ) +add_definitions( -DINSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\" ) set_target_properties( tint2conf PROPERTIES COMPILE_FLAGS -Wall ) #set_target_properties(tint2conf PROPERTIES LINK_FLAGS -Wl,--as-needed) diff --git a/src/tint2conf/main.c b/src/tint2conf/main.c index 135b761..617eed9 100644 --- a/src/tint2conf/main.c +++ b/src/tint2conf/main.c @@ -28,10 +28,8 @@ #include #include -#ifdef BUILD_CMAKE +#ifdef HAVE_VERSION_H #include "version.h" -#else - #include "../version.h" #endif #include "common.h" #include "theme_view.h" @@ -581,7 +579,7 @@ void read_config() } g_width = 500; g_height = 350; - g_cmd_property = g_strdup("python /usr/bin/tintwizard.py"); + g_cmd_property = g_strconcat( "python ", INSTALL_PREFIX, "/bin/tintwizard.py", (void*)0 ); // load config path = g_build_filename (g_get_user_config_dir(), "tint2", "tint2confrc", NULL);