2018-03-23 22:31:29 +00:00
|
|
|
add_library(common
|
2017-03-01 12:43:43 +00:00
|
|
|
Analytics.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
Analytics.h
|
|
|
|
Assert.h
|
|
|
|
Atomic.h
|
|
|
|
BitField.h
|
|
|
|
BitSet.h
|
|
|
|
BitUtils.h
|
|
|
|
BlockingLoop.h
|
2017-03-01 12:43:43 +00:00
|
|
|
CDUtils.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
CDUtils.h
|
|
|
|
ChunkFile.h
|
|
|
|
CodeBlock.h
|
2017-03-01 12:43:43 +00:00
|
|
|
ColorUtil.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
ColorUtil.h
|
|
|
|
Common.h
|
2017-04-14 19:07:37 +00:00
|
|
|
CommonFuncs.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
CommonFuncs.h
|
|
|
|
CommonPaths.h
|
|
|
|
CommonTypes.h
|
|
|
|
Compiler.h
|
2017-03-01 12:43:43 +00:00
|
|
|
Config/Config.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
Config/Config.h
|
2017-10-30 16:22:37 +00:00
|
|
|
Config/ConfigInfo.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
Config/ConfigInfo.h
|
|
|
|
Config/Enums.h
|
2017-03-01 12:43:43 +00:00
|
|
|
Config/Layer.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
Config/Layer.h
|
|
|
|
CPUDetect.h
|
2017-08-07 06:25:14 +00:00
|
|
|
Crypto/AES.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
Crypto/AES.h
|
2017-08-07 06:25:14 +00:00
|
|
|
Crypto/bn.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
Crypto/bn.h
|
2017-08-07 06:25:14 +00:00
|
|
|
Crypto/ec.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
Crypto/ec.h
|
2018-05-21 14:46:03 +00:00
|
|
|
Debug/MemoryPatches.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
Debug/MemoryPatches.h
|
2020-03-21 07:48:49 +00:00
|
|
|
Debug/OSThread.cpp
|
|
|
|
Debug/OSThread.h
|
|
|
|
Debug/Threads.h
|
2018-01-29 16:58:02 +00:00
|
|
|
Debug/Watches.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
Debug/Watches.h
|
|
|
|
DebugInterface.h
|
2019-03-09 13:31:33 +00:00
|
|
|
DynamicLibrary.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
DynamicLibrary.h
|
2017-03-01 12:43:43 +00:00
|
|
|
ENetUtil.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
ENetUtil.h
|
|
|
|
Event.h
|
2017-01-15 20:46:32 +00:00
|
|
|
File.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
File.h
|
2017-03-01 12:43:43 +00:00
|
|
|
FileSearch.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
FileSearch.h
|
2017-03-01 12:43:43 +00:00
|
|
|
FileUtil.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
FileUtil.h
|
|
|
|
FixedSizeQueue.h
|
|
|
|
Flag.h
|
2018-05-07 05:18:41 +00:00
|
|
|
FloatUtils.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
FloatUtils.h
|
|
|
|
FPURoundMode.h
|
2017-03-01 12:43:43 +00:00
|
|
|
GekkoDisassembler.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
GekkoDisassembler.h
|
2017-03-01 12:43:43 +00:00
|
|
|
Hash.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
Hash.h
|
2017-06-12 15:17:05 +00:00
|
|
|
HttpRequest.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
HttpRequest.h
|
2016-12-27 15:32:32 +00:00
|
|
|
Image.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
Image.h
|
2017-03-01 12:43:43 +00:00
|
|
|
IniFile.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
IniFile.h
|
2017-03-01 12:43:43 +00:00
|
|
|
JitRegister.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
JitRegister.h
|
|
|
|
Lazy.h
|
|
|
|
LinearDiskCache.h
|
|
|
|
Logging/ConsoleListener.h
|
|
|
|
Logging/Log.h
|
2017-08-07 06:25:14 +00:00
|
|
|
Logging/LogManager.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
Logging/LogManager.h
|
2017-03-01 12:43:43 +00:00
|
|
|
MathUtil.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
MathUtil.h
|
2019-01-29 22:05:51 +00:00
|
|
|
Matrix.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
Matrix.h
|
2017-08-07 06:25:14 +00:00
|
|
|
MD5.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
MD5.h
|
2017-03-01 12:43:43 +00:00
|
|
|
MemArena.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
MemArena.h
|
2017-03-01 12:43:43 +00:00
|
|
|
MemoryUtil.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
MemoryUtil.h
|
2019-08-23 20:38:44 +00:00
|
|
|
MinizipUtil.h
|
2017-03-01 12:43:43 +00:00
|
|
|
MsgHandler.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
MsgHandler.h
|
2017-03-01 12:43:43 +00:00
|
|
|
NandPaths.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
NandPaths.h
|
2017-03-01 12:43:43 +00:00
|
|
|
Network.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
Network.h
|
2017-03-01 12:43:43 +00:00
|
|
|
PcapFile.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
PcapFile.h
|
2017-03-01 12:43:43 +00:00
|
|
|
PerformanceCounter.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
PerformanceCounter.h
|
2017-03-01 12:43:43 +00:00
|
|
|
Profiler.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
Profiler.h
|
2017-10-27 23:42:25 +00:00
|
|
|
QoSSession.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
QoSSession.h
|
2018-05-21 13:48:17 +00:00
|
|
|
Random.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
Random.h
|
|
|
|
Result.h
|
|
|
|
ScopeGuard.h
|
2017-03-01 12:43:43 +00:00
|
|
|
SDCardUtil.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
SDCardUtil.h
|
|
|
|
Semaphore.h
|
2018-07-04 21:01:50 +00:00
|
|
|
SFMLHelper.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
SFMLHelper.h
|
2017-10-30 16:22:37 +00:00
|
|
|
SettingsHandler.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
SettingsHandler.h
|
|
|
|
SPSCQueue.h
|
2017-03-01 12:43:43 +00:00
|
|
|
StringUtil.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
StringUtil.h
|
2017-03-01 12:43:43 +00:00
|
|
|
SymbolDB.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
SymbolDB.h
|
2017-03-01 12:43:43 +00:00
|
|
|
Thread.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
Thread.h
|
2017-03-01 12:43:43 +00:00
|
|
|
Timer.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
Timer.h
|
2017-03-01 12:43:43 +00:00
|
|
|
TraversalClient.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
TraversalClient.h
|
|
|
|
TraversalProto.h
|
2017-08-07 06:26:01 +00:00
|
|
|
UPnP.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
UPnP.h
|
|
|
|
VariantUtil.h
|
2017-03-01 12:43:43 +00:00
|
|
|
Version.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
Version.h
|
|
|
|
WindowSystemInfo.h
|
|
|
|
WorkQueueThread.h
|
2017-03-01 12:43:43 +00:00
|
|
|
)
|
2014-06-05 23:29:54 +00:00
|
|
|
|
2018-04-01 17:49:34 +00:00
|
|
|
target_link_libraries(common
|
|
|
|
PUBLIC
|
2018-03-23 22:31:29 +00:00
|
|
|
${CMAKE_THREAD_LIBS_INIT}
|
|
|
|
enet
|
2019-06-10 19:00:30 +00:00
|
|
|
fmt::fmt
|
2018-03-23 22:31:29 +00:00
|
|
|
${MBEDTLS_LIBRARIES}
|
2019-08-23 20:38:44 +00:00
|
|
|
minizip
|
2018-04-01 17:49:34 +00:00
|
|
|
|
|
|
|
PRIVATE
|
2018-04-16 16:37:40 +00:00
|
|
|
${CURL_LIBRARIES}
|
2018-04-01 17:49:34 +00:00
|
|
|
${ICONV_LIBRARIES}
|
2016-12-27 15:32:32 +00:00
|
|
|
png
|
2018-04-16 16:37:40 +00:00
|
|
|
${VTUNE_LIBRARIES}
|
2018-03-23 22:31:29 +00:00
|
|
|
)
|
2017-03-25 19:11:33 +00:00
|
|
|
|
2018-03-30 19:43:49 +00:00
|
|
|
if (APPLE)
|
|
|
|
target_link_libraries(common
|
|
|
|
PRIVATE
|
|
|
|
${APPKIT_LIBRARY}
|
|
|
|
${COREFOUNDATION_LIBRARY}
|
|
|
|
${IOK_LIBRARY}
|
|
|
|
)
|
2019-05-08 19:41:07 +00:00
|
|
|
elseif(WIN32)
|
|
|
|
target_link_libraries(common
|
|
|
|
PRIVATE
|
|
|
|
kernel32.lib
|
|
|
|
shlwapi.lib
|
|
|
|
winmm.lib
|
|
|
|
)
|
2020-02-11 23:07:56 +00:00
|
|
|
if (_M_X86_64)
|
|
|
|
target_link_libraries(common PRIVATE opengl32.lib)
|
|
|
|
endif()
|
2018-03-30 19:43:49 +00:00
|
|
|
endif()
|
|
|
|
|
2015-10-03 13:10:43 +00:00
|
|
|
if(ANDROID)
|
2018-03-23 22:31:29 +00:00
|
|
|
target_sources(common PRIVATE
|
2018-08-19 21:38:29 +00:00
|
|
|
AndroidAnalytics.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
AndroidAnalytics.h
|
2018-03-23 22:31:29 +00:00
|
|
|
Logging/ConsoleListenerDroid.cpp
|
|
|
|
)
|
2017-01-20 23:28:32 +00:00
|
|
|
elseif(WIN32)
|
2018-03-23 22:31:29 +00:00
|
|
|
target_sources(common PRIVATE
|
2019-05-08 19:41:07 +00:00
|
|
|
LdrWatcher.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
LdrWatcher.h
|
2018-03-23 22:31:29 +00:00
|
|
|
Logging/ConsoleListenerWin.cpp
|
|
|
|
)
|
2015-10-03 13:10:43 +00:00
|
|
|
else()
|
2018-03-23 22:31:29 +00:00
|
|
|
target_sources(common PRIVATE
|
|
|
|
Logging/ConsoleListenerNix.cpp
|
|
|
|
)
|
2015-10-03 13:10:43 +00:00
|
|
|
endif()
|
|
|
|
|
2015-06-08 03:44:13 +00:00
|
|
|
if(_M_ARM_64)
|
2018-03-23 22:31:29 +00:00
|
|
|
target_sources(common PRIVATE
|
2017-03-01 12:43:43 +00:00
|
|
|
Arm64Emitter.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
Arm64Emitter.h
|
|
|
|
ArmCommon.h
|
2017-03-01 12:43:43 +00:00
|
|
|
ArmCPUDetect.cpp
|
|
|
|
GenericFPURoundMode.cpp
|
|
|
|
)
|
2014-06-06 01:33:35 +00:00
|
|
|
else()
|
2017-03-01 12:43:43 +00:00
|
|
|
if(_M_X86) #X86
|
2018-03-23 22:31:29 +00:00
|
|
|
target_sources(common PRIVATE
|
2018-06-21 10:41:01 +00:00
|
|
|
x64ABI.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
x64ABI.h
|
2018-06-21 10:41:01 +00:00
|
|
|
x64Emitter.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
x64Emitter.h
|
2017-03-01 12:43:43 +00:00
|
|
|
x64FPURoundMode.cpp
|
|
|
|
x64CPUDetect.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
x64Reg.h
|
2017-03-01 12:43:43 +00:00
|
|
|
)
|
|
|
|
else() # Generic
|
2018-03-23 22:31:29 +00:00
|
|
|
target_sources(common PRIVATE
|
2017-03-01 12:43:43 +00:00
|
|
|
GenericFPURoundMode.cpp
|
|
|
|
GenericCPUDetect.cpp
|
|
|
|
)
|
|
|
|
endif()
|
2013-02-26 19:49:00 +00:00
|
|
|
endif()
|
2010-11-01 15:47:02 +00:00
|
|
|
|
2015-09-18 16:40:00 +00:00
|
|
|
# OpenGL Interface
|
2018-03-23 22:31:29 +00:00
|
|
|
target_sources(common PRIVATE
|
2019-05-29 08:16:24 +00:00
|
|
|
GL/GLContext.cpp
|
|
|
|
GL/GLContext.h
|
2017-03-01 12:43:43 +00:00
|
|
|
GL/GLUtil.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
GL/GLUtil.h
|
2017-03-01 12:43:43 +00:00
|
|
|
GL/GLExtensions/GLExtensions.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
GL/GLExtensions/GLExtensions.h
|
2017-03-01 12:43:43 +00:00
|
|
|
)
|
2015-09-18 16:40:00 +00:00
|
|
|
|
2018-10-14 13:17:31 +00:00
|
|
|
if(ENABLE_EGL AND EGL_FOUND)
|
2019-05-29 08:16:24 +00:00
|
|
|
target_sources(common PRIVATE
|
|
|
|
GL/GLInterface/EGL.cpp
|
|
|
|
GL/GLInterface/EGL.h
|
|
|
|
)
|
2017-03-01 12:43:43 +00:00
|
|
|
if(ANDROID)
|
2019-05-29 08:16:24 +00:00
|
|
|
target_sources(common PRIVATE
|
|
|
|
GL/GLInterface/EGLAndroid.cpp
|
|
|
|
GL/GLInterface/EGLAndroid.h
|
|
|
|
)
|
2018-10-14 13:17:31 +00:00
|
|
|
elseif(ENABLE_X11 AND X11_FOUND)
|
2019-05-29 08:16:24 +00:00
|
|
|
target_sources(common PRIVATE
|
|
|
|
GL/GLInterface/EGLX11.cpp
|
|
|
|
GL/GLInterface/EGLX11.h
|
|
|
|
)
|
2017-03-01 12:43:43 +00:00
|
|
|
endif()
|
2018-10-14 13:17:31 +00:00
|
|
|
target_include_directories(common PRIVATE ${EGL_INCLUDE_DIRS})
|
|
|
|
target_link_libraries(common PUBLIC ${EGL_LIBRARIES})
|
2015-09-18 16:40:00 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WIN32)
|
2018-03-23 22:31:29 +00:00
|
|
|
target_sources(common PRIVATE
|
|
|
|
CompatPatches.cpp
|
|
|
|
GL/GLInterface/WGL.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
GL/GLInterface/WGL.h
|
2018-03-23 22:31:29 +00:00
|
|
|
)
|
2015-09-18 16:40:00 +00:00
|
|
|
elseif(APPLE)
|
2019-05-29 08:16:24 +00:00
|
|
|
target_sources(common PRIVATE
|
|
|
|
GL/GLInterface/AGL.h
|
|
|
|
GL/GLInterface/AGL.mm
|
|
|
|
)
|
2018-10-14 13:17:31 +00:00
|
|
|
elseif(ENABLE_X11 AND X11_FOUND)
|
2018-10-03 13:03:36 +00:00
|
|
|
target_sources(common PRIVATE
|
|
|
|
GL/GLX11Window.cpp
|
2019-05-29 08:16:24 +00:00
|
|
|
GL/GLX11Window.h
|
|
|
|
GL/GLInterface/GLX.cpp
|
|
|
|
GL/GLInterface/GLX.h
|
|
|
|
)
|
2018-10-03 13:03:36 +00:00
|
|
|
|
|
|
|
# GLX has a hard dependency on libGL.
|
|
|
|
# Make sure to link to it if using GLX.
|
|
|
|
target_link_libraries(common PUBLIC ${OPENGL_LIBRARIES})
|
2015-09-18 16:40:00 +00:00
|
|
|
endif()
|
|
|
|
|
2018-07-02 17:01:16 +00:00
|
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
2018-03-23 22:31:29 +00:00
|
|
|
target_link_libraries(common PUBLIC dl rt)
|
2015-09-18 16:40:00 +00:00
|
|
|
endif()
|
|
|
|
|
2017-08-14 22:13:49 +00:00
|
|
|
if(USE_UPNP)
|
|
|
|
target_link_libraries(common PRIVATE Miniupnpc::miniupnpc)
|
|
|
|
endif()
|
|
|
|
|
2017-08-14 21:09:32 +00:00
|
|
|
if(OPROFILE_FOUND)
|
2018-04-13 23:32:11 +00:00
|
|
|
target_link_libraries(common PRIVATE OProfile::OProfile)
|
2017-08-14 21:09:32 +00:00
|
|
|
endif()
|
|
|
|
|
2017-01-20 22:03:59 +00:00
|
|
|
if(UNIX)
|
2017-03-01 12:43:43 +00:00
|
|
|
# Posix networking code needs to be fixed for Windows
|
|
|
|
add_executable(traversal_server TraversalServer.cpp)
|
2018-05-21 13:48:17 +00:00
|
|
|
target_link_libraries(traversal_server PRIVATE common)
|
2018-03-08 06:10:17 +00:00
|
|
|
if(SYSTEMD_FOUND)
|
2018-06-08 21:40:42 +00:00
|
|
|
target_link_libraries(traversal_server PRIVATE ${SYSTEMD_LIBRARIES})
|
2018-03-08 06:10:17 +00:00
|
|
|
endif()
|
2017-06-16 04:26:40 +00:00
|
|
|
elseif(WIN32)
|
|
|
|
target_link_libraries(common PRIVATE "-INCLUDE:enableCompatPatches")
|
2017-01-20 22:03:59 +00:00
|
|
|
endif()
|