Browse Source

Make evmjit library installable

cl-refactor
Paweł Bylica 10 years ago
parent
commit
5384b92c66
  1. 4
      CMakeLists.txt
  2. 7
      libevmjit/CMakeLists.txt

4
CMakeLists.txt

@ -6,7 +6,7 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
else ()
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unknown-pragmas -Wextra -DSHAREDLIB -fPIC")
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unknown-pragmas -Wextra")
endif()
if(APPLE)
@ -14,7 +14,7 @@ if(APPLE)
endif()
# LLVM
if(LLVM_DIR) # local LLVM build
if(LLVM_DIR OR APPLE) # local LLVM build
find_package(LLVM REQUIRED CONFIG)
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")

7
libevmjit/CMakeLists.txt

@ -2,13 +2,14 @@ set(TARGET_NAME evmjit)
file(GLOB SOURCES "*.cpp")
file(GLOB HEADERS "*.h")
set(INTERFACE_HEADERS interface.h)
source_group("" FILES ${HEADERS})
source_group("" FILES ${SOURCES})
if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# Disable rtti for Cache as LLVM has no rtti
set_source_files_properties(Cache.cpp PROPERTIES COMPILE_FLAGS -fno-rtti)
endif ()
endif()
link_directories(/usr/lib/llvm-3.5/lib)
add_library(${TARGET_NAME} SHARED ${SOURCES} ${HEADERS})
@ -21,5 +22,5 @@ target_link_libraries(${TARGET_NAME} ${LLVM_LIBS})
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
#install( TARGETS ${EXECUTABLE} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib )
#install( FILES ${HEADERS} DESTINATION include/${EXECUTABLE} )
install(TARGETS ${TARGET_NAME} LIBRARY DESTINATION lib)
install(FILES ${INTERFACE_HEADERS} DESTINATION include/${TARGET_NAME})

Loading…
Cancel
Save