bug(cmake): correct cmake
This commit is contained in:
parent
a662d4a383
commit
1965551be9
|
|
@ -3,6 +3,7 @@ list(APPEND SOURCE
|
|||
Source/Patcher.cpp
|
||||
Source/Helpers.cpp
|
||||
|
||||
# Hooks
|
||||
Source/Hooks/Crypt.cpp
|
||||
Source/Hooks/Http.cpp
|
||||
)
|
||||
|
|
@ -11,41 +12,44 @@ list(APPEND HEADER
|
|||
Header/Patcher.hpp
|
||||
Header/Helpers.hpp
|
||||
|
||||
# Hooks
|
||||
Header/Hooks/Crypt.hpp
|
||||
Header/Hooks/Http.hpp
|
||||
|
||||
# Win32 resources
|
||||
Resource/Information.h
|
||||
Resource/Script.rc
|
||||
)
|
||||
|
||||
if(COMPILE_PLAYER)
|
||||
list(APPEND SOURCE
|
||||
Source/Discord.cpp
|
||||
Source/Hooks/CRoblox.cpp
|
||||
)
|
||||
if(COMPILE_PLAYER OR COMPILE_SERVER)
|
||||
# Hook CRoblox
|
||||
list(APPEND SOURCE Source/Hooks/CRoblox.cpp)
|
||||
list(APPEND HEADER Header/Hooks/CRoblox.hpp)
|
||||
|
||||
list(APPEND HEADER
|
||||
Header/Discord.cpp
|
||||
Header/Hooks/CRoblox.hpp
|
||||
)
|
||||
endif()
|
||||
if(COMPILE_PLAYER)
|
||||
# Discord Rich Presence integration
|
||||
list(APPEND SOURCE Source/Discord.cpp)
|
||||
list(APPEND HEADER Header/Discord.hpp)
|
||||
endif()
|
||||
|
||||
if(COMPILE_SERVER)
|
||||
list(APPEND SOURCE
|
||||
Source/Server.cpp
|
||||
if(COMPILE_SERVER)
|
||||
# Hook DataModel, ServerReplicator, and StandardOut as well as include our custom server interface
|
||||
list(APPEND SOURCE
|
||||
Source/Server.cpp
|
||||
|
||||
Source/Hooks/DataModel.cpp
|
||||
Source/Hooks/ServerReplicator.cpp
|
||||
Source/Hooks/StandardOut.cpp
|
||||
)
|
||||
Source/Hooks/DataModel.cpp
|
||||
Source/Hooks/ServerReplicator.cpp
|
||||
Source/Hooks/StandardOut.cpp
|
||||
)
|
||||
|
||||
list(APPEND HEADER
|
||||
Header/Server.cpp
|
||||
list(APPEND HEADER
|
||||
Header/Server.hpp
|
||||
|
||||
Header/Hooks/DataModel.cpp
|
||||
Header/Hooks/ServerReplicator.cpp
|
||||
Header/Hooks/StandardOut.cpp
|
||||
)
|
||||
Header/Hooks/DataModel.hpp
|
||||
Header/Hooks/ServerReplicator.hpp
|
||||
Header/Hooks/StandardOut.hpp
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_library(Kiseki.Patcher SHARED ${SOURCE} ${HEADER})
|
||||
|
|
@ -59,13 +63,14 @@ find_package(RapidJSON CONFIG REQUIRED)
|
|||
find_path(DETOURS_INCLUDE_DIRS "detours/detours.h")
|
||||
find_library(DETOURS_LIBRARY detours REQUIRED)
|
||||
|
||||
find_path(DISCORD_RPC_INCLUDE_DIRS "discord_rpc.h")
|
||||
find_library(DISCORD_RPC_LIBRARY discord-rpc REQUIRED)
|
||||
|
||||
target_include_directories(Kiseki.Patcher PRIVATE Header ${DETOURS_INCLUDE_DIRS})
|
||||
target_link_libraries(Kiseki.Patcher PRIVATE CURL::libcurl ${DETOURS_LIBRARY} OpenSSL::SSL OpenSSL::Crypto pugixml::static pugixml::pugixml rapidjson)
|
||||
|
||||
# Target-specific linking and compile options
|
||||
if(COMPILE_PLAYER)
|
||||
find_path(DISCORD_RPC_INCLUDE_DIRS "discord_rpc.h")
|
||||
find_library(DISCORD_RPC_LIBRARY discord-rpc REQUIRED)
|
||||
|
||||
target_include_directories(Kiseki.Patcher PRIVATE ${DISCORD_RPC_INCLUDE_DIRS})
|
||||
target_link_libraries(Kiseki.Patcher PRIVATE ${DISCORD_RPC_LIBRARY})
|
||||
target_compile_definitions(Kiseki.Patcher PRIVATE PLAYER)
|
||||
|
|
|
|||
Loading…
Reference in New Issue