Skip to content

Commit b473f48

Browse files
committed
Enable cross-compiling of HogMaker
1 parent fa3f379 commit b473f48

4 files changed

Lines changed: 24 additions & 7 deletions

File tree

netcon/lanclient/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ target_link_libraries(Direct_TCP_IP PRIVATE
1212
>
1313
)
1414

15+
if (ANDROID)
16+
find_package(HogMaker REQUIRED)
17+
endif()
18+
1519
add_custom_target(Direct_TCP_IP_Hog
1620
COMMAND $<TARGET_FILE:HogMaker>
1721
"$<TARGET_FILE_DIR:Descent3>/online/Direct TCP~IP.d3c"

netcon/mtclient/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ target_link_libraries(Parallax_Online PRIVATE
1818
>
1919
)
2020

21+
if (ANDROID)
22+
find_package(HogMaker REQUIRED)
23+
endif()
24+
2125
add_custom_target(Parallax_Online_Hog
2226
COMMAND $<TARGET_FILE:HogMaker>
2327
"$<TARGET_FILE_DIR:Descent3>/online/Parallax Online.d3c"

scripts/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
8686
set(HOG_NAME "win")
8787
endif()
8888

89+
if (ANDROID)
90+
find_package(HogMaker REQUIRED)
91+
endif()
92+
8993
add_custom_target(HogFull
9094
COMMAND $<TARGET_FILE:HogMaker>
9195
"$<TARGET_FILE_DIR:Descent3>/d3-${HOG_NAME}.hog"

tools/CMakeLists.txt

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
add_executable(
2-
HogMaker
3-
HogMaker/HogFormat.cpp
4-
HogMaker/HogMaker.cpp
5-
)
6-
add_dependencies(HogMaker get_git_hash)
7-
target_include_directories(HogMaker PRIVATE ${PROJECT_BINARY_DIR}/lib)
1+
if (ANDROID)
2+
find_package(HogMaker REQUIRED)
3+
else()
4+
add_executable(
5+
HogMaker
6+
HogMaker/HogFormat.cpp
7+
HogMaker/HogMaker.cpp
8+
)
9+
export(TARGETS HogMaker FILE "${CMAKE_BINARY_DIR}/HogMakerConfig.cmake")
10+
add_dependencies(HogMaker get_git_hash)
11+
target_include_directories(HogMaker PRIVATE ${PROJECT_BINARY_DIR}/lib)
12+
endif()

0 commit comments

Comments
 (0)