-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
42 lines (35 loc) · 1.23 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
cmake_minimum_required(VERSION 3.20)
set(NAME omniorbpy)
set(_NAME omniORBpy)
set(VERSION 4.3.1)
set(EXT tar.bz2)
set(SHA1 90470ee4d7f78c1e0f2e58bc301c1a30b2b8d78f)
project(cmeel-${NAME} VERSION ${VERSION})
find_package(Python REQUIRED COMPONENTS Interpreter)
execute_process(COMMAND "${Python_EXECUTABLE}" "-m" "cmeel" "cmake"
OUTPUT_VARIABLE CMEEL_PREFIX)
string(STRIP "${CMEEL_PREFIX}" CMEEL_PREFIX)
message(STATUS "cmeel prefix: ${CMEEL_PREFIX}.")
if(APPLE)
set(ORIGIN "@loader_path")
set(BUILD "")
else()
set(ORIGIN "\$\$ORIGIN")
set(BUILD "--build=${CMAKE_HOST_SYSTEM_PROCESSOR}-unknown-linux-gnu")
endif()
include(ExternalProject)
ExternalProject_Add(
${NAME}
URL "http://downloads.sourceforge.net/project/omniorb/${_NAME}/${_NAME}-${VERSION}/${_NAME}-${VERSION}.${EXT}"
URL_HASH "SHA1=${SHA1}"
DOWNLOAD_EXTRACT_TIMESTAMP ON
BUILD_IN_SOURCE ON
CONFIGURE_COMMAND
${CMAKE_COMMAND} "-E" "env" "LDFLAGS=-Wl,-rpath,'${ORIGIN}'" "--"
"./configure" "--prefix=${CMAKE_INSTALL_PREFIX}" "${BUILD}"
"--with-omniorb=${CMEEL_PREFIX}"
BUILD_COMMAND "make"
# TEST_COMMAND "make" "check"
INSTALL_COMMAND "make" "install")
# dummy file for install target
install(FILES README.md DESTINATION share/cmeel-${NAME}/)