Re: [CMake] Write CMakeLists.txt for this C++ program

2019-06-19 Thread Eric Dönges
To correct myself: On 20.06.19 00:48, Eric Dönges wrote: > > target_link_libraries (main > build/src/libyaracpp.a > build/deps/yara/src/yara/libyara/.libs/libyara.a > yaracpp yara pthread ssl crypto) > This of course should be target_link_libraries (main build/src/lib

Re: [CMake] Write CMakeLists.txt for this C++ program

2019-06-19 Thread Eric Dönges
On 19.06.19 15:36, dexter810 wrote: > *Approach 1:* > CMakeLists.txt: > > cmake_minimum_required(VERSION 3.6) > project(main CXX C) > > add_executable(main main.cpp) > > target_include_directories(main PRIVATE > include build/deps/yara/src/yara/libyara/include) > > > target_

[CMake] [ANNOUNCE] CMake 3.15.0-rc2 is ready for testing

2019-06-19 Thread Robert Maynard
I am proud to announce the second CMake 3.15 release candidate. https://cmake.org/download/ Documentation is available at: https://cmake.org/cmake/help/v3.15 Release notes appear below and are also published at https://cmake.org/cmake/help/v3.15/release/3.15.html Some of the more significa

Re: [CMake] Write CMakeLists.txt for this C++ program

2019-06-19 Thread dexter810
*Approach 1:* CMakeLists.txt: cmake_minimum_required(VERSION 3.6) project(main CXX C) add_executable(main main.cpp) target_include_directories(main PRIVATE include build/deps/yara/src/yara/libyara/include) target_link_libraries (main -Lbuild/src/ -Lbuild/deps/

Re: [CMake] Write CMakeLists.txt for this C++ program

2019-06-19 Thread Eric Dönges
On 19.06.19 12:42, dexter810 wrote: > cmake_minimum_required(VERSION 3.6) > project(main CXX C) > > add_executable(main main.cpp) > > set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Iinclude > -Ibuild/deps/yara/src/yara/libyara/include -Lbuild/src > -Lbuild/deps/yara/src/yara/libyara/.libs/") > > > t

[CMake] Write CMakeLists.txt for this C++ program

2019-06-19 Thread dexter810
This is the program I want to run, main.cpp: #include #include "yaracpp/yaracpp.h" int main() { yaracpp::YaraDetector yara; yara.addRules(R"( rule example { strings: $s = "Hello" condition: $s })"); if (yara.a

Re: [CMake] How to specify debug version of CRT library for Visual Studio generator?

2019-06-19 Thread David Aldrich
> Just a heads up, CMake 3.15 is introducing policy 91 which removes the > runtime library from the default set of flags, and instead has targets > establish what runtime they want. Thanks for this. On Tue, Jun 18, 2019 at 7:08 PM Robert Maynard wrote: > Just a heads up, CMake 3.15 is introduci

Re: [CMake] How to specify debug version of CRT library for Visual Studio generator?

2019-06-19 Thread David Aldrich
> > > On Tue, Jun 18, 2019 at 3:07 PM Eric Dönges wrote: > > On 18.06.19 12:53, David Aldrich wrote: > > > I have a simple CMake project that builds an executable using Visual > > > Studio 2017: > > > > > > > > > > Files > > > # -- Add files to project. --