deps.patch 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt
  2. index 4084142..dd6b111 100644
  3. --- a/deps/CMakeLists.txt
  4. +++ b/deps/CMakeLists.txt
  5. @@ -3,23 +3,21 @@ cmake_minimum_required(VERSION 3.5)
  6. if("${POLYSCOPE_BACKEND_OPENGL3_GLFW}")
  7. ## Glad
  8. - add_subdirectory(glad)
  9. ## GLFW
  10. set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
  11. set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
  12. set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
  13. set(GLFW_INSTALL OFF CACHE BOOL "" FORCE)
  14. - add_subdirectory(glfw)
  15. + find_package(glfw3 REQUIRED)
  16. endif()
  17. if("${POLYSCOPE_BACKEND_OPENGL_MOCK}")
  18. endif()
  19. ## Imgui
  20. -add_subdirectory(imgui)
  21. ## Argparse
  22. ## STB stuff
  23. -add_subdirectory(stb)
  24. +add_library(stb OBJECT stb_impl.cpp)
  25. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
  26. index 5e5ab62..21410ce 100644
  27. --- a/src/CMakeLists.txt
  28. +++ b/src/CMakeLists.txt
  29. @@ -49,7 +49,7 @@ if("${POLYSCOPE_BACKEND_OPENGL3_GLFW}")
  30. # Link settings
  31. list(APPEND BACKEND_LIBS
  32. - glfw ${GLFW_LIBRARIES}
  33. + ${GLFW_LIBRARIES}
  34. )
  35. if(APPLE)
  36. @@ -283,13 +283,8 @@ add_definitions(-DNOMINMAX)
  37. # Include settings
  38. target_include_directories(polyscope PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../include")
  39. -target_include_directories(polyscope PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../deps/glm")
  40. -#target_include_directories(polyscope PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../deps/args") # not used, polyscope generates no apps directly
  41. -target_include_directories(polyscope PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../deps/happly")
  42. -target_include_directories(polyscope PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../deps/json/include")
  43. -target_include_directories(polyscope PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../deps/stb")
  44. -target_include_directories(polyscope PRIVATE "${BACKEND_INCLUDE_DIRS}")
  45. # Link settings
  46. target_link_libraries(polyscope PUBLIC imgui)
  47. target_link_libraries(polyscope PRIVATE "${BACKEND_LIBS}" stb)
  48. +install(TARGETS polyscope LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin)
  49. diff --git a/src/polyscope.cpp b/src/polyscope.cpp
  50. index d270e36..1887ef1 100644
  51. --- a/src/polyscope.cpp
  52. +++ b/src/polyscope.cpp
  53. @@ -14,7 +14,7 @@
  54. #include "stb_image.h"
  55. -#include "json/json.hpp"
  56. +#include "nlohmann/json.hpp"
  57. using json = nlohmann::json;
  58. diff --git a/src/view.cpp b/src/view.cpp
  59. index 6b93f88..31b73ee 100644
  60. --- a/src/view.cpp
  61. +++ b/src/view.cpp
  62. @@ -6,7 +6,7 @@
  63. #include "imgui.h"
  64. -#include "json/json.hpp"
  65. +#include "nlohmann/json.hpp"
  66. using json = nlohmann::json;
  67. namespace polyscope {