Files
Descent3/scripts/CMakeLists.txt
halprin d48b0f1d7f macOS Code Signing and Notarization (#669)
* Code sign the macOS binaries that go into d3-osx.hog

* Code sign the netcon clients for macOS

* Update Build GitHub Action to support macOS signing, package, and notarization

* Update secret name

* try using glob syntax to sign everything in netgames

* Clean the installed folder after making disk image and move disk image into installed folder

* Remove all references to the macOS binary not being signed in USAGE.md readme

* Split the PR workflow from the main build workflow to be explicit

* Test passing in secrets into PR

* Remove test of putting secrets into PR workflow

* Try DescentDevelopers version of GitHub Actions

* test fake secret to test

* Remove fake secret, test was successful

* Set CODESIGN_IDENTITY in the top level CMakeLists.txt

* Create macos_sign CMake function

* Update BUILD.md wih the new description of CODESIGN_IDENTITY

* Test using a combined variable

* Remove test secret

* Indent only two spaces
2025-02-27 08:18:07 -07:00

117 lines
2.3 KiB
CMake

set(CMAKE_FOLDER "scripts")
set(HEADERS
AIGame3_External.h
linux_lib.h
osiris_common.h
osiris_import.h
osiris_vector.h)
set(CPPS
$<$<PLATFORM_ID:Darwin,Linux,OpenBSD>:
linux_lib.cpp
>
)
set(SCRIPTS
aigame2
AIGame3
aigame4
AIGame
barney
BatteriesIncluded
BossCamera
CanyonsCTF
CellTestLevel
ChrisTest
clutter
generic
Geodomes
HalfPipe
InfernalBolt
Inversion
LEVEL0
level10
level11
Level12
level13
level14
LEVEL15
Level16
level17
level1
level2
level3
level4
level5
Level6
level7
level8
Level9
LevelS1
levelS2
Merc02
Merc1
Merc3
Merc4
merc5
Merc6
Merc7
myPowerHouse
Mysterious_Isle
orbital
Paranoia
PiccuStation
Polaris
Quadsomniac
RudeAwakening
SewerRat
testscript
TrainingMission
Y2K
)
add_library(dallas STATIC DallasFuncs.cpp osiris_import.cpp osiris_vector.cpp)
set_target_properties(dallas PROPERTIES PREFIX "")
set_target_properties(dallas PROPERTIES CXX_VISIBILITY_PRESET "hidden")
target_link_libraries(dallas fix misc)
foreach(SCRIPT ${SCRIPTS})
add_library(${SCRIPT} MODULE ${CPPS} ${HEADERS} "${SCRIPT}.cpp")
target_link_libraries(${SCRIPT}
dallas
fix
misc
module
)
set_target_properties(${SCRIPT} PROPERTIES PREFIX "")
set_target_properties(${SCRIPT} PROPERTIES CXX_VISIBILITY_PRESET "hidden")
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set_target_properties(${SCRIPT} PROPERTIES SUFFIX ".dylib")
macos_sign(${SCRIPT})
endif()
endforeach()
include(HogMaker)
MakeHog(
TARGET HogFull
OUTPUT "${D3_GENERATED_FILES_OUTPUT_DIRECTORY}/d3-${HOG_NAME}.hog"
INPUT_FILE "${CMAKE_SOURCE_DIR}/scripts/data/fullhog/d3-${HOG_NAME}-fullhog.txt"
SEARCH_PATH "$<TARGET_FILE_DIR:AIGame>"
DEPENDS ${SCRIPTS}
)
install(
FILES "${D3_GENERATED_FILES_OUTPUT_DIRECTORY}/d3-${HOG_NAME}.hog"
DESTINATION ${CMAKE_INSTALL_DATADIR}
)
# FIXME: there may be only one d3-linux.hog, need deal with demo somehow.
# add_custom_target(HogLinuxDemo
# COMMAND $<TARGET_FILE:HogMaker>
# "${CMAKE_BINARY_DIR}/scripts/data/demohog/d3-${HOG_NAME}.hog"
# "${CMAKE_BINARY_DIR}/scripts/data/demohog/d3-${HOG_NAME}-demohog.txt"
# "${CMAKE_BINARY_DIR}/scripts/"
# DEPENDS ${SCRIPTS} HogMaker data/fullhog/d3-${HOG_NAME}-demohog.txt
# COMMENT "Generate linuxdemohog/d3-${HOG_NAME}.hog"
# )