-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
38 lines (30 loc) · 1.28 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
cmake_minimum_required(VERSION 3.15)
set(NAME omniorb)
set(VERSION 4.2.3)
project(${NAME} VERSION ${VERSION})
set(ORIGIN "\$\$ORIGIN")
set(BUILD "--build=${CMAKE_HOST_SYSTEM_PROCESSOR}-unknown-linux-gnu")
include(ExternalProject)
ExternalProject_Add(
${NAME}
SOURCE_DIR ${CMAKE_SOURCE_DIR}/omniORB
BINARY_DIR build_omniORB
CONFIGURE_COMMAND
${CMAKE_COMMAND} -E env LDFLAGS=-Wl,-rpath,'${ORIGIN}'
${CMAKE_SOURCE_DIR}/omniORB/configure --prefix=${CMAKE_INSTALL_PREFIX} ${BUILD}
INSTALL_COMMAND make install
COMMAND "sed" "-i.bak" "s=^#!.*python.*$=#!/usr/bin/env python="
"${DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/omniidl"
COMMAND ${CMAKE_COMMAND} "-E" "rm" "${DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/omniidl.bak"
)
ExternalProject_Add(
${NAME}py
SOURCE_DIR ${CMAKE_SOURCE_DIR}/omniORBpy
BINARY_DIR build_omniORBpy
CONFIGURE_COMMAND
${CMAKE_COMMAND} -E env LDFLAGS=-Wl,-rpath,'${ORIGIN}:${ORIGIN}/../..' CPPFLAGS=-I${DESTDIR}${CMAKE_INSTALL_PREFIX}/include/omniORB4/internal
${CMAKE_SOURCE_DIR}/omniORBpy/configure --with-omniorb=${DESTDIR}${CMAKE_INSTALL_PREFIX} --prefix=${CMAKE_INSTALL_PREFIX} ${BUILD}
)
add_dependencies(${NAME}py ${NAME})
# dummy file for install target
install(FILES README.md DESTINATION share/${NAME}/)