summaryrefslogtreecommitdiff
path: root/next/platform/glfw/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'next/platform/glfw/CMakeLists.txt')
-rw-r--r--next/platform/glfw/CMakeLists.txt38
1 files changed, 38 insertions, 0 deletions
diff --git a/next/platform/glfw/CMakeLists.txt b/next/platform/glfw/CMakeLists.txt
new file mode 100644
index 0000000000..d4f1b9d545
--- /dev/null
+++ b/next/platform/glfw/CMakeLists.txt
@@ -0,0 +1,38 @@
+find_package(OpenGL REQUIRED)
+find_package(PkgConfig REQUIRED)
+
+pkg_search_module(GLFW glfw3 REQUIRED)
+
+add_executable(
+ mbgl-glfw
+ ${MBGL_ROOT}/platform/glfw/main.cpp
+ ${MBGL_ROOT}/platform/glfw/glfw_view.cpp
+ ${MBGL_ROOT}/platform/glfw/glfw_gl_backend.cpp
+ ${MBGL_ROOT}/platform/glfw/glfw_renderer_frontend.cpp
+ ${MBGL_ROOT}/platform/glfw/settings_json.cpp
+)
+
+target_include_directories(
+ mbgl-glfw
+ PRIVATE ${GLFW_INCLUDE_DIRS}
+)
+
+include(${PROJECT_SOURCE_DIR}/vendor/cheap-ruler-cpp.cmake)
+
+# Use target_link_directories when we move away from CMake 3.10.
+target_link_libraries(
+ mbgl-glfw
+ PRIVATE $<$<BOOL:${GLFW_LIBRARY_DIRS}>:-L${GLFW_LIBRARY_DIRS}>
+)
+
+target_link_libraries(
+ mbgl-glfw
+ PRIVATE
+ ${GLFW_LIBRARIES}
+ Mapbox::Base::Extras::args
+ Mapbox::Map
+ OpenGL::GL
+ mbgl-vendor-cheap-ruler-cpp
+)
+
+set_property(TARGET mbgl-glfw PROPERTY FOLDER Executables)