Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

use GNUInstallDirs on *nix #60

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ set(CLDNN__GTEST_DIR "${CLDNN__COMMON_DIR}/googletest-fused")
# Build targets settings.

# Path which points to default root directory for compilation output.
set(CLDNN_BUILD__DEFAULT_OUT_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/build/out")
set(CLDNN_BUILD__DEFAULT_OUT_ROOT "${CMAKE_BINARY_DIR}")
set(CLDNN__OUTPUT_DIR, "${CMAKE_BINARY_DIR}")

# Prefix for all targets in internal pass.
set(CLDNN_BUILD__PROJ_NAME_PREFIX "")
Expand Down
36 changes: 29 additions & 7 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -247,17 +247,39 @@ target_link_libraries("${CLDNN_BUILD__PROJ}" ${CLDNN__SYSTEM_LINK_LIBRARIES})

# ========================================== Installation ==============================================

if(UNIX)
include(GNUInstallDirs)
endif(UNIX)


# API headers.
install(DIRECTORY "${CLDNN__API_DIR}/"
if(UNIX)
install(DIRECTORY "${CLDNN__API_DIR}/"
DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}/clDNN"
FILE_PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
)
else()
install(DIRECTORY "${CLDNN__API_DIR}/"
DESTINATION "include/clDNN"
FILE_PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
)
endif(UNIX)

# Binaries.
install(TARGETS "${CLDNN_BUILD__PROJ}"
ARCHIVE DESTINATION "lib"
LIBRARY DESTINATION "lib"
RUNTIME DESTINATION "bin"
INCLUDES DESTINATION "include/clDNN"
)
if(UNIX)
install(TARGETS "${CLDNN_BUILD__PROJ}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}"
RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}"
INCLUDES DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}/clDNN"
)
else()
install(TARGETS "${CLDNN_BUILD__PROJ}"
ARCHIVE DESTINATION "lib"
LIBRARY DESTINATION "lib"
RUNTIME DESTINATION "bin"
INCLUDES DESTINATION "include/clDNN"
)
endif(UNIX)

# ======================================================================================================