Skip to content

Commit

Permalink
build SGP just once for all languages
Browse files Browse the repository at this point in the history
another down; a gorillion to go
  • Loading branch information
majcosta committed Dec 24, 2024
1 parent 8c8d826 commit f542574
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
7 changes: 1 addition & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ add_subdirectory("ext/export/src")
# and therefore only need to be compiled once. Good.
add_subdirectory(Lua)
add_subdirectory(Multiplayer)
add_subdirectory(sgp)

# static libraries whose source files, header files or header files included
# by header files rely on Application and Language preprocessor definitions, and
Expand All @@ -65,7 +66,6 @@ TileEngine
TacticalAI
Utils
Strategic
sgp
Laptop
Editor
Console
Expand Down Expand Up @@ -129,10 +129,5 @@ foreach(lang IN LISTS LangTargets)
)
target_link_libraries(${Executable} PUBLIC ${VeryBadLib})
endforeach()

# for sgp only
target_link_libraries(${Executable}_sgp PRIVATE "ddraw.lib" "${PROJECT_SOURCE_DIR}/fmodvc.lib")
target_link_libraries(${Executable}_sgp PUBLIC libpng)
target_compile_definitions(${Executable}_sgp PRIVATE NO_ZLIB_COMPRESSION)
endforeach()
endforeach()
1 change: 1 addition & 0 deletions Ja2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@ Lua
bfVFS
"ws2_32.lib"
Multiplayer
sgp
PARENT_SCOPE)
7 changes: 5 additions & 2 deletions sgp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(sgpSrc
add_library(sgp
"${CMAKE_CURRENT_SOURCE_DIR}/Button Sound Control.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Button System.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/Compression.cpp"
Expand Down Expand Up @@ -33,4 +33,7 @@ set(sgpSrc
"${CMAKE_CURRENT_SOURCE_DIR}/vobject_blitters.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/vsurface.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/WinFont.cpp"
PARENT_SCOPE)
)
target_link_libraries(sgp PRIVATE "ddraw.lib" "${PROJECT_SOURCE_DIR}/fmodvc.lib")
target_link_libraries(sgp PUBLIC libpng)
target_compile_definitions(sgp PRIVATE NO_ZLIB_COMPRESSION)

0 comments on commit f542574

Please sign in to comment.