| 1 | #------------------------------------------------------------------------------
|
|---|
| 2 | # sources.cmake
|
|---|
| 3 | # Module : G4OpenGL
|
|---|
| 4 | # Package: Geant4.src.G4visualization.G4OpenGL
|
|---|
| 5 | #
|
|---|
| 6 | # Sources description for a library.
|
|---|
| 7 | # Lists the sources and headers of the code explicitely.
|
|---|
| 8 | # Lists include paths needed.
|
|---|
| 9 | # Lists the internal granular and global dependencies of the library.
|
|---|
| 10 | # Source specific properties should be added at the end.
|
|---|
| 11 | #
|
|---|
| 12 | # Generated on : 24/9/2010
|
|---|
| 13 | #
|
|---|
| 14 | # $Id: sources.cmake,v 1.5 2010/12/01 16:57:53 bmorgan Exp $
|
|---|
| 15 | # GEANT4 Tag $Name: $
|
|---|
| 16 | #
|
|---|
| 17 | #------------------------------------------------------------------------------
|
|---|
| 18 |
|
|---|
| 19 | # List external includes needed.
|
|---|
| 20 | include_directories(${CLHEP_INCLUDE_DIRS})
|
|---|
| 21 |
|
|---|
| 22 | # List internal includes needed.
|
|---|
| 23 | include_directories(${CMAKE_SOURCE_DIR}/source/digits_hits/hits/include)
|
|---|
| 24 | include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
|
|---|
| 25 | include_directories(${CMAKE_SOURCE_DIR}/source/geometry/solids/CSG/include)
|
|---|
| 26 | include_directories(${CMAKE_SOURCE_DIR}/source/geometry/solids/specific/include)
|
|---|
| 27 | include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
|
|---|
| 28 | include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
|---|
| 29 | include_directories(${CMAKE_SOURCE_DIR}/source/graphics_reps/include)
|
|---|
| 30 | include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
|
|---|
| 31 | include_directories(${CMAKE_SOURCE_DIR}/source/interfaces/basic/include)
|
|---|
| 32 | include_directories(${CMAKE_SOURCE_DIR}/source/interfaces/common/include)
|
|---|
| 33 | include_directories(${CMAKE_SOURCE_DIR}/source/tracking/include)
|
|---|
| 34 | include_directories(${CMAKE_SOURCE_DIR}/source/visualization/externals/gl2ps/include)
|
|---|
| 35 | include_directories(${CMAKE_SOURCE_DIR}/source/visualization/management/include)
|
|---|
| 36 | include_directories(${CMAKE_SOURCE_DIR}/source/visualization/modeling/include)
|
|---|
| 37 |
|
|---|
| 38 | #
|
|---|
| 39 | # Module has optional sources
|
|---|
| 40 | #
|
|---|
| 41 | include(Geant4MacroDefineModule)
|
|---|
| 42 |
|
|---|
| 43 | #
|
|---|
| 44 | # Define the core sources, includes and libraries which all Geant4
|
|---|
| 45 | # OpenGL implementations use
|
|---|
| 46 | #
|
|---|
| 47 | set(G4VIS_MODULE_OPENGL_HEADERS
|
|---|
| 48 | G4OpenGL.hh
|
|---|
| 49 | G4OpenGLImmediateViewer.hh
|
|---|
| 50 | G4OpenGLImmediateSceneHandler.hh
|
|---|
| 51 | G4OpenGLViewer.hh
|
|---|
| 52 | G4OpenGLStoredViewer.hh
|
|---|
| 53 | G4OpenGLStoredSceneHandler.hh
|
|---|
| 54 | G4OpenGLBitMapStore.hh
|
|---|
| 55 | G4OpenGLFontBaseStore.hh
|
|---|
| 56 | G4OpenGLSceneHandler.hh
|
|---|
| 57 | G4OpenGLSceneHandler.icc
|
|---|
| 58 | G4OpenGLViewerMessenger.hh
|
|---|
| 59 | G4OpenGLTransform3D.hh
|
|---|
| 60 | )
|
|---|
| 61 |
|
|---|
| 62 | set(G4VIS_MODULE_OPENGL_SOURCES
|
|---|
| 63 | G4OpenGLImmediateViewer.cc
|
|---|
| 64 | G4OpenGLImmediateSceneHandler.cc
|
|---|
| 65 | G4OpenGLViewer.cc
|
|---|
| 66 | G4OpenGLStoredViewer.cc
|
|---|
| 67 | G4OpenGLStoredSceneHandler.cc
|
|---|
| 68 | G4OpenGLBitMapStore.cc
|
|---|
| 69 | G4OpenGLFontBaseStore.cc
|
|---|
| 70 | G4OpenGLSceneHandler.cc
|
|---|
| 71 | G4OpenGLViewerMessenger.cc
|
|---|
| 72 | G4OpenGLTransform3D.cc
|
|---|
| 73 | )
|
|---|
| 74 |
|
|---|
| 75 | #
|
|---|
| 76 | # May need OpenGL include here
|
|---|
| 77 | #
|
|---|
| 78 | include_directories(${OPENGL_INCLUDE_DIR})
|
|---|
| 79 | set(G4VIS_MODULE_OPENGL_LINK_LIBRARIES ${OPENGL_LIBRARIES})
|
|---|
| 80 |
|
|---|
| 81 | #
|
|---|
| 82 | # All of the above files must have the G4VIS_BUILD_OPENGL_DRIVER definition
|
|---|
| 83 | #
|
|---|
| 84 | GEANT4_ADD_COMPILE_DEFINITIONS(SOURCES ${G4VIS_MODULE_OPENGL_SOURCES}
|
|---|
| 85 | COMPILE_DEFINITIONS G4VIS_BUILD_OPENGL_DRIVER)
|
|---|
| 86 |
|
|---|
| 87 |
|
|---|
| 88 | #
|
|---|
| 89 | # Qt only if selected
|
|---|
| 90 | #
|
|---|
| 91 | if(GEANT4_USE_QT)
|
|---|
| 92 | #
|
|---|
| 93 | # Add in the extra Qt GL sources
|
|---|
| 94 | #
|
|---|
| 95 | list(APPEND G4VIS_MODULE_OPENGL_HEADERS
|
|---|
| 96 | G4OpenGLImmediateQt.hh
|
|---|
| 97 | G4OpenGLImmediateQtViewer.hh
|
|---|
| 98 | G4OpenGLQtExportDialog.hh
|
|---|
| 99 | G4OpenGLQtMovieDialog.hh
|
|---|
| 100 | G4OpenGLQtViewer.hh
|
|---|
| 101 | G4OpenGLStoredQt.hh
|
|---|
| 102 | G4OpenGLStoredQtViewer.hh)
|
|---|
| 103 |
|
|---|
| 104 | list(APPEND G4VIS_MODULE_OPENGL_SOURCES
|
|---|
| 105 | G4OpenGLImmediateQt.cc
|
|---|
| 106 | G4OpenGLImmediateQtViewer.cc
|
|---|
| 107 | G4OpenGLQtExportDialog.cc
|
|---|
| 108 | G4OpenGLQtMovieDialog.cc
|
|---|
| 109 | G4OpenGLQtViewer.cc
|
|---|
| 110 | G4OpenGLStoredQt.cc
|
|---|
| 111 | G4OpenGLStoredQtViewer.cc)
|
|---|
| 112 |
|
|---|
| 113 |
|
|---|
| 114 | # Include the UseQt file to build the moc wrappers
|
|---|
| 115 | include(${QT_USE_FILE})
|
|---|
| 116 |
|
|---|
| 117 | # Add the moc sources - must use absolute path to the files
|
|---|
| 118 | QT4_WRAP_CPP(G4OPENGL_MOC_SOURCES
|
|---|
| 119 | ${CMAKE_SOURCE_DIR}/source/visualization/OpenGL/include/G4OpenGLQtExportDialog.hh
|
|---|
| 120 | ${CMAKE_SOURCE_DIR}/source/visualization/OpenGL/include/G4OpenGLQtMovieDialog.hh
|
|---|
| 121 | ${CMAKE_SOURCE_DIR}/source/visualization/OpenGL/include/G4OpenGLQtViewer.hh
|
|---|
| 122 | OPTIONS -DG4VIS_BUILD_OPENGLQT_DRIVER)
|
|---|
| 123 |
|
|---|
| 124 | list(APPEND G4VIS_MODULE_OPENGL_SOURCES ${G4OPENGL_MOC_SOURCES})
|
|---|
| 125 |
|
|---|
| 126 | # Add the definitions
|
|---|
| 127 | # Argh.. Have to remember about INTY and UI because of their use...
|
|---|
| 128 | GEANT4_ADD_COMPILE_DEFINITIONS(SOURCES ${G4VIS_MODULE_OPENGL_SOURCES}
|
|---|
| 129 | COMPILE_DEFINITIONS
|
|---|
| 130 | G4VIS_BUILD_OPENGL_DRIVER;G4VIS_BUILD_OPENGLQT_DRIVER;G4INTY_BUILD_QT;G4UI_BUILD_QT_SESSION)
|
|---|
| 131 |
|
|---|
| 132 | # And for the moc files because these are in the build tree
|
|---|
| 133 | set_source_files_properties(${G4OPENGL_MOC_SOURCES}
|
|---|
| 134 | PROPERTIES
|
|---|
| 135 | COMPILE_DEFINITIONS
|
|---|
| 136 | "G4VIS_BUILD_OPENGL_DRIVER;G4VIS_BUILD_OPENGLQT_DRIVER"
|
|---|
| 137 | )
|
|---|
| 138 |
|
|---|
| 139 | # Add in Qt libraries
|
|---|
| 140 | list(APPEND G4VIS_MODULE_OPENGL_LINK_LIBRARIES ${QT_LIBRARIES})
|
|---|
| 141 |
|
|---|
| 142 | endif()
|
|---|
| 143 |
|
|---|
| 144 | #
|
|---|
| 145 | # Define the Geant4 Module.
|
|---|
| 146 | #
|
|---|
| 147 | GEANT4_DEFINE_MODULE(NAME G4OpenGL
|
|---|
| 148 | HEADERS
|
|---|
| 149 | ${G4VIS_MODULE_OPENGL_HEADERS}
|
|---|
| 150 | SOURCES
|
|---|
| 151 | ${G4VIS_MODULE_OPENGL_SOURCES}
|
|---|
| 152 | GRANULAR_DEPENDENCIES
|
|---|
| 153 | G4UIbasic
|
|---|
| 154 | G4UIcommon
|
|---|
| 155 | G4csg
|
|---|
| 156 | G4geometrymng
|
|---|
| 157 | G4gl2ps
|
|---|
| 158 | G4globman
|
|---|
| 159 | G4graphics_reps
|
|---|
| 160 | G4hits
|
|---|
| 161 | G4intercoms
|
|---|
| 162 | G4modeling
|
|---|
| 163 | G4specsolids
|
|---|
| 164 | G4tracking
|
|---|
| 165 | G4vis_management
|
|---|
| 166 | GLOBAL_DEPENDENCIES
|
|---|
| 167 | G4digits_hits
|
|---|
| 168 | G4geometry
|
|---|
| 169 | G4gl2ps
|
|---|
| 170 | G4global
|
|---|
| 171 | G4graphics_reps
|
|---|
| 172 | G4intercoms
|
|---|
| 173 | G4interfaces
|
|---|
| 174 | G4modeling
|
|---|
| 175 | G4tracking
|
|---|
| 176 | G4vis_management
|
|---|
| 177 | LINK_LIBRARIES
|
|---|
| 178 | ${G4VIS_MODULE_OPENGL_LINK_LIBRARIES}
|
|---|
| 179 | )
|
|---|
| 180 |
|
|---|
| 181 | # List any source specific properties here
|
|---|
| 182 |
|
|---|