@@ -7,15 +7,16 @@ cmake_minimum_required(VERSION 3.11)
77
88set (SYSTEM_INFO_BUILD_RDF_INTERFACES ON )
99
10- set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR} /cmake" )
10+
11+ set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR} /cmake" )
1112include (dev_tools )
1213
1314## Specify the top level name of the project - this will define the solution name for Visual Studio
1415project (RRA)
1516
1617# Define version information
1718set (RRA_MAJOR_VERSION 1)
18- set (RRA_MINOR_VERSION 8 )
19+ set (RRA_MINOR_VERSION 9 )
1920if (NOT RRA_BUGFIX_NUMBER)
2021 set (RRA_BUGFIX_NUMBER 0)
2122endif ()
@@ -26,8 +27,8 @@ string(TIMESTAMP DATE "\"%m/%d/%Y\"")
2627string (TIMESTAMP YEAR "%Y" )
2728string (TIMESTAMP YEAR_STRING "\" %Y\" " )
2829
29- configure_file ("${CMAKE_SOURCE_DIR } /Buildinfo.properties.in" "${CMAKE_SOURCE_DIR } /Buildinfo.properties" )
30- configure_file ("${CMAKE_SOURCE_DIR } /source/frontend/version.h.in" "${CMAKE_SOURCE_DIR } /source/frontend/version.h" )
30+ configure_file ("${CMAKE_CURRENT_SOURCE_DIR } /Buildinfo.properties.in" "${CMAKE_CURRENT_SOURCE_DIR } /Buildinfo.properties" )
31+ configure_file ("${CMAKE_CURRENT_SOURCE_DIR } /source/frontend/version.h.in" "${CMAKE_CURRENT_SOURCE_DIR } /source/frontend/version.h" )
3132
3233# Add cmake utilities
3334list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /cmake" )
@@ -49,19 +50,23 @@ ENDIF()
4950
5051# As default for RRA, include the debug status in filename - but not the platform bitness
5152set (CMAKE_DEBUG_POSTFIX -d)
52- set (CMAKE_RELEASE_POSTFIX )
53+ set (CMAKE_RELEASE_POSTFIX )
54+
5355
5456# Add definitions for supported hardware
5557add_definitions (-DGPURT_BUILD_RTIP3 )
5658add_definitions (-DGPURT_BUILD_RTIP3_1 )
5759
60+ # Add definitions needed by GLM
61+ add_definitions (-DGLM_ENABLE_EXPERIMENTAL )
62+
5863# Add for CentOS compiler warning
5964add_definitions (-DJSON_SKIP_UNSUPPORTED_COMPILER_CHECK )
6065
61- include_directories ("${PROJECT_SOURCE_DIR } /external/" )
62- include_directories ("${PROJECT_SOURCE_DIR } /external/qt_common/" )
63- include_directories ("${PROJECT_SOURCE_DIR } /external/third_party/" )
64- include_directories ("${PROJECT_SOURCE_DIR } /external/third_party/vulkan/include/" )
66+ include_directories ("${CMAKE_CURRENT_SOURCE_DIR } /external/" )
67+ include_directories ("${CMAKE_CURRENT_SOURCE_DIR } /external/qt_common/" )
68+ include_directories ("${CMAKE_CURRENT_SOURCE_DIR } /external/third_party/" )
69+ include_directories ("${CMAKE_CURRENT_SOURCE_DIR } /external/third_party/vulkan/include/" )
6570
6671# Global compiler options
6772IF (WIN32 )
@@ -102,10 +107,19 @@ MACRO(SOURCE_GROUP_BY_FOLDER target)
102107 ENDIF (files )
103108ENDMACRO (SOURCE_GROUP_BY_FOLDER )
104109
105- add_subdirectory (external/qt_common qt_common )
106- add_subdirectory (external/rdf/imported/zstd )
107- add_subdirectory (external/rdf/rdf )
108- add_subdirectory (external/system_info_utils )
110+ if (NOT TARGET QtUtils)
111+ add_subdirectory (external/qt_common qt_common )
112+ endif ()
113+
114+ if (NOT TARGET amdrdf)
115+ add_subdirectory (external/rdf/imported/zstd )
116+ add_subdirectory (external/rdf/rdf )
117+ endif ()
118+
119+ if (NOT TARGET system_info)
120+ add_subdirectory (external/system_info_utils )
121+ endif ()
122+
109123add_subdirectory (source /backend backend )
110124add_subdirectory (source /frontend frontend )
111125add_subdirectory (source /renderer renderer )
@@ -126,25 +140,20 @@ ENDIF(WIN32)
126140
127141## Copy Documentation and Samples to output directory. Note - this target is intentionally not included in
128142## the default project build. It needs to be explicitly built as a separate project
129-
130- # Determine where the build process will be placing the binary files
131- # This is evaluated at project build time - not at CMake generation time
132- set (BUILD_ROOT $<$<CONFIG :debug >:${CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG} >$<$<CONFIG :release >:${CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE} >)
133-
134- set (DOCS_OUTPUT_DIR ${BUILD_ROOT} )
143+ set (DOCS_OUTPUT_DIR ${CMAKE_BINARY_DIR} )
135144
136145# group sphinx source files into a sphinx folder
137- file (GLOB SPHINX_DOC_FILES ${SPHINX_DOC_FILES} ${CMAKE_SOURCE_DIR } /documentation/source/*.rst )
138- set (SPHINX_DOC_MAIN ${CMAKE_SOURCE_DIR } /documentation/source/conf.py)
146+ file (GLOB SPHINX_DOC_FILES ${SPHINX_DOC_FILES} ${CMAKE_CURRENT_SOURCE_DIR } /documentation/source/*.rst )
147+ set (SPHINX_DOC_MAIN ${CMAKE_CURRENT_SOURCE_DIR } /documentation/source/conf.py)
139148set (ALL_SPHINX_FILES ${SPHINX_DOC_FILES} ${SPHINX_DOC_MAIN} )
140149source_group ("sphinx" FILES ${ALL_SPHINX_FILES} )
141150
142151# group release documents into a release_docs folder
143152set (RELEASE_DOCS_IN_ROOT
144- ${CMAKE_SOURCE_DIR } /README.md
145- ${CMAKE_SOURCE_DIR } /RELEASE_NOTES.txt
146- ${CMAKE_SOURCE_DIR } /NOTICES.txt
147- ${CMAKE_SOURCE_DIR } /LICENSE.txt
153+ ${CMAKE_CURRENT_SOURCE_DIR } /README.md
154+ ${CMAKE_CURRENT_SOURCE_DIR } /RELEASE_NOTES.txt
155+ ${CMAKE_CURRENT_SOURCE_DIR } /NOTICES.txt
156+ ${CMAKE_CURRENT_SOURCE_DIR } /LICENSE.txt
148157)
149158set (RELEASE_DOCS ${RELEASE_DOCS_IN_ROOT} )
150159source_group ("release_docs" FILES ${RELEASE_DOCS} )
@@ -160,25 +169,25 @@ if(SPHINX_EXECUTABLE)
160169 # this ensures the sphinx docs are built everytime you ask to build the Documentation target
161170 # Sphinx has proper dependency checking, so this works as expected.
162171 # Once built, clean up any unneeded files.
163- add_custom_target (Documentation ALL SOURCES ${ALL_SPHINX_FILES} ${RELEASE_DOCS} DEPENDS sphinx_output )
172+ add_custom_target (RRADocumentation ALL SOURCES ${ALL_SPHINX_FILES} ${RELEASE_DOCS} DEPENDS sphinx_output )
164173 add_custom_command (MAIN_DEPENDENCY ${SPHINX_DOC_MAIN} OUTPUT sphinx_output
165174 COMMAND ${CMAKE_COMMAND} -E echo "building Sphinx documentation"
166- COMMAND ${SPHINX_EXECUTABLE} ${CMAKE_SOURCE_DIR } /documentation/source ${DOCS_OUTPUT_DIR} /help/rra/. -t ${SPHINX_OPTION}
175+ COMMAND ${SPHINX_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR } /documentation/source ${DOCS_OUTPUT_DIR} /help/rra/. -t ${SPHINX_OPTION}
167176 COMMAND ${CMAKE_COMMAND} -E remove_directory ${DOCS_OUTPUT_DIR} /help/rra/.doctrees
168177 )
169178 install (DIRECTORY ${DOCS_OUTPUT_DIR} /help DESTINATION . COMPONENT apps)
170179else ()
171180 message (WARNING "SPHINX_EXECUTABLE (sphinx-build) is not found! Documentation will not be built!" )
172181 # If the sphinx binary isn't found, then just create the Documentation project with only the release docs in it.
173- add_custom_target (Documentation ALL SOURCES ${ALL_SPHINX_FILES} ${RELEASE_DOCS} )
182+ add_custom_target (RRADocumentation ALL SOURCES ${ALL_SPHINX_FILES} ${RELEASE_DOCS} )
174183endif ()
175184
176- add_custom_command (TARGET Documentation POST_BUILD
185+ add_custom_command (TARGET RRADocumentation POST_BUILD
177186 COMMAND ${CMAKE_COMMAND} -E echo "copying Documentation to output directory"
178187 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${RELEASE_DOCS_IN_ROOT} ${DOCS_OUTPUT_DIR} /.
179188 COMMAND ${CMAKE_COMMAND} -E echo "copying Samples to output directory"
180189 COMMAND ${CMAKE_COMMAND} -E make_directory ${DOCS_OUTPUT_DIR} /samples
181- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR } /samples/landscape.rra ${DOCS_OUTPUT_DIR} /samples/sample_trace.rra
190+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR } /samples/landscape.rra ${DOCS_OUTPUT_DIR} /samples/sample_trace.rra
182191)
183192
184193install (FILES
@@ -213,5 +222,3 @@ cpack_add_component(debug
213222 DISPLAY_NAME "Debug Symbols"
214223 DESCRIPTION "Debug Symbols" )
215224
216-
217-
0 commit comments