albertodemichelis / squirrel

Official repository for the programming language Squirrel
http://www.squirrel-lang.org
MIT License
894 stars 148 forks source link

Fix interpreter CMake alias for static builds #248

Closed Semphriss closed 2 years ago

Semphriss commented 2 years ago

Attempting to build Squirrel with CMake and -DDISABLE_DYNAMIC=ON will fail.

The reason seems to be a mistake: in sq/CMakeLists.txt, at line 18, the alias generated for squirrel::interpreter_static is actually an alias for the dynamically-linked sq instead of sq_static.

Since the code for static builds is the same as the code for dynamic builds but with "_static" appended to all names, I assumed it was a simple omission and changed sq to sq_static, which fixed the problem.