Skip to content

Commit f166933

Browse files
authored
Merge pull request #310 from probonopd/issue-308
Issue 308
2 parents b9b3321 + b156524 commit f166933

File tree

2 files changed

+50
-40
lines changed

2 files changed

+50
-40
lines changed

CMakeLists.txt

Lines changed: 48 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,51 +7,59 @@ project(linuxdeployqt)
77

88
find_program(GIT git)
99

10-
# make sure Git revision ID and latest tag is not stored in the CMake cache
11-
# otherwise, one would have to reset the CMake cache on every new commit to make sure the Git commit ID is up to date
12-
unset(GIT_COMMIT CACHE)
13-
unset(GIT_LATEST_TAG CACHE)
14-
1510
if("${GIT}" STREQUAL "GIT-NOTFOUND")
16-
message(FATAL_ERROR "Could not find git")
17-
endif()
11+
message(WARNING "Could not find git, commit and tag info cannot be updated")
1812

19-
# read Git revision ID and latest tag number
20-
execute_process(
21-
COMMAND "${GIT}" rev-parse --short HEAD
22-
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
23-
OUTPUT_VARIABLE GIT_COMMIT
24-
OUTPUT_STRIP_TRAILING_WHITESPACE
25-
RESULT_VARIABLE GIT_COMMIT_RESULT
26-
)
27-
if(NOT GIT_COMMIT_RESULT EQUAL 0)
28-
message(FATAL_ERROR "Failed to determine git commit ID")
29-
endif()
30-
mark_as_advanced(GIT_COMMIT GIT_COMMIT_RESULT)
13+
if(NOT GIT_COMMIT)
14+
message(FATAL_ERROR "Commit ID not set, please call with -DGIT_COMMIT=...")
15+
endif()
3116

32-
execute_process(
33-
COMMAND "${GIT}" rev-list --tags --skip=1 --max-count=1
34-
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
35-
OUTPUT_VARIABLE GIT_TAG_ID
36-
OUTPUT_STRIP_TRAILING_WHITESPACE
37-
RESULT_VARIABLE GIT_TAG_ID_RESULT
38-
)
39-
if(NOT GIT_TAG_ID_RESULT EQUAL 0)
40-
message(FATAL_ERROR "Failed to determine git tag ID")
41-
endif()
42-
mark_as_advanced(GIT_TAG_ID GIT_TAG_ID_RESULT)
17+
if(NOT GIT_TAG_NAME)
18+
message(FATAL_ERROR "Tag name not set, please call with -DGIT_TAG_NAME=...")
19+
endif()
20+
else()
21+
# make sure Git revision ID and latest tag is not stored in the CMake cache
22+
# otherwise, one would have to reset the CMake cache on every new commit to make sure the Git commit ID is up to date
23+
unset(GIT_COMMIT CACHE)
24+
unset(GIT_LATEST_TAG CACHE)
4325

44-
execute_process(
45-
COMMAND "${GIT}" describe --tags ${GIT_TAG_ID} --abbrev=0
46-
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
47-
OUTPUT_VARIABLE GIT_TAG_NAME
48-
OUTPUT_STRIP_TRAILING_WHITESPACE
49-
RESULT_VARIABLE GIT_TAG_NAME_RESULT
50-
)
51-
if(NOT GIT_TAG_NAME_RESULT EQUAL 0)
52-
message(FATAL_ERROR "Failed to determine git tag name")
26+
# read Git revision ID and latest tag number
27+
execute_process(
28+
COMMAND "${GIT}" rev-parse --short HEAD
29+
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
30+
OUTPUT_VARIABLE GIT_COMMIT
31+
OUTPUT_STRIP_TRAILING_WHITESPACE
32+
RESULT_VARIABLE GIT_COMMIT_RESULT
33+
)
34+
if(NOT GIT_COMMIT_RESULT EQUAL 0)
35+
message(FATAL_ERROR "Failed to determine git commit ID")
36+
endif()
37+
mark_as_advanced(GIT_COMMIT GIT_COMMIT_RESULT)
38+
39+
execute_process(
40+
COMMAND "${GIT}" rev-list --tags --skip=1 --max-count=1
41+
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
42+
OUTPUT_VARIABLE GIT_TAG_ID
43+
OUTPUT_STRIP_TRAILING_WHITESPACE
44+
RESULT_VARIABLE GIT_TAG_ID_RESULT
45+
)
46+
if(NOT GIT_TAG_ID_RESULT EQUAL 0)
47+
message(FATAL_ERROR "Failed to determine git tag ID")
48+
endif()
49+
mark_as_advanced(GIT_TAG_ID GIT_TAG_ID_RESULT)
50+
51+
execute_process(
52+
COMMAND "${GIT}" describe --tags ${GIT_TAG_ID} --abbrev=0
53+
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
54+
OUTPUT_VARIABLE GIT_TAG_NAME
55+
OUTPUT_STRIP_TRAILING_WHITESPACE
56+
RESULT_VARIABLE GIT_TAG_NAME_RESULT
57+
)
58+
if(NOT GIT_TAG_NAME_RESULT EQUAL 0)
59+
message(FATAL_ERROR "Failed to determine git tag name")
60+
endif()
61+
mark_as_advanced(GIT_TAG_NAME GIT_TAG_NAME_RESULT)
5362
endif()
54-
mark_as_advanced(GIT_TAG_NAME GIT_TAG_NAME_RESULT)
5563

5664
# set version and build number
5765
set(VERSION 1-alpha)

tools/linuxdeployqt/excludelist.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ static const QStringList generatedExcludelist = {
3232
"libgcc_s.so.1",
3333
"libgdk_pixbuf-2.0.so.0",
3434
"libgio-2.0.so.0",
35+
"libglapi.so.0",
3536
"libglib-2.0.so.0",
3637
"libGL.so.1",
3738
"libgobject-2.0.so.0",
@@ -59,6 +60,7 @@ static const QStringList generatedExcludelist = {
5960
"librt.so.1",
6061
"libSM.so.6",
6162
"libstdc++.so.6",
63+
"libthai.so.0",
6264
"libthread_db.so.1",
6365
"libusb-1.0.so.0",
6466
"libutil.so.1",

0 commit comments

Comments
 (0)