-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathCMakeLists.txt
28 lines (21 loc) · 955 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
cmake_minimum_required(VERSION 3.20)
project(superfamiconv LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 20)
include_directories(include)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(CMAKE_OSX_ARCHITECTURES arm64 x86_64)
endif()
if(MSVC)
add_definitions(-DNOMINMAX)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
endif()
if(MSVC)
set(SOURCES include/fmt/format.cpp include/LodePNG/lodepng.cpp include/getopt-win/getopt.c src/superfamiconv.cpp src/sfc_palette.cpp src/sfc_tiles.cpp src/sfc_map.cpp src/Image.cpp src/Map.cpp src/Palette.cpp src/Tiles.cpp)
else()
set(SOURCES include/fmt/format.cpp include/LodePNG/lodepng.cpp src/superfamiconv.cpp src/sfc_palette.cpp src/sfc_tiles.cpp src/sfc_map.cpp src/Image.cpp src/Map.cpp src/Palette.cpp src/Tiles.cpp)
endif()
add_executable(superfamiconv ${SOURCES})