cmake

CMake cannot find freeglut on windows in Clion

半世苍凉 提交于 2021-02-17 01:54:05
问题 I've been stuck for a while now and I can't figure out how to get freeglut working. I thought I knew what it was asking me to do, so I added that set(prefix_path) line but it didn't do anything. Am I supposed to write my own freeglut-config.cmake or what? Note: I am using the freeglut for MinGW package from this website CMake File: cmake_minimum_required(VERSION 3.7) project(HW1) set(CMAKE_CXX_STANDARD 11) set(SOURCE_FILES Triangle.cpp) set(CMAKE_PREFIX_PATH "C:/freeglut") find_package(GLEW

【音视频连载-004】基础学习篇-SDL 加载图片并显示

别来无恙 提交于 2021-02-16 16:52:07
公众号回复:OpenGL,领取学习资源大礼包 音视频学习入门技术文章连载: 技术开发故事会连载 【音视频连载-001】基础学习篇-SDL 介绍以及工程配置 【音视频连载-002】基础学习篇-SDL 创建窗口并显示颜色 【音视频连载-003】基础学习篇-SDL 消息循环和事件响应 在前面的文章中已经介绍完 SDL 显示窗口、消息循环和事件响应这些基础内容,有了这些基础就可以进行功能性开发了。 本篇的主要内容是利用 SDL 加载并显示一张图片,然后再去进行更多的音视频操作。 SDL2_Image 配置 之前写过两篇 libpng 和 libjpeg-turbo 编译与实践的文章: 图像库 libpng 编译与实践 图像库 libjpeg-turbo 编译与实践 有需要的可以去翻阅一下。 在 SDL 中加载 png 或者 jpeg 图片用不到上面两个库了,需要用到 SDL 特定的图片库 SDL_Image ,执行以下命令去下载: brew install sdl2_image 我用的版本是 2.0.5 ,也是目前最新的版本,之后我们要在 CMake 中去配置它。 CMake 工程配置 对 av-beginner 项目的 CMake 配置做了一些改动,创建了一个 cmake_utils 的目录,在该目录下创建了一个 CMakeLists.txt ,里面存放一些自定义的函数

How to use CMake to install

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-16 13:21:08
问题 I can build my projects successfully with CMake, but can I use it to install the results? With Make I add the target install and call that from the command line. I cannot figure out if this is possible with CMake. The final goal is to install a static library, dynamic library and corresponding header files in a platform-portable way. How I imagine it would work: On Linux, copy to /usr/include and /usr/lib . On Windows it would probably be a user-provided folder with an include and lib folder.

How to use CMake to install

99封情书 提交于 2021-02-16 13:20:40
问题 I can build my projects successfully with CMake, but can I use it to install the results? With Make I add the target install and call that from the command line. I cannot figure out if this is possible with CMake. The final goal is to install a static library, dynamic library and corresponding header files in a platform-portable way. How I imagine it would work: On Linux, copy to /usr/include and /usr/lib . On Windows it would probably be a user-provided folder with an include and lib folder.

Win10 + vs2017 编译并配置tesseract4.1.0

痞子三分冷 提交于 2021-02-16 08:54:15
  tesseract 是一个开源的OCR (Optical Character Recognition , 光学字符识别) 引擎,本文就介绍一下自己在编译 tesseract4.1.0时遇到的一些坑,希望能给大家带来一些帮助。 一、下载 tesseract   tesseract 是一个开源项目,可以在 GitHub 上下载源码: https://github.com/tesseract-ocr/tesseract/releases/   当然,也可以下载安装版的: https://github.com/UB-Mannheim/tesseract/wiki   安装版的下载完后直接安装,然后配置环境变量(这个后面会讲到)即可使用。这个方法笔者也尝试过,但是很遗憾,没能在 vs 上找到相关的库文件,也就是不能在 vs 中调用 tesseract 相关的函数方法,只能在控制台上使用,这就比较蛋疼了,暂时在网上也没找到相关的方法,所以只能下个源码包自己编译配置了,折腾了一天才搞定,不得不吐槽一下在 Windows 上想自己编译一个东西真是麻烦。 二、所需要用到的工具   在 Windows 上编译 tesseract 主要需要用到两个工具:cmake和 cppan。 2.1 cmake   cmake 是一个跨平台的编译工具 ,可以使用 cmake 在 Windows

vs2017 编译JRTPLIB

