CMake Compilation error when I use linking with code


Hi guys,

I am trying to build my project by linking with code.

I download the code and put it inside <project_dir>/src/bsf

Then I am using following CMake code:

cmake_minimum_required(VERSION 3.13.0)


set(BSF_DIRECTORY “src/bsf” CACHE STRING “bsf directory”)




include_directories(src/tinyxml src/utility)

find_package(Boost COMPONENTS program_options REQUIRED)


Then I got following errors:
CMake Error at src/bsf/Source/CMake/HelperMethods.cmake:309 (file):
file STRINGS file
cannot be read.
Call Stack (most recent call first):
src/bsf/Source/CMakeLists.txt:53 (check_and_update_binary_deps)

CMake Error at src/bsf/Source/CMake/HelperMethods.cmake:310 (if):
if given arguments:


Unknown arguments specified
Call Stack (most recent call first):
src/bsf/Source/CMakeLists.txt:53 (check_and_update_binary_deps)

if any one can help me!

thank you very much!


This path looks wrong. Try using the absolute path in set(BSF_DIRECTORY “src/bsf” CACHE STRING “bsf directory”) and see if that changes anything.


Thank you, it helps!