-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
39 lines (33 loc) · 1.38 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
cmake_minimum_required(VERSION 3.12.0)
project(cork VERSION 2.0.0 LANGUAGES C CXX)
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
set(is_root_project ON)
else()
set(is_root_project OFF)
endif()
option(CORK_INSTALL "Install Cork" ${is_root_project})
option(CORK_PACKAGE "Package Cork" ${is_root_project})
option(CORK_PLUGINS "Plugin Support" ON)
add_subdirectory(src)
if(CORK_INSTALL)
install(TARGETS cork)
if(UNIX AND NOT APPLE)
install(FILES resources/cork.svg DESTINATION share/icons/hicolor/scalable/apps)
install(FILES resources/roblox-player.svg DESTINATION share/icons/hicolor/scalable/apps)
install(FILES resources/roblox-studio.svg DESTINATION share/icons/hicolor/scalable/apps)
install(FILES distribution/roblox-player.desktop DESTINATION share/applications)
install(FILES distribution/roblox-studio.desktop DESTINATION share/applications)
endif()
endif()
if(CORK_PACKAGE)
set(CPACK_COMPONENTS_ALL cork)
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
set(CPACK_PACKAGE_NAME ${PROJECT_NAME})
set(CPACK_PACKAGE_RELEASE 1)
set(CPACK_PACKAGE_CONTACT "CorkHQ")
set(CPACK_PACKAGE_VENDOR "CorkHQ")
set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}.${CMAKE_SYSTEM_PROCESSOR}")
include(CPack)
endif()