option(DAO_MODULES_STRING_FORMAT "Build the \"format\" module which adds string formatting to Dao." ON) if(DAO_MODULES_STRING_FORMAT) add_library(dao_format SHARED format/dao_format.c) target_link_libraries(dao_format ${DAOLIB_TO_LINK}) install(TARGETS dao_format DESTINATION "${DAO_MODULES_INSTALL_DIR}/string") endif(DAO_MODULES_STRING_FORMAT) option(DAO_MODULES_STRING_MD5 "Build the \"md5\" module which adds the MD5 algorithm to Dao." ON) if(DAO_MODULES_STRING_MD5) add_library(dao_md5 SHARED md5/dao_md5.c md5/dao_md5.h) target_link_libraries(dao_md5 ${DAOLIB_TO_LINK}) install(TARGETS dao_md5 DESTINATION "${DAO_MODULES_INSTALL_DIR}/string") endif(DAO_MODULES_STRING_MD5) option(DAO_MODULES_STRING_TOKENIZE "Build the \"tokenize\" module which adds string tokenizing to Dao." ON) if(DAO_MODULES_STRING_TOKENIZE) add_library(dao_tokenize SHARED tokenize/dao_tokenize.c) target_link_libraries(dao_tokenize ${DAOLIB_TO_LINK}) install(TARGETS dao_tokenize DESTINATION "${DAO_MODULES_INSTALL_DIR}/string") endif(DAO_MODULES_STRING_TOKENIZE) option(DAO_MODULES_STRING_CRYPTO "Build the \"xxtea\" module which adds XXTEA string de-/encryption to Dao." ON) if(DAO_MODULES_STRING_CRYPTO) add_library(dao_xxtea SHARED xxtea/dao_xxtea.c xxtea/dao_xxtea.h) target_link_libraries(dao_xxtea ${DAOLIB_TO_LINK}) install(TARGETS dao_xxtea DESTINATION "${DAO_MODULES_INSTALL_DIR}/string") endif(DAO_MODULES_STRING_CRYPTO) option(DAO_MODULES_STRING_TEMPLATE "Build the \"template\" module which adds string template engine to Dao." ON) if(DAO_MODULES_STRING_TEMPLATE ) add_library(dao_template SHARED template/dao_template.c template/dao_template.h) target_link_libraries(dao_template ${DAOLIB_TO_LINK}) install(TARGETS dao_template DESTINATION "${DAO_MODULES_INSTALL_DIR}/string") endif(DAO_MODULES_STRING_TEMPLATE ) option(DAO_MODULES_STRING_SCANNER "Build the \"scanner\" module which adds regexp string scanning to Dao." ON) if(DAO_MODULES_STRING_SCANNER) add_library(dao_scanner SHARED scanner/dao_scanner.c scanner/dao_scanner.h) target_link_libraries(dao_scanner ${DAOLIB_TO_LINK}) install(TARGETS dao_scanner DESTINATION "${DAO_MODULES_INSTALL_DIR}/string") endif(DAO_MODULES_STRING_SCANNER) # Also add the "string" module containing all of these. if(DAO_MODULES_STRING_FORMAT OR DAO_MODULES_STRING_MD5 OR DAO_MODULES_STRING_TOKENIZE OR DAO_MODULES_STRING_CRYPTO) install(FILES "string.dao" DESTINATION "${DAO_MODULES_INSTALL_DIR}/string") endif()