X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=3rdparty%2Fdtl%2FCMakeLists.txt;h=f757b26b17700b7a64e8b6e6b47e0f965e367dd9;hb=9716e79624a4d;hp=d1c5f4c0033ad9e2c79a247b1a57a31993de1838;hpb=b280fed1b3bbadd2df0aa2097678e63148627e74;p=lyx.git diff --git a/3rdparty/dtl/CMakeLists.txt b/3rdparty/dtl/CMakeLists.txt index d1c5f4c003..f757b26b17 100644 --- a/3rdparty/dtl/CMakeLists.txt +++ b/3rdparty/dtl/CMakeLists.txt @@ -13,11 +13,30 @@ endif() set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON) -project(dt2dv C) +project(dtl C) +set(targets dt2dv dv2dt) +set(_manuals) +macro(add_man _mansrc) + get_filename_component(_mandest ${_mansrc} NAME_WE) + SET(_created_manual "${CMAKE_CURRENT_BINARY_DIR}/${_mandest}.1") + configure_file("${TOP_SRC_DIR}/3rdparty/dtl/${_mansrc}" ${_created_manual} COPYONLY) + list(APPEND _manuals ${_created_manual}) +endmacro(add_man) + +foreach(_t ${targets}) + if (WIN32) + set_source_files_properties(${_t}.c PROPERTIES LANGUAGE C COMPILE_FLAGS -D_CRT_SECURE_NO_WARNINGS=1) + endif() + add_executable(${_t} ${_t}.c) + add_man(${_t}.man) +endforeach() if (WIN32) - #set_source_files_properties(dt2dv.c dv2dt.c PROPERTIES LANGUAGE C COMPILE_FLAGS _CRT_SECURE_NO_WARNINGS) + set_target_properties(${targets} PROPERTIES LANGUAGE C COMPILE_FLAGS -D__STDC__) endif() -add_executable(dt2dv dt2dv.c) -add_executable(dv2dt dv2dt.c) -install(TARGETS dv2dt dt2dv DESTINATION ${LYX_UTILITIES_INSTALL_PATH}) + +# Install dtl tools in this directory to omit possible packaging conflicts +# if installing multiple lyx versions, each with own dtl executables +get_data_destination(dest_data) +install(TARGETS ${targets} DESTINATION "${dest_data}extratools/") +install(FILES ${_manuals} DESTINATION "${dest_data}extraman/man1/")