commit e299154d7e43f793e21fbfdb8a7735215f84b2ed Author: Kan-Ru Chen <kanru@kanru.info> Date: Sat Dec 17 19:53:08 2011 +0800 Fix `make test' in a clean system diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c4cb6d..c52b0f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,7 @@ cmake_minimum_required(VERSION 2.8) set (PACKAGE_NAME opencc) project (${PACKAGE_NAME} C) +include (CTest) enable_testing() ######## Package information diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 5eaadf8..31c4e56 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -92,4 +92,10 @@ install( ${CHINA_DICT_FILES} DESTINATION ${DIR_SHARE_OPENCC} -) \ No newline at end of file +) + +if (BUILD_TESTING) + foreach (DICT ${TAIWAN_DICT_FILES} ${CHINA_DICT_FILES}) + configure_file(${DICT} ${PROJECT_BINARY_DIR}/data COPYONLY) + endforeach (DICT) +endif (BUILD_TESTING)