git-svn-id: svn://db.shs.com.ru/libs@757 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -27,6 +27,17 @@ else()
|
||||
endif()
|
||||
target_link_libraries(${PROJECT_NAME} ${PIP_LIBRARY})
|
||||
|
||||
# Apple crosscompiling rpath patch
|
||||
if (APPLE AND CMAKE_CROSSCOMPILING AND CMAKE_MACOSX_RPATH)
|
||||
foreach(_RP ${CMAKE_INSTALL_RPATH})
|
||||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||
COMMAND "${CMAKE_INSTALL_NAME_TOOL}"
|
||||
"-add_rpath" "${_RP}"
|
||||
"$<TARGET_FILE_DIR:${PROJECT_NAME}>/$<TARGET_FILE_NAME:${PROJECT_NAME}>"
|
||||
COMMENT "Add to ${PROJECT_NAME} rpath \"${_RP}\"")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
add_executable(cdutilstest "cdutilstest.cpp" "cdtest.h")
|
||||
target_link_libraries(cdutilstest ${PIP_LIBRARY} ${PROJECT_NAME})
|
||||
message(STATUS "Building ${PROJECT_NAME}")
|
||||
@@ -55,6 +66,8 @@ if(NOT LIBPROJECT)
|
||||
endif()
|
||||
|
||||
if(LIB)
|
||||
list(APPEND _ALL_TARGETS ${PROJECT_NAME})
|
||||
set(_ALL_TARGETS ${_ALL_TARGETS} PARENT_SCOPE)
|
||||
if(WIN32)
|
||||
install(FILES ${HDRS_UTILS} DESTINATION ${MINGW_INCLUDE})
|
||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_LIB})
|
||||
|
||||
Reference in New Issue
Block a user