DarkflameServer/dCommon/CMakeLists.txt
Jett df0f11c95b
Update CMake configuration for easier maintenance (#642)
* Update CMake configuration for easier maintenance

* Incorrect casing fix

* Move package requirement

* Update CTest linking

* Add logs to the CMake

* Add linking for common libraries

Added linking for common libraries in tests subdirectory.

* Move test subdirectory higher up for some reason

* Whitespace a log removal

Missed new line

* Add dCommon to dChatFilter

* Update library output dir

* Correct libBcrypt

* Further refactor CMake behaviour

* Repair bad comments and update library defines

* Revert to old include directory method

* Implement platform defines

* Add missing include

Mac needs a specific include for defining platform.  Does not compile without this.

Co-authored-by: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com>
2022-07-17 00:24:16 +01:00

27 lines
522 B
CMake

set(DCOMMON_SOURCES "AMFFormat.cpp"
"AMFFormat_BitStream.cpp"
"BinaryIO.cpp"
"dConfig.cpp"
"Diagnostics.cpp"
"dLogger.cpp"
"GeneralUtils.cpp"
"LDFFormat.cpp"
"MD5.cpp"
"Metrics.cpp"
"NiPoint3.cpp"
"NiQuaternion.cpp"
"SHA512.cpp"
"Type.cpp"
"ZCompression.cpp")
include_directories(${PROJECT_SOURCE_DIR}/dCommon/)
add_library(dCommon STATIC ${DCOMMON_SOURCES})
target_link_libraries(dCommon libbcrypt)
if (UNIX)
find_package(ZLIB REQUIRED)
target_link_libraries(dCommon ZLIB::ZLIB)
endif()