From 93580bda2478daa89f94b24f9fb130778afd3ddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Rombauts?= Date: Wed, 6 Jan 2021 09:41:13 +0100 Subject: [PATCH] Fix the compilation of example2 on latest MSVC --- build.bat | 3 ++- examples/example2/CMakeLists.txt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build.bat b/build.bat index cadb1655..87ea871f 100644 --- a/build.bat +++ b/build.bat @@ -6,7 +6,8 @@ mkdir build cd build @REM Generate a Visual Studio solution for latest version found -cmake -DSQLITECPP_BUILD_EXAMPLES=ON -DSQLITECPP_BUILD_TESTS=ON .. +REM -DPYTHON_EXECUTABLE=D:\workspace\Corvus\UnrealEngine\Engine\Binaries\ThirdParty\Python\Win64\python.exe +cmake -DSQLITECPP_BUILD_EXAMPLES=ON -DSQLITECPP_BUILD_TESTS=ON -DSQLITECPP_RUN_CPPLINT=OFF .. @if ERRORLEVEL 1 goto onError @REM Build default configuration (ie 'Debug') diff --git a/examples/example2/CMakeLists.txt b/examples/example2/CMakeLists.txt index 207422ed..9c827c2a 100644 --- a/examples/example2/CMakeLists.txt +++ b/examples/example2/CMakeLists.txt @@ -1,6 +1,6 @@ # Example CMake file for compiling & linking a project with the the SQLiteCpp wrapper # -# Copyright (c) 2012-2020 Sebastien Rombauts (sebastien.rombauts@gmail.com) +# Copyright (c) 2012-2021 Sebastien Rombauts (sebastien.rombauts@gmail.com) # # Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt # or copy at http://opensource.org/licenses/MIT) @@ -16,6 +16,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) # or set them in the cmake command line (see for instance provided build.bat/build.sh scripts) set(SQLITECPP_RUN_CPPCHECK OFF CACHE BOOL "" FORCE) set(SQLITECPP_RUN_CPPLINT OFF CACHE BOOL "" FORCE) +set(SQLITECPP_USE_STATIC_RUNTIME OFF CACHE BOOL "" FORCE) add_subdirectory(../.. SQLiteCpp) # out-of-source build requires explicit subdir name for compilation artifacts # Add main.cpp example source code to the executable