mirror of
https://github.com/krystalgamer/spidey-decomp.git
synced 2024-11-23 21:39:48 +00:00
27 lines
851 B
CMake
27 lines
851 B
CMake
cmake_minimum_required(VERSION 3.5)
|
|
project(spider LANGUAGES CXX)
|
|
|
|
message ("Will create project for decomp!")
|
|
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
message("Creating for G++")
|
|
set (CMAKE_CXX_FLAGS "-m32 -w -fpermissive")
|
|
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
|
message("Creating for Clang++")
|
|
set (CMAKE_CXX_FLAGS "-m32 -w -fpermissive -fms-extensions -Wno-address-of-temporary")
|
|
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
|
message("Creating for AppleClang++")
|
|
set (CMAKE_CXX_FLAGS "-arch i386 -m32 -w -fpermissive -fms-extensions")
|
|
elseif (MSVC)
|
|
message("Creating Windows project")
|
|
if(NOT CMAKE_SIZEOF_VOID_P EQUAL 4)
|
|
message(FATAL_ERROR "Please switch to x32 build.")
|
|
endif()
|
|
else()
|
|
message(FATAL_ERROR "Could not detect compiler")
|
|
endif()
|
|
|
|
file(GLOB SRC_FILES *.cpp)
|
|
|
|
add_executable(${PROJECT_NAME} ${SRC_FILES})
|