╄→гoц情女王★ 提交于 2021-02-15 02:28:22
一. JRTPLIB简介   RTP 是目前解决流媒体实时传输问题的最好办法,而JRTPLIB是一个用C++语言实现的RTP库,它完全遵循RFC 1889设计,目前已经可以运行在Windows、Linux、FreeBSD、Solaris、Unix和 VxWorks等多种操作系统上。在使用JRTPLIB之前,需要对其进行编译。 二. 使用的平台与软件 操作系统:windows 7 软件:CMake 3.12.0 + Visual Studio 2017 二. 下载链接 由于要对 jrtplib 进行编译,且 jrtplib 依赖于 jthread ,需要下载以下内容: jrtplib :http://research.edm.uhasselt.be/jori/jrtplib/jrtplib-3.11.1.zip jthread :http://research.edm.uhasselt.be/jori/jthread/jthread-1.3.3.zip cmake :https://cmake.org/files/v3.12/cmake-3.12.0-win64-x64.msi 三. 编译步骤 1.安装 cmake-gui 。 2.将下载的 jrtplib 和 jthread 压缩包进行解压,同时在同目录下创建 jrtplib_build 和 jthread_build 文件夹。 3

CMake Error at CMakeLists.txt CMAKE_PREFIX_PATH

核能气质少年 提交于 2021-02-14 22:54:54
问题 I have downloaded the source code of the face-analysis SDK from http://face.ci2cv.net/. Now I am trying to get it running. I downloaded all the necessary software and followed the installation instructions. When I try to execute cmake [options] .. I get an error. CMake Error at CMakeLists.txt:21(find_package): Could not find a package configuration file provided by "OpenCV" with any of the following names: OpenCVConfig.cmake opencv-comfig.cmake Add the installation prefix of "OpenCV" to CMAKE

CMake Error at CMakeLists.txt CMAKE_PREFIX_PATH

[亡魂溺海] 提交于 2021-02-14 22:48:22
问题 I have downloaded the source code of the face-analysis SDK from http://face.ci2cv.net/. Now I am trying to get it running. I downloaded all the necessary software and followed the installation instructions. When I try to execute cmake [options] .. I get an error. CMake Error at CMakeLists.txt:21(find_package): Could not find a package configuration file provided by "OpenCV" with any of the following names: OpenCVConfig.cmake opencv-comfig.cmake Add the installation prefix of "OpenCV" to CMAKE

cmake指定交叉编译

北城余情 提交于 2021-02-14 16:19:32
新建文件arm.cmake,内容如下 #指定嵌入式系统的编译输出目录 set(SYSROOT_PATH "/home/suka/out/system") #指定交叉编译器路径 set(TOOLSCHAIN_PATH "/home/suka/toolschain/") set(TOOLCHAIN_HOST "${TOOLSCHAIN_PATH}usr/bin/arm-linux") #message("${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}") message(STATUS "Using sysroot path: ${SYSROOT_PATH}") set(TOOLCHAIN_CC "${TOOLCHAIN_HOST}-gcc") set(TOOLCHAIN_CXX "${TOOLCHAIN_HOST}-g++") #告诉cmake是进行交叉编译 set(CMAKE_CROSSCOMPILING TRUE) # Define name of the target system set(CMAKE_SYSTEM_NAME "Linux") # Define the compiler set(CMAKE_C_COMPILER ${TOOLCHAIN_CC}) set(CMAKE_CXX_COMPILER $

CMake交叉编译配置

和自甴很熟 提交于 2021-02-14 08:43:13
罗列一下cmake常用的命令。 CMake支持大写、小写、混合大小写的命令。 1. 添加头文件目录INCLUDE_DIRECTORIES 语法: include_directories([AFTER|BEFORE] [SYSTEM] dir1 [dir2 ...]) 它相当于g++选项中的-I参数的作用,也相当于环境变量中增加路径到CPLUS_INCLUDE_PATH变量的作用。 include_directories(../../../thirdparty/comm/include) 2. 添加需要链接的库文件目录LINK_DIRECTORIES 语法: link_directories(directory1 directory2 ...) 它相当于g++命令的-L选项的作用,也相当于环境变量中增加LD_LIBRARY_PATH的路径的作用。 link_directories("/home/server/third/lib") 3. 查找库所在目录FIND_LIBRARY 语法: Ashort-hand signature is: find_library ( name1 [path1 path2 ...]) The general signature is: find_library ( name | NAMES name1 [name2 ...] [NAMES_PER_DIR