Respect install destinations set by variables

Use CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_INCLUDEDIR as destination
base.
This commit is contained in:
Tomáš Čech 2015-09-21 21:37:56 +02:00
parent 064e937452
commit ecd7d4056f
4 changed files with 7 additions and 5 deletions

View File

@ -1,3 +1,5 @@
include(GNUInstallDirs)
# Sources
SET(BEMENU_SOURCE
menu.c
@ -43,8 +45,8 @@ SET_TARGET_PROPERTIES(bemenu PROPERTIES
TARGET_LINK_LIBRARIES(bemenu dl)
# Install
INSTALL(TARGETS bemenu DESTINATION lib)
INSTALL(FILES bemenu.h DESTINATION include)
INSTALL(TARGETS bemenu DESTINATION "${CMAKE_INSTALL_LIBDIR}")
INSTALL(FILES bemenu.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
# Unexport
SET(BEMENU_INCLUDES)

View File

@ -6,5 +6,5 @@ if (CURSES_FOUND)
ADD_LIBRARY(bemenu-renderer-curses SHARED curses.c)
SET_TARGET_PROPERTIES(bemenu-renderer-curses PROPERTIES PREFIX "")
TARGET_LINK_LIBRARIES(bemenu-renderer-curses ${BEMENU_LIBRARIES} ${CURSES_LIBRARY} m)
INSTALL(TARGETS bemenu-renderer-curses DESTINATION lib/bemenu)
INSTALL(TARGETS bemenu-renderer-curses DESTINATION "${CMAKE_INSTALL_LIBDIR}/bemenu")
endif ()

View File

@ -10,5 +10,5 @@ if (WAYLAND_FOUND AND CAIRO_FOUND AND PANGO_FOUND AND XKBCOMMON_FOUND)
ADD_LIBRARY(bemenu-renderer-wayland SHARED wayland.c registry.c window.c ${proto-xdg-shell})
SET_TARGET_PROPERTIES(bemenu-renderer-wayland PROPERTIES PREFIX "")
TARGET_LINK_LIBRARIES(bemenu-renderer-wayland ${BEMENU_LIBRARIES} ${WAYLAND_CLIENT_LIBRARIES} ${XKBCOMMON_LIBRARIES} ${CAIRO_LIBRARIES} ${PANGO_LIBRARIES} m)
INSTALL(TARGETS bemenu-renderer-wayland DESTINATION lib/bemenu)
INSTALL(TARGETS bemenu-renderer-wayland DESTINATION "${CMAKE_INSTALL_LIBDIR}/bemenu")
endif ()

View File

@ -6,5 +6,5 @@ if (X11_FOUND AND CAIRO_FOUND AND PANGO_FOUND)
ADD_LIBRARY(bemenu-renderer-x11 SHARED x11.c window.c xkb_unicode.c)
SET_TARGET_PROPERTIES(bemenu-renderer-x11 PROPERTIES PREFIX "")
TARGET_LINK_LIBRARIES(bemenu-renderer-x11 ${BEMENU_LIBRARIES} ${X11_LIBRARIES} ${X11_Xinerama_LIB} ${CAIRO_LIBRARIES} ${PANGO_LIBRARIES} m)
INSTALL(TARGETS bemenu-renderer-x11 DESTINATION lib/bemenu)
INSTALL(TARGETS bemenu-renderer-x11 DESTINATION "${CMAKE_INSTALL_LIBDIR}/bemenu")
endif ()