aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-08-20 16:46:51 -0700
committerChris Robinson <[email protected]>2020-08-20 16:46:51 -0700
commit4eba5c34e97dc94174a1f8834ec4677f1da7f21a (patch)
tree2594d87e39a978b56a3c21834935439295ee2287
parent34b29a48a44ebd62cb1c1745e915ee7a8de54b69 (diff)
Use CMAKE_DLLTOOL instead of looking for dlltool manually
-rw-r--r--CMakeLists.txt15
1 files changed, 3 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 16f1dd85..9584b8bf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -94,16 +94,8 @@ if(WIN32)
set(CPP_DEFS ${CPP_DEFS} _WIN32)
option(ALSOFT_BUILD_ROUTER "Build the router (EXPERIMENTAL; creates OpenAL32.dll and soft_oal.dll)" OFF)
-
if(MINGW)
option(ALSOFT_BUILD_IMPORT_LIB "Build an import .lib using dlltool (requires sed)" ON)
- if(NOT DLLTOOL)
- if(HOST)
- set(DLLTOOL "${HOST}-dlltool")
- else()
- set(DLLTOOL "dlltool")
- endif()
- endif()
endif()
endif()
@@ -1249,13 +1241,12 @@ endif()
if(WIN32 AND MINGW AND ALSOFT_BUILD_IMPORT_LIB AND NOT LIBTYPE STREQUAL "STATIC")
find_program(SED_EXECUTABLE NAMES sed DOC "sed executable")
- find_program(DLLTOOL_EXECUTABLE NAMES "${DLLTOOL}" DOC "dlltool executable")
- if(NOT SED_EXECUTABLE OR NOT DLLTOOL_EXECUTABLE)
+ if(NOT SED_EXECUTABLE OR NOT CMAKE_DLLTOOL)
message(STATUS "")
if(NOT SED_EXECUTABLE)
message(STATUS "WARNING: Cannot find sed, disabling .def/.lib generation")
endif()
- if(NOT DLLTOOL_EXECUTABLE)
+ if(NOT CMAKE_DLLTOOL)
message(STATUS "WARNING: Cannot find dlltool, disabling .def/.lib generation")
endif()
else()
@@ -1263,7 +1254,7 @@ if(WIN32 AND MINGW AND ALSOFT_BUILD_IMPORT_LIB AND NOT LIBTYPE STREQUAL "STATIC"
LINK_FLAGS " -Wl,--output-def,OpenAL32.def")
add_custom_command(TARGET OpenAL POST_BUILD
COMMAND "${SED_EXECUTABLE}" -i -e "s/ @[^ ]*//" OpenAL32.def
- COMMAND "${DLLTOOL_EXECUTABLE}" -d OpenAL32.def -l OpenAL32.lib -D OpenAL32.dll
+ COMMAND "${CMAKE_DLLTOOL}" -d OpenAL32.def -l OpenAL32.lib -D OpenAL32.dll
COMMENT "Stripping ordinals from OpenAL32.def and generating OpenAL32.lib..."
VERBATIM
)