git-svn-id: svn://db.shs.com.ru/pip@936 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -27,6 +27,20 @@ endif()
|
|||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
|
||||||
|
|
||||||
|
# Apple crosscompiling rpath patch
|
||||||
|
macro(apple_rpath_patch _T)
|
||||||
|
if (APPLE AND CMAKE_CROSSCOMPILING AND CMAKE_MACOSX_RPATH)
|
||||||
|
foreach(_RP ${CMAKE_INSTALL_RPATH})
|
||||||
|
add_custom_command(TARGET ${_T} POST_BUILD
|
||||||
|
COMMAND "${CMAKE_INSTALL_NAME_TOOL}"
|
||||||
|
"-add_rpath" "${_RP}"
|
||||||
|
"$<TARGET_FILE_DIR:${_T}>/$<TARGET_FILE_NAME:${_T}>"
|
||||||
|
COMMENT "Add to ${_T} rpath \"${_RP}\"")
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
# Basic
|
# Basic
|
||||||
macro(gather_src DIR CPP H H_P)
|
macro(gather_src DIR CPP H H_P)
|
||||||
set(CS)
|
set(CS)
|
||||||
@@ -600,6 +614,10 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
foreach(_T ${PIP_LIBS_TARGETS})
|
||||||
|
apple_rpath_patch(${_T})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
if(NOT PIP_FREERTOS)
|
if(NOT PIP_FREERTOS)
|
||||||
|
|
||||||
# Auxiliary
|
# Auxiliary
|
||||||
@@ -639,20 +657,6 @@ if(NOT PIP_FREERTOS)
|
|||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Apple crosscompiling rpath patch
|
|
||||||
if (APPLE AND CMAKE_CROSSCOMPILING AND CMAKE_MACOSX_RPATH)
|
|
||||||
foreach(_T ${PIP_LIBS_TARGETS})
|
|
||||||
foreach(_RP ${CMAKE_INSTALL_RPATH})
|
|
||||||
add_custom_command(TARGET ${_T} POST_BUILD
|
|
||||||
COMMAND "${CMAKE_INSTALL_NAME_TOOL}"
|
|
||||||
"-add_rpath" "${_RP}"
|
|
||||||
"$<TARGET_FILE_DIR:${_T}>/$<TARGET_FILE_NAME:${_T}>"
|
|
||||||
COMMENT "Add to ${_T} rpath \"${_RP}\"")
|
|
||||||
endforeach()
|
|
||||||
endforeach()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Build Documentation
|
# Build Documentation
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ file(GLOB CPPS "*.cpp")
|
|||||||
file(GLOB HDRS "*.h")
|
file(GLOB HDRS "*.h")
|
||||||
add_executable(picloud ${CPPS} ${HDRS})
|
add_executable(picloud ${CPPS} ${HDRS})
|
||||||
target_link_libraries(picloud pip pip_cloud)
|
target_link_libraries(picloud pip pip_cloud)
|
||||||
|
apple_rpath_patch(picloud)
|
||||||
if (DEFINED LIB)
|
if (DEFINED LIB)
|
||||||
install(TARGETS picloud DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
install(TARGETS picloud DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||||
else()
|
else()
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
message(STATUS "Building pip_cmg")
|
message(STATUS "Building pip_cmg")
|
||||||
add_executable(pip_cmg "main.cpp")
|
add_executable(pip_cmg "main.cpp")
|
||||||
target_link_libraries(pip_cmg pip)
|
target_link_libraries(pip_cmg pip)
|
||||||
|
apple_rpath_patch(pip_cmg)
|
||||||
if (DEFINED LIB)
|
if (DEFINED LIB)
|
||||||
install(TARGETS pip_cmg DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
install(TARGETS pip_cmg DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||||
else()
|
else()
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
message(STATUS "Building picrypt")
|
message(STATUS "Building picrypt")
|
||||||
add_executable(picrypt "main.cpp")
|
add_executable(picrypt "main.cpp")
|
||||||
target_link_libraries(picrypt pip pip_crypt)
|
target_link_libraries(picrypt pip pip_crypt)
|
||||||
|
apple_rpath_patch(picrypt)
|
||||||
if (DEFINED LIB)
|
if (DEFINED LIB)
|
||||||
install(TARGETS picrypt DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
install(TARGETS picrypt DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||||
else()
|
else()
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ file(GLOB HDRS "*.h")
|
|||||||
add_executable(pip_rc ${CPPS} ${HDRS})
|
add_executable(pip_rc ${CPPS} ${HDRS})
|
||||||
set (PIRC_LIBS pip)
|
set (PIRC_LIBS pip)
|
||||||
target_link_libraries(pip_rc ${PIRC_LIBS})
|
target_link_libraries(pip_rc ${PIRC_LIBS})
|
||||||
|
apple_rpath_patch(pip_rc)
|
||||||
if (DEFINED LIB)
|
if (DEFINED LIB)
|
||||||
install(TARGETS pip_rc DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
install(TARGETS pip_rc DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||||
else()
|
else()
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ file(GLOB CPPS "*.cpp")
|
|||||||
file(GLOB HDRS "*.h")
|
file(GLOB HDRS "*.h")
|
||||||
add_executable(pisd ${CPPS} ${HDRS})
|
add_executable(pisd ${CPPS} ${HDRS})
|
||||||
target_link_libraries(pisd pip pip_crypt)
|
target_link_libraries(pisd pip pip_crypt)
|
||||||
|
apple_rpath_patch(pisd)
|
||||||
if (DEFINED LIB)
|
if (DEFINED LIB)
|
||||||
install(TARGETS pisd DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
install(TARGETS pisd DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||||
else()
|
else()
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
message(STATUS "Building pip_system_test")
|
message(STATUS "Building pip_system_test")
|
||||||
add_executable(pip_system_test "main.cpp")
|
add_executable(pip_system_test "main.cpp")
|
||||||
target_link_libraries(pip_system_test pip)
|
target_link_libraries(pip_system_test pip)
|
||||||
|
apple_rpath_patch(pip_system_test)
|
||||||
if (DEFINED LIB)
|
if (DEFINED LIB)
|
||||||
install(TARGETS pip_system_test DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
install(TARGETS pip_system_test DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||||
endif ()
|
endif ()
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
message(STATUS "Building pift")
|
message(STATUS "Building pift")
|
||||||
add_executable(pift "main.cpp")
|
add_executable(pift "main.cpp")
|
||||||
target_link_libraries(pift pip)
|
target_link_libraries(pift pip)
|
||||||
|
apple_rpath_patch(pift)
|
||||||
if (DEFINED LIB)
|
if (DEFINED LIB)
|
||||||
install(TARGETS pift DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
install(TARGETS pift DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||||
else()
|
else()
|
||||||
|
|||||||
Reference in New Issue
Block a user