From ec0c511a343d79d2f1958c74f28416a1185b9487 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Sun, 17 Apr 2022 22:09:08 +0200 Subject: Install binaries and headers. --- CMakeLists.txt | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ff96097..61b1ce8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,14 +114,14 @@ endif() include(GNUInstallDirs) + +configure_file(diceparser.pc.in diceparser.pc @ONLY) + install(TARGETS diceparser_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) - -configure_file(diceparser.pc.in diceparser.pc @ONLY) - -install(FILES ${CMAKE_BINARY_DIR}/diceparser.pc DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/diceparser.pc DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig) if(Qt${QT_VERSION_MAJOR}Qml_FOUND) set(dice_header_qobject include/diceparser_qobject/diceparser_qobject_global.h include/diceparser_qobject/qmltypesregister.h include/diceparser_qobject/diceroller.h) @@ -140,4 +140,12 @@ if(Qt${QT_VERSION_MAJOR}Qml_FOUND) PUBLIC $ $) + + + install(TARGETS diceparser_qobject + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) endif() + + + -- cgit v1.2.3-70-g09d2