BUG: Updated SimpleInstall tests for new export/import interface.
This commit is contained in:
parent
5594ad4885
commit
1332b55794
@ -145,10 +145,10 @@ IF(STAGE2)
|
|||||||
# try to import the exported targets again
|
# try to import the exported targets again
|
||||||
SET(SimpleInstallS1_DIR ${CMAKE_INSTALL_PREFIX}/MyTest/lib)
|
SET(SimpleInstallS1_DIR ${CMAKE_INSTALL_PREFIX}/MyTest/lib)
|
||||||
FIND_PACKAGE(SimpleInstallS1 REQUIRED)
|
FIND_PACKAGE(SimpleInstallS1 REQUIRED)
|
||||||
GET_TARGET_PROPERTY(simpleInstallLocation S1_SimpleInstall LOCATION)
|
GET_TARGET_PROPERTY(simpleInstallImported S1_SimpleInstall IMPORTED)
|
||||||
IF(NOT simpleInstallLocation)
|
IF(NOT simpleInstallImported)
|
||||||
MESSAGE(FATAL_ERROR "Target S1_SimpleInstall could not be imported, location: ${simpleInstallLocation}")
|
MESSAGE(FATAL_ERROR "Target S1_SimpleInstall could not be imported")
|
||||||
ENDIF(NOT simpleInstallLocation)
|
ENDIF(NOT simpleInstallImported)
|
||||||
|
|
||||||
ELSE(STAGE2)
|
ELSE(STAGE2)
|
||||||
# Wipe out the install directory to do a fresh test.
|
# Wipe out the install directory to do a fresh test.
|
||||||
@ -214,11 +214,11 @@ ELSE(STAGE2)
|
|||||||
# "export" the targets collected in "SimpleInstallS1"
|
# "export" the targets collected in "SimpleInstallS1"
|
||||||
INSTALL(EXPORT SimpleInstallS1 FILE SimpleInstallS1Config.cmake
|
INSTALL(EXPORT SimpleInstallS1 FILE SimpleInstallS1Config.cmake
|
||||||
DESTINATION MyTest/lib
|
DESTINATION MyTest/lib
|
||||||
PREFIX S1_ )
|
NAMESPACE S1_ )
|
||||||
|
|
||||||
EXPORT(TARGETS SimpleInstall test1 test2 test3
|
EXPORT(TARGETS SimpleInstall test1 test2 test3
|
||||||
FILE "${CMAKE_CURRENT_BINARY_DIR}/SimpleInstallS1Config.cmake"
|
FILE "${CMAKE_CURRENT_BINARY_DIR}/SimpleInstallS1Config.cmake"
|
||||||
PREFIX S2_ )
|
NAMESPACE S2_ )
|
||||||
|
|
||||||
ADD_SUBDIRECTORY(scripts)
|
ADD_SUBDIRECTORY(scripts)
|
||||||
|
|
||||||
|
@ -145,10 +145,10 @@ IF(STAGE2)
|
|||||||
# try to import the exported targets again
|
# try to import the exported targets again
|
||||||
SET(SimpleInstallS1_DIR ${CMAKE_INSTALL_PREFIX}/MyTest/lib)
|
SET(SimpleInstallS1_DIR ${CMAKE_INSTALL_PREFIX}/MyTest/lib)
|
||||||
FIND_PACKAGE(SimpleInstallS1 REQUIRED)
|
FIND_PACKAGE(SimpleInstallS1 REQUIRED)
|
||||||
GET_TARGET_PROPERTY(simpleInstallLocation S1_SimpleInstall LOCATION)
|
GET_TARGET_PROPERTY(simpleInstallImported S1_SimpleInstall IMPORTED)
|
||||||
IF(NOT simpleInstallLocation)
|
IF(NOT simpleInstallImported)
|
||||||
MESSAGE(FATAL_ERROR "Target S1_SimpleInstall could not be imported, location: ${simpleInstallLocation}")
|
MESSAGE(FATAL_ERROR "Target S1_SimpleInstall could not be imported")
|
||||||
ENDIF(NOT simpleInstallLocation)
|
ENDIF(NOT simpleInstallImported)
|
||||||
|
|
||||||
ELSE(STAGE2)
|
ELSE(STAGE2)
|
||||||
# Wipe out the install directory to do a fresh test.
|
# Wipe out the install directory to do a fresh test.
|
||||||
@ -214,11 +214,11 @@ ELSE(STAGE2)
|
|||||||
# "export" the targets collected in "SimpleInstallS1"
|
# "export" the targets collected in "SimpleInstallS1"
|
||||||
INSTALL(EXPORT SimpleInstallS1 FILE SimpleInstallS1Config.cmake
|
INSTALL(EXPORT SimpleInstallS1 FILE SimpleInstallS1Config.cmake
|
||||||
DESTINATION MyTest/lib
|
DESTINATION MyTest/lib
|
||||||
PREFIX S1_ )
|
NAMESPACE S1_ )
|
||||||
|
|
||||||
EXPORT(TARGETS SimpleInstall test1 test2 test3
|
EXPORT(TARGETS SimpleInstall test1 test2 test3
|
||||||
FILE "${CMAKE_CURRENT_BINARY_DIR}/SimpleInstallS1Config.cmake"
|
FILE "${CMAKE_CURRENT_BINARY_DIR}/SimpleInstallS1Config.cmake"
|
||||||
PREFIX S2_ )
|
NAMESPACE S2_ )
|
||||||
|
|
||||||
ADD_SUBDIRECTORY(scripts)
|
ADD_SUBDIRECTORY(scripts)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user