bug(cmake): correct cmake
This commit is contained in:
parent
a662d4a383
commit
1965551be9
|
|
@ -3,6 +3,7 @@ list(APPEND SOURCE
|
||||||
Source/Patcher.cpp
|
Source/Patcher.cpp
|
||||||
Source/Helpers.cpp
|
Source/Helpers.cpp
|
||||||
|
|
||||||
|
# Hooks
|
||||||
Source/Hooks/Crypt.cpp
|
Source/Hooks/Crypt.cpp
|
||||||
Source/Hooks/Http.cpp
|
Source/Hooks/Http.cpp
|
||||||
)
|
)
|
||||||
|
|
@ -11,41 +12,44 @@ list(APPEND HEADER
|
||||||
Header/Patcher.hpp
|
Header/Patcher.hpp
|
||||||
Header/Helpers.hpp
|
Header/Helpers.hpp
|
||||||
|
|
||||||
|
# Hooks
|
||||||
Header/Hooks/Crypt.hpp
|
Header/Hooks/Crypt.hpp
|
||||||
Header/Hooks/Http.hpp
|
Header/Hooks/Http.hpp
|
||||||
|
|
||||||
|
# Win32 resources
|
||||||
Resource/Information.h
|
Resource/Information.h
|
||||||
Resource/Script.rc
|
Resource/Script.rc
|
||||||
)
|
)
|
||||||
|
|
||||||
if(COMPILE_PLAYER)
|
if(COMPILE_PLAYER OR COMPILE_SERVER)
|
||||||
list(APPEND SOURCE
|
# Hook CRoblox
|
||||||
Source/Discord.cpp
|
list(APPEND SOURCE Source/Hooks/CRoblox.cpp)
|
||||||
Source/Hooks/CRoblox.cpp
|
list(APPEND HEADER Header/Hooks/CRoblox.hpp)
|
||||||
)
|
|
||||||
|
|
||||||
list(APPEND HEADER
|
if(COMPILE_PLAYER)
|
||||||
Header/Discord.cpp
|
# Discord Rich Presence integration
|
||||||
Header/Hooks/CRoblox.hpp
|
list(APPEND SOURCE Source/Discord.cpp)
|
||||||
)
|
list(APPEND HEADER Header/Discord.hpp)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(COMPILE_SERVER)
|
if(COMPILE_SERVER)
|
||||||
list(APPEND SOURCE
|
# Hook DataModel, ServerReplicator, and StandardOut as well as include our custom server interface
|
||||||
Source/Server.cpp
|
list(APPEND SOURCE
|
||||||
|
Source/Server.cpp
|
||||||
|
|
||||||
Source/Hooks/DataModel.cpp
|
Source/Hooks/DataModel.cpp
|
||||||
Source/Hooks/ServerReplicator.cpp
|
Source/Hooks/ServerReplicator.cpp
|
||||||
Source/Hooks/StandardOut.cpp
|
Source/Hooks/StandardOut.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND HEADER
|
list(APPEND HEADER
|
||||||
Header/Server.cpp
|
Header/Server.hpp
|
||||||
|
|
||||||
Header/Hooks/DataModel.cpp
|
Header/Hooks/DataModel.hpp
|
||||||
Header/Hooks/ServerReplicator.cpp
|
Header/Hooks/ServerReplicator.hpp
|
||||||
Header/Hooks/StandardOut.cpp
|
Header/Hooks/StandardOut.hpp
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(Kiseki.Patcher SHARED ${SOURCE} ${HEADER})
|
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_path(DETOURS_INCLUDE_DIRS "detours/detours.h")
|
||||||
find_library(DETOURS_LIBRARY detours REQUIRED)
|
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_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_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)
|
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_include_directories(Kiseki.Patcher PRIVATE ${DISCORD_RPC_INCLUDE_DIRS})
|
||||||
target_link_libraries(Kiseki.Patcher PRIVATE ${DISCORD_RPC_LIBRARY})
|
target_link_libraries(Kiseki.Patcher PRIVATE ${DISCORD_RPC_LIBRARY})
|
||||||
target_compile_definitions(Kiseki.Patcher PRIVATE PLAYER)
|
target_compile_definitions(Kiseki.Patcher PRIVATE PLAYER)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue