summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNehal J Wani <nehaljw.kkd1@gmail.com>2018-06-06 19:46:07 +0530
committerSteven G. Johnson <stevenj@mit.edu>2018-06-06 16:16:07 +0200
commit0975bf9b6d95e704bb7419e4ca281a171ca0b956 (patch)
tree95001fb7c8e5569fe8361bfaa4a4586d359b953a
parentd81308faba0cfb3fccf8c3b12446863c7b76ae32 (diff)
downloadlibutf8proc-0975bf9b6d95e704bb7419e4ca281a171ca0b956.tar.gz
libutf8proc-0975bf9b6d95e704bb7419e4ca281a171ca0b956.tar.bz2
Enhance CMakeLists.txt (#138)
* Change name of static library if building with msvc * Add install target for cmake
-rw-r--r--CMakeLists.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a255b5b..e0d3f3f 100644
--- 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)