diff options
| -rw-r--r-- | .travis-deps.sh | 6 | ||||
| -rw-r--r-- | CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/citra/CMakeLists.txt | 14 | ||||
| -rw-r--r-- | src/citra_qt/CMakeLists.txt | 4 |
4 files changed, 16 insertions, 13 deletions
diff --git a/.travis-deps.sh b/.travis-deps.sh index b978e552e..2a0f6b284 100644 --- a/.travis-deps.sh +++ b/.travis-deps.sh | |||
| @@ -12,7 +12,11 @@ if [ "$TRAVIS_OS_NAME" = linux -o -z "$TRAVIS_OS_NAME" ]; then | |||
| 12 | ( | 12 | ( |
| 13 | git clone https://github.com/glfw/glfw.git --branch 3.0.4 --depth 1 | 13 | git clone https://github.com/glfw/glfw.git --branch 3.0.4 --depth 1 |
| 14 | mkdir glfw/build && cd glfw/build | 14 | mkdir glfw/build && cd glfw/build |
| 15 | cmake .. && make -j2 && sudo make install | 15 | cmake -DBUILD_SHARED_LIBS=ON \ |
| 16 | -DGLFW_BUILD_EXAMPLES=OFF \ | ||
| 17 | -DGLFW_BUILD_TESTS=OFF \ | ||
| 18 | .. | ||
| 19 | make -j4 && sudo make install | ||
| 16 | ) | 20 | ) |
| 17 | 21 | ||
| 18 | sudo apt-get install lib32stdc++6 | 22 | sudo apt-get install lib32stdc++6 |
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1491df6e6..5bb87d50d 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) |
| @@ -96,10 +97,6 @@ if (ENABLE_GLFW) | |||
| 96 | 97 | ||
| 97 | set(GLFW_LIBRARIES glfw3) | 98 | set(GLFW_LIBRARIES glfw3) |
| 98 | else() | 99 | else() |
| 99 | if (NOT APPLE) | ||
| 100 | find_package(X11 REQUIRED) | ||
| 101 | endif() | ||
| 102 | |||
| 103 | find_package(PkgConfig REQUIRED) | 100 | find_package(PkgConfig REQUIRED) |
| 104 | pkg_search_module(GLFW REQUIRED glfw3) | 101 | pkg_search_module(GLFW REQUIRED glfw3) |
| 105 | endif() | 102 | 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) |