A Step-by-Step Guide to CW32 Development Using CLion

A Step-by-Step Guide to CW32 Development Using CLion

The following article is provided by CW32 ecosystem community user End: https://gitee.com/xcet/embedded-cw32-board-template/tree/master/ref/CW32-GCC-Clion-Template Recently, CLion has become free for non-commercial use, so I immediately downloaded the latest CLion 2025. Now, I will set up the CLion + GCC + CMake development environment for the domestic Wuhan Xinyuan Semiconductor’s CW32 microcontroller. CLion is a cross-platform integrated development … Read more

A Comprehensive Guide to CMake for Embedded Development

A Comprehensive Guide to CMake for Embedded Development

Follow and star our public account for exciting content Source: txp plays Linux Author: txp Editor: Li Xiaoyao Recently, many readers have been asking about CMake and its differences from Makefile in the group. Today, I have organized an article for everyone, which is quite lengthy, and I hope it will be helpful. Today, I … Read more

CMake: Detecting External Libraries – Using pkg-config

CMake: Detecting External Libraries - Using pkg-config

Introduction: In the previous articles, we have basically understood how to link a third-party library. This article and the next will supplement two methods for detecting external libraries. So far, we have learned two methods for detecting external dependencies: Using the built-in CMake find-module, but not all packages can be found in the CMake find … Read more

CMake: Detecting External Libraries – Custom Find Module

CMake: Detecting External Libraries - Custom Find Module

Introduction: In the previous article, we learned about one method of custom detection of external libraries in CMake. This article will demonstrate how to locate the ZeroMQ library on the system by writing a find module, enabling detection of this library on non-operating systems. ✦ Project Structure ✦ . ├── CMakeLists.txt ├── FindZeroMQ.cmake ├── zmq_client.cpp … Read more

Successful Application of CMake in Embedded Development for AIBOX’s Onboard Computing Unit

Successful Application of CMake in Embedded Development for AIBOX's Onboard Computing Unit

The technology for cross-embedded hardware platforms and operating systems is one of the core challenges in current embedded system development, especially in fields such as the Internet of Things (IoT), robotics, and industrial automation. Compatibility issues between different hardware architectures (such as ARM, x86, RISC-V) and operating systems (such as Linux, RTOS, Zephyr) urgently need … Read more

Best Practices for setup.py and CMakeLists.txt in ROS2

Best Practices for setup.py and CMakeLists.txt in ROS2

In ROS2, both setup.py and CMakeLists.txt can be used simultaneously, but specific integration guidelines must be followed. For projects that contain a mix of Python and C++ code, the best practices are as follows: 1. Implementation of Mixed Builds 1. CMake as the Primary Build System (Recommended) Integrate Python modules in CMake using the ament_cmake_python … Read more

CMakeLists.txt Template: One-Click Configuration for Cross-Platform C++ Projects

CMakeLists.txt Template: One-Click Configuration for Cross-Platform C++ Projects

In the development of C++ projects, cross-platform building and configuration have always been complex and troublesome issues. The differences between different operating systems and compilers often lead to cumbersome and repetitive project configurations, and can even cause some hard-to-debug problems. To reduce such issues, CMake has become the preferred build tool for many C++ developers. … Read more

20 Commandments for Building Qt Projects with Modern CMake

20 Commandments for Building Qt Projects with Modern CMake

1. Basic Principles Commandment 1: Minimum Version Declaration cmake_minimum_required(VERSION 3.21) # Requires support for Qt6's AUX_SOURCE_DIRECTORY improvementproject(MyApp VERSION 1.2.3 LANGUAGES CXX) Commandment 2: Strict Policy Configuration # Enforce interface compatibility checks cmake_policy(SET CMP0063 NEW) # Target link library order cmake_policy(SET CMP0079 NEW) # Target import file generation 2. Qt Integration Standards Commandment 3: Modular Qt … Read more

CMake Advanced: Four Strategies to Master External Library Finding, No More Worries About Missing Dependencies!

CMake Advanced: Four Strategies to Master External Library Finding, No More Worries About Missing Dependencies!

Click the blue text to follow the author 1. Introduction: Checking External Libraries In CMake, there are two main methods to locate external dependency libraries: Using CMake’s built-in<span>find_package</span> module: CMake provides built-in find modules for many common libraries (e.g., <span>FindBoost.cmake</span>, <span>FindOpenSSL.cmake</span>, etc.). These modules can usually automatically detect the installation paths of libraries, header files, … Read more

Complete Guide to Modern CMake Configuration

Complete Guide to Modern CMake Configuration

📌Complete Guide to Modern CMake Configuration Table of Contents Basic Project Configuration C++ Standard Settings Compiler Options and Warning Configuration Output Directory Structure Management Environment Detection and Path Configuration Third-Party Dependency Management Target Linking and Visibility Installation Configuration and Deployment Custom Build Targets Complete Example Project Basic Project Configuration Minimum Version Requirement and Project Declaration … Read more