removed unnecessary linking code
This commit is contained in:
parent
a34ba91bca
commit
eed4c1b84d
@ -32,39 +32,14 @@ if(OPENSPADES_RESOURCES)
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
add_custom_target(OpenSpades_Icons ALL COMMENT "Generating icons")
|
||||
add_custom_target(OpenSpades_Unix ALL COMMENT "Process unix stuff")
|
||||
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Icons)
|
||||
add_custom_command(
|
||||
TARGET OpenSpades_Icons
|
||||
TARGET OpenSpades_Unix
|
||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/Icons/converticons.sh ${CMAKE_CURRENT_SOURCE_DIR}/Icons
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Icons)
|
||||
|
||||
set(ICON_DIR ${CMAKE_CURRENT_BINARY_DIR}/Icons/hicolor/16x16/apps)
|
||||
add_library(OpenSpades_BinaryExecutableIcon
|
||||
STATIC
|
||||
${ICON_DIR}/icon.o
|
||||
)
|
||||
set_target_properties(
|
||||
OpenSpades_BinaryExecutableIcon
|
||||
PROPERTIES
|
||||
LINKER_LANGUAGE CXX
|
||||
)
|
||||
set_source_files_properties(
|
||||
${ICON_DIR}/icon.o
|
||||
PROPERTIES
|
||||
EXTERNAL_OBJECT true
|
||||
GENERATED true
|
||||
)
|
||||
add_custom_command(
|
||||
OUTPUT ${ICON_DIR}/icon.o
|
||||
COMMAND cd ${ICON_DIR} && ld -r -b binary -o icon.o openspades.png
|
||||
COMMAND objcopy --rename-section .data=.rodata,alloc,load,readonly,data,contents ${ICON_DIR}/icon.o ${ICON_DIR}/icon.o
|
||||
DEPENDS OpenSpades_Icons
|
||||
)
|
||||
|
||||
|
||||
add_custom_target(OpenSpades_Unix ALL COMMENT "Process unix stuff")
|
||||
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Unix)
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Unix/Debian)
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Unix/Man)
|
||||
|
@ -87,10 +87,6 @@ source_group("libs\\poly2tri\\sweep" FILES ${POLY2TRI_SWEEP_FILES})
|
||||
source_group("ScriptBindings" FILES ${SCRIPTBINDING_FILES})
|
||||
source_group("libs\\unzip" FILES ${UNZIP_FILES})
|
||||
|
||||
if(UNIX)
|
||||
target_link_libraries(OpenSpades OpenSpades_BinaryExecutableIcon)
|
||||
endif(UNIX)
|
||||
|
||||
target_link_libraries(OpenSpades ${SDL2_LIBRARY} ${SDL2_IMAGE_LIBRARY} ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} ${ZLIB_LIBRARIES} ${CURL_LIBRARY} ${CMAKE_DL_LIBS} ${ANGELSCRIPT_LIBS})
|
||||
|
||||
#todo: MACOSX_BUNDLE_ICON_FILE ?
|
||||
|
Loading…
x
Reference in New Issue
Block a user