mirror of https://github.com/WerWolv/ImHex
build: Only build the version stripper on mingw
This commit is contained in:
parent
495608ed7c
commit
a4ee590875
|
|
@ -332,29 +332,31 @@ macro(createPackage)
|
|||
endforeach()
|
||||
]])
|
||||
|
||||
set(VERSIONLESS_LIBWINPTHREAD "${CMAKE_BINARY_DIR}/libwinpthread-1.dll")
|
||||
find_file(LIBWINPTHREAD_PATH NAMES libwinpthread-1.dll)
|
||||
if (NOT LIBWINPTHREAD_PATH)
|
||||
message(FATAL_ERROR "Could not find libwinpthread-1.dll!")
|
||||
if (NOT MSVC)
|
||||
set(VERSIONLESS_LIBWINPTHREAD "${CMAKE_BINARY_DIR}/libwinpthread-1.dll")
|
||||
find_file(LIBWINPTHREAD_PATH NAMES libwinpthread-1.dll)
|
||||
if (NOT LIBWINPTHREAD_PATH)
|
||||
message(FATAL_ERROR "Could not find libwinpthread-1.dll!")
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${VERSIONLESS_LIBWINPTHREAD}
|
||||
COMMAND $<TARGET_FILE:version-stripper> ${LIBWINPTHREAD_PATH} ${VERSIONLESS_LIBWINPTHREAD}
|
||||
DEPENDS version-stripper
|
||||
COMMENT "Stripping version info from libwinpthread..."
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
add_custom_target(versionless_libwinpthread ALL
|
||||
DEPENDS ${VERSIONLESS_LIBWINPTHREAD}
|
||||
)
|
||||
|
||||
# Install the generated file
|
||||
install(FILES ${VERSIONLESS_LIBWINPTHREAD}
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${VERSIONLESS_LIBWINPTHREAD}
|
||||
COMMAND $<TARGET_FILE:version-stripper> ${LIBWINPTHREAD_PATH} ${VERSIONLESS_LIBWINPTHREAD}
|
||||
DEPENDS version-stripper
|
||||
COMMENT "Stripping version info from libwinpthread..."
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
add_custom_target(versionless_libwinpthread ALL
|
||||
DEPENDS ${VERSIONLESS_LIBWINPTHREAD}
|
||||
)
|
||||
|
||||
# Install the generated file
|
||||
install(FILES ${VERSIONLESS_LIBWINPTHREAD}
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}"
|
||||
)
|
||||
|
||||
downloadImHexPatternsFiles(".")
|
||||
elseif(UNIX AND NOT APPLE)
|
||||
set_target_properties(libimhex PROPERTIES SOVERSION ${IMHEX_VERSION})
|
||||
|
|
|
|||
|
|
@ -7,7 +7,10 @@ endif ()
|
|||
add_subdirectory(gui)
|
||||
if (WIN32)
|
||||
add_subdirectory(forwarder)
|
||||
add_subdirectory(version_stripper)
|
||||
|
||||
if (NOT MSVC)
|
||||
add_subdirectory(version_stripper)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if (NOT EMSCRIPTEN)
|
||||
|
|
|
|||
Loading…
Reference in New Issue