Merge branch 'fix-windows-compile'

Closes STJr/SRB2!4.
This commit is contained in:
Ronald Kinard 2015-03-24 23:04:44 -05:00
commit d7b3795a82
3 changed files with 41 additions and 13 deletions

View file

@ -48,7 +48,7 @@ macro(copy_files_to_build_dir target dlllist_var)
add_custom_command(TARGET ${target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${dlllist_item}
${CMAKE_CURRENT_BINARY_DIR}/\$\(Configuration\)/${dllname}
$<TARGET_FILE_DIR:${target}>/${dllname}
)
endforeach()
endif()

View file

@ -109,7 +109,6 @@ set(SRB2_CORE_HEADERS
z_zone.h
config.h.in
${CMAKE_CURRENT_BINARY_DIR}/config.h
)
set(SRB2_CORE_RENDER_SOURCES
@ -171,10 +170,17 @@ if(NOT CLANG)
set(SRB2_CORE_SOURCES ${SRB2_CORE_SOURCES} string.c)
endif()
prepend_sources(SRB2_CORE_SOURCES)
prepend_sources(SRB2_CORE_HEADERS)
prepend_sources(SRB2_CORE_RENDER_SOURCES)
prepend_sources(SRB2_CORE_GAME_SOURCES)
set(SRB2_CORE_HEADERS ${SRB2_CORE_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/config.h)
source_group("Main" FILES ${SRB2_CORE_SOURCES} ${SRB2_CORE_HEADERS})
source_group("Renderer" FILES ${SRB2_CORE_RENDER_SOURCES})
source_group("Game" FILES ${SRB2_CORE_GAME_SOURCES})
set(SRB2_ASM_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/vid_copy.s
)
@ -241,6 +247,9 @@ if(${SRB2_CONFIG_HAVE_BLUA})
lua_script.h
)
prepend_sources(SRB2_LUA_SOURCES)
prepend_sources(SRB2_LUA_HEADERS)
source_group("LUA" FILES ${SRB2_LUA_SOURCES} ${SRB2_LUA_HEADERS})
set(SRB2_BLUA_SOURCES
@ -294,6 +303,10 @@ if(${SRB2_CONFIG_HAVE_BLUA})
blua/lvm.h
blua/lzio.h
)
prepend_sources(SRB2_BLUA_SOURCES)
prepend_sources(SRB2_BLUA_HEADERS)
source_group("LUA\\Interpreter" FILES ${SRB2_BLUA_SOURCES} ${SRB2_BLUA_HEADERS})
endif()
@ -397,16 +410,16 @@ endif()
add_definitions(-DCMAKECONFIG)
add_library(SRB2Core STATIC
${SRB2_CORE_SOURCES}
${SRB2_CORE_HEADERS}
${SRB2_CORE_RENDER_SOURCES}
${SRB2_CORE_GAME_SOURCES}
${SRB2_LUA_SOURCES}
${SRB2_LUA_HEADERS}
${SRB2_BLUA_SOURCES}
${SRB2_BLUA_HEADERS}
)
#add_library(SRB2Core STATIC
# ${SRB2_CORE_SOURCES}
# ${SRB2_CORE_HEADERS}
# ${SRB2_CORE_RENDER_SOURCES}
# ${SRB2_CORE_GAME_SOURCES}
# ${SRB2_LUA_SOURCES}
# ${SRB2_LUA_HEADERS}
# ${SRB2_BLUA_SOURCES}
# ${SRB2_BLUA_HEADERS}
#)
add_subdirectory(sdl)

View file

@ -46,10 +46,25 @@ find_package(SDL2)
if(${SDL2_FOUND})
set(SRB2_SDL2_TOTAL_SOURCES
${SRB2_CORE_SOURCES}
${SRB2_CORE_HEADERS}
${SRB2_CORE_RENDER_SOURCES}
${SRB2_CORE_GAME_SOURCES}
${SRB2_LUA_SOURCES}
${SRB2_LUA_HEADERS}
${SRB2_BLUA_SOURCES}
${SRB2_BLUA_HEADERS}
${SRB2_SDL2_SOURCES}
${SRB2_SDL2_HEADERS}
)
source_group("Main" FILES ${SRB2_CORE_SOURCES} ${SRB2_CORE_HEADERS})
source_group("Renderer" FILES ${SRB2_CORE_RENDER_SOURCES})
source_group("Game" FILES ${SRB2_CORE_GAME_SOURCES})
source_group("Assembly" FILES ${SRB2_ASM_SOURCES} ${SRB2_NASM_SOURCES})
source_group("LUA" FILES ${SRB2_LUA_SOURCES} ${SRB2_LUA_HEADERS})
source_group("LUA\\Interpreter" FILES ${SRB2_BLUA_SOURCES} ${SRB2_BLUA_HEADERS})
if(${SRB2_CONFIG_HWRENDER})
set(SRB2_SDL2_TOTAL_SOURCES ${SRB2_SDL2_TOTAL_SOURCES}
${SRB2_HWRENDER_SOURCES}
@ -129,7 +144,7 @@ if(${SDL2_FOUND})
endif()
endif()
target_link_libraries(SRB2SDL2 PRIVATE SRB2Core)
#target_link_libraries(SRB2SDL2 PRIVATE SRB2Core)
if(${SRB2_USEASM})
if(${SRB2_CONFIG_YASM})