Lines 1-16
Link Here
|
1 |
--- CMakeLists.txt.orig 2019-10-11 23:27:07 UTC |
1 |
--- CMakeLists.txt.orig 2019-12-27 15:25:22 UTC |
2 |
+++ CMakeLists.txt |
2 |
+++ CMakeLists.txt |
3 |
@@ -68,6 +68,9 @@ list(APPEND CMAKE_MODULE_PATH "${DevilutionX_SOURCE_DI |
3 |
@@ -326,7 +326,7 @@ if(WIN32) |
4 |
if(${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD) |
4 |
endif() |
5 |
set(ASAN OFF) |
|
|
6 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DO_LARGEFILE=0 -Dstat64=stat -Dlstat64=lstat -Dlseek64=lseek -Doff64_t=off_t -Dfstat64=fstat -Dftruncate64=ftruncate") |
7 |
+ add_definitions(-D__BSD_VISIBLE=1) |
8 |
+ add_definitions(-D__POSIX_VISIBLE=200809L) |
9 |
+ add_definitions(-D__XSI_VISIBLE=1) |
10 |
endif() |
5 |
endif() |
11 |
|
6 |
|
12 |
if(WIN32) |
7 |
-if(NOT WIN32 AND NOT APPLE) |
13 |
@@ -337,8 +340,8 @@ endif() |
8 |
+if(NOT WIN32 AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD) |
|
|
9 |
# Enable POSIX extensions such as `readlink` and `ftruncate`. |
10 |
add_definitions(-D_POSIX_C_SOURCE=200809L) |
11 |
endif() |
12 |
@@ -337,8 +337,8 @@ endif() |
14 |
|
13 |
|
15 |
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC") |
14 |
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC") |
16 |
# Change __FILE__ to only show the path relative to the project folder |
15 |
# Change __FILE__ to only show the path relative to the project folder |
Lines 21-32
Link Here
|
21 |
|
20 |
|
22 |
if(DEBUG) |
21 |
if(DEBUG) |
23 |
# Note: For Valgrind suppor. |
22 |
# Note: For Valgrind suppor. |
24 |
@@ -368,6 +371,8 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") |
23 |
@@ -399,3 +399,9 @@ if(APPLE) |
25 |
# Silence appfat.cpp warnings |
24 |
|
26 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-narrowing") |
25 |
include(CPack) |
27 |
endif() |
26 |
endif() |
28 |
+ |
27 |
+ |
29 |
+install(TARGETS devilutionx DESTINATION ${BINDIR}) |
28 |
+install(TARGETS devilutionx DESTINATION ${CMAKE_INSTALL_BINDIR}) |
30 |
|
29 |
+install(FILES Packaging/fedora/devilutionx.desktop DESTINATION ${CMAKE_INSTALL_SHAREDIR}/applications) |
31 |
if(APPLE) |
30 |
+install(FILES Packaging/resources/16.png DESTINATION ${CMAKE_INSTALL_SHAREDIR}/icons/hicolor/16x16/apps RENAME devilutionx.png) |
32 |
set_source_files_properties("./Packaging/macOS/AppIcon.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources) |
31 |
+install(FILES Packaging/resources/Diablo_32.png DESTINATION ${CMAKE_INSTALL_SHAREDIR}/icons/hicolor/32x32/apps RENAME devilutionx.png) |
|
|
32 |
+install(FILES Packaging/resources/Diablo_48.png DESTINATION ${CMAKE_INSTALL_SHAREDIR}/icons/hicolor/48x48/apps RENAME devilutionx.png) |