Project

General

Profile

Bug #306

Make quassel compile with msvc on windows

Added by Hydrogen over 15 years ago. Updated about 15 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
General / Unspecified
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Version:
0.13.1
OS:
Any

Description

This is a fairly simple patch, just going to inline it because I'm too lazy to create a patchfile...

Fix quassel build in msvc.
The output directory in msvc for executables is not ${CMAKE_BINARY_DIR}, but rather ${CMAKE_BINARY_DIR}/BUILDTYPE.  This causes the run of genversion to fail because its located in ${CMAKE_BINARY_DIR}/Debug, for example.  This directory is in the path however, so we can just call it directly.
There is the possiblity of this introducing a security risk, as if genversion does not compile, and there is a harmful genversion somewhere further in $PATH, it could be run.  I'm not sure if this is truly an issue, however.

-------------------------------- CMakeLists.txt --------------------------------
index 6f24251..277eb2b 100644
@ -103,7 +103,7 @ include_directories(${QT_INCLUDES})
add_executable(genversion ${CMAKE_SOURCE_DIR}/src/common/genversion.cpp)
target_link_libraries(genversion ${QT_LIBRARIES} ${QT_CORE_LIB_DEPENDENCIES})

-add_custom_target(genversion_run ALL ${CMAKE_BINARY_DIR}/genversion
+add_custom_target(genversion_run ALL genversion
${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}/src/common/version.gen)
add_dependencies(genversion_run genversion)

Associated revisions

Revision bef22247 (diff)
Added by Manuel Nickschas over 15 years ago

Find genversion.exe on Wintendo. Fixes BR #306, thanks to Hydrogen and SaroEngels!

Revision 8bc4fd53 (diff)
Added by Manuel Nickschas over 15 years ago

Find genversion.exe on Wintendo. Fixes BR #306, thanks to Hydrogen and SaroEngels!

History

#1 Updated by Hydrogen over 15 years ago

Lets change that to the following... Thanks Saroengels for the hint :)

-add_custom_target(genversion_run ALL genversion
+get_target_property( GENVERSION_EXECUTABLE genversion LOCATION )
+add_custom_target(genversion_run ALL ${GENVERSION_EXECUTABLE}

#2 Updated by Sputnick over 15 years ago

http://git.quassel-irc.org/?p=quassel.git;a=commit;h=bef2224798775ce371f85b225ef80b3b03197c83

Please let me know if it still doesn't work somewhere, as I can't test on MSVC currently. At least it seems not to cause problems on Linux :)

Also available in: Atom PDF