if(NOT PACKAGING_NSIS)
    set (SRCS pmltest.cpp)
    add_executable(library-pmltest ${SRCS})
    set(PML_LIBRARIES library-pml ${LIBXML2_LIBRARIES})
    target_link_libraries(library-pmltest ${PML_LIBRARIES})
    add_dependencies(library-pmltest library-pml)

    #----------
    # Testing
    #----------
    # TODO build one pml file with every tests in it, use it and check that inputFilename-output-pmltest.pml is identical to inputFilename.pml
    camitk_init_test(library-pmltest)
    # should pass because lmltest run with no arguments shows usage and exit success
    camitk_add_test()

    # should pass because invoking lmltest with a faulty arguments results in printing
    # an "Argument error" message (and exit failure)
    camitk_add_test(EXECUTABLE_ARGS "-error" PASS_REGULAR_EXPRESSION "Argument errors: ")

    # should pass because reading cube4.pml should not modify it (input == output)
    if(NOT WIN32)#this test fails on windows7 VM
    camitk_add_test(EXECUTABLE_ARGS "-i ${CMAKE_CURRENT_SOURCE_DIR}/cube4.pml"
                    PASS_FILE ${CMAKE_CURRENT_SOURCE_DIR}/cube4.pml )
    endif()
endif()
