de-duplicate stonesense resources

develop
Myk Taylor 2023-07-28 23:58:54 -07:00
parent aaf511b5ea
commit ac633da050
No known key found for this signature in database
3 changed files with 53 additions and 46 deletions

@ -70,16 +70,24 @@ jobs:
run: | run: |
echo "CCACHE_DIR=${HOME}/.ccache" >> $GITHUB_ENV echo "CCACHE_DIR=${HOME}/.ccache" >> $GITHUB_ENV
- name: Configure DFHack (common files) - name: Configure DFHack (common files)
env:
CC: gcc-10
CXX: g++-10
run: | run: |
cmake \ cmake \
-S . \ -S . \
-B build \ -B build \
-G Ninja \ -G Ninja \
-DCMAKE_INSTALL_PREFIX=build/common-output \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DDFHACK_BUILD_ARCH=64 \ -DDFHACK_BUILD_ARCH=64 \
-DBUILD_LIBRARY:BOOL=0 \
-DBUILD_BINARIES:BOOL=0 \
-DBUILD_DOCS:BOOL=1 \ -DBUILD_DOCS:BOOL=1 \
-DCMAKE_INSTALL_PREFIX=build/common-output -DBUILD_LIBRARY:BOOL=0 \
-DBUILD_PLUGINS:BOOL=0 \
-DBUILD_STONESENSE:BOOL=1 \
-DINSTALL_DATA_FILES:BOOL=1 \
-DINSTALL_SCRIPTS:BOOL=1
- name: Build DFHack (common files) - name: Build DFHack (common files)
run: | run: |
ninja -C build install ninja -C build install
@ -92,16 +100,16 @@ jobs:
-S . \ -S . \
-B build \ -B build \
-G Ninja \ -G Ninja \
-DDFHACK_BUILD_ARCH=64 \ -DCMAKE_INSTALL_PREFIX=build/linux-output \
-DBUILD_STONESENSE:BOOL=1 \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DBUILD_LIBRARY:BOOL=1 \ -DDFHACK_BUILD_ARCH=64 \
-DBUILD_BINARIES:BOOL=1 \
-DBUILD_DOCS:BOOL=0 \ -DBUILD_DOCS:BOOL=0 \
-DINSTALL_SCRIPTS:BOOL=0 \ -DBUILD_LIBRARY:BOOL=1 \
-DBUILD_PLUGINS:BOOL=1 \
-DBUILD_STONESENSE:BOOL=1 \
-DINSTALL_DATA_FILES:BOOL=0 \ -DINSTALL_DATA_FILES:BOOL=0 \
-DCMAKE_INSTALL_PREFIX=build/linux-output -DINSTALL_SCRIPTS:BOOL=0
- name: Build DFHack (linux build) - name: Build DFHack (linux build)
run: | run: |
ninja -C build install ninja -C build install
@ -110,7 +118,7 @@ jobs:
ccache --show-stats ccache --show-stats
- name: Cross-compile win64 artifacts - name: Cross-compile win64 artifacts
env: env:
CMAKE_EXTRA_ARGS: '-DBUILD_STONESENSE:BOOL=1 -DBUILD_DFLAUNCH:BOOL=1 -DBUILD_DOCS:BOOL=0 -DINSTALL_SCRIPTS:BOOL=0 -DINSTALL_DATA_FILES:BOOL=0' CMAKE_EXTRA_ARGS: '-DBUILD_STONESENSE:BOOL=1 -DBUILD_DFLAUNCH:BOOL=1 -DBUILD_DOCS:BOOL=0 -DINSTALL_DATA_FILES:BOOL=0 -DINSTALL_SCRIPTS:BOOL=0'
steam_username: ${{ secrets.STEAM_SDK_USERNAME }} steam_username: ${{ secrets.STEAM_SDK_USERNAME }}
steam_password: ${{ secrets.STEAM_SDK_PASSWORD }} steam_password: ${{ secrets.STEAM_SDK_PASSWORD }}
run: | run: |

@ -217,7 +217,6 @@ set(DFHACK_USERDOC_DESTINATION ${DFHACK_DATA_DESTINATION})
# some options for the user/developer to play with # some options for the user/developer to play with
option(BUILD_LIBRARY "Build the DFHack library." ON) option(BUILD_LIBRARY "Build the DFHack library." ON)
option(BUILD_PLUGINS "Build the DFHack plugins." ON) option(BUILD_PLUGINS "Build the DFHack plugins." ON)
option(BUILD_BINARIES "Build the DFHack binary tools." ON)
option(INSTALL_SCRIPTS "Install DFHack scripts." ON) option(INSTALL_SCRIPTS "Install DFHack scripts." ON)
option(INSTALL_DATA_FILES "Install DFHack common data files." ON) option(INSTALL_DATA_FILES "Install DFHack common data files." ON)
@ -418,9 +417,7 @@ file(WRITE "${CMAKE_BINARY_DIR}/dfhack_setarch.txt" ${DFHACK_SETARCH})
install(FILES "${CMAKE_BINARY_DIR}/dfhack_setarch.txt" DESTINATION "${DFHACK_DATA_DESTINATION}") install(FILES "${CMAKE_BINARY_DIR}/dfhack_setarch.txt" DESTINATION "${DFHACK_DATA_DESTINATION}")
# build the plugins # build the plugins
if(BUILD_LIBRARY AND BUILD_PLUGINS)
add_subdirectory(plugins) add_subdirectory(plugins)
endif()
if(INSTALL_DATA_FILES) if(INSTALL_DATA_FILES)
add_subdirectory(data) add_subdirectory(data)

@ -115,6 +115,7 @@ macro(dfhack_plugin)
endif() endif()
endif() endif()
if(BUILD_LIBRARY AND BUILD_PLUGINS)
add_library(${PLUGIN_NAME} MODULE ${PLUGIN_SOURCES}) add_library(${PLUGIN_NAME} MODULE ${PLUGIN_SOURCES})
ide_folder(${PLUGIN_NAME} "Plugins") ide_folder(${PLUGIN_NAME} "Plugins")
@ -153,4 +154,5 @@ macro(dfhack_plugin)
install(TARGETS ${PLUGIN_NAME} install(TARGETS ${PLUGIN_NAME}
LIBRARY DESTINATION ${DFHACK_PLUGIN_DESTINATION} LIBRARY DESTINATION ${DFHACK_PLUGIN_DESTINATION}
RUNTIME DESTINATION ${DFHACK_PLUGIN_DESTINATION}) RUNTIME DESTINATION ${DFHACK_PLUGIN_DESTINATION})
endif()
endmacro() endmacro()