Skip to content

Commit

Permalink
Merge pull request #33 from christophevg/v1.0-temp-fix-icon-cp-order
Browse files Browse the repository at this point in the history
V1.0 temp fix icon cp order
  • Loading branch information
hrobeers committed Feb 2, 2015
2 parents 32645bd + 6ed293b commit af5bba9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 22 deletions.
41 changes: 20 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,27 +74,6 @@ if(Boost_FOUND)
endif()


#
# Include subdirectories
#

# Include the subdirectories
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src/app")
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src/hrlib")
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src/patheditor")
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src/foillogic")
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src/foileditors")
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/submodules/jenson/src")
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/submodules/qtunits/src")

add_subdirectory(src/app)
if(Tests)
find_package(Qt5Test REQUIRED)
add_subdirectory(tests/unittests)
endif()


#
# Try to set build number and commit hash
#
Expand Down Expand Up @@ -124,3 +103,23 @@ if(${GIT_BUILD_NUMBER})
else()
message(WARNING "Not building from a git repository, the build number cannot be updated.")
endif()

#
# Include subdirectories
#

# Include the subdirectories
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src/app")
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src/hrlib")
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src/patheditor")
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src/foillogic")
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src/foileditors")
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/submodules/jenson/src")
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/submodules/qtunits/src")

add_subdirectory(src/app)
if(Tests)
find_package(Qt5Test REQUIRED)
add_subdirectory(tests/unittests)
endif()
4 changes: 4 additions & 0 deletions scripts/create-dmg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

APP=$1
VERSION=$2
ICNS=$3

BUNDLE=$(basename ${APP})
NAME=${BUNDLE%.*}-${VERSION}
Expand All @@ -21,6 +22,9 @@ cd stage/
ln -s /Applications .
mkdir .background
cp ../../src/resources/background.png .background/background.png
# TODO: temp fix for bad order of copying icns file to app bundle
mkdir -p ${BUNDLE}/Contents/Resources/
cp ${ICNS} ${BUNDLE}/Contents/Resources/
cd ..

# step 3: create new disk image
Expand Down
4 changes: 3 additions & 1 deletion src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ set(HDR
if (APPLE)
set(MACOSX_BUNDLE_ICON_FILE ${BINARY_NAME}.icns)
set(ICNS ${CMAKE_BINARY_DIR}/${BINARY_NAME}.icns)
# TODO: this seems to copy the icns file to the .app bundle AFTER the DMG
# is constructed. for now, the copying is done by the DMG creation
set_source_files_properties(${ICNS} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")

# custom command to generate iconset when its source is needed
Expand Down Expand Up @@ -115,7 +117,7 @@ if (APPLE)
add_custom_command(
TARGET ${BINARY_NAME}
POST_BUILD
COMMAND ../scripts/create-dmg.sh ${BINARY_NAME}.app ${MAJOR_VERSION}.${MINOR_VERSION}.${REVISION} ${ICNS}
COMMAND ../scripts/create-dmg.sh ${BINARY_NAME}.app ${MAJOR_VERSION}.${MINOR_VERSION}.${REVISION}-${GIT_BUILD_NUMBER} ${ICNS}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)

Expand Down

0 comments on commit af5bba9

Please sign in to comment.