Skip to content

Commit

Permalink
Enable cross-compiling of HogMaker
Browse files Browse the repository at this point in the history
  • Loading branch information
tophyr committed Jun 24, 2024
1 parent fa3f379 commit b473f48
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 7 deletions.
4 changes: 4 additions & 0 deletions netcon/lanclient/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ target_link_libraries(Direct_TCP_IP PRIVATE
>
)

if (ANDROID)
find_package(HogMaker REQUIRED)
endif()

add_custom_target(Direct_TCP_IP_Hog
COMMAND $<TARGET_FILE:HogMaker>
"$<TARGET_FILE_DIR:Descent3>/online/Direct TCP~IP.d3c"
Expand Down
4 changes: 4 additions & 0 deletions netcon/mtclient/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ target_link_libraries(Parallax_Online PRIVATE
>
)

if (ANDROID)
find_package(HogMaker REQUIRED)
endif()

add_custom_target(Parallax_Online_Hog
COMMAND $<TARGET_FILE:HogMaker>
"$<TARGET_FILE_DIR:Descent3>/online/Parallax Online.d3c"
Expand Down
4 changes: 4 additions & 0 deletions scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
set(HOG_NAME "win")
endif()

if (ANDROID)
find_package(HogMaker REQUIRED)
endif()

add_custom_target(HogFull
COMMAND $<TARGET_FILE:HogMaker>
"$<TARGET_FILE_DIR:Descent3>/d3-${HOG_NAME}.hog"
Expand Down
19 changes: 12 additions & 7 deletions tools/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
add_executable(
HogMaker
HogMaker/HogFormat.cpp
HogMaker/HogMaker.cpp
)
add_dependencies(HogMaker get_git_hash)
target_include_directories(HogMaker PRIVATE ${PROJECT_BINARY_DIR}/lib)
if (ANDROID)
find_package(HogMaker REQUIRED)
else()
add_executable(
HogMaker
HogMaker/HogFormat.cpp
HogMaker/HogMaker.cpp
)
export(TARGETS HogMaker FILE "${CMAKE_BINARY_DIR}/HogMakerConfig.cmake")
add_dependencies(HogMaker get_git_hash)
target_include_directories(HogMaker PRIVATE ${PROJECT_BINARY_DIR}/lib)
endif()

0 comments on commit b473f48

Please sign in to comment.