From b8e5f21910e7a01b9a6cbc76e06df10aa143b93c Mon Sep 17 00:00:00 2001 From: Kitling Date: Fri, 4 Sep 2015 20:02:01 -0700 Subject: [PATCH] Inspired by #1108 , fixes compilation error. --- CMakeLists.txt | 9 ++++++++- externals/glad/CMakeLists.txt | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ebffc0d85..394fa4d51 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -168,6 +168,13 @@ ENDIF (APPLE) option(ENABLE_QT "Enable the Qt frontend" ON) option(CITRA_FORCE_QT4 "Use Qt4 even if Qt5 is available." OFF) + +if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") + option(LINUX "Private" ON) +else () + option(LINUX "Private" OFF) +endif () + if (ENABLE_QT) # Set CMAKE_PREFIX_PATH if QTDIR is defined in the environment This allows CMake to # automatically find the Qt packages on Windows @@ -232,7 +239,7 @@ add_subdirectory(src) # 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") +if(LINUX OR ${CMAKE_SYSTEM_NAME} MATCHES "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" diff --git a/externals/glad/CMakeLists.txt b/externals/glad/CMakeLists.txt index ebc5db1f2..1ddb821a9 100644 --- a/externals/glad/CMakeLists.txt +++ b/externals/glad/CMakeLists.txt @@ -9,3 +9,6 @@ set(HEADERS create_directory_groups(${SRCS} ${HEADERS}) add_library(glad STATIC ${SRCS} ${HEADERS}) target_include_directories(glad PUBLIC "include/") +if (LINUX) + target_link_libraries(glad PUBLIC dl) +endif()