1 cmake_minimum_required(VERSION 3.1)
3 set(LYX_IPO_SUPPORTED FALSE)
5 cmake_policy(SET CMP0069 NEW)
6 if (LYX_USE_IPO MATCHES "ON")
7 set(LYX_IPO_SUPPORTED YES)
11 cmake_policy(SET CMP0075 NEW)
14 set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
17 set(targets dt2dv dv2dt)
20 macro(add_man _mansrc)
21 get_filename_component(_mandest ${_mansrc} NAME_WE)
22 SET(_created_manual "${CMAKE_CURRENT_BINARY_DIR}/${_mandest}.1")
23 configure_file("${TOP_SRC_DIR}/3rdparty/dtl/${_mansrc}" ${_created_manual} COPYONLY)
24 list(APPEND _manuals ${_created_manual})
27 foreach(_t ${targets})
29 set_source_files_properties(${_t}.c PROPERTIES LANGUAGE C COMPILE_FLAGS -D_CRT_SECURE_NO_WARNINGS=1)
31 add_executable(${_t} ${_t}.c)
35 set_target_properties(${targets} PROPERTIES LANGUAGE C COMPILE_FLAGS -D__STDC__)
38 # Install dtl tools in this directory to omit possible packaging conflicts
39 # if installing multiple lyx versions, each with own dtl executables
40 get_data_destination(dest_data)
41 install(TARGETS ${targets} DESTINATION "${dest_data}extratools/")
42 install(FILES ${_manuals} DESTINATION "${dest_data}extraman/man1/")