diff options
author | Roberto C. Sanchez <roberto@connexer.com> | 2014-03-29 10:54:04 -0400 |
---|---|---|
committer | Roberto C. Sanchez <roberto@connexer.com> | 2014-03-29 10:54:04 -0400 |
commit | b745315323de9f27538edac9453205ca70e6186e (patch) | |
tree | e804cd15cf894a2a14aab6c5224bc242273dc3ba /utilities/CMakeLists.txt | |
parent | 936d9e8484ff73282c8c0a277310d1ffdde86e10 (diff) |
Imported Upstream version 1.6.2+dfsg
Diffstat (limited to 'utilities/CMakeLists.txt')
-rw-r--r-- | utilities/CMakeLists.txt | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/utilities/CMakeLists.txt b/utilities/CMakeLists.txt new file mode 100644 index 0000000..3d510f1 --- /dev/null +++ b/utilities/CMakeLists.txt @@ -0,0 +1,119 @@ +###################################################################### +# Basic utility programs and their joy. +# +# The general assumption is that each of these utilities is built from +# a single source file, which shares its name with the utility itself (appended with .cpp), +# and then linked against the SWORD library. +# +# This list will be built and installed, if so chosen +# +# These are in alphbetical order now - please keep them that way +# if you edit this list in the future. +# +SET(install_UTILITIES + addld + imp2gbs + imp2ld + imp2vs + installmgr + mkfastmod + mod2imp + mod2osis + mod2vpl + tei2mod + vpl2mod + vs2osisref + vs2osisreftxt + xml2gbs + osis2mod +) + +IF(WITH_ZLIB OR WITH_INTERNAL_ZLIB) + SET(install_UTILITIES ${install_UTILITIES} mod2zmod) +ENDIF(WITH_ZLIB OR WITH_INTERNAL_ZLIB) + +###################################################################### +# These utilities will be built, but they will not be installed +# +# Again, I have gone to great lengths of travail to make this list +# alphabetical. If you add utilities to this list, please do so in a +# way that maintains this. +SET(noinstall_UTILITIES + addgb + addvs + cipherraw + emptyvss + gbfidx + genbookutil + modwrite + step2vpl + stepdump + treeidxutil +) + +##################################################################### +# This will loop over both of the above utility lists and add build targets +# to the system for each one of them. +# + +FOREACH(UTIL ${install_UTILITIES} ${noinstall_UTILITIES}) + ADD_EXECUTABLE("${UTIL}" "${UTIL}.cpp") + IF(BUILDING_SHARED) + TARGET_LINK_LIBRARIES("${UTIL}" sword) + ELSE(BUILDING_SHARED) + TARGET_LINK_LIBRARIES("${UTIL}" sword_static) + ENDIF(BUILDING_SHARED) +ENDFOREACH(UTIL ${install_UTILITIES}) + +#################################################################### +# Just to be difficult, we have a single C file that is a utility +# and, therefore, needs its own treatment. +# + +ADD_EXECUTABLE(lexdump lexdump.c) +IF(BUILDING_SHARED) + TARGET_LINK_LIBRARIES(lexdump sword) +ELSE(BUILDING_SHARED) + TARGET_LINK_LIBRARIES(lexdump sword_static) +ENDIF(BUILDING_SHARED) + +#################################################################### +# Install the utilities +# +# We do this here, rather than up in the main install file, because +# a) it fits more logically and b) the scope of ${install_UTILITIES} +# is limited to CMake files in this directory and below, so rather than +# replicate the above list in another place, we'll just handle our +# own install, since this whole directory is optional, anyway. +# +FOREACH(UTIL ${install_UTILITIES}) + INSTALL(TARGETS ${UTIL} + DESTINATION ${SWORD_INSTALL_DIR}/bin + COMPONENT utilities + ) +ENDFOREACH(UTIL ${install_UTILITIES}) + +#################################################################### +# And, of course, diatheke is a beast unto itself +# +# Let's go! +# +ADD_EXECUTABLE(diatheke + diatheke/diatheke.cpp + diatheke/corediatheke.cpp + diatheke/diathekemgr.cpp + diatheke/diafiltmgr.cpp + diatheke/thmlcgi.cpp + diatheke/gbfcgi.cpp + diatheke/osiscgi.cpp +) +IF(BUILDING_SHARED) + TARGET_LINK_LIBRARIES(diatheke sword) +ELSE(BUILDING_SHARED) + TARGET_LINK_LIBRARIES(diatheke sword_static) +ENDIF(BUILDING_SHARED) +INSTALL(TARGETS diatheke + DESTINATION ${SWORD_INSTALL_DIR}/bin + COMPONENT utilities +) + |