52 lines
1.4 KiB
CMake
52 lines
1.4 KiB
CMake
|
cmake_minimum_required(VERSION 3.8)
|
||
|
include(ExternalProject)
|
||
|
include(FetchContent)
|
||
|
|
||
|
project(speciesgen VERSION 6.0.0)
|
||
|
set(CMAKE_CXX_STANDARD 17)
|
||
|
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||
|
if (NOT CMAKE_BUILD_TYPE)
|
||
|
set(CMAKE_BUILD_TYPE "Release")
|
||
|
endif()
|
||
|
|
||
|
|
||
|
if (NOT MSVC AND NOT WIN32)
|
||
|
add_executable(speciesgen
|
||
|
"src/speciesgen.cpp"
|
||
|
"src/error.cpp"
|
||
|
"src/starbound/metadata.cpp"
|
||
|
"src/starbound/item.cpp"
|
||
|
"src/starbound/patch.cpp"
|
||
|
"src/starbound/frames.cpp"
|
||
|
"src/starpounds/weightstage.cpp"
|
||
|
"src/starpounds/types.cpp"
|
||
|
)
|
||
|
else()
|
||
|
add_executable(speciesgen WIN32
|
||
|
"src/speciesgen.cpp"
|
||
|
"src/error.cpp"
|
||
|
"src/starbound/metadata.cpp"
|
||
|
"src/starbound/item.cpp"
|
||
|
"src/starbound/patch.cpp"
|
||
|
"src/starbound/frames.cpp"
|
||
|
"src/starpounds/weightstage.cpp"
|
||
|
"src/starpounds/types.cpp"
|
||
|
#"resources/resource.rc"
|
||
|
)
|
||
|
endif()
|
||
|
|
||
|
find_package(wxWidgets 3.1.5 REQUIRED COMPONENTS propgrid core base)
|
||
|
include(${wxWidgets_USE_FILE})
|
||
|
include_directories(speciesgen "include" "thirdparty/rapidjson/include" "thirdparty/magic_enum/include")
|
||
|
target_link_libraries(speciesgen PRIVATE ${wxWidgets_LIBRARIES})
|
||
|
|
||
|
add_definitions(-DSPECIESGEN_VERSION="${CMAKE_PROJECT_VERSION}")
|
||
|
|
||
|
if (NOT CMAKE_BUILD_TYPE EQUAL "DEBUG")
|
||
|
add_definitions(-DwxDEBUG_LEVEL=0 -D_ITERATOR_DEBUG_LEVEL=0)
|
||
|
endif()
|
||
|
|
||
|
if (CMAKE_VERSION VERSION_GREATER 3.12)
|
||
|
set_property(TARGET speciesgen PROPERTY CXX_STANDARD 17)
|
||
|
endif()
|