-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
43 lines (34 loc) · 1.35 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
cmake_minimum_required(VERSION 3.20)
project(
${SKBUILD_PROJECT_NAME}
LANGUAGES C CXX
VERSION ${SKBUILD_PROJECT_VERSION})
find_package(Python COMPONENTS Interpreter Development.Module)
if(DEFINED ENV{AF_BUILD_LOCAL_LIBS})
include(FetchContent)
#set(NO_SONAME)
FetchContent_Declare(
arrayfire
GIT_REPOSITORY https://github.com/arrayfire/arrayfire.git
GIT_TAG v3.9
)
#TODO: change package name to match repository/project name?
#set(AF_INSTALL_CMAKE_DIR "${SKBUILD_PROJECT_NAME}")
set(AF_INSTALL_BIN_DIR "arrayfire_wrapper/binaries")
set(AF_INSTALL_CMAKE_DIR "arrayfire_wrapper/binaries")
set(AF_INSTALL_DOC_DIR "arrayfire_wrapper/binaries")
set(AF_INSTALL_EXAMPLE_DIR "arrayfire_wrapper/binaries")
set(AF_INSTALL_INC_DIR "arrayfire_wrapper/binaries")
set(AF_INSTALL_LIB_DIR "arrayfire_wrapper/binaries")
set(FG_INSTALL_LIB_DIR "arrayfire_wrapper/binaries")
FetchContent_MakeAvailable(arrayfire)
endif()
# Testing artifacts
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generated.txt "Testing")
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/generated.txt
DESTINATION arrayfire_wrapper
COMPONENT Generated)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generated_ignored.txt "Testing")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/generated_ignored.txt
DESTINATION arrayfire_wrapper)