2015-08-15 20:41:02 +00:00
|
|
|
cmake_minimum_required(VERSION 2.8.12)
|
2014-04-25 16:57:00 +00:00
|
|
|
|
|
|
|
set(ASMJIT_STATIC TRUE)
|
|
|
|
|
2014-07-10 16:46:10 +00:00
|
|
|
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()
|
|
|
|
|
2016-12-20 23:47:08 +00:00
|
|
|
if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1)
|
|
|
|
message( FATAL_ERROR "RPCS3 requires at least gcc-5.1." )
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 6.1)
|
|
|
|
message( FATAL_ERROR "RPCS3 can't be compiled with gcc-6.1, see #1691." )
|
|
|
|
endif()
|
|
|
|
|
2017-03-02 21:49:42 +00: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()
|
|
|
|
|
2016-07-01 04:07:16 +00:00
|
|
|
add_definitions(-DCMAKE_BUILD)
|
|
|
|
|
2016-02-13 06:15:41 +00:00
|
|
|
# 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 tests." FORCE)
|
|
|
|
|
2016-07-01 04:07:16 +00:00
|
|
|
# Select the version of libpng to use, default is builtin
|
|
|
|
if (NOT USE_SYSTEM_LIBPNG)
|
|
|
|
add_subdirectory( 3rdparty/libpng )
|
|
|
|
endif()
|
2016-03-22 21:26:37 +00:00
|
|
|
|
2016-07-11 14:26:47 +00:00
|
|
|
option(VULKAN_PREBUILT "" OFF)
|
|
|
|
|
2015-08-07 21:53:39 +00: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")
|
2016-02-16 19:23:17 +00:00
|
|
|
add_subdirectory( Vulkan )
|
2014-04-25 16:57:00 +00:00
|
|
|
add_subdirectory( rpcs3 )
|
2016-06-18 18:41:17 +00:00
|
|
|
add_subdirectory( rsx_program_decompiler )
|