-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCMakeLists.txt
51 lines (43 loc) · 1.85 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# VookiImageViewer - a tool for showing images.
# Copyright(C) 2023 Michal Duda <[email protected]>
#
# https://github.com/vookimedlo/vooki-image-viewer
#
# This program is free software : you can redistribute it and / or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
CMAKE_MINIMUM_REQUIRED(VERSION 3.18.4)
PROJECT(ApplicationAndDependencies HOMEPAGE_URL "https://vookiimageviewer.cz")
SET(3RD_PARTY_LIBS ${CMAKE_BINARY_DIR}/EPs)
SET(3RD_PARTY_LIBS_INSTALL "${3RD_PARTY_LIBS}/install")
GET_FILENAME_COMPONENT(3RD_PARTY_LIBS_INSTALL_ABSOLUTE "${3RD_PARTY_LIBS_INSTALL}" ABSOLUTE)
LIST(PREPEND CMAKE_PREFIX_PATH "${3RD_PARTY_LIBS_INSTALL}/lib/cmake")
LIST(PREPEND CMAKE_PREFIX_PATH "${3RD_PARTY_LIBS_INSTALL}")
if (APPLE)
option(APPLE_FAT_ARCH "Requested a fat architecture (x86_64 & arm64)" ON)
if (APPLE_FAT_ARCH)
SET(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
MESSAGE("-- Requested architectures are x86_64 & arm64")
endif()
endif()
MESSAGE("-- 3RD_PARTY_LIBS: ${3RD_PARTY_LIBS}")
if (BUILD_DEPENDENCIES)
MESSAGE("-- Building required dependencies ...")
if (APPLE)
ADD_SUBDIRECTORY(build/cmake/platform/mac/ExternalProjects)
elseif (WIN32)
ADD_SUBDIRECTORY(build/cmake/platform/windows/ExternalProjects)
endif()
else()
MESSAGE("-- Building application ...")
ADD_SUBDIRECTORY(build/cmake)
endif()