Skip to content

Commit

Permalink
Fix MacOS packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeeter committed Apr 18, 2020
1 parent 97fa7ac commit 633504e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,18 @@ set_property(SOURCE ${Project_Resources_RCC} PROPERTY SKIP_AUTOGEN ON)
#include opengl files.
include_directories(${QT_QTOPENGL_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR} )

add_executable(fstl WIN32 ${Project_Sources} ${Project_Headers} ${Project_Resources_RCC} ${Icon_Resource})
target_link_libraries(fstl Qt5::Widgets Qt5::Core Qt5::Gui Qt5::OpenGL ${OPENGL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
if(WIN32)
add_executable(fstl WIN32 ${Project_Sources} ${Project_Headers} ${Project_Resources_RCC} ${Icon_Resource})
set(Fstl_LINK_FLAGS ${CMAKE_CURRENT_SOURCE_DIR}/${Icon_Resource})
set_target_properties(fstl PROPERTIES LINK_FLAGS ${Fstl_LINK_FLAGS})
elseif(APPLE)
add_executable(fstl MACOSX_BUNDLE ${Project_Sources} ${Project_Headers} ${Project_Resources_RCC} ${Icon_Resource})
else()
add_executable(fstl ${Project_Sources} ${Project_Headers} ${Project_Resources_RCC} ${Icon_Resource})
endif(WIN32)

target_link_libraries(fstl Qt5::Widgets Qt5::Core Qt5::Gui Qt5::OpenGL ${OPENGL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})

# Add version definitions to use within the code.
target_compile_definitions(fstl PRIVATE -DFSTL_VERSION="${PROJECT_VERSION}")

Expand Down
2 changes: 1 addition & 1 deletion app/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ APP=fstl
MACDEPLOYQT=`otool -L $APP.app/Contents/MacOS/fstl | sed -n -e "s:\(.*\)lib/QtCore.*:\1/bin/macdeployqt:gp"`

$MACDEPLOYQT $APP.app
cp ../app/Info.plist $APP.app/Contents/

# Delete unused Qt plugins
cd fstl.app/Contents/PlugIns
Expand Down Expand Up @@ -41,7 +42,6 @@ do
done

cd ../Resources
rm empty.lproj

# Create a disk image
cd ../../..
Expand Down

0 comments on commit 633504e

Please sign in to comment.