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
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} )
--- /dev/null
+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)
+