[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r2279: It seems we need to always specially handle windres on win32 (in vidalia/trunk: . src/vidalia)
Author: edmanm
Date: 2008-01-06 00:57:23 -0500 (Sun, 06 Jan 2008)
New Revision: 2279
Modified:
vidalia/trunk/VidaliaMacros.cmake
vidalia/trunk/src/vidalia/CMakeLists.txt
Log:
It seems we need to always specially handle windres on win32 (not just on
MinGW), since qt4_add_resources doesn't understand .rc files.
Modified: vidalia/trunk/VidaliaMacros.cmake
===================================================================
--- vidalia/trunk/VidaliaMacros.cmake 2008-01-06 05:51:53 UTC (rev 2278)
+++ vidalia/trunk/VidaliaMacros.cmake 2008-01-06 05:57:23 UTC (rev 2279)
@@ -44,15 +44,15 @@
endif(NOT QT_LUPDATE_EXECUTABLE)
-## We need windres.exe when building on MinGW to compile the .rc file
-if (MINGW)
- find_program(MINGW_WINDRES_EXECUTABLE NAMES windres.exe ${QT_BINARY_DIR})
- if (NOT MINGW_WINDRES_EXECUTABLE)
+## We need windres.exe when building on Win32 to compile the .rc file
+if (WIN32)
+ find_program(WIN32_WINDRES_EXECUTABLE NAMES windres.exe ${QT_BINARY_DIR})
+ if (NOT WIN32_WINDRES_EXECUTABLE)
message(FATAL_ERR
- "Vidalia could not find windres. Please make sure MinGW is installed and its bin directory is in your PATH environment variable."
+ "Vidalia could not find windres. Please make sure Qt is installed and its bin directory is in your PATH environment variable."
)
- endif(NOT MINGW_WINDRES_EXECUTABLE)
-endif(MINGW)
+ endif(NOT WIN32_WINDRES_EXECUTABLE)
+endif(WIN32)
## Wraps the supplied .ts files in lrelease commands
@@ -75,9 +75,9 @@
endmacro(QT4_ADD_TRANSLATIONS)
-if (MINGW)
+if (WIN32)
## Wraps the supplied .rc files in windres commands
- macro(MINGW_WRAP_RC outfiles)
+ macro(WIN32_WRAP_RC outfiles)
foreach(it ${ARGN})
get_filename_component(it ${it} ABSOLUTE)
get_filename_component(outfile ${it} NAME_WE)
@@ -85,12 +85,12 @@
set(outfile ${CMAKE_CURRENT_BINARY_DIR}/${outfile}_res.o)
add_custom_command(OUTPUT ${outfile}
- COMMAND ${MINGW_WINDRES_EXECUTABLE}
+ COMMAND ${WIN32_WINDRES_EXECUTABLE}
ARGS -i ${it} -o ${outfile} --include-dir=${rc_path}
MAIN_DEPENDENCY ${it}
)
set(${outfiles} ${${outfiles}} ${outfile})
endforeach(it)
- endmacro(MINGW_WRAP_RC)
-endif(MINGW)
+ endmacro(WIN32_WRAP_RC)
+endif(WIN32)
Modified: vidalia/trunk/src/vidalia/CMakeLists.txt
===================================================================
--- vidalia/trunk/src/vidalia/CMakeLists.txt 2008-01-06 05:51:53 UTC (rev 2278)
+++ vidalia/trunk/src/vidalia/CMakeLists.txt 2008-01-06 05:57:23 UTC (rev 2279)
@@ -247,11 +247,7 @@
if (WIN32)
## Create a Windows binary
- if (MINGW)
- mingw_wrap_rc(vidalia_SRCS res/vidalia_win.rc)
- else (MINGW)
- qt4_add_resources(vidalia_SRCS res/vidalia_win.rc)
- endif(MINGW)
+ win32_wrap_rc(vidalia_SRCS res/vidalia_win.rc)
add_executable(${vidalia_BIN} WIN32 ${vidalia_SRCS})
else (WIN32)
## Non-Windows, non-Mac