diff --git a/CMakeLists.txt b/CMakeLists.txt index 0188de3c..abe92825 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -275,7 +275,12 @@ endif() add_subdirectory(Descent3) -add_subdirectory(tools) +if (CMAKE_CROSSCOMPILING) + find_package(HogMaker REQUIRED) +else() + add_subdirectory(tools) +endif() + add_subdirectory(netcon) add_subdirectory(netgames) add_subdirectory(scripts) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index e1e98bec..1b34f7e4 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,11 +1,7 @@ -if(CMAKE_CROSSCOMPILING) - find_package(HogMaker) -else() - add_executable( - HogMaker - HogMaker/HogFormat.cpp - HogMaker/HogMaker.cpp - ) - target_include_directories(HogMaker PRIVATE ${PROJECT_BINARY_DIR}/lib) - export(TARGETS HogMaker FILE "${CMAKE_BINARY_DIR}/HogMakerConfig.cmake") -endif() +add_executable( + HogMaker + HogMaker/HogFormat.cpp + HogMaker/HogMaker.cpp +) +target_include_directories(HogMaker PRIVATE ${PROJECT_BINARY_DIR}/lib) +export(TARGETS HogMaker FILE "${CMAKE_BINARY_DIR}/HogMakerConfig.cmake") \ No newline at end of file