X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftex2lyx%2FCMakeLists.txt;h=36db7234dffb9b88df89a8ece80c1f8fddf7b7c2;hb=766eb3f02c69ef3fea1845b53a153bfbe9e5f55a;hp=0debbeb022d96a99bf0aa38f28e54e6b530373e3;hpb=18f79eeddcf58e2b20c883ca26d895ab34c074c2;p=lyx.git diff --git a/src/tex2lyx/CMakeLists.txt b/src/tex2lyx/CMakeLists.txt index 0debbeb022..36db7234df 100644 --- a/src/tex2lyx/CMakeLists.txt +++ b/src/tex2lyx/CMakeLists.txt @@ -5,16 +5,16 @@ # Copyright (c) 2008-2011 Kornel Benko, # -set(_tex2lyx tex2lyx${PROGRAM_SUFFIX}) project(${_tex2lyx}) # There is no header file lengthcommon.h set(LINKED_sources ${TOP_SRC_DIR}/src/lengthcommon.cpp) set(LINKED_headers) -foreach(_src insets/InsetLayout Color Counters - Encoding FloatList Floating FontInfo - Layout LayoutFile LayoutModuleList Lexer ModuleList TextClass +foreach(_src graphics/GraphicsParams insets/ExternalTemplate + insets/ExternalTransforms insets/InsetLayout Author CiteEnginesList Color Counters + Encoding FloatList Floating FontInfo LaTeXPackages Layout + LayoutFile LayoutModuleList Length Lexer ModuleList TextClass Spacing version) list(APPEND LINKED_sources ${TOP_SRC_DIR}/src/${_src}.cpp) list(APPEND LINKED_headers ${TOP_SRC_DIR}/src/${_src}.h) @@ -24,32 +24,43 @@ file(GLOB tex2lyx_sources ${TOP_SRC_DIR}/src/tex2lyx/${LYX_CPP_FILES}) file(GLOB tex2lyx_headers ${TOP_SRC_DIR}/src/tex2lyx/${LYX_HPP_FILES}) -include_directories(BEFORE - ${TOP_SRC_DIR}/src/tex2lyx - ${TOP_SRC_DIR}/src/support/minizip +include_directories((BEFORE + ${TOP_SRC_DIR}/src/tex2lyx) ${ZLIB_INCLUDE_DIR}) -add_definitions(-DTEX2LYX) +if(WIN32 AND NOT MINGW) + set(FILE_RC ${TOP_CMAKE_PATH}/lyx.rc) + message(STATUS "Using icon defined in resource file: ${FILE_RC}") +endif() if(NOT LYX_MERGE_FILES) - add_executable(${_tex2lyx} ${tex2lyx_sources} ${LINKED_sources} ${tex2lyx_headers} ${LINKED_headers}) + add_executable(${_tex2lyx} ${tex2lyx_sources} ${LINKED_sources} ${tex2lyx_headers} ${LINKED_headers} ${FILE_RC}) else() lyx_const_touched_files(_allinone tex2lyx_sources) lyx_const_touched_files(_allinone_linked LINKED_sources) - add_executable(${_tex2lyx} ${_allinone_files} ${_allinone_linked_files}) + add_executable(${_tex2lyx} ${_allinone_files} ${_allinone_linked_files} ${FILE_RC}) endif() +set_target_properties(${_tex2lyx} PROPERTIES FOLDER "applications/TeX2LyX") target_link_libraries(${_tex2lyx} support ${Lyx_Boost_Libraries} ${QT_QTCORE_LIBRARY} - ${LIBINTL_LIBRARIES} + ${QT_QTGUI_LIBRARY} ${ICONV_LIBRARY}) +lyx_target_link_libraries(${_tex2lyx} Magic) + +add_dependencies(${_tex2lyx} lyx_version) + if(WIN32) target_link_libraries(${_tex2lyx} shlwapi ole32 psapi) endif() +if(CYGWIN) + target_link_libraries(${_tex2lyx} shlwapi ole32) +endif() + if(APPLE) target_link_libraries(${_tex2lyx} "-framework AppKit") endif() @@ -57,11 +68,7 @@ endif() project_source_group("${GROUP_CODE}" tex2lyx_sources tex2lyx_headers) -if(LYX_BUNDLE) - install(TARGETS ${_tex2lyx} - RUNTIME DESTINATION bin - BUNDLE DESTINATION .) -else() - install(TARGETS ${_tex2lyx} DESTINATION bin) -endif() +add_subdirectory(test) + +install(TARGETS ${_tex2lyx} DESTINATION ${LYX_UTILITIES_INSTALL_PATH})