diff options
author | bunnei <bunneidev@gmail.com> | 2014-12-22 17:11:37 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2014-12-22 17:11:37 +0100 |
commit | 949d95659e019d2c1bb58327827e1a9fc39b28ee (patch) | |
tree | eca14a68ab0d253412689ec58f003c014e4d02ae | |
parent | Merge pull request #333 from lioncash/qops (diff) | |
parent | Build GLFW as a shared lib on Travis (diff) | |
download | yuzu-949d95659e019d2c1bb58327827e1a9fc39b28ee.tar yuzu-949d95659e019d2c1bb58327827e1a9fc39b28ee.tar.gz yuzu-949d95659e019d2c1bb58327827e1a9fc39b28ee.tar.bz2 yuzu-949d95659e019d2c1bb58327827e1a9fc39b28ee.tar.lz yuzu-949d95659e019d2c1bb58327827e1a9fc39b28ee.tar.xz yuzu-949d95659e019d2c1bb58327827e1a9fc39b28ee.tar.zst yuzu-949d95659e019d2c1bb58327827e1a9fc39b28ee.zip |
-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 ( git clone https://github.com/glfw/glfw.git --branch 3.0.4 --depth 1 mkdir glfw/build && cd glfw/build - cmake .. && make -j2 && sudo make install + cmake -DBUILD_SHARED_LIBS=ON \ + -DGLFW_BUILD_EXAMPLES=OFF \ + -DGLFW_BUILD_TESTS=OFF \ + .. + make -j4 && sudo make install ) 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) if (NOT MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-attributes") + add_definitions(-pthread) else() # Silence deprecation warnings add_definitions(/D_CRT_SECURE_NO_WARNINGS) @@ -96,10 +97,6 @@ if (ENABLE_GLFW) set(GLFW_LIBRARIES glfw3) else() - if (NOT APPLE) - find_package(X11 REQUIRED) - endif() - find_package(PkgConfig REQUIRED) pkg_search_module(GLFW REQUIRED glfw3) 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 create_directory_groups(${SRCS} ${HEADERS}) -# NOTE: This is a workaround for CMake bug 0006976 (missing X11_xf86vmode_LIB variable) -if (NOT X11_xf86vmode_LIB) - set(X11_xv86vmode_LIB Xxf86vm) -endif() - add_executable(citra ${SRCS} ${HEADERS}) target_link_libraries(citra core common video_core) target_link_libraries(citra ${OPENGL_gl_LIBRARY} ${GLFW_LIBRARIES} inih) +if (UNIX) + target_link_libraries(citra -pthread) +endif() + if (APPLE) - target_link_libraries(citra iconv pthread ${COREFOUNDATION_LIBRARY}) + target_link_libraries(citra iconv ${COREFOUNDATION_LIBRARY}) elseif (WIN32) target_link_libraries(citra winmm) else() # Unix - target_link_libraries(citra pthread rt) - target_link_libraries(citra ${X11_X11_LIB} ${X11_Xi_LIB} ${X11_Xcursor_LIB} ${X11_Xrandr_LIB} ${X11_xv86vmode_LIB}) + target_link_libraries(citra rt) endif() #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}) target_link_libraries(citra-qt core common video_core qhexedit) target_link_libraries(citra-qt ${OPENGL_gl_LIBRARY} ${CITRA_QT_LIBS}) +if (UNIX) + target_link_libraries(citra-qt -pthread) +endif() + if (APPLE) target_link_libraries(citra-qt iconv ${COREFOUNDATION_LIBRARY}) elseif (WIN32) |