-
-
Notifications
You must be signed in to change notification settings - Fork 56
/
CMakeLists.txt
60 lines (55 loc) · 2.11 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
52
53
54
55
56
57
58
59
60
cmake_minimum_required (VERSION 3.25)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
if(DEFINED ENV{VCPKG_ROOT})
file(TO_CMAKE_PATH $ENV{VCPKG_ROOT} VCPKG_ROOT)
if(EXISTS "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake")
set(CMAKE_TOOLCHAIN_FILE "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake")
set(USING_VCPKG ON)
endif()
endif()
if (POLICY CMP0141)
cmake_policy(SET CMP0141 NEW)
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<IF:$<AND:$<C_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:MSVC>>,$<$<CONFIG:Debug,RelWithDebInfo>:EditAndContinue>,$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>>")
endif()
project("org.nickvision.tubeconverter" LANGUAGES C CXX VERSION 2024.11.1 DESCRIPTION "Download web video and audio.")
set(SHORT_NAME "parabolic")
set(DISPLAY_NAME "Parabolic")
include(GNUInstallDirs)
file(STRINGS "${CMAKE_SOURCE_DIR}/resources/po/POTFILES" TRANSLATE_FILES)
file(STRINGS "${CMAKE_SOURCE_DIR}/resources/po/LINGUAS" LINGUAS)
set(POT_FILE "${CMAKE_SOURCE_DIR}/resources/po/${SHORT_NAME}.pot")
file(STRINGS "${CMAKE_SOURCE_DIR}/docs/po/LINGUAS" DOC_LINGUAS)
set(DOC_POT_FILE "${CMAKE_SOURCE_DIR}/docs/po/${SHORT_NAME}.pot")
find_program(GETTEXT_XGETTEXT_EXECUTABLE xgettext)
find_program(GETTEXT_MSGMERGE_EXECUTABLE msgmerge)
find_program(GETTEXT_MSGFMT_EXECUTABLE msgfmt)
find_program(ITSTOOL_EXECUTABLE itstool)
find_program(YELP_BUILD_EXECUTABLE yelp-build)
if(EXISTS "${GETTEXT_XGETTEXT_EXECUTABLE}")
if(EXISTS "${GETTEXT_MSGMERGE_EXECUTABLE}")
if(EXISTS "${GETTEXT_MSGFMT_EXECUTABLE}")
set(HAS_GETTEXT TRUE)
endif()
endif()
endif()
if(EXISTS "${ITSTOOL_EXECUTABLE}")
if(EXISTS "${YELP_BUILD_EXECUTABLE}")
set(HAS_YELP TRUE)
endif()
endif()
add_subdirectory("lib${SHORT_NAME}")
if(WIN32)
add_subdirectory("${PROJECT_NAME}.qt")
else()
if(NOT DEFINED UI_PLATFORM)
if(LINUX)
add_subdirectory("${PROJECT_NAME}.gnome")
else()
add_subdirectory("${PROJECT_NAME}.qt")
endif()
else()
add_subdirectory("${PROJECT_NAME}.${UI_PLATFORM}")
endif()
endif()