From d6342f01959631341cb883048992f80ccda7694e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 14 Mar 2018 09:02:33 +0100 Subject: cmake: find editbin for .sln easier It's in the linker directory as-is. --- cmake/opentrack-boilerplate.cmake | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'cmake/opentrack-boilerplate.cmake') 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() -- cgit v1.2.3