Skip to content

Commit

Permalink
windows: choose the right dlltool based on 32/64bit
Browse files Browse the repository at this point in the history
  • Loading branch information
franku committed Sep 20, 2018
1 parent 953c474 commit 8202ee4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion core/src/lib/bareos/CMakeLists.txt
Expand Up @@ -71,12 +71,19 @@ INSTALL(TARGETS bareos DESTINATION ${libdir})
set_target_properties(bareos PROPERTIES VERSION "${VERSION}"
SOVERSION "${SOVERSION}")


IF(HAVE_WIN32)
IF ("${WINDOWS_BITS}" STREQUAL "64")
set(DLLTOOL x86_64-w64-mingw32-dlltool)
ELSE()
set(DLLTOOL i686-w64-mingw32-dlltool)
ENDIF()

ADD_CUSTOM_COMMAND(
PRE_LINK
TARGET bareos
DEPENDS libbareoscfg.def
COMMAND x86_64-w64-mingw32-dlltool -d ${CMAKE_CURRENT_SOURCE_DIR}/libbareoscfg.def -l libbareoscfg_import_a
COMMAND ${DLLTOOL} -d ${CMAKE_CURRENT_SOURCE_DIR}/libbareoscfg.def -l libbareoscfg_import_a
COMMAND echo ${CMAKE_CURRENT_BINARY_DIR}
COMMAND cp libbareoscfg_import_a ${WINDOWS_IMPORT_LIB_DIRECTORY}/libbareoscfg_import_a.a)

Expand Down

0 comments on commit 8202ee4

Please sign in to comment.