@@ -51,23 +51,23 @@ endif()
5151
5252set (SRCS ../utils/qsem.cxx
5353 GPUDisplay.cxx
54- GPUDisplayMagneticField.cxx
55- GPUDisplayFrontend.cxx
56- GPUDisplayBackend .cxx
57- GPUDisplayBackendOpenGL .cxx
58- GPUDisplayFrontendGlfw .cxx)
54+ helpers/ GPUDisplayMagneticField.cxx
55+ frontend/ GPUDisplayFrontend.cxx
56+ frontend/GPUDisplayFrontendGlfw .cxx
57+ backend/GPUDisplayBackend .cxx
58+ backend/GPUDisplayBackendOpenGL .cxx)
5959
60- set (SRCS_NO_H GPUDisplayLoader.cxx
61- GPUDisplayBackendOpenGLMagneticField.cxx
62- GPUDisplayQuaternion.cxx
63- GPUDisplayInterpolation.cxx
64- GPUDisplayKeys .cxx
65- GPUDisplayROOT .cxx)
60+ set (SRCS_NO_H helpers/ GPUDisplayLoader.cxx
61+ helpers/ GPUDisplayBackendOpenGLMagneticField.cxx
62+ helpers/ GPUDisplayQuaternion.cxx
63+ helpers/ GPUDisplayInterpolation.cxx
64+ helpers/GPUDisplayROOT .cxx
65+ frontend/GPUDisplayKeys .cxx)
6666
67- set (HDRS_INSTALL GPUDisplayShaders.h)
67+ set (HDRS_INSTALL shaders/ GPUDisplayShaders.h)
6868
6969if (GPUCA_EVENT_DISPLAY_VULKAN)
70- set (SRCS ${SRCS} GPUDisplayBackendVulkan.cxx)
70+ set (SRCS ${SRCS} backend/ GPUDisplayBackendVulkan.cxx)
7171 if (GPUCA_EVENT_DISPLAY_WAYLAND)
7272 add_custom_command (
7373 OUTPUT ${CMAKE_CURRENT_BINARY_DIR} /xdg-gen/xdg-shell-client-protocol.h
@@ -94,28 +94,28 @@ if(GPUCA_EVENT_DISPLAY_VULKAN)
9494 MAIN_DEPENDENCY ${O2GPUWayland_PROTOCOLS_DIR} /unstable/xdg-decoration/xdg-decoration-unstable-v1.xml
9595 COMMENT "Preparing Wayland xdg-decoration-protocol.c" )
9696
97- set_property (SOURCE GPUDisplayFrontendWayland.cxx ${CMAKE_CURRENT_BINARY_DIR} /xdg-gen/xdg-shell-protocol.c APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR} /xdg-gen/xdg-shell-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR} /xdg-gen/xdg-decoration-client-protocol.h )
98- set_property (SOURCE GPUDisplayFrontendWayland.cxx APPEND PROPERTY INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR} /xdg-gen/ )
97+ set_property (SOURCE frontend/ GPUDisplayFrontendWayland.cxx ${CMAKE_CURRENT_BINARY_DIR} /xdg-gen/xdg-shell-protocol.c APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR} /xdg-gen/xdg-shell-client-protocol.h ${CMAKE_CURRENT_BINARY_DIR} /xdg-gen/xdg-decoration-client-protocol.h )
98+ set_property (SOURCE frontend/ GPUDisplayFrontendWayland.cxx APPEND PROPERTY INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR} /xdg-gen/ )
9999
100- set (SRCS_NO_H ${SRCS_NO_H} GPUDisplayFrontendWayland.cxx ${CMAKE_CURRENT_BINARY_DIR} /xdg-gen/xdg-shell-protocol.c ${CMAKE_CURRENT_BINARY_DIR} /xdg-gen/xdg-decoration-protocol.c)
100+ set (SRCS_NO_H ${SRCS_NO_H} frontend/ GPUDisplayFrontendWayland.cxx ${CMAKE_CURRENT_BINARY_DIR} /xdg-gen/xdg-shell-protocol.c ${CMAKE_CURRENT_BINARY_DIR} /xdg-gen/xdg-decoration-protocol.c)
101101 endif ()
102102endif ()
103103
104104if (X11_FOUND)
105- set (SRCS ${SRCS} GPUDisplayFrontendX11.cxx)
105+ set (SRCS ${SRCS} frontend/ GPUDisplayFrontendX11.cxx)
106106endif ()
107107
108108if (GLUT_FOUND)
109- set (SRCS ${SRCS} GPUDisplayFrontendGlut.cxx)
109+ set (SRCS ${SRCS} frontend/ GPUDisplayFrontendGlut.cxx)
110110endif ()
111111
112112if (GPUCA_EVENT_DISPLAY_QT)
113113 set (CMAKE_AUTOMOC ON )
114114 set (CMAKE_AUTORCC ON )
115115 set (CMAKE_AUTOUIC ON )
116116
117- set (SRCS ${SRCS} GPUDisplayGUI.cxx GPUDisplayGUIWrapper.cxx)
118- set (SRCS_NO_H ${SRCS_NO_H} GPUDisplayGUI.ui)
117+ set (SRCS ${SRCS} frontend/ GPUDisplayGUI.cxx frontend/ GPUDisplayGUIWrapper.cxx)
118+ set (SRCS_NO_H ${SRCS_NO_H} frontend/ GPUDisplayGUI.ui)
119119endif ()
120120
121121string (REPLACE ".cxx" ".h" HDRS "${SRCS} " )
@@ -136,7 +136,7 @@ if(ALIGPU_BUILD_TYPE STREQUAL "O2")
136136 TARGETVARNAME exporterName
137137 COMPONENT_NAME gpu
138138 PUBLIC_LINK_LIBRARIES O2::Field O2::GPUTracking Boost::program_options
139- SOURCES tools /field-uniform-exporter.cxx GPUDisplayMagneticField.cxx )
139+ SOURCES helpers /field-uniform-exporter.cxx helpers/ GPUDisplayMagneticField.cxx )
140140
141141 target_compile_definitions (${exporterName} PRIVATE $<TARGET_PROPERTY :O2 ::GPUTracking ,COMPILE_DEFINITIONS >)
142142endif ()
@@ -156,6 +156,7 @@ endif()
156156
157157message (STATUS "Building GPU Event Display (Vulkan ${GPUCA_EVENT_DISPLAY_VULKAN} , Wayland ${GPUCA_EVENT_DISPLAY_WAYLAND} , Freetype ${GPUCA_EVENT_DISPLAY_FREETYPE} , Fontconfig ${Fontconfig_FOUND} , Qt ${GPUCA_EVENT_DISPLAY_QT} )" )
158158target_link_libraries (${targetName} PUBLIC ${GLFW_LIBRARIES} OpenGL::GL )
159+ target_include_directories (${targetName} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} )
159160
160161if (X11_FOUND)
161162 target_link_libraries (${targetName} PRIVATE X11::X11 )
0 commit comments