aboutsummaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt20
1 files changed, 18 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5cae66de..fc742317 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,8 +8,11 @@ if (NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-attributes -pthread")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
else()
- # Silence deprecation warnings
- add_definitions(/D_CRT_SECURE_NO_WARNINGS)
+ # Silence "deprecation" warnings
+ add_definitions(/D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE)
+ # Avoid windows.h junk
+ add_definitions(/DNOMINMAX)
+
# set up output paths for executable binaries (.exe-files, and .dll-files on DLL-capable platforms)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_CONFIGURATION_TYPES Debug Release RelWithDebInfo CACHE STRING "" FORCE)
@@ -197,3 +200,16 @@ if(ENABLE_QT)
add_subdirectory(externals/qhexedit)
endif()
add_subdirectory(src)
+
+# Install freedesktop.org metadata files, following those specifications:
+# http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
+# http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
+# http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html
+if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD|OpenBSD|NetBSD")
+ install(FILES "${CMAKE_SOURCE_DIR}/dist/citra.desktop"
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications")
+ install(FILES "${CMAKE_SOURCE_DIR}/dist/citra.svg"
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/pixmaps")
+ install(FILES "${CMAKE_SOURCE_DIR}/dist/citra.xml"
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/mime/packages")
+endif()