File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.6)
22project (server_modloader)
33
4+ include (CMakePackageConfigHelpers)
5+
46set (CMAKE_CXX_STANDARD 11)
57set (CMAKE_POSITION_INDEPENDENT_CODE ON )
68
79set (MODLOADER_VERSION "Preview 1" )
810
911add_subdirectory (dep/funchook)
1012
11- include_directories (include /)
1213add_library (server_modloader SHARED include /modloader/hook.h include /modloader/statichook.h include /modloader/log .h
1314 include /modloader/loader.h
1415 src/hook.cpp src/log .cpp src/loader.h src/loader.cpp src/elf_helper.cpp src/elf_helper.h src/main.cpp)
1516target_link_libraries (server_modloader funchook)
16- target_compile_definitions (server_modloader PRIVATE MODLOADER_VERSION="${MODLOADER_VERSION} " )
17+ target_compile_definitions (server_modloader PRIVATE MODLOADER_VERSION="${MODLOADER_VERSION} " )
18+ target_include_directories (server_modloader PUBLIC include /)
19+
20+ install (TARGETS server_modloader DESTINATION lib)
21+ install (DIRECTORY ${CMAKE_SOURCE_DIR} /include / DESTINATION include )
22+ install (FILES ModLoaderConfig.cmake DESTINATION share/cmake/modloader)
Original file line number Diff line number Diff line change 1+ add_library (ModLoader SHARED IMPORTED )
2+
3+ find_library (MODLOADER_LIBRARY server_modloader HINTS "${CMAKE_CURRENT_LIST_DIR} /../../../lib" )
4+ set (MODLOADER_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR} /../../../include/" )
5+ set_target_properties (ModLoader PROPERTIES IMPORTED_LOCATION "${MODLOADER_LIBRARY} " )
6+ set_target_properties (ModLoader PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${MODLOADER_INCLUDE_DIR} " )
You can’t perform that action at this time.
0 commit comments