diff -up ./src/CMakeLists.txt.orig ./src/CMakeLists.txt --- ./src/CMakeLists.txt.orig 2015-12-25 20:23:35.000000000 +0100 +++ ./src/CMakeLists.txt 2016-12-09 14:55:18.122575245 +0100 @@ -1,5 +1,7 @@ set(SOURCES cbor.c cbor/streaming.c cbor/internal/encoders.c cbor/internal/builder_callbacks.c cbor/internal/loaders.c cbor/internal/stack.c cbor/internal/unicode.c cbor/encoding.c cbor/serialization.c cbor/arrays.c cbor/common.c cbor/floats_ctrls.c cbor/bytestrings.c cbor/callbacks.c cbor/strings.c cbor/maps.c cbor/tags.c cbor/ints.c) +include(GNUInstallDirs) + set(CMAKE_SKIP_BUILD_RPATH FALSE) @@ -20,9 +22,9 @@ configure_file(libcbor.pc.in libcbor.pc #http://www.cmake.org/Wiki/CMake:Install_Commands -install(TARGETS cbor cbor_shared - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib +install(TARGETS cbor cbor_shared + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION bin) install(DIRECTORY cbor DESTINATION include @@ -31,4 +33,4 @@ install(DIRECTORY cbor DESTINATION inclu install(FILES cbor.h DESTINATION include) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libcbor.pc" - DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig") + DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig") diff -up ./src/libcbor.pc.in.orig ./src/libcbor.pc.in --- ./src/libcbor.pc.in.orig 2015-12-25 20:23:35.000000000 +0100 +++ ./src/libcbor.pc.in 2016-12-09 14:08:06.675665595 +0100 @@ -1,6 +1,6 @@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=${prefix} -libdir=${prefix}/lib +libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ includedir=${prefix}/include Name: @PROJECT_NAME@