cmake_minimum_required(VERSION 2.8)
project(spcore_tests)

#
# Test smart pointer
#

add_executable(test_spcore_smart_ptr test_spcore_smart_ptr.cpp)
target_link_libraries(test_spcore_smart_ptr spcore)
target_link_libraries(test_spcore_smart_ptr testcommon)
target_link_libraries(test_spcore_smart_ptr nvwa)
add_test (NAME test_spcore_smart_ptr COMMAND $<TARGET_FILE:nvwa_loader> $<TARGET_FILE:test_spcore_smart_ptr>)

#
# Test spcore runtime
#

add_executable(test_spcore_runtime test_spcore_runtime.cpp)
target_link_libraries(test_spcore_runtime spcore)
target_link_libraries(test_spcore_runtime testcommon)
target_link_libraries(test_spcore_runtime nvwa)
add_test (NAME test_spcore_runtime COMMAND $<TARGET_FILE:nvwa_loader> $<TARGET_FILE:test_spcore_runtime>)

#
# Test basic types
#

add_executable(test_spcore_basic_types test_spcore_basic_types.cpp)
target_link_libraries(test_spcore_basic_types spcore)
target_link_libraries(test_spcore_basic_types testcommon)
target_link_libraries(test_spcore_basic_types nvwa)
add_test (NAME test_spcore_basic_types COMMAND $<TARGET_FILE:nvwa_loader> $<TARGET_FILE:test_spcore_basic_types>)

#
# Test component
#

add_executable(test_spcore_component test_spcore_component.cpp)
target_link_libraries(test_spcore_component spcore) 
target_link_libraries(test_spcore_component testcommon)
target_link_libraries(test_spcore_component nvwa)
add_test (NAME test_spcore_component COMMAND $<TARGET_FILE:nvwa_loader> $<TARGET_FILE:test_spcore_component>)

#
# Test wx_main_thread
#

add_executable(test_spcore_wx_main_thread test_spcore_wx_main_thread.cpp)
target_link_libraries(test_spcore_wx_main_thread spcore) 
target_link_libraries(test_spcore_wx_main_thread testcommon)
target_link_libraries(test_spcore_wx_main_thread nvwa)
target_link_libraries(test_spcore_wx_main_thread ${wxWidgets_LIBRARIES})
add_test (NAME test_spcore_wx_main_thread COMMAND $<TARGET_FILE:nvwa_loader> $<TARGET_FILE:test_spcore_wx_main_thread>)

#
# Test configuration
#

add_executable(test_spcore_configuration test_spcore_configuration.cpp)
target_link_libraries(test_spcore_configuration spcore) 
target_link_libraries(test_spcore_configuration testcommon)
target_link_libraries(test_spcore_configuration nvwa)
add_test (NAME test_spcore_configuration COMMAND $<TARGET_FILE:nvwa_loader> $<TARGET_FILE:test_spcore_configuration>)
