project(lfhistory) set(SOURCES ${FARSOURCE}/luafar/src/luaplug.c ) add_library (${PROJECT_NAME} MODULE ${SOURCES}) set_property(TARGET ${PROJECT_NAME} PROPERTY C_STANDARD 11) set(EXPNAMES CONFIGURE OPENPLUGIN ) set(EXPORTS "") foreach(f ${EXPNAMES}) list(APPEND EXPORTS "-DEXPORT_${f}") endforeach() target_compile_definitions(${PROJECT_NAME} PRIVATE ${EXPORTS} PRIVATE "-DSYS_ID=0xA745761D" PRIVATE "-DPLUG_MINFARVERSION=MAKEFARVERSION(2,4)" PRIVATE "-DPLUG_VERSION=3,11,1,0" PRIVATE "-DPLUG_TITLE=\"LuaFAR History\"" PRIVATE "-DPLUG_DESCRIPTION=\"History of commands, files and folders\"" PRIVATE "-DPLUG_AUTHOR=\"Shmuel Zeigerman\"" ) target_include_directories(${PROJECT_NAME} PRIVATE ${FARSOURCE}/far/far2sdk) set(INSTALL_DIR "${INSTALL_DIR}/${PROJECT_NAME}") set_target_properties(${PROJECT_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${INSTALL_DIR}/plug" PREFIX "" SUFFIX ".far-plug-wide") set(MY_LIST lfhistory.lua lfh_config.lua lfh_eng.hlf lfh_rus.hlf ) foreach(elem ${MY_LIST}) configure_file("plug/${elem}" "${INSTALL_DIR}/plug/${elem}" COPYONLY) endforeach() add_custom_target(${PROJECT_NAME}_lang ALL minilua ${LUA_SHARE}/makelang.lua ${CMAKE_CURRENT_SOURCE_DIR}/plug/lfh_lang.templ ${INSTALL_DIR}/plug )