Created
December 19, 2016 02:14
-
-
Save lethean/03fb21f7a137be71f8958499cc8b729e to your computer and use it in GitHub Desktop.
fix libui build error in win32 due to resources.res
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt | |
index 4695eb4..df7d838 100644 | |
--- a/windows/CMakeLists.txt | |
+++ b/windows/CMakeLists.txt | |
@@ -65,14 +65,14 @@ set(_LIBUI_INCLUDEDIRS _LIBUI_INCLUDEDIRS PARENT_SCOPE) | |
# Windows won't link resources in static libraries; we need to provide the libui.res file in this case. | |
set(_LIBUINAME libui PARENT_SCOPE) | |
if(NOT BUILD_SHARED_LIBS) | |
- set(_LIBUI_STATIC_RES ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/libui.res PARENT_SCOPE) | |
+ set(_LIBUI_STATIC_RES ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/$(Configuration)/libui.res PARENT_SCOPE) | |
endif() | |
macro(_handle_static) | |
# TODO this full path feels hacky | |
add_custom_command( | |
TARGET libui POST_BUILD | |
COMMAND | |
- ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:libui,BINARY_DIR>/CMakeFiles/libui.dir/windows/resources.rc.* ${_LIBUI_STATIC_RES} | |
+ ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:libui,BINARY_DIR>/libui.dir/$(Configuration)/resources.res ${_LIBUI_STATIC_RES} | |
COMMENT "Copying libui.res") | |
endmacro() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment