diff options
| author | 2014-12-13 20:02:22 -0200 | |
|---|---|---|
| committer | 2014-12-15 19:34:17 -0200 | |
| commit | 06f31e8b471d5b54fee80568db2583d41e81fdb0 (patch) | |
| tree | f3cbe39ae7bbcf4be2d40e3394c1b60939baeaaa | |
| parent | Merge pull request #276 from lioncash/decrappify (diff) | |
| download | yuzu-06f31e8b471d5b54fee80568db2583d41e81fdb0.tar.gz yuzu-06f31e8b471d5b54fee80568db2583d41e81fdb0.tar.xz yuzu-06f31e8b471d5b54fee80568db2583d41e81fdb0.zip | |
Clean up CMake library specification
The X11 libraries don't need to be specified when doing dynamic linking
| -rw-r--r-- | CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/citra/CMakeLists.txt | 14 | ||||
| -rw-r--r-- | src/citra_qt/CMakeLists.txt | 4 |
3 files changed, 11 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 61d5d524a..0e48645d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -6,6 +6,7 @@ project(citra) | |||
| 6 | 6 | ||
| 7 | if (NOT MSVC) | 7 | if (NOT MSVC) |
| 8 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-attributes") | 8 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-attributes") |
| 9 | add_definitions(-pthread) | ||
| 9 | else() | 10 | else() |
| 10 | # Silence deprecation warnings | 11 | # Silence deprecation warnings |
| 11 | add_definitions(/D_CRT_SECURE_NO_WARNINGS) | 12 | add_definitions(/D_CRT_SECURE_NO_WARNINGS) |
| @@ -75,10 +76,6 @@ if (ENABLE_GLFW) | |||
| 75 | 76 | ||
| 76 | set(GLFW_LIBRARIES glfw3) | 77 | set(GLFW_LIBRARIES glfw3) |
| 77 | else() | 78 | else() |
| 78 | if (NOT APPLE) | ||
| 79 | find_package(X11 REQUIRED) | ||
| 80 | endif() | ||
| 81 | |||
| 82 | find_package(PkgConfig REQUIRED) | 79 | find_package(PkgConfig REQUIRED) |
| 83 | pkg_search_module(GLFW REQUIRED glfw3) | 80 | pkg_search_module(GLFW REQUIRED glfw3) |
| 84 | endif() | 81 | endif() |
diff --git a/src/citra/CMakeLists.txt b/src/citra/CMakeLists.txt index f2add394f..b06259f5e 100644 --- a/src/citra/CMakeLists.txt +++ b/src/citra/CMakeLists.txt | |||
| @@ -12,22 +12,20 @@ set(HEADERS | |||
| 12 | 12 | ||
| 13 | create_directory_groups(${SRCS} ${HEADERS}) | 13 | create_directory_groups(${SRCS} ${HEADERS}) |
| 14 | 14 | ||
| 15 | # NOTE: This is a workaround for CMake bug 0006976 (missing X11_xf86vmode_LIB variable) | ||
| 16 | if (NOT X11_xf86vmode_LIB) | ||
| 17 | set(X11_xv86vmode_LIB Xxf86vm) | ||
| 18 | endif() | ||
| 19 | |||
| 20 | add_executable(citra ${SRCS} ${HEADERS}) | 15 | add_executable(citra ${SRCS} ${HEADERS}) |
| 21 | target_link_libraries(citra core common video_core) | 16 | target_link_libraries(citra core common video_core) |
| 22 | target_link_libraries(citra ${OPENGL_gl_LIBRARY} ${GLFW_LIBRARIES} inih) | 17 | target_link_libraries(citra ${OPENGL_gl_LIBRARY} ${GLFW_LIBRARIES} inih) |
| 23 | 18 | ||
| 19 | if (UNIX) | ||
| 20 | target_link_libraries(citra -pthread) | ||
| 21 | endif() | ||
| 22 | |||
| 24 | if (APPLE) | 23 | if (APPLE) |
| 25 | target_link_libraries(citra iconv pthread ${COREFOUNDATION_LIBRARY}) | 24 | target_link_libraries(citra iconv ${COREFOUNDATION_LIBRARY}) |
| 26 | elseif (WIN32) | 25 | elseif (WIN32) |
| 27 | target_link_libraries(citra winmm) | 26 | target_link_libraries(citra winmm) |
| 28 | else() # Unix | 27 | else() # Unix |
| 29 | target_link_libraries(citra pthread rt) | 28 | target_link_libraries(citra rt) |
| 30 | target_link_libraries(citra ${X11_X11_LIB} ${X11_Xi_LIB} ${X11_Xcursor_LIB} ${X11_Xrandr_LIB} ${X11_xv86vmode_LIB}) | ||
| 31 | endif() | 29 | endif() |
| 32 | 30 | ||
| 33 | #install(TARGETS citra RUNTIME DESTINATION ${bindir}) | 31 | #install(TARGETS citra RUNTIME DESTINATION ${bindir}) |
diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt index 90e5c6aa6..54d0a1271 100644 --- a/src/citra_qt/CMakeLists.txt +++ b/src/citra_qt/CMakeLists.txt | |||
| @@ -60,6 +60,10 @@ add_executable(citra-qt ${SRCS} ${HEADERS} ${UI_HDRS}) | |||
| 60 | target_link_libraries(citra-qt core common video_core qhexedit) | 60 | target_link_libraries(citra-qt core common video_core qhexedit) |
| 61 | target_link_libraries(citra-qt ${OPENGL_gl_LIBRARY} ${CITRA_QT_LIBS}) | 61 | target_link_libraries(citra-qt ${OPENGL_gl_LIBRARY} ${CITRA_QT_LIBS}) |
| 62 | 62 | ||
| 63 | if (UNIX) | ||
| 64 | target_link_libraries(citra-qt -pthread) | ||
| 65 | endif() | ||
| 66 | |||
| 63 | if (APPLE) | 67 | if (APPLE) |
| 64 | target_link_libraries(citra-qt iconv ${COREFOUNDATION_LIBRARY}) | 68 | target_link_libraries(citra-qt iconv ${COREFOUNDATION_LIBRARY}) |
| 65 | elseif (WIN32) | 69 | elseif (WIN32) |