Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unbreak build on FreeBSD #5161

Merged
merged 4 commits into from
Sep 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions 3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ elseif(WIN32)
target_link_libraries(3rdparty_hidapi INTERFACE hidapi-hid Shlwapi.lib)
else()
add_subdirectory(hidapi/libusb EXCLUDE_FROM_ALL)
target_include_directories(hidapi-libusb PUBLIC hidapi/hidapi)

target_link_libraries(3rdparty_hidapi INTERFACE hidapi-libusb usb)
endif()

Expand Down Expand Up @@ -329,10 +331,6 @@ add_library(3rdparty_glew INTERFACE)
if(NOT MSVC)
find_package(GLEW 1.13.0 REQUIRED)
target_link_libraries(3rdparty_glew INTERFACE GLEW::GLEW)

set(CMAKE_THREAD_PREFER_PTHREAD 1)
find_package(Threads REQUIRED)
target_link_libraries(3rdparty_glew INTERFACE Threads::Threads)
endif()


Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()

if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions(-DNDEBUG)
endif()

if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
message( FATAL_ERROR "RPCS3 can only be compiled on 64-bit platforms." )
endif()
Expand Down
10 changes: 5 additions & 5 deletions rpcs3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ add_custom_target(GitVersion ALL
# Check for a sufficient compiler and set build options
include(ConfigureCompiler)

if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions(-DNDEBUG)
endif()

set(ADDITIONAL_LIBS "")
if(CMAKE_SYSTEM MATCHES "Linux")
#on some Linux distros shm_unlink and similar functions are in librt only
Expand Down Expand Up @@ -55,9 +51,9 @@ set_target_properties(rpcs3
AUTOMOC ON
AUTOUIC ON)

target_link_libraries(rpcs3 ${ADDITIONAL_LIBS})
target_link_libraries(rpcs3 rpcs3_emu rpcs3_ui)
target_link_libraries(rpcs3 3rdparty::discord-rpc 3rdparty::qt5 3rdparty::hidapi)
target_link_libraries(rpcs3 ${ADDITIONAL_LIBS})

# Win resource file
if (WIN32)
Expand All @@ -68,6 +64,10 @@ if(UNIX)
find_package(X11 REQUIRED)
target_include_directories(rpcs3 PUBLIC ${X11_INCLUDE_DIR})
target_link_libraries(rpcs3 ${X11_LIBRARIES})

set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package(Threads REQUIRED)
target_link_libraries(rpcs3 Threads::Threads)
endif()

if(WIN32)
Expand Down