OLD | NEW |
(Empty) | |
| 1 cmake_minimum_required(VERSION 2.8.8) |
| 2 project(BlinkGCPlugin) |
| 3 |
| 4 # This pugin is built using LLVM's build system, not Chromium's. |
| 5 # It expects LLVM_SRC_DIR and LLVM_BUILD_DIR to be set. |
| 6 # For example: |
| 7 # |
| 8 # cmake -GNinja -DLLVM_BUILD_DIR=$CHROMIUM_SRC_DIR/third_party/llvm-build \ |
| 9 # -DLLVM_SRC_DIR=$CHROMIUM_SRC_DIR/third_party/llvm \ |
| 10 # $CHROMIUM_SRC_DIR/tools/clang/blink_gc_plugin/ |
| 11 # ninja |
| 12 |
| 13 list(APPEND CMAKE_MODULE_PATH "${LLVM_BUILD_DIR}/share/llvm/cmake") |
| 14 |
| 15 include(LLVMConfig) |
| 16 include(AddLLVM) |
| 17 include(HandleLLVMOptions) |
| 18 |
| 19 # Use rpath to find the bundled standard C++ library. |
| 20 set(CMAKE_BUILD_WITH_INSTALL_RPATH ON) |
| 21 if (APPLE) |
| 22 set(CMAKE_INSTALL_NAME_DIR "@rpath") |
| 23 set(CMAKE_INSTALL_RPATH "@executable_path/../lib") |
| 24 else(UNIX) |
| 25 set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib") |
| 26 endif() |
| 27 |
| 28 set(LLVM_RUNTIME_OUTPUT_INTDIR "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin") |
| 29 set(LLVM_LIBRARY_OUTPUT_INTDIR "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib") |
| 30 |
| 31 include_directories("${LLVM_SRC_DIR}/include" |
| 32 "${LLVM_SRC_DIR}/tools/clang/include" |
| 33 "${LLVM_BUILD_DIR}/include" |
| 34 "${LLVM_BUILD_DIR}/tools/clang/include") |
| 35 |
| 36 # This line is read by update.sh and other scripts in tools/clang/scripts |
| 37 # Note: The spaces are significant. |
| 38 set(LIBRARYNAME BlinkGCPlugin_10) |
| 39 |
| 40 add_llvm_loadable_module("lib${LIBRARYNAME}" |
| 41 BlinkGCPlugin.cpp |
| 42 Edge.cpp |
| 43 RecordInfo.cpp |
| 44 ) |
OLD | NEW |