summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-09-08 10:28:09 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-09-08 10:28:09 +0300
commit0f05f64bba29ecc5873c1faeb2e4395763ae060d (patch)
tree04a247e41cc566272055f90a11acddd12854ac7d /CMakeLists.txt
parent487ad42e3e1d038e5c0d196cb3c590bb8ffe4d50 (diff)
Option to have the_Foundation in a subdirectory
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2018c4c1..e90d1175 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,7 +12,16 @@ option (ENABLE_KERNING "Enable kerning in font renderer (slower)" ON)
12option (ENABLE_RESOURCE_EMBED "Embed resources inside the executable" OFF) 12option (ENABLE_RESOURCE_EMBED "Embed resources inside the executable" OFF)
13 13
14include (Embed.cmake) 14include (Embed.cmake)
15find_package (the_Foundation REQUIRED) 15if (EXISTS ${CMAKE_SOURCE_DIR}/lib/the_Foundation)
16 set (TFDN_STATIC_LIBRARY ON CACHE BOOL "Shared library not needed")
17 set (TFDN_ENABLE_INSTALL OFF CACHE BOOL "Library install not needed")
18 set (TFDN_ENABLE_TESTS OFF CACHE BOOL "Library tests not needed")
19 set (TFDN_ENABLE_WEBREQUEST OFF CACHE BOOL "libcurl not needed")
20 add_subdirectory (lib/the_Foundation)
21 add_library (the_Foundation::the_Foundation ALIAS the_Foundation)
22else ()
23 find_package (the_Foundation REQUIRED)
24endif ()
16find_package (PkgConfig REQUIRED) 25find_package (PkgConfig REQUIRED)
17pkg_check_modules (SDL2 REQUIRED sdl2) 26pkg_check_modules (SDL2 REQUIRED sdl2)
18 27
@@ -147,6 +156,7 @@ if (APPLE)
147 endif () 156 endif ()
148 set_target_properties (app PROPERTIES 157 set_target_properties (app PROPERTIES
149 OUTPUT_NAME "Lagrange" 158 OUTPUT_NAME "Lagrange"
159 BUILD_RPATH ${SDL2_LIBRARY_DIRS}
150 MACOSX_BUNDLE YES 160 MACOSX_BUNDLE YES
151 MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_LIST_DIR}/res/MacOSXBundleInfo.plist.in" 161 MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_LIST_DIR}/res/MacOSXBundleInfo.plist.in"
152 MACOSX_BUNDLE_BUNDLE_NAME "Lagrange" 162 MACOSX_BUNDLE_BUNDLE_NAME "Lagrange"