Move add_library block to the beginning of the file, unify add_library blocks by using ${PROJECT_NAME}
Add library aliases for configuration-level library checking
Use PUBLIC, INTERFACE and PRIVATE sections of target_ directives to allow CMake inherit options from linked libraries
Overall using modern CMake features reduces amount of boilerplate user code required to use the library and makes it easier to read CMake files when looking for some specific library options.
Also use modern CMake features
Move
add_library
block to the beginning of the file, unifyadd_library
blocks by using${PROJECT_NAME}
Add library aliases for configuration-level library checking UsePUBLIC
,INTERFACE
andPRIVATE
sections oftarget_
directives to allow CMake inherit options from linked librariesOverall using modern CMake features reduces amount of boilerplate user code required to use the library and makes it easier to read CMake files when looking for some specific library options.