2026-02-08 12:09:02 +01:00
|
|
|
# Fetch implot
|
|
|
|
|
include(implot)
|
|
|
|
|
message(STATUS "IMPLOT sources at ${IMPLOT_DIR}")
|
|
|
|
|
|
2025-08-18 22:39:43 +00:00
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/app_resources_default.h.in
|
|
|
|
|
${CMAKE_BINARY_DIR}/app_resources_default.h @ONLY)
|
|
|
|
|
|
2026-02-08 12:09:02 +01:00
|
|
|
set(IMPLOTSRC
|
|
|
|
|
"${IMPLOT_DIR}/implot.h"
|
|
|
|
|
"${IMPLOT_DIR}/implot_internal.h"
|
|
|
|
|
"${IMPLOT_DIR}/implot_items.cpp"
|
|
|
|
|
"${IMPLOT_DIR}/implot.cpp"
|
|
|
|
|
"${IMPLOT_DIR}/implot_demo.cpp"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
set(IMGUISRC
|
|
|
|
|
"${imgui_DIR}/imgui.cpp"
|
|
|
|
|
"${imgui_DIR}/misc/cpp/imgui_stdlib.cpp"
|
|
|
|
|
"${imgui_DIR}/imgui_demo.cpp"
|
|
|
|
|
"${imgui_DIR}/imgui_draw.cpp"
|
|
|
|
|
"${imgui_DIR}/imgui_tables.cpp"
|
|
|
|
|
"${imgui_DIR}/imgui_widgets.cpp"
|
|
|
|
|
"${imgui_DIR}/backends/imgui_impl_opengl3.cpp"
|
|
|
|
|
"${imgui_DIR}/backends/imgui_impl_glfw.cpp")
|
|
|
|
|
|
2025-08-18 22:39:43 +00:00
|
|
|
set(APPLIBSRC
|
2026-02-08 12:09:02 +01:00
|
|
|
include/imgui_proxy.hpp
|
|
|
|
|
include/AppGLFW.hpp
|
|
|
|
|
include/DefaultApp.hpp
|
|
|
|
|
include/PixelariumGallery.hpp
|
2025-08-18 22:39:43 +00:00
|
|
|
AppGLFW.cpp
|
2025-09-22 23:13:28 +02:00
|
|
|
DefaultApp.cpp
|
2026-02-08 12:09:02 +01:00
|
|
|
PixelariumGallery.cpp)
|
2025-08-18 22:39:43 +00:00
|
|
|
|
2026-01-23 23:00:35 +00:00
|
|
|
set(RENDERSRC
|
2026-02-08 12:09:02 +01:00
|
|
|
rendering/include/RenderHelpers.hpp
|
|
|
|
|
rendering/include/RenderImageManager.hpp
|
|
|
|
|
rendering/include/CvMatRender.hpp
|
|
|
|
|
rendering/include/IPixelariumImageView.hpp
|
|
|
|
|
rendering/include/PixelariumImageViewDefault.hpp
|
|
|
|
|
rendering/include/PixelariumImageViewCzi.hpp
|
|
|
|
|
rendering/include/ImageViewFactory.hpp
|
2026-01-23 23:00:35 +00:00
|
|
|
rendering/RenderHelpers.cpp
|
|
|
|
|
rendering/CvMatRender.cpp
|
|
|
|
|
rendering/IPixelariumImageView.cpp
|
2026-02-08 12:09:02 +01:00
|
|
|
rendering/RenderImageManager.cpp
|
2026-01-23 23:00:35 +00:00
|
|
|
rendering/PixelariumImageViewDefault.cpp
|
|
|
|
|
rendering/PixelariumImageViewCzi.cpp
|
|
|
|
|
rendering/ImageViewFactory.cpp)
|
|
|
|
|
|
2025-08-18 22:39:43 +00:00
|
|
|
set(APPLIBNAME pixelariumapplicationlib)
|
|
|
|
|
|
|
|
|
|
add_library(${APPLIBNAME}
|
2026-02-08 12:09:02 +01:00
|
|
|
STATIC ${APPLIBSRC} ${IMGUISRC} ${IMPLOTSRC} ${RENDERSRC})
|
|
|
|
|
|
|
|
|
|
add_library(pixelarium::lib::application_static ALIAS ${APPLIBNAME})
|
2025-08-18 22:39:43 +00:00
|
|
|
|
|
|
|
|
target_link_libraries(${APPLIBNAME}
|
2026-02-08 12:09:02 +01:00
|
|
|
PUBLIC
|
|
|
|
|
pixelarium::lib::utilities_static
|
|
|
|
|
pixelarium::lib::imaging_static
|
|
|
|
|
pixelarium::lib::resources_static)
|
2025-08-18 22:39:43 +00:00
|
|
|
|
|
|
|
|
# This needs to be public to let the consumer know about it.
|
|
|
|
|
if(WIN32)
|
|
|
|
|
target_link_libraries(${APPLIBNAME}
|
|
|
|
|
PUBLIC opengl32.lib
|
|
|
|
|
PUBLIC glfw
|
|
|
|
|
PUBLIC OpenGL::GL)
|
|
|
|
|
endif()
|
|
|
|
|
if(LINUX)
|
|
|
|
|
target_link_libraries(${APPLIBNAME}
|
|
|
|
|
PUBLIC glfw GL)
|
|
|
|
|
endif()
|
|
|
|
|
if(APPLE)
|
|
|
|
|
target_link_libraries(${APPLIBNAME}
|
|
|
|
|
PUBLIC glfw
|
|
|
|
|
PUBLIC "-framework OpenGL")
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
target_include_directories(${APPLIBNAME}
|
2026-02-08 12:09:02 +01:00
|
|
|
INTERFACE
|
2025-08-18 22:39:43 +00:00
|
|
|
PRIVATE ${CMAKE_BINARY_DIR}
|
2026-02-08 12:09:02 +01:00
|
|
|
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/rendering/include
|
|
|
|
|
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include
|
2025-09-22 23:13:28 +02:00
|
|
|
PUBLIC ${pfd_DIR}
|
2025-08-18 22:39:43 +00:00
|
|
|
PUBLIC ${imgui_DIR}
|
2026-02-08 12:09:02 +01:00
|
|
|
PUBLIC ${imgui_DIR}/misc/cpp
|
|
|
|
|
PUBLIC ${imgui_DIR}/backends
|
|
|
|
|
${IMPLOT_DIR})
|