mirror of
https://github.com/edubart/otclient.git
synced 2025-04-29 17:19:20 +02:00
Fix adding executable icon on windows with non-msvc compiler (#1136)
This commit is contained in:
parent
69e44a3722
commit
4edb1eb3ad
2
.github/workflows/build-vcpkg.yml
vendored
2
.github/workflows/build-vcpkg.yml
vendored
@ -73,7 +73,7 @@ jobs:
|
||||
uses: lukka/get-cmake@latest
|
||||
|
||||
- name: Ubuntu - install opengl lua5.1 luajit
|
||||
# vcpkg has lua 5.2
|
||||
# vcpkg has lua 5.3+
|
||||
run: sudo apt-get install libglew-dev liblua5.1-0-dev libluajit-5.1-dev
|
||||
if: contains( matrix.os, 'ubuntu')
|
||||
|
||||
|
@ -23,13 +23,24 @@ set(executable_SOURCES
|
||||
src/main.cpp
|
||||
)
|
||||
|
||||
# add executable icon for win32 platforms
|
||||
if(WIN32)
|
||||
if(MSVC)
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/otcicon.o
|
||||
COMMAND ${CMAKE_RC_COMPILER}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
-fo${CMAKE_CURRENT_BINARY_DIR}/otcicon.o
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/otcicon.rc)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/otcicon.rc
|
||||
)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
else()
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/otcicon.o
|
||||
COMMAND ${CMAKE_RC_COMPILER}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
-i${CMAKE_CURRENT_SOURCE_DIR}/src/otcicon.rc
|
||||
-o ${CMAKE_CURRENT_BINARY_DIR}/otcicon.o
|
||||
)
|
||||
endif()
|
||||
|
||||
set(executable_SOURCES ${executable_SOURCES} otcicon.o)
|
||||
endif()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user