summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2013-10-29 09:05:51 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2013-10-29 09:05:51 +0100
commit137f03b9a34fb39e5321524ab11fa31276458476 (patch)
tree83ea6e2b2228d1e99a37a0e510faaa13130ef849 /src
parent85a0f33711fd4467b9027da85ab9e09e406398d4 (diff)
downloadlibuca-137f03b9a34fb39e5321524ab11fa31276458476.tar.gz
libuca-137f03b9a34fb39e5321524ab11fa31276458476.tar.bz2
libuca-137f03b9a34fb39e5321524ab11fa31276458476.tar.xz
libuca-137f03b9a34fb39e5321524ab11fa31276458476.zip
Use ConfigurePaths to get installation paths
The advantage is twofold: 1) we have a clear separation between setting up the paths and actually using them, 2) the interface is very likely as configure scripts and makes integration into build system a bit easier.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt28
-rw-r--r--src/config.h.in2
-rw-r--r--src/libuca.pc.in17
3 files changed, 18 insertions, 29 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6872015..066649b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -16,15 +16,9 @@ create_enums(uca-enums
${uca_HDRS})
#}}}
#{{{ Variables
-set(prefix ${CMAKE_INSTALL_PREFIX})
if (CI_INSTALL_PREFIX)
- set(prefix ${CI_INSTALL_PREFIX})
+ set(UCA_PREFIX "${CI_INSTALL_PREFIX}")
endif()
-
-set(exec_prefix "\${prefix}")
-set(libdir ${prefix}/${LIB_INSTALL_DIR})
-set(includedir "\${prefix}/include")
-set(VERSION ${UCA_VERSION_STRING})
#}}}
#{{{ Configure
find_program(INTROSPECTION_SCANNER "g-ir-scanner")
@@ -37,7 +31,6 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/libuca.pc.in"
"${CMAKE_CURRENT_BINARY_DIR}/libuca.pc" @ONLY IMMEDIATE)
#}}}
#{{{ Target
-
include_directories(${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR})
@@ -168,32 +161,31 @@ if(GTK_DOC_FOUND)
add_custom_target(reference ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html.stamp)
- install(FILES ${reference_files} DESTINATION share/gtk-doc/html/uca)
+ install(FILES ${reference_files}
+ DESTINATION ${UCA_DATADIR}/gtk-doc/html/uca)
endif()
endif()
-
-
-# --- Install target ----------------------------------------------------------
-
+#}}}
+#{{{ Installation
install(TARGETS uca
- LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+ LIBRARY DESTINATION ${UCA_LIBDIR}
COMPONENT libraries)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libuca.pc
- DESTINATION ${LIB_INSTALL_DIR}/pkgconfig
+ DESTINATION ${UCA_PKGCONFIGDIR}
COMPONENT libraries)
install(FILES ${uca_HDRS}
- DESTINATION include/uca
+ DESTINATION ${UCA_INCLUDEDIR}
COMPONENT headers)
if(WITH_GIR)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_XML}
- DESTINATION share/gir-1.0
+ DESTINATION ${UCA_GIRDIR}
COMPONENT libraries)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_TYPELIB}
- DESTINATION ${LIB_INSTALL_DIR}/girepository-1.0
+ DESTINATION ${UCA_TYPELIBDIR}
COMPONENT libraries)
endif()
#}}}
diff --git a/src/config.h.in b/src/config.h.in
index ec1fb62..28f4ffb 100644
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -4,6 +4,4 @@
#cmakedefine HAVE_UFO_CAMERA
#cmakedefine HAVE_PYLON_CAMERA
#cmakedefine HAVE_DEXELA_CL
-
#cmakedefine HAVE_MOCK_CAMERA
-#define CONTROL_GLADE_PATH "${CMAKE_INSTALL_PREFIX}/share/libuca/control.glade"
diff --git a/src/libuca.pc.in b/src/libuca.pc.in
index 3ca4dbe..14a9361 100644
--- a/src/libuca.pc.in
+++ b/src/libuca.pc.in
@@ -1,14 +1,13 @@
-# Package Information for pkg-config
-
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir_old=@includedir@/uca
-includedir_new=@includedir@
+prefix=@UCA_PREFIX@
+exec_prefix=@UCA_EPREFIX@
+libdir=@UCA_LIBDIR@
+includedir=@UCA_INCLUDEDIR@
+girdir=@UCA_GIRDIR@
+typelibdir=@UCA_TYPELIBDIR@
Name: libuca
Description: @UCA_DESCRIPTION@
-Version: @VERSION@
+Version: @UCA_VERSION_STRING@
Libs: -L${libdir} -luca
-Cflags: -I${includedir_old} -I${includedir_new}
+Cflags: -I${includedir}
Requires: glib-2.0 gobject-2.0