if(COMMAND cmake_policy) cmake_policy(SET CMP0003 NEW) # link to full path of libs cmake_policy(SET CMP0005 NEW) # escapes in add_definitions if(POLICY CMP0077) cmake_policy(SET CMP0077 NEW) # use vars for options endif() if(NOT CMAKE_VERSION VERSION_LESS 3.0) cmake_policy(SET CMP0043 NEW) # for wxWidgets, use generator expressions endif() endif() option(ENABLE_VCPKG "Use dependencies for Visual Studio from vcpkg" ON) set(NLS_DEFAULT ON) # get win32 deps before project declaration, because toolchain is set for vcpkg set(VCPKG_DEPS zlib libpng SDL2 SFML gettext wxWidgets) include(${CMAKE_SOURCE_DIR}/cmake/Win32Deps.cmake) project(VBA-M C CXX) cmake_minimum_required(VERSION 2.8.12) if(NOT CMAKE_PREFIX_PATH AND (NOT ("$ENV{CMAKE_PREFIX_PATH}" STREQUAL ""))) set(CMAKE_PREFIX_PATH "$ENV{CMAKE_PREFIX_PATH}") endif() if(CMAKE_BUILD_TYPE STREQUAL "") set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build Type" FORCE) endif() set(ALL_TARGETS fex visualboyadvance-m vbamcore vbam) set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) #Output all binaries at top level set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}) option(ENABLE_SDL "Build the SDL port" OFF) option(ENABLE_WX "Build the wxWidgets port" ON) option(ENABLE_DEBUGGER "Enable the debugger" ON) option(ENABLE_ASAN "Enable -fsanitize=