diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..59face8 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "libclangmm"] + path = libclangmm + url = https://github.com/eidheim/libclangmm.git diff --git a/docs/install.md b/docs/install.md index ca6052a..c5c85c8 100644 --- a/docs/install.md +++ b/docs/install.md @@ -1,11 +1,13 @@ # juCi++ ## Installation guide ## -Before installation, please install libclangmm, see [installation guide](http://github.com/cppit/libclangmm/blob/master/docs/install.md). ## Debian/Ubuntu 15 +Install dependencies: ```sh -sudo apt-get install pkg-config libboost-system-dev libboost-thread-dev libboost-filesystem-dev libboost-log-dev libgtkmm-3.0-dev libgtksourceviewmm-3.0-dev aspell-en libaspell-dev git +sudo apt-get install git cmake make g++ libclang-dev pkg-config libboost-system-dev libboost-thread-dev libboost-filesystem-dev libboost-log-dev libgtkmm-3.0-dev libgtksourceviewmm-3.0-dev aspell-en libaspell-dev ``` + +Get juCi++ source, compile and install: ```sh git clone http://github.com/cppit/jucipp.git cd jucipp @@ -15,13 +17,16 @@ sudo make install ``` ## Ubuntu 14/Linux Mint 17 +Install dependencies: ```sh sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install g++-4.9 sudo apt-get remove g++-4.8 -sudo apt-get install pkg-config libboost-system1.55-dev libboost-thread1.55-dev libboost-filesystem1.55-dev libboost-log1.55-dev libgtkmm-3.0-dev libgtksourceviewmm-3.0-dev aspell-en libaspell-dev git +sudo apt-get install git cmake make g++ libclang-dev pkg-config libboost-system1.55-dev libboost-thread1.55-dev libboost-filesystem1.55-dev libboost-log1.55-dev libgtkmm-3.0-dev libgtksourceviewmm-3.0-dev aspell-en libaspell-dev ``` + +Get juCi++ source, compile and install: ```sh git clone http://github.com/cppit/jucipp.git cd jucipp @@ -31,10 +36,12 @@ sudo make install ``` ## OS X with Homebrew (http://brew.sh/) +Install dependencies (installing llvm may take some time): ```sh -brew install pkg-config boost gtkmm3 homebrew/x11/gtksourceviewmm3 aspell git +brew install cmake --with-clang llvm pkg-config boost gtkmm3 homebrew/x11/gtksourceviewmm3 aspell ``` +Get juCi++ source, compile and install: ```sh git clone https://github.com/cppit/jucipp.git cd jucipp @@ -49,14 +56,10 @@ Install dependencies (replace x86_64 with i686 for 32-bit MSYS2 installs): pacman -S patch autoconf automake-wrapper mingw-w64-x86_64-gtkmm3 mingw-w64-x86_64-gtksourceviewmm3 mingw-w64-x86_64-boost mingw-w64-x86_64-aspell mingw-w64-x86_64-aspell-en git ``` -Get juCi++ source: +Get juCi++ source, compile and install (replace mingw64 with mingw32 for 32-bit MSYS2 installs): ```sh git clone https://github.com/cppit/jucipp.git cd jucipp -``` - -Compile and install juCi++ source (replace mingw64 with mingw32 for 32-bit MSYS2 installs): -```sh cmake -G"MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=/mingw64 . make make install diff --git a/libclangmm b/libclangmm new file mode 160000 index 0000000..e060dec --- /dev/null +++ b/libclangmm @@ -0,0 +1 @@ +Subproject commit e060dec32bb8306eff6f9114092cdbefe8fea5fb diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 954e2ac..a0376d5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -35,9 +35,6 @@ function(validate FOUND APPLE UNIX WINDOWS) endif() endfunction(validate) -find_package(LibClangmm) -validate(${LCL_FOUND} "clangmm" "clangmm" "clangmm") - find_package(LibClang) validate(${LIBCLANG_FOUND} "clang" "libclang-dev" "llvm") @@ -84,7 +81,22 @@ set(source_files juci.h singletons.h singletons.cc cmake.h - cmake.cc) + cmake.cc + + ../libclangmm/src/CodeCompleteResults.cc + ../libclangmm/src/CompilationDatabase.cc + ../libclangmm/src/CompileCommand.cc + ../libclangmm/src/CompileCommands.cc + ../libclangmm/src/CompletionString.cc + ../libclangmm/src/Cursor.cc + ../libclangmm/src/Index.cc + ../libclangmm/src/SourceLocation.cc + ../libclangmm/src/SourceRange.cc + ../libclangmm/src/Token.cc + ../libclangmm/src/Tokens.cc + ../libclangmm/src/TranslationUnit.cc + ../libclangmm/src/Diagnostic.cc + ../libclangmm/src/Utility.cc) if(MSYS) list(APPEND source_files terminal_win.cc) @@ -106,7 +118,8 @@ if(${validation}) ${GTKSVMM_INCLUDE_DIRS} ${LCL_INCLUDE_DIRS} ${LIBCLANG_INCLUDE_DIRS} - ${ASPELL_INCLUDE_DIR}) + ${ASPELL_INCLUDE_DIR} + ../libclangmm/src) link_directories( ${GTKMM_LIBRARY_DIRS}