Skip to content

Commit f269d03

Browse files
authored
Update CMakeLists.txt
1 parent 8ae464e commit f269d03

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

src/CMakeLists.txt

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,8 @@ add_custom_target(deploy-qt ALL
103103
VERBATIM
104104
)
105105

106-
# Explicit sign with Hardened Runtime -----------------------------------------
107-
if(APPLE)
108-
add_custom_target(codesign ALL
109-
COMMAND /usr/bin/codesign -vvv --deep --strict --force --options runtime --timestamp --sign ${CODESIGN_ID} $<TARGET_BUNDLE_DIR:${PROJECT_TARGET_NAME}>
110-
DEPENDS deploy-qt
111-
COMMENT "Codesign with Hardened Runtime"
112-
VERBATIM
113-
)
114-
endif()
115-
116-
# Create custom .DS_Store on MacOS --------------------------------------------
117106
if(APPLE)
107+
# Create custom .DS_Store on MacOS ----------------------------------------
118108
set(APP_DIR_OLD "$<TARGET_BUNDLE_DIR:${PROJECT_TARGET_NAME}>")
119109
set(APP_DIR_TMP "${CMAKE_BINARY_DIR}/${PROJECT_TARGET_NAME}/${PROJECT_SHORT_REL_NAME}_tmp.app")
120110
set(APP_DIR_NEW "${CMAKE_BINARY_DIR}/${PROJECT_TARGET_NAME}/${PROJECT_SHORT_REL_NAME}.app")
@@ -125,7 +115,7 @@ if(APPLE)
125115
COMMAND ${CMAKE_COMMAND} -E rename ${APP_DIR_OLD} ${APP_DIR_TMP}
126116
COMMAND ${CMAKE_COMMAND} -E rm -rf ${APP_DIR_NEW}
127117
COMMAND ${CMAKE_COMMAND} -E rename ${APP_DIR_TMP} ${APP_DIR_NEW}
128-
DEPENDS codesign
118+
DEPENDS deploy-qt
129119
COMMENT "Renaming ${APP_DIR_OLD} bundle to ${APP_DIR_NEW}"
130120
VERBATIM
131121
)
@@ -150,6 +140,14 @@ if(APPLE)
150140
COMMENT "Generating custom .DS_Store for Drag-and-Drop DMG"
151141
VERBATIM
152142
)
143+
144+
# Explicit sign with Hardened Runtime -------------------------------------
145+
add_custom_target(codesign ALL
146+
COMMAND /usr/bin/codesign -vvv --deep --strict --force --options runtime --timestamp --sign ${CODESIGN_ID} "${APP_DIR_NEW}"
147+
DEPENDS gen-dsstore
148+
COMMENT "Codesign with Hardened Runtime"
149+
VERBATIM
150+
)
153151
endif()
154152

155153
# Install ---------------------------------------------------------------------

0 commit comments

Comments
 (0)