summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-03-14 09:02:33 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-03-14 09:02:33 +0100
commitd6342f01959631341cb883048992f80ccda7694e (patch)
tree9ad2227699edd7623b87e49a77e4952a4a892f11
parent5c7485c4afab0a9c74a454f39aad72f8df8e9444 (diff)
cmake: find editbin for .sln easier
It's in the linker directory as-is.
-rw-r--r--cmake/opentrack-boilerplate.cmake18
1 files changed, 4 insertions, 14 deletions
diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake
index bea2b47a..02826941 100644
--- a/cmake/opentrack-boilerplate.cmake
+++ b/cmake/opentrack-boilerplate.cmake
@@ -96,20 +96,10 @@ endfunction()
function(otr_find_msvc_editbin varname)
if(MSVC)
- # on .sln generator we have no editbin in path
- is_sln_generator(is-msvc)
- if(is-msvc)
- # this is bad but what can we do? searching for vcvarsall.bat
- # would be easier, but then we'd have to differentiate x86/amd64
- # cross tools, etc. which is a can of worms and if/else branches.
- get_filename_component(linker-dir "${CMAKE_LINKER}" DIRECTORY)
- find_file(opentrack_editbin-executable "editbin.exe" "${linker-dir}" "${linker-dir}/.." "${linker-dir}/../..")
- otr_escape_string("${editbin-executable}" editbin-executable)
- else()
- set(opentrack_editbin-executable "editbin")
- endif()
- mark_as_advanced(FORCE opentrack_editbin-executable)
- set("${varname}" "${opentrack_editbin-executable}" PARENT_SCOPE)
+ get_filename_component(linker-dir "${CMAKE_LINKER}" DIRECTORY)
+ set("${varname}" "${linker-dir}/editbin.exe" PARENT_SCOPE)
+ else()
+ set("${varname}" "editbin" PARENT_SCOPE)
endif()
endfunction()