mirror of
https://gitee.com/openharmony/third_party_vulkan-loader
synced 2024-11-27 09:21:56 +00:00
cmake: find libdrm with pkg-config
This commit is contained in:
parent
2d2ae54aec
commit
add717e09c
@ -14,12 +14,17 @@ configure_file (
|
|||||||
)
|
)
|
||||||
|
|
||||||
include_directories("${PROJECT_BINARY_DIR}")
|
include_directories("${PROJECT_BINARY_DIR}")
|
||||||
|
|
||||||
# xgl global includes
|
|
||||||
include_directories("/usr/include/drm")
|
|
||||||
include_directories("${PROJECT_SOURCE_DIR}/include")
|
include_directories("${PROJECT_SOURCE_DIR}/include")
|
||||||
|
|
||||||
|
|
||||||
|
include(FindPkgConfig)
|
||||||
|
pkg_check_modules(LIBDRM REQUIRED libdrm)
|
||||||
|
if (NOT LIBDRM_FOUND)
|
||||||
|
message(FATAL_ERROR "libdrm not found")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall")
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")
|
||||||
include(GetGitRevisionDescription)
|
include(GetGitRevisionDescription)
|
||||||
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
||||||
|
Loading…
Reference in New Issue
Block a user