9e8477e1c9
This commit was ported from old repo. Original author: Ranjith Ramakrishnan <Ranjith.Ramakrishnan@amd.com> For static builds use drm and drm_amdgpu static libraries for linking. Created a separate cmake target file and static library for static use case The config file will include the respective target file based on BUILD_SHARED_LIBS. Default target file will be the one where drm and libdrm_amdgpu shaed libraries are linked. Applications using statically linked cmake targets of hsakmt should install the required static libraries before building. Change-Id: Idf4e1a2b5f18b344f5a9927803756d50c2b33702
21 lines
886 B
CMake
21 lines
886 B
CMake
@PACKAGE_INIT@
|
|
|
|
include( CMakeFindDependencyMacro )
|
|
|
|
# Locate dependent packages here. Finding them propagates usage requirements,
|
|
# if any, to our clients and ensures that their target names are in scope for
|
|
# the build. hsakmt has no cmake project dependencies so there is nothing to
|
|
# find. If we switch to use find_package with external (to ROCm) library
|
|
# dependencies (ie libnuma) then those packages should be located here using
|
|
# find_dependencies as shown below.
|
|
#find_dependency(Bar, 2.0)
|
|
|
|
# If the option is ON link other dependent libraries dynamically
|
|
# If the option is OFF, then link libdrm and libdrm_amdgpu statically
|
|
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
|
|
|
|
if(BUILD_SHARED_LIBS)
|
|
include( "${CMAKE_CURRENT_LIST_DIR}/@HSAKMT_TARGET@Targets.cmake" )
|
|
else()
|
|
include( "${CMAKE_CURRENT_LIST_DIR}/@HSAKMT_STATIC_DRM_TARGET@Targets.cmake" )
|
|
endif() |