CMakeLists.txt 877 B

12345678910111213141516171819202122232425
  1. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB")
  2. aux_source_directory(. SRC_LIST)
  3. file(GLOB HEADERS "*.h")
  4. add_library(devcore ${SRC_LIST} ${HEADERS})
  5. find_package(Boost QUIET REQUIRED COMPONENTS thread filesystem random system)
  6. target_include_directories(devcore PRIVATE ..)
  7. target_include_directories(devcore SYSTEM PUBLIC ${Boost_INCLUDE_DIRS})
  8. target_link_libraries(devcore ${Boost_FILESYSTEM_LIBRARIES})
  9. target_link_libraries(devcore ${Boost_RANDOM_LIBRARIES})
  10. target_link_libraries(devcore ${Boost_SYSTEM_LIBRARIES})
  11. target_link_libraries(devcore ${Boost_THREAD_LIBRARIES})
  12. if (NOT EMSCRIPTEN)
  13. find_package(LevelDB)
  14. target_include_directories(devcore SYSTEM PUBLIC ${LEVELDB_INCLUDE_DIRS})
  15. target_link_libraries(devcore ${LEVELDB_LIBRARIES})
  16. endif()
  17. install(TARGETS devcore RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)