@@ -22,13 +22,14 @@ cmake_minimum_required(VERSION 3.2.0 FATAL_ERROR)
2222include (ExternalProject)
2323# Include needed macros
2424include (common_macros.cmake)
25- if (MSVC )
26- # Set the configuration type
27- set (CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE} )
28- endif ()
2925
3026project (igdrcl)
3127
28+ if (CMAKE_CONFIGURATION_TYPES )
29+ # Set custom build types for multi-configuration generators
30+ set (CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE} )
31+ endif ()
32+
3233set (BRANCH_DIR_SUFFIX "/" )
3334
3435if (TR_DEPRECATED)
@@ -183,33 +184,6 @@ if(WIN32)
183184 message (STATUS "WDK include paths: ${WDK_INCLUDE_PATHS} " )
184185endif ()
185186
186- # GmmLib detection
187- if (NOT GMMUMD_LIB_NAME)
188- if (TARGET gmm_umd)
189- set (GMMUMD_LIB_NAME "gmm_umd" )
190- else ()
191- if (GMM_SOURCE_DIR)
192- get_filename_component (GMM_SOURCE_DIR "${GMM_SOURCE_DIR} " ABSOLUTE )
193- else (GMM_SOURCE_DIR)
194- get_filename_component (GMM_SOURCE_DIR_tmp "${CMAKE_SOURCE_DIR} /../gmmlib" ABSOLUTE )
195- if (IS_DIRECTORY "${GMM_SOURCE_DIR_tmp} " )
196- set (GMM_SOURCE_DIR "${GMM_SOURCE_DIR_tmp} " )
197- endif ()
198- endif ()
199- if (NOT IS_DIRECTORY "${GMM_SOURCE_DIR} " )
200- message (FATAL_ERROR "GmmLib not found!" )
201- endif ()
202-
203- message (STATUS "GmmLib source dir is: ${GMM_SOURCE_DIR} " )
204- add_subdirectory ("${GMM_SOURCE_DIR} " "${IGDRCL_BUILD_DIR} /gmmlib" )
205-
206- if (NOT GMMUMD_LIB_NAME)
207- set (GMMUMD_LIB_NAME "gmm_umd" )
208- endif ()
209- endif ()
210- endif ()
211- set (UMKM_SHAREDDATA_INCLUDE_PATHS $<TARGET_PROPERTY:${GMMUMD_LIB_NAME} ,INTERFACE_INCLUDE_DIRECTORIES >)
212-
213187# Intel Graphics Compiler detection
214188if (NOT IGC__IGC_TARGETS)
215189 if (IGC_DIR)
@@ -238,6 +212,33 @@ foreach(TARGET_tmp ${IGDRCL__IGC_TARGETS})
238212endforeach (TARGET_tmp)
239213message (STATUS "IGC targets: ${IGDRCL__IGC_TARGETS} " )
240214
215+ # GmmLib detection
216+ if (NOT GMMUMD_LIB_NAME)
217+ if (TARGET gmm_umd)
218+ set (GMMUMD_LIB_NAME "gmm_umd" )
219+ else ()
220+ if (GMM_SOURCE_DIR)
221+ get_filename_component (GMM_SOURCE_DIR "${GMM_SOURCE_DIR} " ABSOLUTE )
222+ else (GMM_SOURCE_DIR)
223+ get_filename_component (GMM_SOURCE_DIR_tmp "${CMAKE_SOURCE_DIR} /../gmmlib" ABSOLUTE )
224+ if (IS_DIRECTORY "${GMM_SOURCE_DIR_tmp} " )
225+ set (GMM_SOURCE_DIR "${GMM_SOURCE_DIR_tmp} " )
226+ endif ()
227+ endif ()
228+ if (NOT IS_DIRECTORY "${GMM_SOURCE_DIR} " )
229+ message (FATAL_ERROR "GmmLib not found!" )
230+ endif ()
231+
232+ message (STATUS "GmmLib source dir is: ${GMM_SOURCE_DIR} " )
233+ add_subdirectory ("${GMM_SOURCE_DIR} " "${IGDRCL_BUILD_DIR} /gmmlib" )
234+
235+ if (NOT GMMUMD_LIB_NAME)
236+ set (GMMUMD_LIB_NAME "gmm_umd" )
237+ endif ()
238+ endif ()
239+ endif ()
240+ set (UMKM_SHAREDDATA_INCLUDE_PATHS $<TARGET_PROPERTY:${GMMUMD_LIB_NAME} ,INTERFACE_INCLUDE_DIRECTORIES >)
241+
241242# Instrumentation detection
242243if (NOT INSTRUMENTATION_LIB_NAME)
243244 if (INSTRUMENTATION_SOURCE_DIR)
0 commit comments