Skip to content

Commit

Permalink
macos: improve cmake build
Browse files Browse the repository at this point in the history
  • Loading branch information
mcallegari committed Jun 8, 2024
1 parent abeec90 commit 9702cb0
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fixtureeditor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ else()
qt5_add_translation(QM_FILES ${TS_FILES})
endif()

add_executable(${module_name} WIN32 MACOSX_BUNDLE
add_executable(${module_name} WIN32
../ui/src/aboutbox.cpp ../ui/src/aboutbox.h ../ui/src/aboutbox.ui
../ui/src/apputil.cpp ../ui/src/apputil.h
../ui/src/docbrowser.cpp ../ui/src/docbrowser.h
Expand Down
2 changes: 1 addition & 1 deletion launcher/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ else()
qt5_add_translation(QM_FILES ${TS_FILES})
endif()

add_executable(${module_name} MACOSX_BUNDLE
add_executable(${module_name}
launcher.cpp launcher.h
main.cpp
${QM_FILES}
Expand Down
2 changes: 1 addition & 1 deletion main/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(module_name "qlcplus")

add_executable(${module_name} WIN32 MACOSX_BUNDLE
add_executable(${module_name} WIN32
main.cpp
)

Expand Down
3 changes: 3 additions & 0 deletions platforms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ endif()
if(WIN32)
add_subdirectory(windows)
endif()
if(APPLE)
add_subdirectory(macos)
endif()
16 changes: 16 additions & 0 deletions platforms/macos/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.16)
project(icons VERSION 1.0 LANGUAGES C CXX)

#set(CMAKE_INCLUDE_CURRENT_DIR ON)
include(../../variables.cmake)

# install macOS files for a correct bundle
install(FILES qt.conf DESTINATION ${INSTALLROOT}/${DATADIR})
install(FILES ../../resources/icons/qlcplus.icns DESTINATION ${INSTALLROOT})

if(qmlui)
install(FILES Info.plist.qmlui DESTINATION ${INSTALLROOT}/Info.plist)
else()
install(FILES Info.plist DESTINATION ${INSTALLROOT})
endif()
install(CODE "execute_process(COMMAND sed -i -e \"s/__QLC_VERSION__/${APPVERSION}/g\" ${INSTALLROOT}/Info.plist)")
2 changes: 1 addition & 1 deletion qmlui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ if(ANDROID)
${module_name}
PROPERTIES LIBRARY_OUTPUT_NAME qlcplus)
else()
add_executable(${module_name} WIN32 MACOSX_BUNDLE
add_executable(${module_name} WIN32
${SRC_FILES}
${QM_FILES}
)
Expand Down

0 comments on commit 9702cb0

Please sign in to comment.