psOff_public/CMakeLists.txt

81 lines
2.1 KiB
CMake
Raw Normal View History

2024-02-27 18:51:39 +00:00
cmake_minimum_required(VERSION 3.24)
set(ProjectName psOff_${CMAKE_BUILD_TYPE})
project(${ProjectName} VERSION 0.0.1)
unset(CMAKE_IMPORT_LIBRARY_SUFFIX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
2024-03-10 16:59:41 +00:00
set(CMAKE_CXX_FLAGS_RELEASE "/MD /Zi /GS- /GF /Gy /GR /Oi -Ofast -fno-strict-aliasing")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG /OPT:REF,ICF")
2024-02-27 18:51:39 +00:00
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
set(CMAKE_WINDOWS_SYMBOL_VISIBILITY_IN_STATIC_LIBRARIES OFF)
if(NOT PRJ_SRC_DIR)
set(PRJ_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
endif()
2024-03-04 19:16:43 +00:00
if(NOT DEFINED IMAGE_BASE)
set(IMAGE_BASE 0x10000000)
endif()
# # Gather Infos
# Vulkan
2024-02-27 18:51:39 +00:00
find_package(Vulkan 1.3 REQUIRED)
message("Vulkan Libs: ${Vulkan_LIBRARIES}")
message("Vulkan Include: ${Vulkan_INCLUDE_DIRS}")
get_filename_component(VulkanPath ${Vulkan_LIBRARY} DIRECTORY)
message("Vulkan Path: ${VulkanPath}")
# # - Gather Infos
2024-03-02 14:41:36 +00:00
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/lib) # Move all libs here post-build, except third_party
#
2024-02-27 18:51:39 +00:00
include_directories(BEFORE
${CMAKE_INSTALL_PREFIX}/development/include
${PRJ_SRC_DIR}/modules_include
2024-03-01 14:09:01 +00:00
${PRJ_SRC_DIR}/tools/logging
${PRJ_SRC_DIR}/tools/config_emu
${PRJ_SRC_DIR}
${CMAKE_BINARY_DIR}/third_party/install/include
2024-02-27 18:51:39 +00:00
)
link_directories(BEFORE
${CMAKE_INSTALL_PREFIX}/development/lib
${CMAKE_BINARY_DIR}/third_party/install/lib
2024-02-29 16:54:15 +00:00
${CMAKE_BINARY_DIR}/core
2024-03-02 13:48:41 +00:00
${CMAKE_BINARY_DIR}/lib
2024-02-27 18:51:39 +00:00
)
2024-03-02 13:48:41 +00:00
add_subdirectory(tools/logging) # include before link_libraries
add_subdirectory(tools/config_emu) # include before link_libraries
2024-03-10 13:30:22 +00:00
add_subdirectory(tools/dll2Nids)
add_dependencies(dll2Nids third_party)
2024-03-01 14:09:01 +00:00
2024-02-27 18:51:39 +00:00
link_libraries(
2024-03-01 14:09:01 +00:00
logging.lib
2024-02-27 18:51:39 +00:00
)
2024-03-04 19:16:43 +00:00
add_compile_definitions(IMAGE_BASE=${IMAGE_BASE})
2024-02-27 18:51:39 +00:00
# # Projects
include("third_party/third_party.cmake")
# Internal Projects
2024-02-27 18:51:39 +00:00
add_subdirectory(modules)
2024-02-29 16:00:13 +00:00
add_subdirectory(core)
2024-03-01 15:06:58 +00:00
add_subdirectory(utility)
2024-03-01 14:09:01 +00:00
# #- Projects
# # Install
install(DIRECTORY "${CMAKE_BINARY_DIR}/third_party/bin/" DESTINATION ${CMAKE_INSTALL_PREFIX}
FILES_MATCHING PATTERN "*.dll"
2024-03-03 14:27:53 +00:00
)
2024-03-06 13:58:27 +00:00
install(DIRECTORY "${CMAKE_BINARY_DIR}/third_party/install/bin/" DESTINATION ${CMAKE_INSTALL_PREFIX}
FILES_MATCHING PATTERN "*.dll"
2024-03-11 11:18:27 +00:00
)