CMakeLists.txt
CMake scripts including "SuperInclude.cmake" (include CMake macros straight from Github), "Win32CC.cmake" (cross-compilation helpers), "FindWine.cmake" and "jar.cmake" (downloads dependencies from Maven repositories)
Install / Use
/learn @daniperez/CMakeLists.txtREADME
CMakeLists.txt
Available scripts:
<a href="http://cmake.org"><img alt="CMake logo" src="http://www.cmake.org/opensourcelogos/cmake100.png" align="right"/></a>
- SuperInclude
- Win32 Application Cross-Compilation
- CMakeJar
All the scripts are found in this folder. Examples of usage can be found in the corresponding subfolders.
1 - SuperInclude
Provides github_include macro that works like include but it downloads
the macro from github if it's not present in the local file system.
Just include SuperInclude.cmake and call the macro (see the
example).
You can find the available macros in SuperInclude.cmake.
2 - Win32 Application Cross-Compilation
This script is split in a functional basis. They can be used together or individually:
-
Win32CC.cmake: main script. In order to use it, include it in your CMake script:set ( CMAKE_MODULE_PATH <location of Win32CC script if no default location> ) include ( Win32CC )Find in Win32CC.cmake the available macros. The macros set some variables that help at cross-compiling and cross-testing (i.e. testing Windows binaries in a POSIX system).
-
Windows-mingw-i686.cmake: toolchain file. This is the minimum CMake configuration needed if you wanted to compile for Windows. To use it call cmake as follows:cmake -DCMAKE_TOOLCHAIN_FILE=<path to Windows-mingw-i686.cmake> <path to the folder containing CMakeLists.txt>In principle, you don't need to provide any other config file or variable, it will detect your configuration if your distribution is supported. For the time being, the supported distributions are: Fedora 15.
-
FindWine.cmake: used byWin32CC.cmaketo check if Wine is present. If it is, WINE_FOUND and WINE_CMD are set accordingly.You can find an example here.
3 - CMakeJar
Provides a mean of loading files from Maven repository files. This can be useful when you need to use a dependency released in a Maven repository in your CMake project (e.g. a XML configuration file,...). It also contains a macro to unjar a jar.
Just include jar.cmake and call the macros found there (see the example).
Note: parse_arguments.cmake is needed by jar.cmake. I didn't write it.
Related Skills
node-connect
349.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。

