Browse Source

Fixed cmakelists for Windows and updated doc (though make install seems not to work.

merge-requests/37/head
U-olece-PC\olece 10 years ago
parent
commit
51d753d254
  1. 9
      CMakeLists.txt
  2. 14
      docs/install.md
  3. 7
      src/CMakeLists.txt

9
CMakeLists.txt

@ -1,12 +1,15 @@
cmake_minimum_required (VERSION 2.8.4)
set(project_name clangmm)
project(${project_name})
if(CYGWIN)
set(library_path "/usr/local/bin/")
if(MSYS)
string(TOLOWER "/$ENV{MSYSTEM}" CMAKE_INSTALL_PREFIX)
set(library_path "${CMAKE_INSTALL_PREFIX}/bin/")
set(include_path "${CMAKE_INSTALL_PREFIX}/include/")
else()
set(library_path "/usr/local/lib/")
endif()
set(include_path "/usr/local/include/")
endif()
if(APPLE)
set(Boost_USE_STATIC_LIBS "YES")

14
docs/install.md

@ -26,6 +26,19 @@ make
make install
```
##Windows with MSYS2 https://msys2.github.io/
Install dependencies(replace [arch] with i686 or x86_64 depending on your MSYS2 install):
```sh
pacman -S mingw-w64-[arch]-cmake mingw-w64-[arch]-toolchain mingw-w64-[arch]-clang
```
```sh
cmake -G"MSYS Makefiles" .
make
make install
```
<!--
## Windows with Cygwin (https://www.cygwin.com/)
**Make sure the PATH environment variable does not include paths to non-Cygwin cmake, make and g++.**
@ -41,3 +54,4 @@ cmake .
make
make install
```
-->

7
src/CMakeLists.txt

@ -48,8 +48,13 @@ set(cc_files
add_library(${project_name} SHARED ${header_files} ${cc_files})
include_directories(${LIBCLANG_INCLUDE_DIRS})
if(MSYS)
set(LIBCLANG_LIBRARIES "${library_path}/clang.dll")
endif()
target_link_libraries(${project_name} ${LIBCLANG_LIBRARIES})
if(CYGWIN)
if(MSYS)
install(TARGETS ${project_name} RUNTIME DESTINATION ${library_path})
else()
install(TARGETS ${project_name} LIBRARY DESTINATION ${library_path})

Loading…
Cancel
Save