mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-14 22:19:25 +01:00
Buildsystem: Add support for compiling with MinGW on Windows
Tested with: - Windows 8 x64 - MySQL 5.5.30 win32 - OpenSSL 1.0.1c (32 bits) - No PCH - MinGW with GCC 4.7.0 TODO: - Fix compile/link with PCH enabled - Fix compile with WheatyExceptonionReport enabled (ignored for now) - Fix compile of .rc files (ignored for now) - Test with more platforms
This commit is contained in:
@@ -29,11 +29,18 @@ set(authserver_SRCS
|
||||
)
|
||||
|
||||
if( WIN32 )
|
||||
set(authserver_SRCS
|
||||
${authserver_SRCS}
|
||||
${sources_Debugging}
|
||||
if ( MSVC )
|
||||
set(authserver_SRCS
|
||||
${authserver_SRCS}
|
||||
${sources_Debugging}
|
||||
authserver.rc
|
||||
)
|
||||
)
|
||||
else ( )
|
||||
set(authserver_SRCS
|
||||
${authserver_SRCS}
|
||||
${sources_Debugging}
|
||||
)
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
@@ -76,10 +83,17 @@ target_link_libraries(authserver
|
||||
)
|
||||
|
||||
if( WIN32 )
|
||||
add_custom_command(TARGET authserver
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/authserver.conf.dist ${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/
|
||||
)
|
||||
if ( MSVC )
|
||||
add_custom_command(TARGET authserver
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/authserver.conf.dist ${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/
|
||||
)
|
||||
elseif ( MINGW )
|
||||
add_custom_command(TARGET authserver
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/authserver.conf.dist ${CMAKE_BINARY_DIR}/bin/
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if( UNIX )
|
||||
|
||||
Reference in New Issue
Block a user