summaryrefslogtreecommitdiffstats
path: root/test/unit/common/CMakeLists.txt
blob: 7d1ae9d47ec51e2a914bbe9f398617c8388fd47c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
set(SRC_DIR ${colobot_SOURCE_DIR}/src)

include_directories(
${SRC_DIR}
${GTEST_INCLUDE_DIR}
)

add_executable(image_test ${SRC_DIR}/common/image.cpp image_test.cpp)
target_link_libraries(image_test ${SDL_LIBRARY} ${SDLIMAGE_LIBRARY} ${PNG_LIBRARIES})

file(COPY colobot.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

add_executable(profile_test ${SRC_DIR}/common/profile.cpp ${SRC_DIR}/common/logger.cpp profile_test.cpp)
set_target_properties(profile_test PROPERTIES COMPILE_DEFINITIONS "DEV_BUILD=1")
target_link_libraries(profile_test gtest ${Boost_LIBRARIES})

add_test(NAME profile_test
         COMMAND ${CMAKE_BINARY_DIR}/profile_test
         WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})