diff --git a/CMakeLists.txt b/CMakeLists.txt index 896be3e..ffdd936 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,8 +92,22 @@ ENDIF(TREAT_WARNINGS_AS_ERRORS) SET(CMAKE_MODULE_PATH "${FasTC_SOURCE_DIR}/CMakeModules" ${CMAKE_MODULE_PATH}) FIND_PACKAGE(PVRTexLib) -ADD_SUBDIRECTORY(BPTCEncoder) -ADD_SUBDIRECTORY(IO) -ADD_SUBDIRECTORY(Core) +SET(FASTC_DIRECTORIES + BPTCEncoder IO Core +) + +FOREACH(DIR ${FASTC_DIRECTORIES}) + ADD_SUBDIRECTORY(${DIR}) +ENDFOREACH() + +ENABLE_TESTING() + +ADD_SUBDIRECTORY(GTest) +FOREACH(DIR ${FASTC_DIRECTORIES}) + SET(TESTDIR ${FasTC_SOURCE_DIR}/${DIR}/test) + IF(IS_DIRECTORY ${TESTDIR}) + ADD_SUBDIRECTORY(${TESTDIR}) + ENDIF() +ENDFOREACH() ADD_SUBDIRECTORY(CLTool)