[trunk] Prefer the new style cmake: add_test command
[openjpeg.git] / tests / unit / CMakeLists.txt
1 # UNIT TESTS 
2
3 include_directories(
4   ${OPENJPEG_BINARY_DIR}/src/lib/openjp2 # opj_config.h
5   ${OPENJPEG_SOURCE_DIR}/src/lib/openjp2
6 )
7
8 add_executable(testempty0 testempty0.c)
9 add_executable(testempty1 testempty1.c)
10 add_executable(testempty2 testempty2.c)
11
12 target_link_libraries(testempty0 openjp2)
13 target_link_libraries(testempty1 openjp2)
14 target_link_libraries(testempty2 openjp2)
15
16 add_test(NAME testempty0 COMMAND testempty0)
17 add_test(NAME testempty1 COMMAND testempty1)
18 add_test(NAME testempty2 COMMAND testempty2)