Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix corrade-rc executable not found when build target WinRT #81 #82

Merged
merged 1 commit into from
Nov 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ endif()

# Initialize macros etc.
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/modules/" ${CMAKE_MODULE_PATH})
if(CMAKE_CROSSCOMPILING)
if(CMAKE_CROSSCOMPILING AND NOT CORRADE_TARGET_WINDOWS_RT)
find_program(CORRADE_RC_EXECUTABLE corrade-rc)
if(NOT CORRADE_RC_EXECUTABLE)
message(FATAL_ERROR "Native `corrade-rc` executable, which is needed when crosscompiling, was not found")
Expand Down
5 changes: 4 additions & 1 deletion src/Corrade/Utility/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ endif()
# Then the condition would be if(NOT CMAKE_CROSSCOMPILING OR CORRADE_TARGET_WINDOWS_RT)
# and similar change would be in UseCorrade.cmake. More info in this thread:
# https://cmake.org/pipermail/cmake-developers/2015-January/024242.html
if(NOT CMAKE_CROSSCOMPILING)
if(NOT CMAKE_CROSSCOMPILING OR CORRADE_TARGET_WINDOWS_RT)
# Sources for standalone corrade-rc
set(CorradeUtilityRc_SRCS
Arguments.cpp
Expand Down Expand Up @@ -227,6 +227,9 @@ if(NOT CMAKE_CROSSCOMPILING)
target_link_libraries(corrade-rc PRIVATE ${CMAKE_DL_LIBS})
endif()
set_target_properties(corrade-rc PROPERTIES FOLDER "Corrade/Utility")
if(CORRADE_TARGET_WINDOWS_RT)
set_target_properties(corrade-rc PROPERTIES VS_WINRT_COMPONENT OFF)
endif()
install(TARGETS corrade-rc DESTINATION ${CORRADE_BINARY_INSTALL_DIR})

# Corrade::rc target alias for superprojects
Expand Down