Commit 587419db authored by Brad King's avatar Brad King
Browse files

ENH: Update ExportImport test to enforce dependent library paths

  - Build without rpaths
  - Place implementation libs in separate directories
parent f49ec94e
......@@ -41,6 +41,7 @@ add_custom_command(
-DCMAKE_C_FLAGS_MINSIZEREL:STRING=${CMAKE_C_FLAGS_MINSIZEREL}
-DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING=${CMAKE_C_FLAGS_RELWITHDEBINFO}
-DCMAKE_INSTALL_PREFIX:STRING=${ExportImport_BINARY_DIR}/Root
-DCMAKE_SKIP_RPATH:BOOL=ON
)
add_custom_target(ExportTarget ALL DEPENDS ${ExportImport_BINARY_DIR}/ExportProject)
add_dependencies(ExportTarget CleanupTarget)
......@@ -68,6 +69,7 @@ add_custom_command(
-DCMAKE_C_FLAGS_MINSIZEREL:STRING=${CMAKE_C_FLAGS_MINSIZEREL}
-DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING=${CMAKE_C_FLAGS_RELWITHDEBINFO}
-DCMAKE_INSTALL_PREFIX:STRING=${ExportImport_BINARY_DIR}/Root
-DCMAKE_SKIP_RPATH:BOOL=ON
)
add_custom_target(ImportTarget ALL DEPENDS ${ExportImport_BINARY_DIR}/ImportProject)
add_dependencies(ImportTarget ExportTarget)
......
......@@ -10,6 +10,7 @@ add_executable(testExe1 testExe1.c)
target_link_libraries(testExe1 testExe1lib)
add_library(testExe2libImp SHARED testExe2libImp.c)
set_property(TARGET testExe2libImp PROPERTY LIBRARY_OUTPUT_DIRECTORY impl)
add_library(testExe2lib SHARED testExe2lib.c)
target_link_libraries(testExe2lib testExe2libImp)
set_property(TARGET testExe2lib PROPERTY LINK_INTERFACE_LIBRARIES "")
......@@ -22,6 +23,7 @@ add_library(testLib2 STATIC testLib2.c)
target_link_libraries(testLib2 testLib1)
add_library(testLib3Imp SHARED testLib3Imp.c)
set_property(TARGET testLib3Imp PROPERTY LIBRARY_OUTPUT_DIRECTORY impl)
add_library(testLib3 SHARED testLib3.c)
target_link_libraries(testLib3 testLib3Imp)
set_property(TARGET testLib3 PROPERTY LINK_INTERFACE_LIBRARIES "")
......@@ -36,6 +38,13 @@ set_property(TARGET testExe3 PROPERTY MACOSX_BUNDLE 1)
install(
TARGETS
testExe2libImp testLib3Imp
EXPORT exp
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib/impl
ARCHIVE DESTINATION lib/impl
)
install(
TARGETS
testExe1 testLib1 testLib2 testExe2 testLib3 testLib4 testExe3
testExe2lib
EXPORT exp
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment