From f33c94db661aec44e7973271283cfdd30e7bd57b Mon Sep 17 00:00:00 2001 From: Jethro Cao Date: Thu, 5 Dec 2019 00:40:24 +0700 Subject: [PATCH] Add install target * this allows `$ make install` to also execute successfully * without changing the output location of nuklear.so --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d87381b..ebb849a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,3 +25,9 @@ TARGET_LINK_LIBRARIES( ) SET_TARGET_PROPERTIES("${LIB_NAME}" PROPERTIES PREFIX "") + +IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + SET(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}" CACHE PATH "..." FORCE) +ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + +INSTALL(TARGETS "${LIB_NAME}" DESTINATION .)