mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2026-02-06 11:27:19 +00:00
KASM-6984 Refactor TinyXML2 integration and update build settings
This commit is contained in:
parent
865aa1d4f0
commit
44ee8ee58a
@ -74,7 +74,6 @@ set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -UNDEBUG")
|
||||
|
||||
# Make sure we get a sane C version
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
|
||||
# Enable OpenMP
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp")
|
||||
@ -227,6 +226,7 @@ include_directories(${CMAKE_BINARY_DIR})
|
||||
|
||||
include(cmake/StaticBuild.cmake)
|
||||
|
||||
add_subdirectory(third_party)
|
||||
add_subdirectory(common)
|
||||
|
||||
if(WIN32)
|
||||
|
||||
@ -1,84 +1,82 @@
|
||||
include_directories(${CMAKE_SOURCE_DIR}/common ${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/unix/kasmvncpasswd)
|
||||
|
||||
set(RFB_SOURCES
|
||||
Blacklist.cxx
|
||||
Congestion.cxx
|
||||
CConnection.cxx
|
||||
CMsgHandler.cxx
|
||||
CMsgReader.cxx
|
||||
CMsgWriter.cxx
|
||||
CSecurityPlain.cxx
|
||||
CSecurityStack.cxx
|
||||
CSecurityVeNCrypt.cxx
|
||||
CSecurityVncAuth.cxx
|
||||
ComparingUpdateTracker.cxx
|
||||
Configuration.cxx
|
||||
ConnParams.cxx
|
||||
CopyRectDecoder.cxx
|
||||
Cursor.cxx
|
||||
DecodeManager.cxx
|
||||
Decoder.cxx
|
||||
d3des.c
|
||||
EncCache.cxx
|
||||
EncodeManager.cxx
|
||||
Encoder.cxx
|
||||
HextileDecoder.cxx
|
||||
HextileEncoder.cxx
|
||||
JpegCompressor.cxx
|
||||
JpegDecompressor.cxx
|
||||
KeyRemapper.cxx
|
||||
LogWriter.cxx
|
||||
Logger.cxx
|
||||
Logger_file.cxx
|
||||
Logger_stdio.cxx
|
||||
Password.cxx
|
||||
PixelBuffer.cxx
|
||||
PixelFormat.cxx
|
||||
RREEncoder.cxx
|
||||
RREDecoder.cxx
|
||||
RawDecoder.cxx
|
||||
RawEncoder.cxx
|
||||
Region.cxx
|
||||
SConnection.cxx
|
||||
SMsgHandler.cxx
|
||||
SMsgReader.cxx
|
||||
SMsgWriter.cxx
|
||||
ServerCore.cxx
|
||||
Security.cxx
|
||||
SecurityServer.cxx
|
||||
SecurityClient.cxx
|
||||
SelfBench.cxx
|
||||
SSecurityPlain.cxx
|
||||
SSecurityStack.cxx
|
||||
SSecurityVncAuth.cxx
|
||||
SSecurityVeNCrypt.cxx
|
||||
ScaleFilters.cxx
|
||||
Timer.cxx
|
||||
TightDecoder.cxx
|
||||
TightEncoder.cxx
|
||||
TightJPEGEncoder.cxx
|
||||
TightWEBPEncoder.cxx
|
||||
TightQOIEncoder.cxx
|
||||
UpdateTracker.cxx
|
||||
VNCSConnectionST.cxx
|
||||
VNCServerST.cxx
|
||||
ZRLEEncoder.cxx
|
||||
ZRLEDecoder.cxx
|
||||
Watermark.cxx
|
||||
cpuid.cxx
|
||||
encodings.cxx
|
||||
util.cxx
|
||||
xxhash.c)
|
||||
Blacklist.cxx
|
||||
Congestion.cxx
|
||||
CConnection.cxx
|
||||
CMsgHandler.cxx
|
||||
CMsgReader.cxx
|
||||
CMsgWriter.cxx
|
||||
CSecurityPlain.cxx
|
||||
CSecurityStack.cxx
|
||||
CSecurityVeNCrypt.cxx
|
||||
CSecurityVncAuth.cxx
|
||||
ComparingUpdateTracker.cxx
|
||||
Configuration.cxx
|
||||
ConnParams.cxx
|
||||
CopyRectDecoder.cxx
|
||||
Cursor.cxx
|
||||
DecodeManager.cxx
|
||||
Decoder.cxx
|
||||
d3des.c
|
||||
EncCache.cxx
|
||||
EncodeManager.cxx
|
||||
Encoder.cxx
|
||||
HextileDecoder.cxx
|
||||
HextileEncoder.cxx
|
||||
JpegCompressor.cxx
|
||||
JpegDecompressor.cxx
|
||||
KeyRemapper.cxx
|
||||
LogWriter.cxx
|
||||
Logger.cxx
|
||||
Logger_file.cxx
|
||||
Logger_stdio.cxx
|
||||
Password.cxx
|
||||
PixelBuffer.cxx
|
||||
PixelFormat.cxx
|
||||
RREEncoder.cxx
|
||||
RREDecoder.cxx
|
||||
RawDecoder.cxx
|
||||
RawEncoder.cxx
|
||||
Region.cxx
|
||||
SConnection.cxx
|
||||
SMsgHandler.cxx
|
||||
SMsgReader.cxx
|
||||
SMsgWriter.cxx
|
||||
ServerCore.cxx
|
||||
Security.cxx
|
||||
SecurityServer.cxx
|
||||
SecurityClient.cxx
|
||||
SelfBench.cxx
|
||||
SSecurityPlain.cxx
|
||||
SSecurityStack.cxx
|
||||
SSecurityVncAuth.cxx
|
||||
SSecurityVeNCrypt.cxx
|
||||
ScaleFilters.cxx
|
||||
Timer.cxx
|
||||
TightDecoder.cxx
|
||||
TightEncoder.cxx
|
||||
TightJPEGEncoder.cxx
|
||||
TightWEBPEncoder.cxx
|
||||
TightQOIEncoder.cxx
|
||||
UpdateTracker.cxx
|
||||
VNCSConnectionST.cxx
|
||||
VNCServerST.cxx
|
||||
ZRLEEncoder.cxx
|
||||
ZRLEDecoder.cxx
|
||||
Watermark.cxx
|
||||
cpuid.cxx
|
||||
encodings.cxx
|
||||
util.cxx
|
||||
xxhash.c
|
||||
)
|
||||
|
||||
if(UNIX)
|
||||
set(RFB_SOURCES ${RFB_SOURCES} Logger_syslog.cxx)
|
||||
endif()
|
||||
if (UNIX)
|
||||
set(RFB_SOURCES ${RFB_SOURCES} Logger_syslog.cxx)
|
||||
endif ()
|
||||
|
||||
if(WIN32)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/win)
|
||||
set(RFB_SOURCES ${RFB_SOURCES} WinPasswdValidator.cxx)
|
||||
endif(WIN32)
|
||||
if (WIN32)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/win)
|
||||
set(RFB_SOURCES ${RFB_SOURCES} WinPasswdValidator.cxx)
|
||||
endif (WIN32)
|
||||
|
||||
set(RFB_LIBRARIES ${JPEG_LIBRARIES} ${PNG_LIBRARIES} os rdr Xregion)
|
||||
|
||||
@ -88,49 +86,57 @@ if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_
|
||||
set(RFB_LIBRARIES ${RFB_LIBRARIES} tbb)
|
||||
endif ()
|
||||
|
||||
if(HAVE_PAM)
|
||||
set(RFB_SOURCES ${RFB_SOURCES} UnixPasswordValidator.cxx
|
||||
UnixPasswordValidator.h pam.c pam.h)
|
||||
set(RFB_LIBRARIES ${RFB_LIBRARIES} ${PAM_LIBS})
|
||||
endif()
|
||||
if (HAVE_PAM)
|
||||
set(RFB_SOURCES ${RFB_SOURCES} UnixPasswordValidator.cxx
|
||||
UnixPasswordValidator.h pam.c pam.h)
|
||||
set(RFB_LIBRARIES ${RFB_LIBRARIES} ${PAM_LIBS})
|
||||
endif ()
|
||||
|
||||
if(GNUTLS_FOUND)
|
||||
set(RFB_SOURCES
|
||||
${RFB_SOURCES}
|
||||
CSecurityTLS.cxx
|
||||
SSecurityTLS.cxx
|
||||
)
|
||||
set(RFB_LIBRARIES
|
||||
${RFB_LIBRARIES}
|
||||
${GNUTLS_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
if (GNUTLS_FOUND)
|
||||
set(RFB_SOURCES
|
||||
${RFB_SOURCES}
|
||||
CSecurityTLS.cxx
|
||||
SSecurityTLS.cxx
|
||||
)
|
||||
set(RFB_LIBRARIES
|
||||
${RFB_LIBRARIES}
|
||||
${GNUTLS_LIBRARIES}
|
||||
)
|
||||
endif ()
|
||||
|
||||
# SSE2
|
||||
|
||||
set(SSE2_SOURCES
|
||||
scale_sse2.cxx)
|
||||
scale_sse2.cxx)
|
||||
|
||||
set(SCALE_DUMMY_SOURCES
|
||||
scale_dummy.cxx)
|
||||
scale_dummy.cxx)
|
||||
|
||||
if(COMPILER_SUPPORTS_SSE2)
|
||||
set_source_files_properties(${SSE2_SOURCES} PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS} -msse2)
|
||||
set(RFB_SOURCES
|
||||
${RFB_SOURCES}
|
||||
${SSE2_SOURCES}
|
||||
)
|
||||
else()
|
||||
set(RFB_SOURCES
|
||||
${RFB_SOURCES}
|
||||
${SCALE_DUMMY_SOURCES}
|
||||
)
|
||||
endif()
|
||||
if (COMPILER_SUPPORTS_SSE2)
|
||||
set_source_files_properties(${SSE2_SOURCES} PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS} -msse2)
|
||||
set(RFB_SOURCES
|
||||
${RFB_SOURCES}
|
||||
${SSE2_SOURCES}
|
||||
)
|
||||
else ()
|
||||
set(RFB_SOURCES
|
||||
${RFB_SOURCES}
|
||||
${SCALE_DUMMY_SOURCES}
|
||||
)
|
||||
endif ()
|
||||
|
||||
add_library(rfb STATIC ${RFB_SOURCES})
|
||||
|
||||
target_link_libraries(rfb ${RFB_LIBRARIES})
|
||||
target_include_directories(rfb PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/common
|
||||
${JPEG_INCLUDE_DIR}
|
||||
${PNG_INCLUDE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/unix/kasmvncpasswd
|
||||
${CMAKE_SOURCE_DIR}/third_party/tinyxml2
|
||||
)
|
||||
|
||||
if(UNIX)
|
||||
libtool_create_control_file(rfb)
|
||||
endif()
|
||||
target_link_libraries(rfb PRIVATE ${RFB_LIBRARIES} tinyxml2_objs)
|
||||
|
||||
if (UNIX)
|
||||
libtool_create_control_file(rfb)
|
||||
endif ()
|
||||
|
||||
1
third_party/CMakeLists.txt
vendored
Normal file
1
third_party/CMakeLists.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
add_subdirectory(tinyxml2)
|
||||
5
third_party/tinyxml2/CMakeLists.txt
vendored
Normal file
5
third_party/tinyxml2/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
add_library(tinyxml2_objs OBJECT tinyxml2.cpp)
|
||||
if (NOT WIN32)
|
||||
set_target_properties(tinyxml2_objs PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
endif ()
|
||||
target_include_directories(tinyxml2_objs PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
Loading…
Reference in New Issue
Block a user