[Scummvm-git-logs] scummvm master -> cf32f6a497a1be9fb0dda608b4dc36f3bef6c14b
orgads
noreply at scummvm.org
Fri Jan 14 04:02:18 UTC 2022
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
56495448b2 CREATE_PROJECT: Enable C++11
cf32f6a497 CREATE_PROJECT: Leverage C++11 string literals for cmake generator
Commit: 56495448b274f393bcdcb39f5ef3f6b9ef46d4bb
https://github.com/scummvm/scummvm/commit/56495448b274f393bcdcb39f5ef3f6b9ef46d4bb
Author: Orgad Shaneh (orgads at gmail.com)
Date: 2022-01-14T06:02:13+02:00
Commit Message:
CREATE_PROJECT: Enable C++11
Changed paths:
devtools/create_project/cmake/CMakeLists.txt
devtools/create_project/xcode/create_project.xcodeproj/project.pbxproj
diff --git a/devtools/create_project/cmake/CMakeLists.txt b/devtools/create_project/cmake/CMakeLists.txt
index e247257b214..9bbf9a7876d 100644
--- a/devtools/create_project/cmake/CMakeLists.txt
+++ b/devtools/create_project/cmake/CMakeLists.txt
@@ -21,3 +21,5 @@ add_executable(create_project ${SOURCE_FILES})
if (WIN32)
target_link_libraries(create_project rpcrt4 advapi32)
endif ()
+set_property(TARGET create_project PROPERTY CXX_STANDARD 11)
+set_property(TARGET create_project PROPERTY CXX_STANDARD_REQUIRED ON)
diff --git a/devtools/create_project/xcode/create_project.xcodeproj/project.pbxproj b/devtools/create_project/xcode/create_project.xcodeproj/project.pbxproj
index 76e31621fd2..654a232e580 100644
--- a/devtools/create_project/xcode/create_project.xcodeproj/project.pbxproj
+++ b/devtools/create_project/xcode/create_project.xcodeproj/project.pbxproj
@@ -180,6 +180,7 @@
F9A66C2E1396D36100CEE494 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ CLANG_CXX_LANGUAGE_STANDARD="c++11";
CLANG_CXX_LIBRARY = "libc++";
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -202,6 +203,7 @@
F9A66C2F1396D36100CEE494 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ CLANG_CXX_LANGUAGE_STANDARD="c++11";
CLANG_CXX_LIBRARY = "libc++";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_PREPROCESSOR_DEFINITIONS = (
Commit: cf32f6a497a1be9fb0dda608b4dc36f3bef6c14b
https://github.com/scummvm/scummvm/commit/cf32f6a497a1be9fb0dda608b4dc36f3bef6c14b
Author: Orgad Shaneh (orgads at gmail.com)
Date: 2022-01-14T06:02:13+02:00
Commit Message:
CREATE_PROJECT: Leverage C++11 string literals for cmake generator
Changed paths:
devtools/create_project/cmake.cpp
diff --git a/devtools/create_project/cmake.cpp b/devtools/create_project/cmake.cpp
index 0389a536667..34441f90c3c 100644
--- a/devtools/create_project/cmake.cpp
+++ b/devtools/create_project/cmake.cpp
@@ -79,39 +79,41 @@ void CMakeProvider::createWorkspace(const BuildSetup &setup) {
workspace << "cmake_minimum_required(VERSION 3.13)\n";
workspace << "project(" << setup.projectDescription << ")\n\n";
- workspace << "set(CMAKE_EXPORT_COMPILE_COMMANDS ON)\n";
- workspace << "find_package(PkgConfig QUIET)\n";
- workspace << "include(CMakeParseArguments)\n";
- workspace << "\n";
- workspace << "set(SCUMMVM_LIBS)\n";
- workspace << "\n";
-
- workspace << "macro(find_feature)\n";
- workspace << "\tset(_OPTIONS_ARGS)\n";
- workspace << "\tset(_ONE_VALUE_ARGS name findpackage_name include_dirs_var libraries_var)\n";
- workspace << "\tset(_MULTI_VALUE_ARGS pkgconfig_name libraries)\n";
- workspace << "\tcmake_parse_arguments(_feature \"${_OPTIONS_ARGS}\" \"${_ONE_VALUE_ARGS}\" \"${_MULTI_VALUE_ARGS}\" ${ARGN})\n";
- workspace << "\n";
- workspace << "\tif (_feature_pkgconfig_name AND PKG_CONFIG_FOUND)\n";
- workspace << "\t\tpkg_check_modules(${_feature_name} REQUIRED ${_feature_pkgconfig_name})\n";
- workspace << "\t\tinclude_directories(${${_feature_name}_INCLUDE_DIRS})\n";
- workspace << "\t\tlist(APPEND SCUMMVM_LIBS ${${_feature_name}_LIBRARIES})\n";
- workspace << "\tendif()\n\n";
- workspace << "\tif (NOT ${_feature_name}_FOUND)\n";
- workspace << "\t\tif (_feature_findpackage_name)\n";
- workspace << "\t\t\tfind_package(${_feature_findpackage_name} REQUIRED)\n";
- workspace << "\t\tendif()\n";
- workspace << "\t\tif (_feature_include_dirs_var)\n";
- workspace << "\t\t\tinclude_directories(${${_feature_include_dirs_var}} REQUIRED)\n";
- workspace << "\t\tendif()\n";
- workspace << "\t\tif (_feature_libraries_var)\n";
- workspace << "\t\t\tlist(APPEND SCUMMVM_LIBS ${${_feature_libraries_var}})\n";
- workspace << "\t\tendif()\n";
- workspace << "\t\tif (_feature_libraries)\n";
- workspace << "\t\t\tlist(APPEND SCUMMVM_LIBS ${_feature_libraries})\n";
- workspace << "\t\tendif()\n";
- workspace << "\tendif()\n";
- workspace << "endmacro()\n\n";
+ workspace << R"(set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
+find_package(PkgConfig QUIET)
+include(CMakeParseArguments)
+
+set(SCUMMVM_LIBS)
+
+macro(find_feature)
+ set(_OPTIONS_ARGS)
+ set(_ONE_VALUE_ARGS name findpackage_name include_dirs_var libraries_var)
+ set(_MULTI_VALUE_ARGS pkgconfig_name libraries)
+ cmake_parse_arguments(_feature "${_OPTIONS_ARGS}" "${_ONE_VALUE_ARGS}" "${_MULTI_VALUE_ARGS}" ${ARGN})
+
+ if (_feature_pkgconfig_name AND PKG_CONFIG_FOUND)
+ pkg_check_modules(${_feature_name} REQUIRED ${_feature_pkgconfig_name})
+ include_directories(${${_feature_name}_INCLUDE_DIRS})
+ list(APPEND SCUMMVM_LIBS ${${_feature_name}_LIBRARIES})
+ endif()
+
+ if (NOT ${_feature_name}_FOUND)
+ if (_feature_findpackage_name)
+ find_package(${_feature_findpackage_name} REQUIRED)
+ endif()
+ if (_feature_include_dirs_var)
+ include_directories(${${_feature_include_dirs_var}} REQUIRED)
+ endif()
+ if (_feature_libraries_var)
+ list(APPEND SCUMMVM_LIBS ${${_feature_libraries_var}})
+ endif()
+ if (_feature_libraries)
+ list(APPEND SCUMMVM_LIBS ${_feature_libraries})
+ endif()
+ endif()
+endmacro()
+
+)";
workspace << "# Define the engines and subengines\n";
writeEngines(setup, workspace);
@@ -129,13 +131,15 @@ void CMakeProvider::createWorkspace(const BuildSetup &setup) {
workspace << "# Libraries and features\n\n";
writeFeatureLibSearch(setup, workspace, "sdl");
- workspace << "# Depending on how SDL2 was built, there can be either and imported target or flags variables\n";
- workspace << "# Define the flags variables from the imported target if necessary\n";
- workspace << "if (TARGET SDL2::SDL2)\n";
- workspace << "\tget_target_property(SDL2_INCLUDE_DIRS SDL2::SDL2 INTERFACE_INCLUDE_DIRECTORIES)\n";
- workspace << "\tget_target_property(SDL2_LIBRARIES SDL2::SDL2 LOCATION)\n";
- workspace << "endif()\n";
- workspace << "include_directories(${SDL2_INCLUDE_DIRS})\n\n";
+ workspace << R"(# Depending on how SDL2 was built, there can be either and imported target or flags variables
+# Define the flags variables from the imported target if necessary
+if (TARGET SDL2::SDL2)
+ get_target_property(SDL2_INCLUDE_DIRS SDL2::SDL2 INTERFACE_INCLUDE_DIRECTORIES)
+ get_target_property(SDL2_LIBRARIES SDL2::SDL2 LOCATION)
+endif()
+include_directories(${SDL2_INCLUDE_DIRS})
+
+)";
for (FeatureList::const_iterator i = setup.features.begin(), end = setup.features.end(); i != end; ++i) {
if (!i->enable || featureExcluded(i->name)) continue;
More information about the Scummvm-git-logs
mailing list