-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
26 lines (21 loc) · 787 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
26 lines (21 loc) · 787 Bytes
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
cmake_minimum_required(VERSION 3.22)
project(mymath)
find_package(Halide REQUIRED)
find_package(Python3 REQUIRED Development Interpreter)
set(SRCS "mymath.cpp")
add_library(run_lib SHARED IMPORTED)
set_target_properties(run_lib PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/librun_c_backend_and_native.so)
Python3_add_library(mymath MODULE WITH_SOABI ${SRCS})
target_link_libraries(mymath PRIVATE run_lib)
set_target_properties(
mymath
PROPERTIES
PREFIX ""
OUTPUT_NAME "mymath"
LINKER_LANGUAGE C
)
# add_executable(mymath_c mymath.cpp )
target_include_directories(mymath PUBLIC
"${PROJECT_BINARY_DIR}"
"${PROJECT_SOURCE_DIR}/include"
)