]> Git trees. - libqmvoc.git/commitdiff
move the test in an own subdir; no need to link to kdeui, kdecore is enough
authorPino Toscano <pino@kde.org>
Wed, 4 Apr 2007 21:58:27 +0000 (21:58 +0000)
committerPino Toscano <pino@kde.org>
Wed, 4 Apr 2007 21:58:27 +0000 (21:58 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=650589

libscience/CMakeLists.txt
libscience/tests/CMakeLists.txt [new file with mode: 0644]
libscience/tests/xmlreadingtest.cpp [moved from libscience/xmlreadingtest.cpp with 100% similarity]

index 7493561ddcc684547dcac4ed046ec0c9cd67a8d7..a07f115cf9fbd971fe4711eb5c67504fff3eeb2f 100644 (file)
@@ -1,15 +1,10 @@
 add_subdirectory(data)
+add_subdirectory(tests)
 
 if(OPENBABEL2_FOUND AND OPENGL_FOUND AND EIGEN_FOUND)
 add_subdirectory(compoundviewer)
 endif(OPENBABEL2_FOUND AND OPENGL_FOUND AND EIGEN_FOUND)
 
-#comment these lines out if you don't want to build the test
-set(parsertest_SRCS xmlreadingtest.cpp)
-kde4_add_executable(parsertest ${parsertest_SRCS})
-target_link_libraries(parsertest science)
-#end tests
-
 set(science_LIB_SRCS
    element.cpp
    spectrum.cpp
@@ -27,7 +22,7 @@ kde4_automoc(${science_LIB_SRCS})
 
 kde4_add_library(science SHARED ${science_LIB_SRCS})
 
-target_link_libraries(science  ${KDE4_KDEUI_LIBS} ${QT_QTXML_LIBRARY} )
+target_link_libraries(science  ${KDE4_KDECORE_LIBS} ${QT_QTXML_LIBRARY} )
 
 set_target_properties(science PROPERTIES VERSION 4.0.0 SOVERSION 4 )
 install(TARGETS science  DESTINATION ${LIB_INSTALL_DIR} )
diff --git a/libscience/tests/CMakeLists.txt b/libscience/tests/CMakeLists.txt
new file mode 100644 (file)
index 0000000..b4de2bb
--- /dev/null
@@ -0,0 +1,18 @@
+if(KDE4_BUILD_TESTS)
+
+# Tests don't need to go into toplevel/bin, they are fine in the current dir.
+set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
+
+########### next target ###############
+
+set(parsertest_SRCS xmlreadingtest.cpp)
+
+kde4_add_executable(parsertest ${parsertest_SRCS})
+
+target_link_libraries(parsertest science)
+
+
+endif(KDE4_BUILD_TESTS)
+