CMakeLists.txt 472 B

12345678910111213141516171819202122232425
  1. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions")
  2. set(FLATBUFFERS_SRC
  3. ./flatc.cpp
  4. ./idl_gen_cpp.cpp
  5. ./idl_gen_fbs.cpp
  6. ./idl_gen_general.cpp
  7. ./idl_gen_go.cpp
  8. ./idl_gen_text.cpp
  9. ./idl_parser.cpp
  10. )
  11. include_directories(
  12. ${CMAKE_CURRENT_SOURCE_DIR}
  13. )
  14. add_library(flatbuffers STATIC
  15. ${FLATBUFFERS_SRC}
  16. )
  17. set_target_properties(flatbuffers
  18. PROPERTIES
  19. ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
  20. LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
  21. )