From b51efe44c401c9c796ebaa9a5e7b2a01b2571d76 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Thu, 18 Apr 2019 11:45:28 -0700 Subject: [PATCH] Added export/install section to CMakeLists.txt --- CMakeLists.txt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0856d3f..beae8b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,6 +98,8 @@ set (SILENCE "${SILENCE} -Wno-sign-compare") set (SILENCE "${SILENCE} -Wno-unused-variable") set (SILENCE "${SILENCE} -Wno-missing-field-initializers") set (SILENCE "${SILENCE} -Wno-unused-parameter") +#set (SILENCE "${SILENCE} -Wno-nullability-completeness") +#set (SILENCE "${SILENCE} -Wno-expansion-to-defined") set (ZT_FLAGS "${ZT_FLAGS} -DZT_USE_MINIUPNPC=1") set (ZT_FLAGS "${ZT_FLAGS} -DZT_SOFTWARE_UPDATE_DEFAULT=0") @@ -497,4 +499,16 @@ if (SHOULD_BUILD_TESTS) # Simple Example #add_executable (simple ${PROJ_DIR}/test/simple.cpp) #target_link_libraries(simple ${STATIC_LIB_NAME}) -endif () \ No newline at end of file +endif () + +# ----------------------------------------------------------------------------- +# | INSTALL | +# ----------------------------------------------------------------------------- + +set(include_dest "include/zt") +set(main_lib_dest "lib/zt") +set(lib_dest "${main_lib_dest}/${CMAKE_BUILD_TYPE}") +install(TARGETS ${STATIC_LIB_NAME} EXPORT ${STATIC_LIB_NAME} DESTINATION "${lib_dest}") +install(TARGETS ${STATIC_LIB_NAME} DESTINATION "${main_lib_dest}") +install(FILES ${PUBLIC_ZT_HEADERS} DESTINATION "${include_dest}") +install(EXPORT ${STATIC_LIB_NAME} DESTINATION "${lib_dest}")