Re: [CMake] Suppress a specific path in the RPATH of an executable explicitly

2019-12-19 Thread Eric Dönges
On 19.12.19 10:52, Cornelis Bockemühl wrote: > In a project setup I am copying a number of shared library files into > the executable directory (basically with a mechanism involving > configure_file - because the "install" logic was simply too complicated > for the project and for my limited brain

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

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) > > >

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/") > > >

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

2019-06-18 Thread Eric Dönges
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.   --   # > ### > > file(GLOB SRC_FILES >    

Re: [CMake] Mingw64: add a statically linked library adds libstdc++ dependency

2019-06-17 Thread Eric Dönges
On 15.06.19 21:33, William Zeitler wrote: > In the example below, two lines are marked "COMMENT ME OUT": one in > hello_c/main.cpp and the other in hello_c/CMakeLists.txt. If you comment > these out, the reference to the hello_lib library is removed; the > project builds and the executable