X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FCMakeLists.txt;h=3f3ebe9ac41e565b05c77fa93143525063c5ee0e;hb=f1f63fcad0a5512dc277fd8e401ac6cd5736c699;hp=5918ba58006e758659f28b4aa3b73a1ea0230f64;hpb=41a0adcb472715a91ea252251ee08d703f36a55c;p=lyx.git diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5918ba5800..3f3ebe9ac4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -87,8 +87,9 @@ endif() 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) @@ -104,9 +105,10 @@ lyx_find_info_files(LyXCMakeFiles ${TOP_SRC_DIR}/development/cmake/*.msvc) 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_BUNDLE} + ${LYX_BUILD_BUNDLE} ${lyx_sources} ${lyx_headers} ${vld_files} @@ -115,9 +117,6 @@ add_executable(${_lyx} ${lyx_cmake_files} ) -if(LYX_BUNDLE) - set(MACOSX_BUNDLE_STRATUP_COMMAND ${_lyx}) -endif() lyx_add_gcc_pch(${_lyx}) @@ -143,13 +142,16 @@ endif() if(ENCHANT_FOUND) target_link_libraries(${_lyx} ${ENCHANT_LIBRARY}) endif() +if(Magic_FOUND) + target_link_libraries(${_lyx} ${Magic_LIBRARY}) +endif() if(APPLE) target_link_libraries(${_lyx} "-bind_at_load") if(LYX_COCOA) target_link_libraries(${_lyx} "-framework Cocoa") else() - target_link_libraries(${_lyx} "-framework Carbon") + target_link_libraries(${_lyx} "-framework AppKit") endif() endif() @@ -159,10 +161,18 @@ endif() project_source_group("${GROUP_CODE}" lyx_sources lyx_headers) + +install(TARGETS ${_lyx} + RUNTIME DESTINATION bin + BUNDLE DESTINATION .) + if(LYX_BUNDLE) - install(TARGETS ${_lyx} - RUNTIME DESTINATION bin - BUNDLE DESTINATION .) -else() - install(TARGETS ${_lyx} DESTINATION bin) + 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() +