commit 0975bf9b6d95e704bb7419e4ca281a171ca0b956
parent d81308faba0cfb3fccf8c3b12446863c7b76ae32
Author: Nehal J Wani <nehaljw.kkd1@gmail.com>
Date: Wed, 6 Jun 2018 19:46:07 +0530
Enhance CMakeLists.txt (#138)
* Change name of static library if building with msvc
* Add install target for cmake
Diffstat:
1 file changed, 13 insertions(+), 0 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
@@ -27,6 +27,9 @@ if (BUILD_SHARED_LIBS)
else()
# Building static library
target_compile_definitions(utf8proc PUBLIC "UTF8PROC_STATIC")
+ if (MSVC)
+ set_target_properties(utf8proc PROPERTIES OUTPUT_NAME "utf8proc_static")
+ endif()
endif()
target_compile_definitions(utf8proc PRIVATE "UTF8PROC_EXPORTS")
@@ -36,3 +39,13 @@ set_target_properties (utf8proc PROPERTIES
VERSION "${SO_MAJOR}.${SO_MINOR}.${SO_PATCH}"
SOVERSION ${SO_MAJOR}
)
+
+install(TARGETS utf8proc
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
+
+install(
+ FILES
+ "${PROJECT_SOURCE_DIR}/utf8proc.h"
+ DESTINATION include)