File: install-library-multiarch-path

package info (click to toggle)
orocos-bfl 0.8.0-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, trixie
  • size: 2,040 kB
  • sloc: cpp: 14,358; sh: 89; makefile: 8; ansic: 4
file content (29 lines) | stat: -rw-r--r-- 1,141 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Description: Install library into multiarch path

--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -16,10 +16,10 @@ ENDIF( OROCOS_PLUGIN )
 
 # examples will be linked with orocos-bfl, so when building both static and shared, examples will link with shared
 IF (LIBRARY_TYPE STREQUAL "shared")
+  include(GNUInstallDirs)
   ADD_LIBRARY(orocos-bfl SHARED $ENV{GLOBAL_LIBRARY_SRCS})
-  SET_TARGET_PROPERTIES(orocos-bfl PROPERTIES OUTPUT_NAME orocos-bfl)
   SET_TARGET_PROPERTIES(orocos-bfl PROPERTIES VERSION "${VERSION}" SOVERSION "${VERSION_MAJOR}.${VERSION_MINOR}")
-  INSTALL_TARGETS( /lib orocos-bfl)       
+  INSTALL(TARGETS orocos-bfl LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library)
 ELSE (LIBRARY_TYPE STREQUAL "shared")
 
 IF (LIBRARY_TYPE STREQUAL "static")
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -113,7 +113,8 @@ ADD_SUBDIRECTORY( examples )
 # .pc file
 # --------
 CONFIGURE_FILE( orocos-bfl.pc.in orocos-bfl.pc @ONLY)
-INSTALL_FILES( /lib/pkgconfig FILES orocos-bfl.pc)
+include(GNUInstallDirs)
+INSTALL_FILES( "/${CMAKE_INSTALL_LIBDIR}/pkgconfig" FILES orocos-bfl.pc)
 
 
 # Building Doxygen documents