forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aseprite-0.9.5-as-needed.patch
38 lines (31 loc) · 1.09 KB
/
aseprite-0.9.5-as-needed.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Description: fix FTBFS with --as-needed linker option
Libraries must be placed after object files in command line.
Author: Ilya Barygin <[email protected]>
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -135,6 +135,10 @@
# All libraries for .exe files
set(all_libs ${aseprite_libraries} ${libs3rdparty} ${sys_libs})
+if(LIBALLEGRO4_LINK_FLAGS)
+ set(all_libs ${all_libs} ${LIBALLEGRO4_LINK_FLAGS})
+endif()
+
######################################################################
# ASEPRITE libraries
@@ -405,10 +409,6 @@
add_executable(aseprite WIN32 main.cpp ${win32_resources} ${x11_resources})
target_link_libraries(aseprite ${all_libs})
-if(LIBALLEGRO4_LINK_FLAGS)
- set_target_properties(aseprite
- PROPERTIES LINK_FLAGS ${LIBALLEGRO4_LINK_FLAGS})
-endif()
install(TARGETS aseprite
RUNTIME DESTINATION bin)
@@ -450,8 +450,7 @@
endif()
if(LIBALLEGRO4_LINK_FLAGS)
- set_target_properties(${testname}
- PROPERTIES LINK_FLAGS ${LIBALLEGRO4_LINK_FLAGS})
+ target_link_libraries(${testname} ${LIBALLEGRO4_LINK_FLAGS})
endif()
if(extra_definitions)