diff options
author | Matthias Vogelgesang <matthias.vogelgesang@gmail.com> | 2012-07-18 16:02:57 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@gmail.com> | 2012-07-18 16:02:57 +0200 |
commit | cecc7a459ae5deb7d3cca3924c583b5aec2165ab (patch) | |
tree | bcfcd5b76c2d7c6b5db64a90f8f9c91716033291 | |
parent | 1c99dd636e725ad8d439b22e05a51f8c53a03228 (diff) | |
download | uca-cecc7a459ae5deb7d3cca3924c583b5aec2165ab.tar.gz uca-cecc7a459ae5deb7d3cca3924c583b5aec2165ab.tar.bz2 uca-cecc7a459ae5deb7d3cca3924c583b5aec2165ab.tar.xz uca-cecc7a459ae5deb7d3cca3924c583b5aec2165ab.zip |
Install glade file into prefix/share/libuca
-rw-r--r-- | src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/config.h.in | 1 | ||||
-rw-r--r-- | test/CMakeLists.txt | 25 | ||||
-rw-r--r-- | test/control.c | 3 | ||||
-rw-r--r-- | test/test-all.c | 2 | ||||
-rw-r--r-- | test/test-mock.c | 2 |
6 files changed, 19 insertions, 16 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f6a344b..02a1005 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -244,7 +244,7 @@ install(FILES ${uca_HDRS} # --- install pkg-config file set(prefix ${CMAKE_INSTALL_PREFIX}) if (CI_INSTALL_PREFIX) - set(prefix ${CI_INSTALL_PREFIX}) + set(prefix ${CI_INSTALL_PREFIX}) endif() set(exec_prefix "\${prefix}") diff --git a/src/config.h.in b/src/config.h.in index 4eee2db..0b1dde9 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -4,3 +4,4 @@ #cmakedefine HAVE_UFO_CAMERA #cmakedefine HAVE_MOCK_CAMERA +#define CONTROL_GLADE_PATH "${CMAKE_INSTALL_PREFIX}/share/libuca/control.glade" 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 <unistd.h> #include <errno.h> +#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 <glib.h> #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 <glib.h> #include "uca-camera.h" -#include "uca-mock-camera.h" +#include "cameras/uca-mock-camera.h" typedef struct { UcaMockCamera *camera; |