diff options
| author | 2015-01-10 02:03:07 -0500 | |
|---|---|---|
| committer | 2015-01-10 02:03:07 -0500 | |
| commit | e7d21188588266cc6846f73a2f20b4a6aea6d750 (patch) | |
| tree | ba24bb1c44b9aa926563cd9f39c7495bc2a52858 | |
| parent | Merge pull request #454 from chinhodado/patch-1 (diff) | |
| parent | Looks like that might be needed on OSX after all (diff) | |
| download | yuzu-e7d21188588266cc6846f73a2f20b4a6aea6d750.tar.gz yuzu-e7d21188588266cc6846f73a2f20b4a6aea6d750.tar.xz yuzu-e7d21188588266cc6846f73a2f20b4a6aea6d750.zip | |
Merge pull request #342 from uppfinnarn/master
Build improvements
| -rw-r--r-- | CMakeLists.txt | 15 | ||||
| -rw-r--r-- | src/citra/CMakeLists.txt | 16 | ||||
| -rw-r--r-- | src/citra_qt/CMakeLists.txt | 13 |
3 files changed, 13 insertions, 31 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 76dc2ab1a..9151fe479 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -5,8 +5,8 @@ cmake_minimum_required(VERSION 2.8.11) | |||
| 5 | project(citra) | 5 | 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 -pthread") |
| 9 | add_definitions(-pthread) | 9 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread") |
| 10 | else() | 10 | else() |
| 11 | # Silence deprecation warnings | 11 | # Silence deprecation warnings |
| 12 | add_definitions(/D_CRT_SECURE_NO_WARNINGS) | 12 | add_definitions(/D_CRT_SECURE_NO_WARNINGS) |
| @@ -106,10 +106,17 @@ if (ENABLE_GLFW) | |||
| 106 | endif() | 106 | endif() |
| 107 | 107 | ||
| 108 | IF (APPLE) | 108 | IF (APPLE) |
| 109 | # CoreFoundation is required only on OSX | 109 | FIND_LIBRARY(COCOA_LIBRARY Cocoa) # Umbrella framework for everything GUI-related |
| 110 | FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation) | 110 | FIND_LIBRARY(IOKIT_LIBRARY IOKit) # GLFW dependency |
| 111 | FIND_LIBRARY(COREVIDEO_LIBRARY CoreVideo) # GLFW dependency | ||
| 112 | set(PLATFORM_LIBRARIES iconv ${COCOA_LIBRARY} ${IOKIT_LIBRARY} ${COREVIDEO_LIBRARY}) | ||
| 113 | |||
| 111 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") | 114 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") |
| 112 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++") | 115 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++") |
| 116 | ELSEIF(WIN32) | ||
| 117 | set(PLATFORM_LIBRARIES winmm) | ||
| 118 | ELSE() | ||
| 119 | set(PLATFORM_LIBRARIES rt) | ||
| 113 | ENDIF (APPLE) | 120 | ENDIF (APPLE) |
| 114 | 121 | ||
| 115 | option(ENABLE_QT "Enable the Qt frontend" ON) | 122 | option(ENABLE_QT "Enable the Qt frontend" ON) |
diff --git a/src/citra/CMakeLists.txt b/src/citra/CMakeLists.txt index bbb3374f2..713f49193 100644 --- a/src/citra/CMakeLists.txt +++ b/src/citra/CMakeLists.txt | |||
| @@ -16,20 +16,6 @@ create_directory_groups(${SRCS} ${HEADERS}) | |||
| 16 | add_executable(citra ${SRCS} ${HEADERS}) | 16 | add_executable(citra ${SRCS} ${HEADERS}) |
| 17 | target_link_libraries(citra core common video_core) | 17 | target_link_libraries(citra core common video_core) |
| 18 | target_link_libraries(citra ${GLFW_LIBRARIES} ${OPENGL_gl_LIBRARY} inih) | 18 | target_link_libraries(citra ${GLFW_LIBRARIES} ${OPENGL_gl_LIBRARY} inih) |
| 19 | 19 | target_link_libraries(citra ${PLATFORM_LIBRARIES}) | |
| 20 | if (UNIX) | ||
| 21 | target_link_libraries(citra -pthread) | ||
| 22 | endif() | ||
| 23 | |||
| 24 | if (APPLE) | ||
| 25 | target_link_libraries(citra iconv ${COREFOUNDATION_LIBRARY}) | ||
| 26 | elseif (WIN32) | ||
| 27 | target_link_libraries(citra winmm wsock32 ws2_32) | ||
| 28 | if (MINGW) # GCC does not support codecvt, so use iconv instead | ||
| 29 | target_link_libraries(citra iconv) | ||
| 30 | endif() | ||
| 31 | else() # Unix | ||
| 32 | target_link_libraries(citra rt) | ||
| 33 | endif() | ||
| 34 | 20 | ||
| 35 | #install(TARGETS citra RUNTIME DESTINATION ${bindir}) | 21 | #install(TARGETS citra RUNTIME DESTINATION ${bindir}) |
diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt index a0ba252b3..bbc521f8a 100644 --- a/src/citra_qt/CMakeLists.txt +++ b/src/citra_qt/CMakeLists.txt | |||
| @@ -60,17 +60,6 @@ endif() | |||
| 60 | add_executable(citra-qt ${SRCS} ${HEADERS} ${UI_HDRS}) | 60 | add_executable(citra-qt ${SRCS} ${HEADERS} ${UI_HDRS}) |
| 61 | target_link_libraries(citra-qt core common video_core qhexedit) | 61 | target_link_libraries(citra-qt core common video_core qhexedit) |
| 62 | target_link_libraries(citra-qt ${OPENGL_gl_LIBRARY} ${CITRA_QT_LIBS}) | 62 | target_link_libraries(citra-qt ${OPENGL_gl_LIBRARY} ${CITRA_QT_LIBS}) |
| 63 | 63 | target_link_libraries(citra-qt ${PLATFORM_LIBRARIES}) | |
| 64 | if (UNIX) | ||
| 65 | target_link_libraries(citra-qt -pthread) | ||
| 66 | endif() | ||
| 67 | |||
| 68 | if (APPLE) | ||
| 69 | target_link_libraries(citra-qt iconv ${COREFOUNDATION_LIBRARY}) | ||
| 70 | elseif (WIN32) | ||
| 71 | target_link_libraries(citra-qt winmm wsock32 ws2_32) | ||
| 72 | else() # Unix | ||
| 73 | target_link_libraries(citra-qt rt) | ||
| 74 | endif() | ||
| 75 | 64 | ||
| 76 | #install(TARGETS citra-qt RUNTIME DESTINATION ${bindir}) | 65 | #install(TARGETS citra-qt RUNTIME DESTINATION ${bindir}) |