@@ -1,23 +1,21 @@
if("${POLYSCOPE_BACKEND_OPENGL3_GLFW}")
## Glad
- add_subdirectory(glad)
## GLFW
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(GLFW_INSTALL OFF CACHE BOOL "" FORCE)
- add_subdirectory(glfw)
+ find_package(glfw3 REQUIRED)
endif()
if("${POLYSCOPE_BACKEND_OPENGL_MOCK}")
endif()
## Imgui
-add_subdirectory(imgui)
## Argparse
## Other dependencies
-add_subdirectory(stb)
+add_library(stb OBJECT stb_impl.cpp)
@@ -5,8 +5,10 @@
#include <cmath>
// Added by nsharp: use glm instead of internal vector class
+#define GLM_ENABLE_EXPERIMENTAL
#include <glm/glm.hpp>
#include <glm/gtx/norm.hpp>
+#undef GLM_ENABLE_EXPERIMENTAL
namespace MC
{
@@ -24,7 +24,7 @@
#include "args/args.hxx"
#include "happly.h"
-#include "json/json.hpp"
+#include "nlohmann/json.hpp"
#include "simple_dot_mesh_parser.h"
#include "surface_mesh_io.h"
@@ -2,6 +2,7 @@
#pragma once
+#include <cstdint>
#include <string>
@@ -48,7 +48,7 @@ if("${POLYSCOPE_BACKEND_OPENGL3_GLFW}")
# Link settings
list(APPEND BACKEND_LIBS
- glfw ${GLFW_LIBRARIES}
+ ${GLFW_LIBRARIES}
)
if(APPLE)
@@ -330,15 +330,9 @@ add_definitions(-DNOMINMAX)
# Include settings
target_include_directories(polyscope PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../include")
-target_include_directories(polyscope PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../deps/glm")
-#target_include_directories(polyscope PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../deps/args") # not used, polyscope generates no apps directly
-target_include_directories(polyscope PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../deps/happly")
-target_include_directories(polyscope PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../deps/MarchingCubeCpp")
-target_include_directories(polyscope PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../deps/json/include")
-target_include_directories(polyscope PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../deps/stb")
target_include_directories(polyscope PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../deps/MarchingCubeCpp/include")
-target_include_directories(polyscope PRIVATE "${BACKEND_INCLUDE_DIRS}")
# Link settings
target_link_libraries(polyscope PUBLIC imgui)
target_link_libraries(polyscope PRIVATE "${BACKEND_LIBS}" stb)
+install(TARGETS polyscope LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin)
@@ -16,7 +16,7 @@
#include "stb_image.h"
-#include "json/json.hpp"
+#include "nlohmann/json.hpp"
using json = nlohmann::json;
#include "backends/imgui_impl_opengl3.h"
@@ -4,8 +4,10 @@
#include "polyscope/polyscope.h"
+#define GLM_ENABLE_EXPERIMENTAL
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtx/transform.hpp>
+#undef GLM_ENABLE_EXPERIMENTAL
#include <cmath>
@@ -7,7 +7,7 @@
#include "imgui.h"
-#include "json/json.hpp"
+#include "nlohmann/json.hpp"
using json = nlohmann::json;
namespace polyscope {