cmake

How to group multiple library targets into one in CMake

风格不统一 提交于 2021-02-08 05:01:45
问题 I am trying to group multiple targets into a single one so the downstream user only need to link to that single one. The downstream user won't need to look up all the targets and all functionality from the upstream library will be available by linking to that single one. Please see below CMakeLists of my failed attempt. cmake_minimum_required(VERSION 3.11) project(modules) # 10 libraries with actually functionality add_subdirectory(mylib1) add_subdirectory(mylib2) ... add_subdirectory(mylib10

Error : LNK1104 cannot open file 'pthread.lib'

北城以北 提交于 2021-02-08 03:46:56
问题 I am trying to compile a native Linux C++ application in Windows using Visual Studio 2017. The app uses WebRtc's Acoustic Echo Cancellation(AEC) APIs to negate echo on wav files. Following is the CmakeLists.txt file: cmake_minimum_required(VERSION 2.8) project(wav-aec) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) add_subdirectory(gflags) add_definitions("-DWEBRTC_NS_FLOAT -DWEBRTC_WIN -DNOMINMAX") #-DWEBRTC_UNTRUSTED_DELAY -DWEBRTC_LINUX -DWEBRTC_POSIX

Build zeromq on Windows 10 with CMake

∥☆過路亽.° 提交于 2021-02-08 03:45:28
问题 In the past I’ve used the Visual Studio solution files to build zeromq (libzmq) on Windows. I just noticed that the Visual Studio solutions have been deprecated because they are too difficult to maintain. The alternative is to use CMake; trouble is I’ve no experience of how to invoke the build this way. Is anyone please able to demonstrate the necessary commands, step-by-step? I’d like to achieve 32 & 64bit libzmq binaries using libsodium and compiled with VS2015 on Windows 10. (I’ve

Compile and link OpenCV to my project in my main CMakeLists.txt

不想你离开。 提交于 2021-02-08 03:01:43
问题 I am new to cmake. I have a project which uses dlib and opencv. They are defined as submodules which are in third_party folder. I want to link them to my main project which is 'node' with cmake but I could not achieved. I am sharing my project tree. I did with find_package(OpenCV) and target_link_libraries(recognition-node ${OPENCV_LIBS}) way but I need to compile from source without installing anything. At last, I just want to write 'cmake . && make' . ├── CMakeLists.txt ├── node │ ├── build

Compile and link OpenCV to my project in my main CMakeLists.txt

烈酒焚心 提交于 2021-02-08 03:00:51
问题 I am new to cmake. I have a project which uses dlib and opencv. They are defined as submodules which are in third_party folder. I want to link them to my main project which is 'node' with cmake but I could not achieved. I am sharing my project tree. I did with find_package(OpenCV) and target_link_libraries(recognition-node ${OPENCV_LIBS}) way but I need to compile from source without installing anything. At last, I just want to write 'cmake . && make' . ├── CMakeLists.txt ├── node │ ├── build

CMake: How to show headers in “Header files” in Visual Studio project?

有些话、适合烂在心里 提交于 2021-02-07 23:47:11
问题 I have created a simple library project in C++ and added CMake file to automatically generate a Visual Studio project. My small project contains only 2 files: include/ testproject/ testproject.h src/ testproject.cpp CMakeLists.txt Header file now in External Dependencies (screenshot). How to display it in the section "Headers"? (or any other. Just not "External Dependencies") CMakeLists.txt: CMAKE_MINIMUM_REQUIRED(VERSION 2.8) SET(PROJECTNAME testproject) PROJECT(${PROJECTNAME}) FILE(GLOB MY

CMake: How to show headers in “Header files” in Visual Studio project?

人走茶凉 提交于 2021-02-07 23:44:47
问题 I have created a simple library project in C++ and added CMake file to automatically generate a Visual Studio project. My small project contains only 2 files: include/ testproject/ testproject.h src/ testproject.cpp CMakeLists.txt Header file now in External Dependencies (screenshot). How to display it in the section "Headers"? (or any other. Just not "External Dependencies") CMakeLists.txt: CMAKE_MINIMUM_REQUIRED(VERSION 2.8) SET(PROJECTNAME testproject) PROJECT(${PROJECTNAME}) FILE(GLOB MY

Building opencv 3.1 on windows - where do I specify the LAPACK library location?

99封情书 提交于 2021-02-07 23:25:54
问题 For building opencv 3.1 I'm using cmake with Visual Studio 2013. I downloaded the dependencies as shown here: http://docs.opencv.org/3.1.0/d3/d52/tutorial_windows_install.html While configuring cmake, the first thing it shows is: FP16: Compiler support is available A library with BLAS API not found. Please specify library location. LAPACK requires BLAS A library with LAPACK API not found. Please specify library location. The problem is, that I don't know how to specify the location. For the

Building opencv 3.1 on windows - where do I specify the LAPACK library location?

假装没事ソ 提交于 2021-02-07 23:24:27
问题 For building opencv 3.1 I'm using cmake with Visual Studio 2013. I downloaded the dependencies as shown here: http://docs.opencv.org/3.1.0/d3/d52/tutorial_windows_install.html While configuring cmake, the first thing it shows is: FP16: Compiler support is available A library with BLAS API not found. Please specify library location. LAPACK requires BLAS A library with LAPACK API not found. Please specify library location. The problem is, that I don't know how to specify the location. For the

How can I make CMake use Mingw-w64 gcc/g++? [duplicate]

允我心安 提交于 2021-02-07 22:56:14
问题 This question already has answers here : Running CMake on Windows (2 answers) Closed 1 year ago . I am on Windwos trying to get Mingw-w64 to work with CMake since my MSVC is somehow not working at all (using Windows10 64bit. Basically I add the arguments -DCMAKE_CXX_COMPILER="C:/MinGW-w64/mingw64/bin/g++.exe" -DCMAKE_C_COMPILER="C:/MinGW-w64/mingw64/bin/gcc.exe" to my call to CMake which sets the corresponding compiler. However I get these errors: -- The C compiler identification is unknown -