Преглед на файлове

Merge branch 'fix-misc-configure-errors'

* fix-misc-configure-errors:
  Fix CMake 3.0 configure error when building CTK with testing enabled
  Fix configure error relayed to missing ctkQtTesting cmake module
Jean-Christophe Fillion-Robin преди 10 години
родител
ревизия
ef40fc9d58

+ 2 - 3
Libs/Core/Testing/Cpp/CMakeLists.txt

@@ -9,7 +9,6 @@ ctkMacroBuildLib(
   TARGET_LIBRARIES ${CTK_BASE_LIBRARIES}
   LIBRARY_TYPE "SHARED"
   )
-get_target_property(ctkDummyPluginPATH "CTKDummyPlugin" LOCATION)
 remove_definitions(-DCTKDummyPlugin)
 
 set(KIT ${PROJECT_NAME})
@@ -130,9 +129,9 @@ endif()
 #
 
 SIMPLE_TEST( ctkAbstractFactoryTest1 )
-SIMPLE_TEST( ctkAbstractLibraryFactoryTest1 ${ctkDummyPluginPATH} )
+SIMPLE_TEST( ctkAbstractLibraryFactoryTest1 $<TARGET_FILE:CTKDummyPlugin> )
 SIMPLE_TEST( ctkAbstractObjectFactoryTest1 )
-SIMPLE_TEST( ctkAbstractPluginFactoryTest1 ${ctkDummyPluginPATH} )
+SIMPLE_TEST( ctkAbstractPluginFactoryTest1 $<TARGET_FILE:CTKDummyPlugin> )
 SIMPLE_TEST( ctkAbstractQObjectFactoryTest1 )
 SIMPLE_TEST( ctkBackTraceTest )
 if(HAVE_BFD)

+ 1 - 1
Libs/Testing/CMakeLists.txt

@@ -1,7 +1,7 @@
 project(CTKTesting)
 
 if(CTK_USE_QTTESTING)
-  include(../QtTesting/CMake/ctkQtTesting.cmake)
+  include(${CMAKE_SOURCE_DIR}/Libs/QtTesting/CMake/ctkQtTesting.cmake)
 endif()
 install(FILES
   ctkTest.h

+ 1 - 0
Libs/Visualization/VTK/Widgets/Testing/Cpp/CMakeLists.txt

@@ -98,6 +98,7 @@ set(LIBRARY_NAME ${PROJECT_NAME})
 # If CTK_USE_QTTESTING is ON
 #
 if(CTK_USE_QTTESTING)
+  include(${CMAKE_SOURCE_DIR}/Libs/QtTesting/CMake/ctkQtTesting.cmake)
   ctkQtTesting(Tests TEST_MOC_SOURCES TEST_UI_FORMS Tests_RESOURCES)
 endif()
 

+ 1 - 0
Libs/Widgets/Testing/Cpp/CMakeLists.txt

@@ -196,6 +196,7 @@ set(Tests_MOC_SRCS
   )
 
 if(CTK_USE_QTTESTING)
+  include(${CMAKE_SOURCE_DIR}/Libs/QtTesting/CMake/ctkQtTesting.cmake)
   ctkQtTesting(Tests_SRCS Tests_MOC_SRCS Tests_UI_FORMS Tests_RESOURCES)
 endif()