add_definitions(-DDEVEL_VERSION)
endif()
+
if (LYX_MERGE_FILES)
if(dont_merge)
list(REMOVE_ITEM lyx_sources ${dont_merge})
if (LYX_VLD)
configure_file(${vld_path}/vld.ini ${CMAKE_CURRENT_BINARY_DIR}/vld.ini COPYONLY)
- configure_file(${vld_path}/vld.ini ${CMAKE_CURRENT_BINARY_DIR}/memory_leak_report.txt COPYONLY)
+ set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/memory_leak_report.txt PROPERTIES GENERATED TRUE)
set(vld_files ${CMAKE_CURRENT_BINARY_DIR}/vld.ini ${CMAKE_CURRENT_BINARY_DIR}/memory_leak_report.txt)
+ lyx_add_info_files(VLD ${vld_files})
endif()
if(WIN32)
lyx_find_info_files(LyXCMakeFiles ${TOP_SRC_DIR}/development/cmake/modules/*)
lyx_find_info_files(LyXUiFiles ${TOP_SRC_DIR}/lib/ui/*)
+
add_executable(${_lyx}
${WIN32_CONSOLE}
+ ${LYX_BUILD_BUNDLE}
${lyx_sources}
${lyx_headers}
${vld_files}
${lyx_cmake_files}
)
+
lyx_add_gcc_pch(${_lyx})
target_link_libraries(${_lyx}
frontend_qt4
graphics
support
+ ${LIBINTL_LIBRARIES}
${ICONV_LIBRARY}
${QT_QTMAIN_LIBRARY}
${vld_dll})
-if(NOT LYX_EXTERNAL_LIBINTL OR WIN32)
- target_link_libraries(${_lyx} intl)
- add_dependencies(${_lyx} intl_target)
-endif()
if(HUNSPELL_FOUND)
target_link_libraries(${_lyx} ${HUNSPELL_LIBRARY})
if(APPLE)
target_link_libraries(${_lyx} "-bind_at_load")
- target_link_libraries(${_lyx} "-framework Carbon")
+ if(LYX_COCOA)
+ target_link_libraries(${_lyx} "-framework Cocoa")
+ else()
+ target_link_libraries(${_lyx} "-framework Carbon")
+ endif()
endif()
if(MINGW)
project_source_group("${GROUP_CODE}" lyx_sources lyx_headers)
-install(TARGETS ${_lyx} DESTINATION bin)
+
+install(TARGETS ${_lyx}
+ RUNTIME DESTINATION bin
+ BUNDLE DESTINATION .)
+
+if(LYX_BUNDLE)
+ if(NOT APPLE)
+ set(installed_lyx ${CMAKE_INSTALL_PREFIX}/bin/${_lyx}${CMAKE_EXECUTABLE_SUFFIX})
+ else()
+ set(installed_lyx ${CMAKE_INSTALL_PREFIX}/${_lyx}.app)
+ endif()
+ install(CODE "include(BundleUtilities)
+ fixup_bundle(\"${installed_lyx}\" \"\" \"\") " COMPONENT RUNTIME)
+endif()