forked from gemini3d/cmake-python-build
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathffi.cmake
More file actions
34 lines (26 loc) · 662 Bytes
/
ffi.cmake
File metadata and controls
34 lines (26 loc) · 662 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
27
28
29
30
31
32
33
34
# installs CMAKE_INSTALL_PREFIX/lib64/libffi.{a,so}
include(ExternalProject)
if(find)
find_library(libffi NAMES ffi)
endif()
if(libffi)
add_custom_target(ffi)
return()
endif()
if(NOT LIBTOOL_EXECUTABLE)
message(FATAL_ERROR "FFI needs libtool")
endif()
string(JSON ffi_url GET ${json_meta} ffi url)
string(JSON ffi_tag GET ${json_meta} ffi tag)
set(ffi_args
--disable-docs
)
extproj_autotools(ffi ${ffi_url} ${ffi_tag} "${ffi_args}")
ExternalProject_Add_Step(ffi
autogen
COMMAND <SOURCE_DIR>/autogen.sh
DEPENDEES download
DEPENDERS configure
WORKING_DIRECTORY <SOURCE_DIR>
)
# autogen.sh needs to be executed in SOURCE_DIR, not in build directory