From cecc7a459ae5deb7d3cca3924c583b5aec2165ab Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Wed, 18 Jul 2012 16:02:57 +0200 Subject: Install glade file into prefix/share/libuca --- test/CMakeLists.txt | 25 +++++++++++++------------ test/control.c | 3 ++- test/test-all.c | 2 +- test/test-mock.c | 2 +- 4 files changed, 17 insertions(+), 15 deletions(-) (limited to 'test') diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 224bd46..9050ce5 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -10,24 +10,21 @@ pkg_check_modules(GTHREAD2 gthread-2.0) pkg_check_modules(GLIB2 glib-2.0>=2.24 REQUIRED) pkg_check_modules(GOBJECT2 gobject-2.0>=2.24 REQUIRED) -include_directories(${CMAKE_SOURCE_DIR}/src) +#include_directories(${CMAKE_SOURCE_DIR}/src) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/control.glade ${CMAKE_CURRENT_BINARY_DIR}) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/run.py ${CMAKE_CURRENT_BINARY_DIR}) # --- Build targets ----------------------------------------------------------- -#add_executable(enum enum.c) -#add_executable(benchmark benchmark.c) - -#target_link_libraries(enum uca) -#target_link_libraries(benchmark uca) - include_directories( ${GLIB2_INCLUDE_DIRS} ${GOBJECT2_INCLUDE_DIRS} - ${CMAKE_CURRENT_SOURCE_DIR}/../src/cameras + ${CMAKE_CURRENT_BINARY_DIR}/../src/ + ${CMAKE_CURRENT_SOURCE_DIR}/../src ) +message("${CMAKE_CURRENT_SOURCE_DIR}") + add_executable(grab grab.c) add_executable(grab-async grab-async.c) @@ -36,12 +33,20 @@ target_link_libraries(grab-async uca ${GLIB2_LIBRARIES} ${GOBJECT2_LIBRARIES}) if (GTK2_FOUND) include_directories(${GTK2_INCLUDE_DIRS}) + add_executable(control control.c egg-property-cell-renderer.c egg-property-tree-view.c) + target_link_libraries(control uca ${GTK2_LIBRARIES} ${GTHREAD2_LIBRARIES}) + + install(TARGETS control + RUNTIME DESTINATION bin) + + install(FILES control.glade + DESTINATION share/libuca) endif() if (HAVE_MOCK_CAMERA) @@ -53,7 +58,3 @@ endif() add_executable(test-all test-all.c) target_link_libraries(test-all uca ${GLIB2_LIBRARIES} ${GOBJECT2_LIBRARIES}) - -add_executable(perf-overhead perf-overhead.c) -target_link_libraries(perf-overhead uca - ${GLIB2_LIBRARIES} ${GOBJECT2_LIBRARIES}) diff --git a/test/control.c b/test/control.c index 96a476f..eaa88e3 100644 --- a/test/control.c +++ b/test/control.c @@ -24,6 +24,7 @@ #include #include +#include "config.h" #include "uca-camera.h" #include "egg-property-tree-view.h" @@ -319,7 +320,7 @@ int main(int argc, char *argv[]) GtkBuilder *builder = gtk_builder_new(); - if (!gtk_builder_add_from_file(builder, "control.glade", &error)) { + if (!gtk_builder_add_from_file(builder, CONTROL_GLADE_PATH, &error)) { g_print("Error: %s\n", error->message); return 1; } diff --git a/test/test-all.c b/test/test-all.c index 8c672e8..9526d4f 100644 --- a/test/test-all.c +++ b/test/test-all.c @@ -1,7 +1,7 @@ #include #include "uca-camera.h" -#include "uca-mock-camera.h" +#include "cameras/uca-mock-camera.h" typedef struct { UcaCamera *camera; diff --git a/test/test-mock.c b/test/test-mock.c index 31517ed..7594a3a 100644 --- a/test/test-mock.c +++ b/test/test-mock.c @@ -1,7 +1,7 @@ #include #include "uca-camera.h" -#include "uca-mock-camera.h" +#include "cameras/uca-mock-camera.h" typedef struct { UcaMockCamera *camera; -- cgit v1.2.3