CMakeLists.txt 660 B

123456789101112131415161718192021222324252627282930
  1. # TODO: should not use this
  2. if (WIN32)
  3. if (BUILD_SHARED_LIBS)
  4. set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
  5. endif()
  6. endif()
  7. #
  8. # libraries
  9. #
  10. # llama
  11. add_library(llama
  12. ../include/llama.h
  13. llama.cpp
  14. unicode.h
  15. unicode.cpp
  16. unicode-data.cpp
  17. )
  18. target_include_directories(llama PUBLIC . ../include)
  19. target_compile_features (llama PUBLIC cxx_std_11) # don't bump
  20. target_link_libraries(llama PUBLIC ggml)
  21. if (BUILD_SHARED_LIBS)
  22. set_target_properties(llama PROPERTIES POSITION_INDEPENDENT_CODE ON)
  23. target_compile_definitions(llama PRIVATE LLAMA_SHARED LLAMA_BUILD)
  24. endif()