From c3ec5b3bc76f63c0de93d29077e3fc67e6222795 Mon Sep 17 00:00:00 2001 From: Petr Mrázek Date: Mon, 22 Jan 2018 04:21:39 +0100 Subject: Add cmake install command --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 904f00bc2d..dfad5e650f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,11 @@ endif() add_library(${NBT_NAME} ${NBT_SOURCES}) target_include_directories(${NBT_NAME} PUBLIC include ${CMAKE_CURRENT_BINARY_DIR}) +# Install it +if(DEFINED NBT_DEST_DIR) + install(TARGETS ${NBT_NAME} DESTINATION ${NBT_DEST_DIR}) +endif() + if(NBT_USE_ZLIB) target_link_libraries(${NBT_NAME} z) endif() -- cgit 0.0.5-2-1-g0f52