From ce0ef4a7577ef78d6ff0f378a64c7805ae1c2a83 Mon Sep 17 00:00:00 2001 From: eidheim Date: Fri, 21 Aug 2015 10:27:55 +0200 Subject: [PATCH] Added Cygwin support. --- CMakeLists.txt | 6 +++++- src/CMakeLists.txt | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dab3e5d..c8f69c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,11 @@ cmake_minimum_required (VERSION 2.8.4) set(project_name clangmm) project(${project_name}) -set(library_path "/usr/local/lib/") +if(CYGWIN) + set(library_path "/usr/bin/") +else() + set(library_path "/usr/local/lib/") +endif() set(include_path "/usr/local/include/") if(APPLE) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a5f29de..f606241 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -49,6 +49,9 @@ add_library(${project_name} SHARED ${header_files} ${cc_files}) include_directories(${LIBCLANG_INCLUDE_DIRS}) target_link_libraries(${project_name} ${LIBCLANG_LIBRARIES}) - -install(TARGETS ${project_name} LIBRARY DESTINATION ${library_path}) +if(CYGWIN) + install(TARGETS ${project_name} RUNTIME DESTINATION ${library_path}) +else() + install(TARGETS ${project_name} LIBRARY DESTINATION ${library_path}) +endif() install(FILES ${header_files} DESTINATION ${include_path}/libclangmm)