1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 02:32:36 +01:00
rpcs3/CMakeLists.txt

70 lines
2.5 KiB
CMake
Raw Normal View History

2017-11-15 20:47:30 +01:00
cmake_minimum_required(VERSION 3.1)
option(WITH_GDB "WITH_GDB" OFF)
option(WITHOUT_LLVM "WITHOUT_LLVM" OFF)
option(USE_NATIVE_INSTRUCTIONS "USE_NATIVE_INSTRUCTIONS makes rpcs3 compile with -march=native, which is useful for local builds, but not good for packages." ON)
2017-06-12 20:45:29 +02:00
if (WITH_GDB)
add_definitions(-DWITH_GDB_DEBUGGER)
endif()
2018-06-12 20:03:53 +02:00
set(ASMJIT_EMBED TRUE)
set(ASMJIT_DIR "${CMAKE_CURRENT_LIST_DIR}/asmjit" CACHE PATH "Location of 'asmjit'")
include("${ASMJIT_DIR}/CMakeLists.txt")
if (NOT CMAKE_BUILD_TYPE)
message(STATUS "No build type selected, default to Release")
set(CMAKE_BUILD_TYPE "Release")
endif()
if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
message( FATAL_ERROR "RPCS3 can only be compiled on 64-bit platforms." )
endif()
2017-03-02 22:49:42 +01:00
find_program(CCACHE_FOUND ccache)
if (CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif()
# Select the version of libpng to use, default is builtin
if (NOT USE_SYSTEM_LIBPNG)
# We use libpng's static library and don't need to build the shared library and run the tests
set(PNG_SHARED OFF CACHE BOOL "Build shared lib" FORCE)
set(PNG_TESTS OFF CACHE BOOL "Build libpng tests" FORCE)
set(SKIP_INSTALL_ALL ON)
add_subdirectory(3rdparty/libpng EXCLUDE_FROM_ALL)
endif()
add_subdirectory(3rdparty/pugixml EXCLUDE_FROM_ALL)
2015-08-07 23:53:39 +02:00
# TODO: do real installation, including copying directory structure
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${PROJECT_BINARY_DIR}/bin")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${PROJECT_BINARY_DIR}/bin")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${PROJECT_BINARY_DIR}/bin")
2017-06-12 20:45:29 +02:00
add_subdirectory(Vulkan EXCLUDE_FROM_ALL)
add_subdirectory(rpcs3)
include_directories(3rdparty/hidapi/hidapi)
if(APPLE)
add_subdirectory(3rdparty/hidapi/mac EXCLUDE_FROM_ALL)
#list(APPEND LIBS hidapi)
2018-05-28 22:16:29 +02:00
elseif(CMAKE_SYSTEM MATCHES "Linux")
add_subdirectory(3rdparty/hidapi/linux EXCLUDE_FROM_ALL)
elseif(MSVC)
add_subdirectory(3rdparty/hidapi/windows EXCLUDE_FROM_ALL)
else()
add_subdirectory(3rdparty/hidapi/libusb EXCLUDE_FROM_ALL)
#list(APPEND LIBS hidapi-libusb)
endif()
2018-05-15 02:27:50 +02:00
set(YAML_CPP_BUILD_TESTS OFF CACHE BOOL "Enable testing" FORCE)
set(YAML_CPP_BUILD_TOOLS OFF CACHE BOOL "Enable parse tools" FORCE)
set(YAML_CPP_BUILD_CONTRIB OFF CACHE BOOL "Enable contrib stuff in library" FORCE)
add_subdirectory(3rdparty/yaml-cpp EXCLUDE_FROM_ALL)
2018-05-15 02:27:50 +02:00
set(XXHASH_BUNDLED_MODE ON)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Make xxHash build static libs")
add_subdirectory(3rdparty/xxHash/cmake_unofficial)