1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

CMake buildsystem for src/main as well.

I had to rename PNGs, but updated qmake buildsystem so it still works
(kind of, there are duplicate pngs installed, no big deal...)

Only tested on Linux, but tried to write the cmake code for OSX and
Windows specific things too.
This commit is contained in:
David Faure 2017-09-10 13:35:21 +02:00
parent d69e5458f9
commit 31d0e1f6b3
9 changed files with 67 additions and 7 deletions

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 709 B

After

Width:  |  Height:  |  Size: 709 B

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -1,3 +1,3 @@
add_subdirectory(lib)
# TODO add_subdirectory(main)
add_subdirectory(main)
# TODO add_subdirectory(plugins)

View File

@ -25,23 +25,29 @@ mac {
target3.files = $$PWD/../linux/pixmaps/qupzilla.png
target3.path = $$icon_folder
ico16.files = $$PWD/../linux/hicolor/16x16/apps/qupzilla.png
ico16.files = $$PWD/../linux/hicolor/16-apps-qupzilla.png
ico16.path = $$hicolor_folder/16x16/apps
ico16.extra = cp $$PWD/../linux/hicolor/16-apps-qupzilla.png $$hicolor_folder/16x16/apps/qupzilla.png
ico32.files = $$PWD/../linux/hicolor/32x32/apps/qupzilla.png
ico32.files = $$PWD/../linux/hicolor/32-apps-qupzilla.png
ico32.path = $$hicolor_folder/32x32/apps
ico32.extra = cp $$PWD/../linux/hicolor/32-apps-qupzilla.png $$hicolor_folder/32x32/apps/qupzilla.png
ico48.files = $$PWD/../linux/hicolor/48x48/apps/qupzilla.png
ico48.files = $$PWD/../linux/hicolor/48-apps-qupzilla.png
ico48.path = $$hicolor_folder/48x48/apps
ico48.extra = cp $$PWD/../linux/hicolor/48-apps-qupzilla.png $$hicolor_folder/48x48/apps/qupzilla.png
ico64.files = $$PWD/../linux/hicolor/64x64/apps/qupzilla.png
ico64.files = $$PWD/../linux/hicolor/64-apps-qupzilla.png
ico64.path = $$hicolor_folder/64x64/apps
ico64.extra = cp $$PWD/../linux/hicolor/64-apps-qupzilla.png $$hicolor_folder/64x64/apps/qupzilla.png
ico128.files = $$PWD/../linux/hicolor/128x128/apps/qupzilla.png
ico128.files = $$PWD/../linux/hicolor/128-apps-qupzilla.png
ico128.path = $$hicolor_folder/128x128/apps
ico128.extra = cp $$PWD/../linux/hicolor/128-apps-qupzilla.png $$hicolor_folder/128x128/apps/qupzilla.png
ico256.files = $$PWD/../linux/hicolor/256x256/apps/qupzilla.png
ico256.files = $$PWD/../linux/hicolor/256-apps-qupzilla.png
ico256.path = $$hicolor_folder/256x256/apps
ico256.extra = cp $$PWD/../linux/hicolor/256-apps-qupzilla.png $$hicolor_folder/256x256/apps/qupzilla.png
bashcompletion.files = $$PWD/../linux/completion/falkon
bashcompletion.path = $$share_folder/bash-completion/completions

54
src/main/CMakeLists.txt Normal file
View File

@ -0,0 +1,54 @@
include_directories(
../lib/3rdparty
../lib/app
../lib/session
../lib/webengine
../lib/webtab
)
set(SRCS main.cpp)
if (WIN32)
set(SRCS ${SRCS} appicon.rc)
endif()
if (${CMAKE_SYSTEM} MATCHES "OS2")
set(SRCS ${SRCS} appicon_os2.rc)
endif()
add_executable(falkon ${SRCS})
target_link_libraries(falkon FalkonPrivate)
if (APPLE)
set_target_properties(falkon PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/main/Info.plist)
set_target_properties(falkon PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "org.kde.falkon")
set_target_properties(falkon PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Falkon")
install(FILES lib/data/icons/exeicons/qupzilla.icns DESTINATION ${BUNDLE_INSTALL_DIR}/falkon.app/Contents/Resources)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/bin/locale DESTINATION ${BUNDLE_INSTALL_DIR}/falkon.app/Contents/Resources)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/bin/themes DESTINATION ${BUNDLE_INSTALL_DIR}/falkon.app/Contents/Resources)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/bin/plugins DESTINATION ${BUNDLE_INSTALL_DIR}/falkon.app/Contents/Resources)
endif ()
if (CMAKE_SYSTEM_NAME MATCHES FreeBSD OR CMAKE_SYSTEM_NAME MATCHES OpenBSD OR HAIKU)
target_link_libraries(falkon execinfo)
endif()
if (UNIX AND NOT APPLE)
install(TARGETS falkon ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(DIRECTORY ${CMAKE_SOURCE_DIR}/bin/locale DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/locale) # TODO correct?
install(DIRECTORY ${CMAKE_SOURCE_DIR}/bin/themes DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/themes)
install(PROGRAMS ../../linux/applications/org.kde.Falkon.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES ../../linux/pixmaps/qupzilla.png DESTINATION ${KDE_INSTALL_DATADIR}/pixmaps)
ecm_install_icons(ICONS
../../linux/hicolor/16-apps-qupzilla.png
../../linux/hicolor/32-apps-qupzilla.png
../../linux/hicolor/48-apps-qupzilla.png
../../linux/hicolor/64-apps-qupzilla.png
../../linux/hicolor/128-apps-qupzilla.png
../../linux/hicolor/256-apps-qupzilla.png
DESTINATION ${KDE_INSTALL_ICONDIR} THEME hicolor)
install(FILES ../../linux/completion/falkon DESTINATION ${KDE_INSTALL_DATADIR}/bash-completion/completions)
install(FILES ../../linux/appdata/org.kde.Falkon.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
endif()