make unified build work on windows
This commit is contained in:
parent
7eebc7a2d7
commit
85ec8d3366
@ -84,7 +84,6 @@ set(TWN_THIRD_PARTY_SOURCE_FILES
|
|||||||
|
|
||||||
set(TWN_NONOPT_SOURCE_FILES
|
set(TWN_NONOPT_SOURCE_FILES
|
||||||
src/twn_stb.c
|
src/twn_stb.c
|
||||||
src/twn_main.c
|
|
||||||
|
|
||||||
src/twn_context.c include/twn_context.h
|
src/twn_context.c include/twn_context.h
|
||||||
src/twn_audio.c include/twn_audio.h
|
src/twn_audio.c include/twn_audio.h
|
||||||
@ -275,6 +274,7 @@ endfunction()
|
|||||||
function(link_deps target)
|
function(link_deps target)
|
||||||
target_link_libraries(${target} PUBLIC
|
target_link_libraries(${target} PUBLIC
|
||||||
$<$<NOT:$<BOOL:${EMSCRIPTEN}>>:SDL2::SDL2>
|
$<$<NOT:$<BOOL:${EMSCRIPTEN}>>:SDL2::SDL2>
|
||||||
|
$<$<NOT:$<BOOL:${TWN_FEATURE_DYNLIB_GAME}>>:SDL2::SDL2main>
|
||||||
physfs-static
|
physfs-static
|
||||||
xms)
|
xms)
|
||||||
target_include_directories(${target} PUBLIC ${SDL2_INCLUDE_DIRS})
|
target_include_directories(${target} PUBLIC ${SDL2_INCLUDE_DIRS})
|
||||||
@ -289,7 +289,7 @@ function(use_townengine sources output_directory)
|
|||||||
add_library(${target}_game SHARED ${sources})
|
add_library(${target}_game SHARED ${sources})
|
||||||
give_options(${target}_game)
|
give_options(${target}_game)
|
||||||
include_deps(${target}_game)
|
include_deps(${target}_game)
|
||||||
target_link_libraries(${target}_game PUBLIC $<$<NOT:$<BOOL:${EMSCRIPTEN}>>:SDL2::SDL2> ${TWN_TARGET})
|
target_link_libraries(${target}_game PUBLIC ${TWN_TARGET})
|
||||||
set_target_properties(${target}_game PROPERTIES
|
set_target_properties(${target}_game PROPERTIES
|
||||||
OUTPUT_NAME game
|
OUTPUT_NAME game
|
||||||
LIBRARY_OUTPUT_DIRECTORY ${output_directory}
|
LIBRARY_OUTPUT_DIRECTORY ${output_directory}
|
||||||
|
Loading…
Reference in New Issue
Block a user