aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2014-05-31 03:22:00 +0100
committerChad Versace <chad.versace@linux.intel.com>2014-06-05 20:52:20 -0700
commit001e84091b0a7bca03586e9aebd9103e9630bfa5 (patch)
tree52cbec8a8dbd4a67f509585a2b072116e3fc9a00
parentd62f8178f9f29a5ab2942d03fdc251544eec7edb (diff)
downloadwaffle-001e84091b0a7bca03586e9aebd9103e9630bfa5.tar.gz
cmake: reformat/update install targets
Cleanup the formatting and add component for each build target. The latter will allow us to use CPack to create a component based installer for Windows. Additionally install wflinfo to CMAKE_INSTALL_BINDIR rather than hardcoding it to 'bin'. v2: Tag html documentation as htmldocs COMPONENT. Suggested by Chad. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r--CMakeLists.txt14
-rw-r--r--doc/CMakeLists.txt19
-rw-r--r--examples/CMakeLists.txt12
-rw-r--r--include/CMakeLists.txt18
-rw-r--r--man/html.cmake7
-rw-r--r--man/manpages.cmake21
-rw-r--r--src/utils/CMakeLists.txt6
-rw-r--r--src/waffle/CMakeLists.txt7
8 files changed, 72 insertions, 32 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d8d234d..b32b3d1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -92,11 +92,17 @@ endif()
configure_file(waffle.pc.in ${waffle_libname}.pc @ONLY)
-install(FILES ${CMAKE_BINARY_DIR}/${waffle_libname}.pc
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+install(
+ FILES ${CMAKE_BINARY_DIR}/${waffle_libname}.pc
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
+ COMPONENT pkgconfig
+ )
-install(FILES cmake/Modules/FindWaffle.cmake
- DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/Modules")
+install(
+ FILES cmake/Modules/FindWaffle.cmake
+ DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/cmake/Modules"
+ COMPONENT cmakefind
+ )
# ------------------------------------------------------------------------------
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index b89fde3..a2d46e6 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,7 +1,14 @@
-install(FILES "${CMAKE_SOURCE_DIR}/README.txt"
- "${CMAKE_SOURCE_DIR}/LICENSE.txt"
- DESTINATION "${CMAKE_INSTALL_DOCDIR}")
+install(
+ FILES
+ "${CMAKE_SOURCE_DIR}/README.txt"
+ "${CMAKE_SOURCE_DIR}/LICENSE.txt"
+ DESTINATION "${CMAKE_INSTALL_DOCDIR}"
+ COMPONENT coredocs
+ )
-install(DIRECTORY "${CMAKE_SOURCE_DIR}/doc/release-notes"
- DESTINATION "${CMAKE_INSTALL_DOCDIR}"
- FILES_MATCHING PATTERN "waffle-${waffle_major_version}.${waffle_minor_version}.*.txt")
+install(
+ DIRECTORY "${CMAKE_SOURCE_DIR}/doc/release-notes"
+ DESTINATION "${CMAKE_INSTALL_DOCDIR}"
+ COMPONENT releasenotes
+ FILES_MATCHING PATTERN "waffle-${waffle_major_version}.${waffle_minor_version}.*.txt"
+ )
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 410bbf8..8392ecb 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,7 +1,11 @@
-install(FILES Makefile.example
- gl_basic.c
- simple-x11-egl.c
- DESTINATION "${CMAKE_INSTALL_DOCDIR}/examples")
+install(
+ FILES
+ Makefile.example
+ gl_basic.c
+ simple-x11-egl.c
+ DESTINATION "${CMAKE_INSTALL_DOCDIR}/examples"
+ COMPONENT examples
+ )
# ----------------------------------------------------------------------------
# Target: simple-x11-egl (executable)
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index 0123c28..e190a76 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -2,10 +2,14 @@ configure_file(waffle/waffle_version.h.in
${CMAKE_CURRENT_SOURCE_DIR}/waffle/waffle_version.h
@ONLY)
-install(FILES waffle/waffle.h
- waffle/waffle_gbm.h
- waffle/waffle_glx.h
- waffle/waffle_version.h
- waffle/waffle_wayland.h
- waffle/waffle_x11_egl.h
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${waffle_libname})
+install(
+ FILES
+ waffle/waffle.h
+ waffle/waffle_gbm.h
+ waffle/waffle_glx.h
+ waffle/waffle_version.h
+ waffle/waffle_wayland.h
+ waffle/waffle_x11_egl.h
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${waffle_libname}
+ COMPONENT headers
+ )
diff --git a/man/html.cmake b/man/html.cmake
index ea55600..59e0490 100644
--- a/man/html.cmake
+++ b/man/html.cmake
@@ -92,5 +92,8 @@ add_custom_target(html
DEPENDS ${html_outputs}
)
-install(DIRECTORY ${html_out_dir}
- DESTINATION ${CMAKE_INSTALL_DOCDIR}/html)
+install(
+ DIRECTORY ${html_out_dir}
+ DESTINATION ${CMAKE_INSTALL_DOCDIR}/html
+ COMPONENT htmldocs
+ )
diff --git a/man/manpages.cmake b/man/manpages.cmake
index 1332eb9..b8ededa 100644
--- a/man/manpages.cmake
+++ b/man/manpages.cmake
@@ -92,9 +92,18 @@ add_custom_target(man
DEPENDS ${man_outputs}
)
-install(DIRECTORY ${man_out_dir}/man1
- DESTINATION ${CMAKE_INSTALL_MANDIR})
-install(DIRECTORY ${man_out_dir}/man3
- DESTINATION ${CMAKE_INSTALL_MANDIR})
-install(DIRECTORY ${man_out_dir}/man7
- DESTINATION ${CMAKE_INSTALL_MANDIR})
+install(
+ DIRECTORY ${man_out_dir}/man1
+ DESTINATION ${CMAKE_INSTALL_MANDIR}
+ COMPONENT manuals
+ )
+install(
+ DIRECTORY ${man_out_dir}/man3
+ DESTINATION ${CMAKE_INSTALL_MANDIR}
+ COMPONENT manuals
+ )
+install(
+ DIRECTORY ${man_out_dir}/man7
+ DESTINATION ${CMAKE_INSTALL_MANDIR}
+ COMPONENT manuals
+ )
diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt
index 5bdf9c4..848702c 100644
--- a/src/utils/CMakeLists.txt
+++ b/src/utils/CMakeLists.txt
@@ -16,4 +16,8 @@ if(waffle_on_mac)
)
endif()
-install(TARGETS wflinfo DESTINATION bin)
+install(
+ TARGETS wflinfo
+ DESTINATION ${CMAKE_INSTALL_BINDIR}
+ COMPONENT utils
+ )
diff --git a/src/waffle/CMakeLists.txt b/src/waffle/CMakeLists.txt
index 10a0241..12cc567 100644
--- a/src/waffle/CMakeLists.txt
+++ b/src/waffle/CMakeLists.txt
@@ -175,8 +175,11 @@ set_target_properties(${waffle_libname}
LINK_INTERFACE_LIBRARIES ""
)
-install(TARGETS ${waffle_libname}
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+install(
+ TARGETS ${waffle_libname}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ COMPONENT libraries
+ )
# ----------------------------------------------------------------------------
# Target: waffle_static