8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 20:03:02 +01:00

[build][cmake] Fix mingw build: removed unix prefixes from output libraries.

This commit is contained in:
egorpugin 2015-05-28 13:27:11 +00:00
parent 372242e865
commit d07e85568e
3 changed files with 18 additions and 3 deletions

View File

@ -199,6 +199,11 @@ if (WIN32)
endif(WIN32)
if (MINGW)
# clear unix-style prefixes
set(CMAKE_SHARED_LIBRARY_PREFIX)
set(CMAKE_SHARED_MODULE_PREFIX)
set(CMAKE_STATIC_LIBRARY_PREFIX)
add_definitions(-D_WIN32_WINNT=0x0600)
endif()

View File

@ -108,7 +108,7 @@ function(epp_process type files)
set(dir ${dir}/${file}.d)
add_custom_command(
OUTPUT ${out}
DEPENDS databases ${in}
DEPENDS databases boot_gpre ${in}
COMMENT "Calling GPRE master for ${F}"
#
COMMAND ${CMAKE_COMMAND} -E make_directory ${dir}

View File

@ -1000,12 +1000,22 @@ foreach(F ${files})
endforeach()
if (WIN32)
set(fbclient_lib_src $<CONFIG>/fbclient.lib)
set(fbclient_lib_dst fbclient_ms.lib)
set( ib_util_lib_src $<CONFIG>/ib_util.lib)
set( ib_util_lib_dst ib_util_ms.lib)
if (MINGW)
set(fbclient_lib_src libfbclient.dll.a)
set(fbclient_lib_dst libfbclient.dll.a)
set( ib_util_lib_src libib_util.dll.a)
set( ib_util_lib_dst libib_util.dll.a)
endif()
add_custom_command(
TARGET copy_files
POST_BUILD
# lib
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<CONFIG>/fbclient.lib ${output_dir}/lib/fbclient_ms.lib
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<CONFIG>/ib_util.lib ${output_dir}/lib/ib_util_ms.lib
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${fbclient_lib_src} ${output_dir}/lib/${fbclient_lib_dst}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ib_util_lib_src} ${output_dir}/lib/${ib_util_lib_dst}
# installers
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/builds/install/arch-specific/win32/install_classic.bat ${output_dir}/install_classic.bat
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/builds/install/arch-specific/win32/install_super.bat ${output_dir}/install_super.bat