mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
Only link necessary libraries to DirectX
This commit is contained in:
parent
18c9950b97
commit
ce852d3a14
@ -271,8 +271,7 @@ set(CPPS
|
||||
weather.cpp)
|
||||
|
||||
if(WIN32)
|
||||
set(PLATFORM_LIBS linux wsock32.lib winmm.lib SDL2::SDL2
|
||||
${DSOUND_LIBRARY} ${DINPUT_LIBRARY} ${DXGUID_LIBRARY} ${DDRAW_LIBRARY})
|
||||
set(PLATFORM_LIBS linux wsock32.lib winmm.lib SDL2::SDL2)
|
||||
set(PLATFORM_CPPS loki_utils.c lnxmain.cpp)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO /NODEFAULTLIB:LIBC")
|
||||
endif()
|
||||
@ -294,7 +293,7 @@ add_executable(Descent3
|
||||
WIN32
|
||||
${HEADERS} ${CPPS} ${PLATFORM_CPPS} ${INCS}
|
||||
)
|
||||
target_link_libraries(Descent3
|
||||
target_link_libraries(Descent3 PRIVATE
|
||||
2dlib AudioEncode bitmap cfile czip d3music dd_video ddebug ddio libmve libacm
|
||||
fix grtext manage mem misc model module movie stream_audio
|
||||
music networking physics renderer rtperformance sndlib ui unzip vecmat md5
|
||||
|
@ -13,3 +13,4 @@ target_link_libraries(dd_grwin32 PRIVATE
|
||||
misc
|
||||
)
|
||||
target_compile_definitions(dd_grwin32 PRIVATE DX_APP)
|
||||
target_link_libraries(dd_grwin32 PRIVATE ${DDRAW_LIBRARY})
|
||||
|
@ -562,8 +562,7 @@ set(SOURCE
|
||||
)
|
||||
|
||||
# Editor only works in Windows, because of MFC and DirectX dependencies
|
||||
set(PLATFORM_LIBS linux wsock32.lib winmm.lib dd_grwin32 win32 SDL2::SDL2
|
||||
${DSOUND_LIBRARY} ${DINPUT_LIBRARY} ${DXGUID_LIBRARY} ${DDRAW_LIBRARY})
|
||||
set(PLATFORM_LIBS linux wsock32.lib winmm.lib dd_grwin32 win32 SDL2::SDL2)
|
||||
set(PLATFORM_CPPS ../Descent3/loki_utils.c ../Descent3/lnxmain.cpp)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO /NODEFAULTLIB:LIBC")
|
||||
|
||||
@ -573,7 +572,7 @@ target_include_directories(Descent3Editor PRIVATE ../lib ../ ../manage/ ${PROJEC
|
||||
target_compile_definitions(Descent3Editor PUBLIC _AFXDLL EDITOR)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_STANDARD} /Zc:forScope-")
|
||||
|
||||
target_link_libraries(Descent3Editor
|
||||
target_link_libraries(Descent3Editor PRIVATE
|
||||
2dlib AudioEncode bitmap cfile czip d3music dd_video ddebug ddio libmve libacm
|
||||
fix grtext manage mem misc model module movie stream_audio
|
||||
music networking physics renderer rtperformance sndlib ui unzip vecmat md5
|
||||
|
@ -6,9 +6,15 @@ set(CPPS
|
||||
>
|
||||
)
|
||||
|
||||
add_library(networking STATIC ${HEADERS} ${CPPS})
|
||||
if(WIN32)
|
||||
set(PLATFORMCPPS "directplay.cpp")
|
||||
set(PLATFORM_LIBS ${DXGUID_LIBRARY})
|
||||
endif()
|
||||
|
||||
add_library(networking STATIC ${HEADERS} ${CPPS} ${PLATFORMCPPS})
|
||||
target_link_libraries(networking PRIVATE
|
||||
ddio
|
||||
mem
|
||||
misc
|
||||
${PLATFORM_LIBS}
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user