diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-02 08:17:45 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-02 11:11:24 +0200 |
commit | 3543fd0eaaf3ed0f068ed0012e9da8a6d500f298 (patch) | |
tree | 7f33456ea75f6b0f83fcbbf1368abdab256e305f /CMakeLists.txt | |
parent | 8605b747b3eac83e6af7907de7659bfb989d0358 (diff) |
Embed: Build resource files faster
As part of the CMake configuration, build bincat (23 lines of C) to concatenate resource files together. This is much faster because CMake doesn't have to get involved in the contents of the binary files.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f4b0376c..cb97185c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -14,7 +14,6 @@ | |||
14 | # https://libsdl.org/). To make configuration easier, consider writing | 14 | # https://libsdl.org/). To make configuration easier, consider writing |
15 | # for your personal use a pkg-config sdl2.pc file that uses the Windows | 15 | # for your personal use a pkg-config sdl2.pc file that uses the Windows |
16 | # version of the library. | 16 | # version of the library. |
17 | # - `cat` is relied upon for merging all the resource files together. | ||
18 | 17 | ||
19 | cmake_minimum_required (VERSION 3.9) | 18 | cmake_minimum_required (VERSION 3.9) |
20 | 19 | ||
@@ -33,7 +32,7 @@ option (ENABLE_RESOURCE_EMBED "Embed resources inside the executable" OFF) | |||
33 | option (ENABLE_WINDOWPOS_FIX "Set position after showing window (workaround for SDL bug)" OFF) | 32 | option (ENABLE_WINDOWPOS_FIX "Set position after showing window (workaround for SDL bug)" OFF) |
34 | 33 | ||
35 | include (BuildType.cmake) | 34 | include (BuildType.cmake) |
36 | include (Embed.cmake) | 35 | include (res/Embed.cmake) |
37 | if (NOT EXISTS ${CMAKE_SOURCE_DIR}/lib/the_Foundation/CMakeLists.txt) | 36 | if (NOT EXISTS ${CMAKE_SOURCE_DIR}/lib/the_Foundation/CMakeLists.txt) |
38 | set (INSTALL_THE_FOUNDATION YES) | 37 | set (INSTALL_THE_FOUNDATION YES) |
39 | find_package (the_Foundation REQUIRED) | 38 | find_package (the_Foundation REQUIRED) |