• Aziz Baibabaev's avatar
    Replace add_definitions with CMAKE_CXX_FLAGS in cmake file · bd664d9a
    Aziz Baibabaev authored
    When using add_definitions erroneous flags are passed to dll resource compiler under MinGW. This breaks the build for anything linked to dlib, using a dll rc and MinGW.
    
    The proper way is to append to CMAKE_CXX_FLAGS.
    
    For CMake 2.8.12 and higher the proper way is add_compile_options(-Wreturn-type) OR target_compile_options(dlib PRIVATE -Wreturn-type)
    bd664d9a
cmake 3.18 KB