mirror of
https://github.com/SysRay/psOff_public.git
synced 2025-02-17 04:50:09 +00:00
use external third_party repo
This commit is contained in:
parent
09600f0c51
commit
51392ba613
@ -1,4 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
include(ExternalProject)
|
||||
|
||||
set(PSOFF_LIB_VERSION v.0.0)
|
||||
|
||||
set(ProjectName psOff_${CMAKE_BUILD_TYPE})
|
||||
project(${ProjectName} VERSION 0.0.1)
|
||||
@ -43,21 +46,25 @@ include_directories(BEFORE
|
||||
${PRJ_SRC_DIR}/tools/config_emu
|
||||
${PRJ_SRC_DIR}/tools/gamereport
|
||||
${PRJ_SRC_DIR}
|
||||
${CMAKE_BINARY_DIR}/third_party/install/include
|
||||
${CMAKE_BINARY_DIR}/third_party/src/third_party/include
|
||||
)
|
||||
|
||||
link_directories(BEFORE
|
||||
${CMAKE_INSTALL_PREFIX}/development/lib
|
||||
${CMAKE_BINARY_DIR}/third_party/install/lib
|
||||
${CMAKE_BINARY_DIR}/third_party/src/third_party/lib
|
||||
${CMAKE_BINARY_DIR}/core
|
||||
${CMAKE_BINARY_DIR}/lib
|
||||
${CMAKE_BINARY_DIR}/bin
|
||||
)
|
||||
|
||||
add_subdirectory(tools/logging) # include before link_libraries
|
||||
add_subdirectory(tools/config_emu)
|
||||
add_subdirectory(tools/gamereport)
|
||||
add_subdirectory(tools/dll2Nids)
|
||||
add_dependencies(dll2Nids third_party)
|
||||
ExternalProject_Add(third_party
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
PREFIX ${CMAKE_BINARY_DIR}/third_party
|
||||
BUILD_IN_SOURCE 1
|
||||
URL https://github.com/SysRay/psOff_thirdParty/releases/download/${PSOFF_LIB_VERSION}/psOff-3rd.zip
|
||||
)
|
||||
|
||||
set(TEST_BENCH OFF CACHE BOOL "Enable testing")
|
||||
|
||||
@ -65,25 +72,27 @@ if(TEST_BENCH)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
# include before link_libraries
|
||||
add_subdirectory(tools/logging)
|
||||
add_subdirectory(tools/config_emu)
|
||||
add_subdirectory(tools/dll2Nids)
|
||||
add_dependencies(dll2Nids third_party)
|
||||
|
||||
# -
|
||||
link_libraries(
|
||||
logging.lib
|
||||
)
|
||||
add_compile_definitions(IMAGE_BASE=${IMAGE_BASE})
|
||||
|
||||
# # Projects
|
||||
include("third_party/third_party.cmake")
|
||||
|
||||
# Internal Projects
|
||||
add_subdirectory(modules)
|
||||
add_subdirectory(core)
|
||||
add_subdirectory(utility)
|
||||
add_subdirectory(tools/gamereport)
|
||||
|
||||
# #- Projects
|
||||
|
||||
# # Install
|
||||
install(DIRECTORY "${CMAKE_BINARY_DIR}/third_party/bin/" DESTINATION ${CMAKE_INSTALL_PREFIX}
|
||||
install(DIRECTORY "${CMAKE_BINARY_DIR}/third_party/src/third_party/bin/" DESTINATION ${CMAKE_INSTALL_PREFIX}
|
||||
FILES_MATCHING PATTERN "*.dll"
|
||||
)
|
||||
install(DIRECTORY "${CMAKE_BINARY_DIR}/third_party/install/bin/" DESTINATION ${CMAKE_INSTALL_PREFIX}
|
||||
FILES_MATCHING PATTERN "*.dll"
|
||||
)
|
||||
)
|
@ -29,7 +29,7 @@ add_library(core SHARED
|
||||
$<TARGET_OBJECTS:unwinding>
|
||||
)
|
||||
|
||||
add_dependencies(core logging boost config_emu gamereport)
|
||||
add_dependencies(core logging third_party config_emu gamereport)
|
||||
target_link_libraries(core PRIVATE
|
||||
libboost_thread
|
||||
libboost_chrono
|
||||
|
@ -2,8 +2,4 @@ add_library(dmem OBJECT
|
||||
dmem.cpp
|
||||
)
|
||||
|
||||
add_dependencies(dmem third_party boost psOff_utility)
|
||||
|
||||
target_include_directories(dmem PRIVATE
|
||||
${PRJ_SRC_DIR}/third_party/magic_enum/include
|
||||
)
|
||||
add_dependencies(dmem third_party psOff_utility)
|
@ -9,8 +9,4 @@ add_library(fileManager OBJECT
|
||||
types/type_rng.cpp
|
||||
)
|
||||
|
||||
add_dependencies(fileManager third_party psOff_utility)
|
||||
|
||||
target_include_directories(fileManager PRIVATE
|
||||
${PRJ_SRC_DIR}/third_party/magic_enum/include
|
||||
)
|
||||
add_dependencies(fileManager third_party psOff_utility)
|
@ -7,6 +7,5 @@ add_library(imports OBJECT
|
||||
add_dependencies(imports third_party psOff_utility initParams)
|
||||
target_include_directories(imports PRIVATE
|
||||
${Vulkan_INCLUDE_DIRS}
|
||||
${PRJ_SRC_DIR}/third_party/optick/src
|
||||
${PRJ_SRC_DIR}
|
||||
)
|
@ -2,4 +2,4 @@ add_library(initParams OBJECT
|
||||
initParams.cpp
|
||||
)
|
||||
|
||||
add_dependencies(initParams third_party boost)
|
||||
add_dependencies(initParams third_party)
|
||||
|
@ -7,4 +7,4 @@ add_library(kernel OBJECT
|
||||
semaphore_fifo.cpp
|
||||
)
|
||||
|
||||
add_dependencies(kernel third_party boost)
|
||||
add_dependencies(kernel third_party)
|
@ -2,4 +2,4 @@ add_library(timer OBJECT
|
||||
timer.cpp
|
||||
)
|
||||
|
||||
add_dependencies(timer third_party boost)
|
||||
add_dependencies(timer third_party)
|
||||
|
@ -5,10 +5,8 @@ add_library(videoout OBJECT
|
||||
imageHandler.cpp
|
||||
)
|
||||
|
||||
add_dependencies(videoout third_party psOff_utility gamereport initParams imports boost config_emu)
|
||||
add_dependencies(videoout third_party psOff_utility gamereport initParams imports config_emu)
|
||||
|
||||
target_include_directories(videoout PRIVATE
|
||||
${Vulkan_INCLUDE_DIRS}
|
||||
${PRJ_SRC_DIR}/third_party/optick/src
|
||||
${PRJ_SRC_DIR}/third_party/magic_enum/include
|
||||
${PRJ_SRC_DIR}/third_party/SDL2/include
|
||||
)
|
||||
|
@ -21,8 +21,8 @@
|
||||
|
||||
#include <queue>
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL_syswm.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL2/SDL_syswm.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <assert.h>
|
||||
|
@ -5,8 +5,8 @@
|
||||
#include "logging.h"
|
||||
#include "utility/utility.h"
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL_vulkan.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL2/SDL_vulkan.h>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <assert.h>
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
#include "logging.h"
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL_vulkan.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL2/SDL_vulkan.h>
|
||||
#include <format>
|
||||
#include <utility/utility.h>
|
||||
#include <vulkan/vk_enum_string_helper.h>
|
||||
|
@ -6,8 +6,4 @@ project(${libName})
|
||||
|
||||
add_library(${libName} SHARED entry.cpp)
|
||||
|
||||
target_link_directories(${libName} PRIVATE
|
||||
${CMAKE_BINARY_DIR}/third_party/install/lib
|
||||
)
|
||||
|
||||
setupModule(${libName})
|
@ -9,9 +9,7 @@ add_library(${libName} SHARED entry.cpp)
|
||||
add_dependencies(${libName} third_party config_emu)
|
||||
|
||||
target_link_libraries(${libName} PRIVATE config_emu.lib SDL2 libboost_thread)
|
||||
|
||||
target_compile_definitions(${libName} PRIVATE BOOST_ALL_NO_LIB WIN32_LEAN_AND_MEAN)
|
||||
target_include_directories(${libName} PRIVATE
|
||||
${PRJ_SRC_DIR}/third_party/SDL2/include
|
||||
)
|
||||
|
||||
setupModule(${libName})
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include "logging.h"
|
||||
#include "types.h"
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <array>
|
||||
#include <chrono>
|
||||
#include <mutex>
|
||||
|
@ -10,12 +10,7 @@ add_library(${libName} SHARED
|
||||
entry.cpp entryEx.cpp avplayer.cpp
|
||||
)
|
||||
|
||||
target_link_directories(${libName} PRIVATE
|
||||
${PRJ_SRC_DIR}/third_party/ffmpeg/lib
|
||||
)
|
||||
|
||||
target_include_directories(${libName} PRIVATE
|
||||
${PRJ_SRC_DIR}/third_party/ffmpeg/include
|
||||
${Vulkan_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
|
@ -8,7 +8,7 @@ add_library(${libName} SHARED
|
||||
entry.cpp
|
||||
)
|
||||
|
||||
add_dependencies(${libName} third_party boost)
|
||||
add_dependencies(${libName} third_party)
|
||||
|
||||
target_compile_definitions(${libName} PRIVATE BOOST_ALL_NO_LIB)
|
||||
target_link_libraries(${libName} PRIVATE libboost_thread psOff_utility)
|
||||
|
@ -7,7 +7,7 @@ project(${libName})
|
||||
add_library(${libName} SHARED entry.cpp mspace.cpp)
|
||||
target_compile_definitions(${libName} PRIVATE BOOST_ALL_NO_LIB)
|
||||
|
||||
add_dependencies(${libName} core third_party boost)
|
||||
add_dependencies(${libName} core third_party)
|
||||
target_link_libraries(${libName} PRIVATE core.lib libboost_thread)
|
||||
|
||||
setupModule(${libName})
|
||||
|
@ -6,8 +6,10 @@ project(${libName})
|
||||
|
||||
add_library(${libName} SHARED entry.cpp wepoll.c epoll.cpp socket.cpp resolver.cpp)
|
||||
|
||||
add_dependencies(${libName} boost config_emu)
|
||||
add_dependencies(${libName} third_party config_emu)
|
||||
|
||||
target_compile_definitions(${libName} PUBLIC BOOST_ALL_NO_LIB WIN32_LEAN_AND_MEAN)
|
||||
|
||||
target_link_libraries(${libName} ws2_32 libboost_thread config_emu.lib)
|
||||
|
||||
setupModule(${libName})
|
||||
|
@ -6,14 +6,6 @@ project(${libName})
|
||||
|
||||
add_library(${libName} SHARED entry.cpp)
|
||||
|
||||
target_include_directories(${libName} PRIVATE
|
||||
${PRJ_SRC_DIR}/third_party/ffmpeg/include
|
||||
)
|
||||
|
||||
target_link_directories(${libName} PRIVATE
|
||||
${PRJ_SRC_DIR}/third_party/ffmpeg/lib
|
||||
)
|
||||
|
||||
set(FFMPEG_LIBS
|
||||
avformat
|
||||
avcodec
|
||||
|
@ -12,10 +12,9 @@ add_library(${libName} SHARED entry.cpp
|
||||
)
|
||||
|
||||
add_dependencies(${libName} core config_emu)
|
||||
|
||||
target_link_libraries(${libName} PRIVATE SDL2 ${Vulkan_LIBRARIES} core.lib config_emu.lib libboost_thread)
|
||||
|
||||
target_compile_definitions(${libName} PRIVATE BOOST_ALL_NO_LIB WIN32_LEAN_AND_MEAN)
|
||||
target_include_directories(${libName} PRIVATE
|
||||
${PRJ_SRC_DIR}/third_party/SDL2/include
|
||||
)
|
||||
|
||||
setupModule(${libName})
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "logging.h"
|
||||
#include "types.h"
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
LOG_DEFINE_MODULE(libScePad_config);
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "core/videoout/videoout.h"
|
||||
// #include "logging.h"
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <bitset>
|
||||
#include <math.h>
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "core/videoout/videoout.h"
|
||||
#include "logging.h"
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <bitset>
|
||||
#include <math.h>
|
||||
|
||||
|
@ -6,10 +6,6 @@ project(${libName})
|
||||
|
||||
add_library(${libName} SHARED entry.cpp)
|
||||
|
||||
target_include_directories(${libName} PRIVATE
|
||||
${PRJ_SRC_DIR}/third_party/libpng/
|
||||
)
|
||||
|
||||
add_dependencies(${libName} third_party)
|
||||
target_link_libraries(${libName} libpng16)
|
||||
|
||||
|
@ -11,7 +11,7 @@ add_library(${libName} SHARED
|
||||
pthread.cpp
|
||||
)
|
||||
|
||||
add_dependencies(${libName} core third_party boost)
|
||||
add_dependencies(${libName} core third_party)
|
||||
target_link_libraries(${libName} PRIVATE
|
||||
core.lib
|
||||
libboost_thread
|
||||
|
@ -6,7 +6,7 @@ project(${libName})
|
||||
|
||||
add_library(${libName} SHARED entry.cpp)
|
||||
|
||||
add_dependencies(${libName} third_party boost)
|
||||
add_dependencies(${libName} third_party)
|
||||
target_link_libraries(${libName} PRIVATE
|
||||
libboost_chrono
|
||||
)
|
||||
|
@ -5,12 +5,10 @@ project(${libName})
|
||||
|
||||
add_library(${libName} SHARED entry.cpp)
|
||||
|
||||
target_link_directories(${libName} PRIVATE
|
||||
${CMAKE_BINARY_DIR}/third_party/install/lib
|
||||
)
|
||||
add_dependencies(${libName} third_party config_emu)
|
||||
|
||||
add_dependencies(${libName} boost config_emu)
|
||||
target_compile_definitions(${libName} PUBLIC BOOST_ALL_NO_LIB)
|
||||
|
||||
target_link_libraries(${libName} PUBLIC libboost_thread config_emu.lib)
|
||||
|
||||
setupModule(${libName})
|
||||
|
@ -15,7 +15,7 @@ add_library(${libName} SHARED
|
||||
pthread.cpp
|
||||
)
|
||||
|
||||
add_dependencies(${libName} core third_party boost)
|
||||
add_dependencies(${libName} core third_party)
|
||||
target_link_libraries(${libName} PRIVATE
|
||||
core.lib
|
||||
libboost_thread
|
||||
|
@ -6,7 +6,8 @@ project(${libName})
|
||||
|
||||
add_library(${libName} SHARED entry.cpp)
|
||||
|
||||
add_dependencies(${libName} core third_party boost)
|
||||
add_dependencies(${libName} core third_party)
|
||||
|
||||
target_link_libraries(${libName} PRIVATE
|
||||
core.lib
|
||||
libboost_thread
|
||||
|
@ -9,15 +9,12 @@ add_link_options(/DEBUG)
|
||||
link_directories(
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}/lib
|
||||
${CMAKE_BINARY_DIR}/third_party/install/lib
|
||||
)
|
||||
|
||||
include_directories(
|
||||
${PRJ_SRC_DIR}
|
||||
${CMAKE_BINARY_DIR}/third_party/install/include
|
||||
|
||||
${Vulkan_INCLUDE_DIRS}
|
||||
${PRJ_SRC_DIR}/third_party
|
||||
${PRJ_SRC_DIR}/tools/logging
|
||||
)
|
||||
|
||||
|
@ -8,7 +8,7 @@ add_executable(semaphore_test
|
||||
|
||||
add_test(NAME semaphore_test COMMAND semaphore_test)
|
||||
|
||||
add_dependencies(semaphore_test third_party psOff_utility logging_stub boost)
|
||||
add_dependencies(semaphore_test third_party psOff_utility logging_stub)
|
||||
|
||||
target_link_libraries(semaphore_test PRIVATE
|
||||
logging_stub.lib
|
||||
@ -18,8 +18,8 @@ target_link_libraries(semaphore_test PRIVATE
|
||||
|
||||
set_target_properties(semaphore_test
|
||||
PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/."
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/."
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
|
||||
PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/."
|
||||
)
|
44
third_party/third_party.cmake
vendored
44
third_party/third_party.cmake
vendored
@ -1,44 +0,0 @@
|
||||
include(ExternalProject)
|
||||
|
||||
ExternalProject_Add(zlib_project
|
||||
SOURCE_DIR ${PRJ_SRC_DIR}/third_party/zlib
|
||||
BINARY_DIR ${CMAKE_BINARY_DIR}/third_party/zlib
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release
|
||||
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/third_party/install
|
||||
-DCMAKE_INSTALL_MESSAGE=${CMAKE_INSTALL_MESSAGE}
|
||||
-DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
|
||||
-DCMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE}
|
||||
-DCMAKE_SHARED_LINKER_FLAGS=${CMAKE_SHARED_LINKER_FLAGS}
|
||||
)
|
||||
|
||||
ExternalProject_Add(third_party
|
||||
SOURCE_DIR ${PRJ_SRC_DIR}/third_party
|
||||
BINARY_DIR ${CMAKE_BINARY_DIR}/third_party
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release
|
||||
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/third_party/install
|
||||
-DCMAKE_INSTALL_MESSAGE=${CMAKE_INSTALL_MESSAGE}
|
||||
-DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
|
||||
-DCMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE}
|
||||
-DCMAKE_SHARED_LINKER_FLAGS=${CMAKE_SHARED_LINKER_FLAGS}
|
||||
)
|
||||
ExternalProject_Add_StepDependencies(third_party build zlib_project)
|
||||
|
||||
set(BOOST_INCLUDE_LIBRARIES "program_options;date_time;interprocess;stacktrace;uuid;beast;signals2;thread;url;asio")
|
||||
ExternalProject_Add(boost
|
||||
SOURCE_DIR ${PRJ_SRC_DIR}/third_party/boost
|
||||
BINARY_DIR ${CMAKE_BINARY_DIR}/third_party/boost
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release
|
||||
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/third_party/install
|
||||
-DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
|
||||
-DCMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE}
|
||||
-DCMAKE_SHARED_LINKER_FLAGS=${CMAKE_SHARED_LINKER_FLAGS}
|
||||
-DCMAKE_INSTALL_MESSAGE=NEVER
|
||||
-DBoost_USE_STATIC_LIBS=ON
|
||||
-DBoost_USE_MULTITHREADED=ON
|
||||
-DBUILD_TESTING=OFF
|
||||
-DBOOST_INSTALL_LAYOUT=system
|
||||
CMAKE_CACHE_ARGS -DBOOST_INCLUDE_LIBRARIES:STRING=${BOOST_INCLUDE_LIBRARIES}
|
||||
)
|
@ -2,24 +2,16 @@ cmake_minimum_required(VERSION 3.24)
|
||||
|
||||
add_library(config_emu SHARED config_emu.cpp)
|
||||
|
||||
target_link_directories(config_emu PRIVATE
|
||||
${CMAKE_BINARY_DIR}/third_party/install/lib
|
||||
)
|
||||
|
||||
add_dependencies(config_emu boost)
|
||||
add_dependencies(config_emu third_party)
|
||||
|
||||
target_link_libraries(config_emu PUBLIC libboost_thread)
|
||||
target_compile_definitions(config_emu PUBLIC BOOST_ALL_NO_LIB WIN32_LEAN_AND_MEAN)
|
||||
target_compile_options(config_emu PRIVATE "/Zi")
|
||||
|
||||
target_include_directories(config_emu PRIVATE
|
||||
${PRJ_SRC_DIR}/third_party
|
||||
)
|
||||
|
||||
set_target_properties(config_emu
|
||||
PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/."
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/third_party/intall/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
|
||||
)
|
||||
|
||||
install(TARGETS config_emu LIBRARY DESTINATION .)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include "third_party/nlohmann/json.hpp"
|
||||
#include "nlohmann/json.hpp"
|
||||
#include "utility/utility.h"
|
||||
|
||||
#include <boost/thread/mutex.hpp>
|
||||
|
@ -8,12 +8,8 @@ add_executable(dll2Nids ${SRC})
|
||||
|
||||
target_include_directories(dll2Nids PRIVATE
|
||||
${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_BINARY_DIR}/third_party/install/include
|
||||
)
|
||||
|
||||
target_link_directories(dll2Nids PRIVATE
|
||||
${CMAKE_BINARY_DIR}/third_party/install/lib
|
||||
)
|
||||
add_dependencies(dll2Nids third_party)
|
||||
|
||||
add_dependencies(dll2Nids third_party boost)
|
||||
target_link_libraries(dll2Nids libboost_container)
|
@ -14,25 +14,16 @@ add_library(gamereport SHARED ${SRC} ${POST_CONFIGURE_FILE})
|
||||
|
||||
target_include_directories(gamereport PRIVATE
|
||||
${CMAKE_SOURCE_DIR}
|
||||
${PRJ_SRC_DIR}/third_party
|
||||
${CMAKE_BINARY_DIR}/third_party/install/include
|
||||
${PRJ_SRC_DIR}/third_party/SDL2/include
|
||||
${PRJ_SRC_DIR}/third_party/openssl/include
|
||||
)
|
||||
|
||||
target_link_directories(gamereport PRIVATE
|
||||
${PRJ_SRC_DIR}/third_party/openssl/lib
|
||||
${CMAKE_BINARY_DIR}/third_party/install/lib
|
||||
)
|
||||
|
||||
add_dependencies(gamereport third_party boost check_git)
|
||||
add_dependencies(gamereport third_party logging check_git)
|
||||
target_link_libraries(gamereport PUBLIC libboost_url SDL2 libssl libcrypto logging.lib config_emu.lib)
|
||||
target_compile_definitions(gamereport PUBLIC BOOST_ALL_NO_LIB)
|
||||
|
||||
set_target_properties(gamereport
|
||||
PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/."
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/third_party/intall/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
)
|
||||
|
||||
install(TARGETS gamereport LIBRARY DESTINATION .)
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "git_ver.h"
|
||||
#include "logging.h"
|
||||
#include "modules_include/system_param.h"
|
||||
#include "third_party/nlohmann/json.hpp"
|
||||
#include "nlohmann/json.hpp"
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "SDL.h"
|
||||
#include "SDL2/SDL.h"
|
||||
#include "utility/utility.h"
|
||||
|
||||
#define GAMEREPORT_USER_SEND_SCANCODE SDL_SCANCODE_F11
|
||||
|
@ -2,33 +2,25 @@ cmake_minimum_required(VERSION 3.24)
|
||||
|
||||
add_library(logging SHARED logging.cpp)
|
||||
|
||||
target_link_directories(logging PRIVATE
|
||||
${CMAKE_BINARY_DIR}/third_party/install/lib
|
||||
)
|
||||
|
||||
add_dependencies(logging third_party boost config_emu)
|
||||
add_dependencies(logging third_party config_emu)
|
||||
|
||||
target_link_libraries(logging ws2_32 p7 config_emu.lib libboost_thread)
|
||||
target_compile_definitions(logging PRIVATE BOOST_ALL_NO_LIB WIN32_LEAN_AND_MEAN)
|
||||
target_include_directories(logging PRIVATE ${PRJ_SRC_DIR}/third_party/p7/Headers)
|
||||
target_compile_options(logging PRIVATE "/Zi")
|
||||
|
||||
ADD_CUSTOM_COMMAND(TARGET logging
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/logging.lib" "${CMAKE_BINARY_DIR}/lib"
|
||||
)
|
||||
target_compile_definitions(logging PRIVATE BOOST_ALL_NO_LIB WIN32_LEAN_AND_MEAN)
|
||||
|
||||
target_compile_options(logging PRIVATE "/Zi")
|
||||
|
||||
set_target_properties(logging
|
||||
PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/."
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
|
||||
)
|
||||
|
||||
install(TARGETS logging LIBRARY DESTINATION .)
|
||||
|
||||
# Stub
|
||||
add_library(logging_stub SHARED logging_stub.cpp)
|
||||
|
||||
set_target_properties(logging_stub
|
||||
PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/."
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
|
||||
)
|
@ -4,11 +4,12 @@
|
||||
|
||||
#include "config_emu.h"
|
||||
|
||||
#include <P7_Telemetry.h>
|
||||
#include <P7_Trace.h>
|
||||
#define P7TRACE_NO_VA_ARG_OPTIMIZATION
|
||||
#include <cassert>
|
||||
#include <chrono>
|
||||
#include <mutex>
|
||||
#include <p7/P7_Telemetry.h>
|
||||
#include <p7/P7_Trace.h>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace __Log {
|
||||
|
Loading…
x
Reference in New Issue
Block a user