Fix building with cmake on cygwin.

Add required libraries for the link stage.
This commit is contained in:
Enrico Forestieri 2014-12-26 17:00:23 +01:00
parent 9126a99e97
commit 1b0cbb6932
5 changed files with 18 additions and 0 deletions

View File

@ -149,6 +149,10 @@ if(MINGW)
target_link_libraries(${_lyx} ole32)
endif()
if(CYGWIN)
target_link_libraries(${_lyx} gdi32 shlwapi ole32)
endif()
project_source_group("${GROUP_CODE}" lyx_sources lyx_headers)
install(TARGETS ${_lyx}

View File

@ -38,5 +38,9 @@ if(APPLE)
target_link_libraries(${_lyxclient} "-framework AppKit")
endif()
if(CYGWIN)
target_link_libraries(${_lyxclient} shlwapi)
endif()
install(TARGETS ${_lyxclient} DESTINATION ${LYX_UTILITIES_INSTALL_PATH})

View File

@ -17,6 +17,9 @@ macro(sources _program)
${Lyx_Boost_Libraries} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY}
${ZLIB_LIBRARY} ${ICONV_LIBRARY})
lyx_target_link_libraries(${_program} Magic)
if(CYGWIN)
target_link_libraries(${_program} shlwapi)
endif()
endmacro()
file(GLOB test_sources ${TOP_SRC_DIR}/src/support/tests/${LYX_CPP_FILES})

View File

@ -19,6 +19,9 @@ add_executable(check_layout ${check_layout_SOURCES})
target_link_libraries(check_layout support
${Lyx_Boost_Libraries} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY}
${ZLIB_LIBRARY} ${ICONV_LIBRARY})
if(CYGWIN)
target_link_libraries(check_layout shlwapi)
endif()
lyx_target_link_libraries(check_layout Magic)
add_dependencies(lyx_run_tests check_layout)

View File

@ -58,6 +58,10 @@ 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()