loader_aw

Load OBJ/MTL file formats
git clone git://git.meso-star.fr/loader_aw.git
Log | Files | Refs | README | LICENSE

commit dca51342fc07d4b114f3f6055fe84a4903dd7ee1
parent 816caf720136e541f658300dbccc83cd340bff13
Author: vaplv <vaplv@free.fr>
Date:   Sat, 19 Sep 2015 15:31:09 +0200

Add the NO_TEST build option

Control the compilation of the test programs

Diffstat:
Mcmake/CMakeLists.txt | 22+++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -18,6 +18,8 @@ project(aw C) cmake_policy(SET CMP0011 NEW) enable_testing() +option(NO_TEST "Do not compile the test pograms" OFF) + set(AW_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../src) ################################################################################ @@ -65,21 +67,23 @@ rcmake_setup_devel(aw AW ${VERSION} aw_version.h) ################################################################################ # Define tests ################################################################################ -add_executable(test_aw_obj ${AW_SOURCE_DIR}/test_aw_obj.c) -target_link_libraries(test_aw_obj aw) -add_test(test_aw_obj test_aw_obj) -rcmake_set_test_runtime_dirs(test_aw_obj _runtime_dirs) +if(NOT NO_TEST) + add_executable(test_aw_obj ${AW_SOURCE_DIR}/test_aw_obj.c) + target_link_libraries(test_aw_obj aw) + add_test(test_aw_obj test_aw_obj) + rcmake_set_test_runtime_dirs(test_aw_obj _runtime_dirs) -add_executable(test_aw_mtl ${AW_SOURCE_DIR}/test_aw_mtl.c) -target_link_libraries(test_aw_mtl aw) -add_test(test_aw_mtl test_aw_mtl) -rcmake_set_test_runtime_dirs(test_aw_mtl _runtime_dirs) + add_executable(test_aw_mtl ${AW_SOURCE_DIR}/test_aw_mtl.c) + target_link_libraries(test_aw_mtl aw) + add_test(test_aw_mtl test_aw_mtl) + rcmake_set_test_runtime_dirs(test_aw_mtl _runtime_dirs) +endif(NOT NO_TEST) ################################################################################ # Install directories ################################################################################ install(TARGETS aw - ARCHIVE DESTINATION lib + ARCHIVE DESTINATION bin LIBRARY DESTINATION lib RUNTIME DESTINATION bin) install(FILES ${AW_FILES_INC} DESTINATION include)