Skip to content

Commit

Permalink
add dfhooks chainloader
Browse files Browse the repository at this point in the history
  • Loading branch information
myk002 committed May 3, 2024
1 parent 58dc8d0 commit 8d03e7a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@
[submodule "depends/googletest"]
path = depends/googletest
url = ../../google/googletest.git
[submodule "depends/dfhooks"]
path = depends/dfhooks
url = ../../DFHack/dfhooks
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ endif()
# make sure all the necessary submodules have been set up
if(NOT EXISTS ${dfhack_SOURCE_DIR}/library/xml/codegen.pl
OR NOT EXISTS ${dfhack_SOURCE_DIR}/scripts/CMakeLists.txt
OR NOT EXISTS ${dfhack_SOURCE_DIR}/depends/dfhooks/CMakeLists.txt
OR NOT EXISTS ${dfhack_SOURCE_DIR}/depends/clsocket/CMakeLists.txt
OR NOT EXISTS ${dfhack_SOURCE_DIR}/depends/jsoncpp-sub/CMakeLists.txt
OR NOT EXISTS ${dfhack_SOURCE_DIR}/depends/libexpat/expat/CMakeLists.txt
Expand Down
3 changes: 3 additions & 0 deletions depends/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# list depends here.
add_subdirectory(dfhooks)
install(TARGETS dfhooks LIBRARY DESTINATION . RUNTIME DESTINATION .)

add_subdirectory(lodepng)
add_subdirectory(lua)
add_subdirectory(md5)
Expand Down
1 change: 1 addition & 0 deletions depends/dfhooks
Submodule dfhooks added at 43369f
8 changes: 4 additions & 4 deletions library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -375,14 +375,14 @@ add_executable(binpatch binpatch.cpp)
target_link_libraries(binpatch dfhack-md5)

if(WIN32)
set_target_properties(dfhack PROPERTIES OUTPUT_NAME "dfhooks" )
set_target_properties(dfhack PROPERTIES OUTPUT_NAME "dfhooks_dfhack" )
set_target_properties(dfhack PROPERTIES COMPILE_FLAGS "/FI\"Export.h\"" )
set_target_properties(dfhack-client PROPERTIES COMPILE_FLAGS "/FI\"Export.h\"" )
else()
set_target_properties(dfhack PROPERTIES COMPILE_FLAGS "-include Export.h" )
set_target_properties(dfhack-client PROPERTIES COMPILE_FLAGS "-include Export.h" )
add_library(dfhooks SHARED Hooks.cpp)
target_link_libraries(dfhooks dfhack)
add_library(dfhooks_dfhack SHARED Hooks.cpp)
target_link_libraries(dfhooks_dfhack dfhack)
endif()

# effectively disables debug builds...
Expand Down Expand Up @@ -431,7 +431,7 @@ if(UNIX)
install(PROGRAMS ${dfhack_SOURCE_DIR}/package/linux/dfhack-run
DESTINATION .)
endif()
install(TARGETS dfhooks
install(TARGETS dfhooks_dfhack
LIBRARY DESTINATION .
RUNTIME DESTINATION .)
endif()
Expand Down

0 comments on commit 8d03e7a

Please sign in to comment.