WSL/SLF GitLab Repository

Commit d2352b13 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

More fixes for the packaging on Mac

parent 13f9fe24
......@@ -42,14 +42,24 @@ SET(RESOURCES resources/inishell.qrc)
INCLUDE("${PROJECT_SOURCE_DIR}/src/CMakeLists.txt")
SET(TARGET ${CMAKE_PROJECT_NAME})
ADD_EXECUTABLE(${TARGET} WIN32 ${EXTRA_LIBS_SRC} ${SOURCES} ${RESOURCES})
SET(TARGET_TYPE "")
IF(WIN32)
SET(TARGET_TYPE "WIN32")
ENDIF(WIN32)
IF(APPLE)
SET(TARGET_TYPE "MACOSX_BUNDLE")
ENDIF(APPLE)
ADD_EXECUTABLE(${TARGET} ${TARGET_TYPE} ${EXTRA_LIBS_SRC} ${SOURCES} ${RESOURCES})
INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/")
TARGET_LINK_LIBRARIES(${TARGET} ${QT5_LIBRARIES})
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin"
CLEAN_DIRECT_OUTPUT 1
OUTPUT_NAME ${TARGET})
INSTALL(TARGETS ${TARGET} RUNTIME DESTINATION bin COMPONENT exe)
INSTALL(TARGETS ${TARGET} RUNTIME DESTINATION bin BUNDLE DESTINATION bin COMPONENT exe)
# Retrieve the absolute path to qmake and then use that path to find
# the binaries
......@@ -67,10 +77,14 @@ ENDIF()
IF(APPLE)
FIND_PROGRAM(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${_qt_bin_dir}")
ADD_CUSTOM_COMMAND(TARGET ${TARGET} POST_BUILD
COMMAND "${MACDEPLOYQT_EXECUTABLE}"
"$<TARGET_FILE_DIR:${TARGET}>/../.."
-always-overwrite
COMMENT "Running macdeployqt...")
# COMMAND "${MACDEPLOYQT_EXECUTABLE}"
# "$<TARGET_FILE_DIR:${TARGET}>"
# -always-overwrite
# COMMENT "Running macdeployqt...")
COMMAND "${MACDEPLOYQT_EXECUTABLE}"
"bin/inishell.app"
-always-overwrite
COMMENT "Running macdeployqt...")
ENDIF()
###########################################################
......
......@@ -112,7 +112,7 @@ MACRO (SET_COMPILER_OPTIONS)
###########################################################
ELSEIF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
SET(WARNINGS_OFF "-Wno-long-long -Wno-float-equal -Wno-documentation -Wno-documentation-unknown-command -Wno-old-style-cast -Wno-padded -Wno-missing-noreturn -Wno-weak-vtables -Wno-switch-enum -Wno-covered-switch-default -Wno-global-constructors -Wno-exit-time-destructors -Wno-unknown-pragmas -Wno-format-nonliteral -Wno-date-time -Wno-unused-template -Wno-disabled-macro-expansion -Wno-c++98-compat -Wno-c++98-compat-pedantic")
SET(WARNINGS_OFF "-Wno-long-long -Wno-float-equal -Wno-documentation -Wno-documentation-unknown-command -Wno-old-style-cast -Wno-padded -Wno-missing-noreturn -Wno-weak-vtables -Wno-switch-enum -Wno-covered-switch-default -Wno-global-constructors -Wno-exit-time-destructors -Wno-unknown-pragmas -Wno-format-nonliteral -Wno-date-time -Wno-unused-template -Wno-disabled-macro-expansion -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-redundant-parens")
SET(WARNINGS "-Wall -Wswitch -Weverything ${WARNINGS_OFF}") #obviously, we should try to fix the warnings! Keeping in mind that some of these W are half buggy...
SET(DEEP_WARNINGS "-Wunused-value -Wshadow -Wpointer-arith -Wconversion -Winline -Wdisabled-optimization -Wctor-dtor-privacy") #-Rpass=.* for static analysis
SET(EXTRA_WARNINGS "-Wextra -pedantic ${DEEP_WARNINGS}") #-Weffc++
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment