@@ -7,36 +7,39 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
77set (CMAKE_CXX_EXTENSIONS OFF )
88
99# Standard CMake toggle:
10- # -DBUILD_SHARED_LIBS=ON -> SHARED
11- # -DBUILD_SHARED_LIBS=OFF -> STATIC
10+ # -DBUILD_SHARED_LIBS=ON -> SHARED
11+ # -DBUILD_SHARED_LIBS=OFF -> STATIC
1212option (BUILD_SHARED_LIBS "Build shared libraries" ON )
1313
1414# Custom CMake toggle:
15- # -DCORELIB_USE_STD_FILESYSTEM=ON -> (Default) use <filesystem>
16- # -DCORELIB_USE_STD_FILESYSTEM=OFF -> use <boost/filesystem.hpp>
15+ # -DCORELIB_USE_STD_FILESYSTEM=ON -> (Default) use <filesystem>
16+ # -DCORELIB_USE_STD_FILESYSTEM=OFF -> use <boost/filesystem.hpp>
1717option (CORELIB_USE_STD_FILESYSTEM "Use <filesystem> instead of <boost/filesystem.hpp>" ON )
1818
1919# Custom CMake toggle:
20- # -DCORELIB_USE_FLATBUFFERS=ON -> support Google flatbuffers
21- # -DCORELIB_USE_FLATBUFFERS=OFF -> do not support Google flatbuffers
20+ # -DCORELIB_USE_FLATBUFFERS=ON -> support Google flatbuffers
21+ # -DCORELIB_USE_FLATBUFFERS=OFF -> do not support Google flatbuffers
2222option (CORELIB_USE_FLATBUFFERS "Support Google flatbuffers." OFF )
2323
2424# Custom CMake toggle:
25- # -DCORELIB_SOCKET_DEBUG=ON -> Extra debug to log.
26- # -DCORELIB_SOCKET_DEBUG=OFF -> (Default) No extra debug to log/
25+ # -DCORELIB_SOCKET_DEBUG=ON -> Extra debug to log.
26+ # -DCORELIB_SOCKET_DEBUG=OFF -> (Default) No extra debug to log/
2727option (CORELIB_SOCKET_DEBUG "Use extra debug output from Asio classes" OFF )
2828
2929# Local env vars for this CMakelists file, must be set before calling CMake configure
3030# and as these are cached will be rememebr until the CMake cache is cleared.
3131#
3232# Path that is parent to the /boost include directory.
3333set (CORELIB_BOOST_ROOT $ENV{CORELIB_BOOST_ROOT} CACHE PATH "Boost root" )
34+
3435# Path to the correct Boost lib folder for your compiler and platform.
3536set (CORELIB_BOOST_LIB $ENV{CORELIB_BOOST_LIB} CACHE PATH "Boost libs" )
37+
3638# Name modifier for boost libs.
37- set (CORELIB_BOOST_LIB_NAME_STUB $ENV{CORELIB_BOOST_LIB_NAME_STUB} CACHE PATH "Boost lib name stub" )
39+ set (CORELIB_BOOST_LIB_NAME_STUB $ENV{CORELIB_BOOST_LIB_NAME_STUB} CACHE PATH "Boost lib name stub" )
40+
3841# Name modifier for boost libs in debug mode.
39- set (CORELIB_BOOST_LIB_NAME_STUB_D $ENV{CORELIB_BOOST_LIB_NAME_STUB_D} CACHE PATH "Boost lib name stub (debug)" )
42+ set (CORELIB_BOOST_LIB_NAME_STUB_D $ENV{CORELIB_BOOST_LIB_NAME_STUB_D} CACHE PATH "Boost lib name stub (debug)" )
4043
4144# Check required paths are configured and exist on disk.
4245foreach (v CORELIB_BOOST_ROOT CORELIB_BOOST_LIB)
@@ -75,6 +78,7 @@ add_library(CoreLibrary
7578 Source /DebugLog/DebugLogSingleton.cpp
7679 Source /CsvGrid/CsvGridCell.cpp
7780 Source /CsvGrid/CsvGridCellDouble.cpp
81+ Source /Serialization/SerializeToVector.cpp
7882 Source /Asio/AsioDefines.cpp
7983 Source /Asio/IoContextThreadGroup.cpp
8084 Source /Asio/MessageUtils.cpp
@@ -143,14 +147,15 @@ target_include_directories(CoreLibrary PUBLIC
143147)
144148
145149# --- Generator-expression helpers ---
146- set (_CORELIB_WIN "$<PLATFORM_ID :Windows >" )
150+ set (_CORELIB_WIN "$<PLATFORM_ID :Windows >" )
147151set (_CORELIB_LINUX "$<PLATFORM_ID :Linux >" )
148- set (_CORELIB_DBG "$<CONFIG :Debug >" )
149- set (_CORELIB_REL "$<IN_LIST :$<CONFIG >,Release ;RelWithDebInfo ;MinSizeRel >" )
152+ set (_CORELIB_DBG "$<CONFIG :Debug >" )
153+ set (_CORELIB_REL "$<IN_LIST :$<CONFIG >,Release ;RelWithDebInfo ;MinSizeRel >" )
150154set (_CORELIB_NEED_BOOST_FS "$<NOT :$<BOOL :${CORELIB_USE_STD_FILESYSTEM} >>" )
151155set (_CORELIB_NEED_FLATBUFFERS "$<BOOL :${CORELIB_USE_FLATBUFFERS} >" )
152156
153157target_link_libraries (CoreLibrary PUBLIC
158+
154159 # Linux
155160 $<${_CORELIB_LINUX} :${CORELIB_BOOST_LIB} /libboost_system .a >
156161 $<${_CORELIB_LINUX} :${CORELIB_BOOST_LIB} /libboost_thread .a >
@@ -162,6 +167,7 @@ target_link_libraries(CoreLibrary PUBLIC
162167
163168 # Windows
164169 $<$<PLATFORM_ID :Windows >:iphlpapi >
170+
165171 # Windows Release-ish
166172 $<$<AND :${_CORELIB_WIN} ,${_CORELIB_REL} >:${CORELIB_BOOST_LIB} /libboost_thread -${CORELIB_BOOST_LIB_NAME_STUB} .lib >
167173 $<$<AND :${_CORELIB_WIN} ,${_CORELIB_REL} >:${CORELIB_BOOST_LIB} /libboost_locale -${CORELIB_BOOST_LIB_NAME_STUB} .lib >
0 commit comments