A few updates for the CMake configuration

Started by
3 comments, last by Solokiller 1 year, 7 months ago

There are a few updates needed for the CMake configuration file.

Line 9:

option(MSVC_COMPILE_FLAGS "Compiler flags to use with MSVC" "/MP")

option is only for boolean values, so this will add either ON or OFF as a command line parameter.

It should be:

set(MSVC_COMPILE_FLAGS "/MP" CACHE STRING "Compiler flags to use with MSVC")

Line 150:

target_include_directories(${ANGELSCRIPT_LIBRARY_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../include)

This won't work when using Angelscript by directly including the CMakeLists.txt file in another project.

It should be:

target_include_directories(${ANGELSCRIPT_LIBRARY_NAME} PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../include>")

Making the path public allows it to be used by other projects, and using the BUILD_INTERFACE generator expression limits its use to builds only. It will not be included in the installed version, which depends on the path provided by the install command on line 197.

Advertisement

Thanks for letting me know. I'll check in these changes as soon as I can.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

I've finally checked in these changes in revision 2800.

Thanks,
Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Thanks!

This topic is closed to new replies.

Advertisement