File tree 7 files changed +49
-94
lines changed
7 files changed +49
-94
lines changed Original file line number Diff line number Diff line change 69
69
shell : arch -x86_64 /bin/bash -e {0}
70
70
run : |
71
71
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
72
- eval "$(/usr/local/bin/brew shellenv)" # makes the Intel version of Brew and its installs are enshrined as the default
72
+ eval "$(/usr/local/bin/brew shellenv)" # makes the Intel version of Brew and its installs are enshrined as the default
73
73
echo "PATH=$PATH" >> $GITHUB_ENV # modify $PATH so the above step persists into the future steps
74
74
75
75
- name : Install macOS dependencies
@@ -105,9 +105,7 @@ jobs:
105
105
- name : Configure cross-compiled build
106
106
if : ${{ matrix.os.preset == 'linux-cross-arm64' }}
107
107
run : |
108
- cmake --preset linux
109
- ninja -f build-${{ matrix.build_type }}.ninja -C builds/linux/ HogMaker
110
- cmake --preset linux-cross-arm64 -DHogMaker_DIR=$PWD/builds/linux/ -DBUILD_TESTING=OFF -DENABLE_LOGGER=ON -DFORCE_PORTABLE_INSTALL=ON -DBUILD_EDITOR=OFF -DUSE_EXTERNAL_PLOG=ON
108
+ cmake --preset linux-cross-arm64 -DBUILD_TESTING=OFF -DENABLE_LOGGER=ON -DFORCE_PORTABLE_INSTALL=ON -DBUILD_EDITOR=OFF -DUSE_EXTERNAL_PLOG=ON
111
109
112
110
- name : Configure CMake
113
111
if : ${{ matrix.os.preset != 'linux-cross-arm64' }}
Original file line number Diff line number Diff line change @@ -275,11 +275,17 @@ endif()
275
275
276
276
add_subdirectory (Descent3)
277
277
278
- if (CMAKE_CROSSCOMPILING )
279
- find_package (HogMaker REQUIRED)
280
- else ()
281
- add_subdirectory (tools)
278
+ # Always build HogMaker natively. Build it as external project,
279
+ include (ExternalProject)
280
+ ExternalProject_Add(HogMaker
281
+ SOURCE_DIR ${CMAKE_SOURCE_DIR} /tools
282
+ BINARY_DIR ${CMAKE_BINARY_DIR} /tools
283
+ INSTALL_COMMAND ""
284
+ )
285
+ if (DEFINED CMAKE_CONFIGURATION_TYPES )
286
+ set (HogMakerBin_ConfigDir "$<CONFIG>/" )
282
287
endif ()
288
+ set (HogMakerBin ${CMAKE_BINARY_DIR} /tools/${HogMakerBin_ConfigDir} HogMaker)
283
289
284
290
add_subdirectory (netcon)
285
291
add_subdirectory (netgames)
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -19,16 +19,17 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
19
19
set_target_properties (Direct_TCP_IP PROPERTIES SUFFIX ".dylib" )
20
20
endif ()
21
21
22
- include (HogMaker)
23
- MakeHog(
24
- TARGET Direct_TCP_IP_Hog
25
- OUTPUT "${D3_GENERATED_FILES_OUTPUT_DIRECTORY} /online/Direct TCP~IP.d3c"
26
- INPUT_FILE "${CMAKE_SOURCE_DIR} /netcon/lanclient/TCP_IP.d3c.txt"
27
- SEARCH_PATH "$<TARGET_FILE_DIR:Direct_TCP_IP>" "${CMAKE_SOURCE_DIR} /scripts/data/fullhog/"
28
- DEPENDS Direct_TCP_IP
22
+ add_custom_target (Direct_TCP_IP_Hog
23
+ COMMAND ${HogMakerBin}
24
+ "$<TARGET_FILE_DIR:Descent3>/online/Direct TCP~IP.d3c"
25
+ "${CMAKE_SOURCE_DIR} /netcon/lanclient/TCP_IP.d3c.txt"
26
+ "${CMAKE_SOURCE_DIR} /scripts/data/fullhog/"
27
+ "$<TARGET_FILE_DIR:Direct_TCP_IP>"
28
+ DEPENDS Direct_TCP_IP HogMaker
29
+ COMMENT "Generate 'Direct TCP~IP.d3c'"
29
30
)
30
31
31
32
install (
32
- FILES "${D3_GENERATED_FILES_OUTPUT_DIRECTORY} /online/Direct TCP~IP.d3c"
33
- DESTINATION ${CMAKE_INSTALL_DATADIR} /online
33
+ FILES "${D3_GENERATED_FILES_OUTPUT_DIRECTORY} /online/Direct TCP~IP.d3c"
34
+ DESTINATION ${CMAKE_INSTALL_DATADIR} /online
34
35
)
Original file line number Diff line number Diff line change @@ -29,16 +29,17 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
29
29
set_target_properties (Parallax_Online PROPERTIES SUFFIX ".dylib" )
30
30
endif ()
31
31
32
- include (HogMaker)
33
- MakeHog(
34
- TARGET Parallax_Online_Hog
35
- OUTPUT "${D3_GENERATED_FILES_OUTPUT_DIRECTORY} /online/Parallax Online.d3c"
36
- INPUT_FILE "${CMAKE_SOURCE_DIR} /netcon/mtclient/Parallax_Online.d3c.txt"
37
- SEARCH_PATH "$<TARGET_FILE_DIR:Parallax_Online>" "${CMAKE_SOURCE_DIR} /scripts/data/fullhog/"
38
- DEPENDS Parallax_Online
32
+ add_custom_target (Parallax_Online_Hog
33
+ COMMAND ${HogMakerBin}
34
+ "$<TARGET_FILE_DIR:Descent3>/online/Parallax Online.d3c"
35
+ "${CMAKE_SOURCE_DIR} /netcon/mtclient/Parallax_Online.d3c.txt"
36
+ "${CMAKE_SOURCE_DIR} /scripts/data/fullhog/"
37
+ "$<TARGET_FILE_DIR:Parallax_Online>"
38
+ DEPENDS Parallax_Online HogMaker
39
+ COMMENT "Generate 'Parallax Online.d3c'"
39
40
)
40
41
41
42
install (
42
- FILES "${D3_GENERATED_FILES_OUTPUT_DIRECTORY} /online/Parallax Online.d3c"
43
- DESTINATION ${CMAKE_INSTALL_DATADIR} /online
43
+ FILES "${D3_GENERATED_FILES_OUTPUT_DIRECTORY} /online/Parallax Online.d3c"
44
+ DESTINATION ${CMAKE_INSTALL_DATADIR} /online
44
45
)
Original file line number Diff line number Diff line change @@ -90,13 +90,13 @@ foreach(SCRIPT ${SCRIPTS})
90
90
endif ()
91
91
endforeach ()
92
92
93
- include (HogMaker)
94
- MakeHog(
95
- TARGET HogFull
96
- OUTPUT "${D3_GENERATED_FILES_OUTPUT_DIRECTORY} / d3-${HOG_NAME} .hog "
97
- INPUT_FILE " ${CMAKE_SOURCE_DIR} /scripts/data/fullhog/d3- ${HOG_NAME} -fullhog.txt "
98
- SEARCH_PATH "$<TARGET_FILE_DIR:AIGame>"
99
- DEPENDS ${SCRIPTS}
93
+ add_custom_target (HogFull
94
+ COMMAND ${HogMakerBin}
95
+ "$<TARGET_FILE_DIR:Descent3>/d3- ${HOG_NAME} .hog"
96
+ "${CMAKE_SOURCE_DIR} /scripts/data/fullhog/ d3-${HOG_NAME} -fullhog.txt "
97
+ "$<TARGET_FILE_DIR:AIGame> "
98
+ DEPENDS ${SCRIPTS} HogMaker data/fullhog/d3- ${HOG_NAME} -fullhog.txt
99
+ COMMENT "Generate fullhog/d3- ${HOG_NAME} .hog"
100
100
)
101
101
102
102
install (
@@ -106,7 +106,7 @@ install(
106
106
107
107
# FIXME: there may be only one d3-linux.hog, need deal with demo somehow.
108
108
# add_custom_target(HogLinuxDemo
109
- # COMMAND $<TARGET_FILE:HogMaker>
109
+ # COMMAND ${HogMakerBin}
110
110
# "${CMAKE_BINARY_DIR}/scripts/data/demohog/d3-${HOG_NAME}.hog"
111
111
# "${CMAKE_BINARY_DIR}/scripts/data/demohog/d3-${HOG_NAME}-demohog.txt"
112
112
# "${CMAKE_BINARY_DIR}/scripts/"
Original file line number Diff line number Diff line change
1
+ cmake_minimum_required (VERSION 3.20) # For using CMAKE_<LANG>_BYTE_ORDER
2
+
3
+ project (HogMaker LANGUAGES CXX)
4
+
5
+ set (CMAKE_CXX_STANDARD 17)
6
+ set (CMAKE_CXX_STANDARD_REQUIRED ON )
7
+
1
8
add_executable (
2
9
HogMaker
3
10
HogMaker/HogFormat.cpp
4
11
HogMaker/HogMaker.cpp
5
12
)
6
- target_include_directories (HogMaker PRIVATE ${PROJECT_BINARY_DIR} /lib)
7
- export (TARGETS HogMaker FILE " ${CMAKE_BINARY_DIR} /HogMakerConfig.cmake" )
13
+
14
+ target_include_directories ( HogMaker PRIVATE ${PROJECT_SOURCE_DIR} /../lib ${PROJECT_BINARY_DIR} /lib )
You can’t perform that action at this time.
0 commit comments