2020-03-21 20:39:01 +01:00
|
|
|
# Create the Sqrat library
|
2020-03-22 17:35:07 +01:00
|
|
|
add_library(Sqrat STATIC sqrat.cpp sqrat.h
|
|
|
|
sqrat/sqratAllocator.h
|
|
|
|
sqrat/sqratArray.h
|
|
|
|
sqrat/sqratClass.h
|
|
|
|
sqrat/sqratConst.h
|
|
|
|
sqrat/sqratFunction.h
|
|
|
|
sqrat/sqratGlobalMethods.h
|
|
|
|
sqrat/sqratMemberMethods.h
|
|
|
|
sqrat/sqratObject.h
|
|
|
|
sqrat/sqratOverloadMethods.h
|
|
|
|
sqrat/sqratScript.h
|
|
|
|
sqrat/sqratTable.h
|
|
|
|
sqrat/sqratTypes.h
|
|
|
|
sqrat/sqratUtil.h
|
|
|
|
)
|
2020-03-21 20:39:01 +01:00
|
|
|
# Set library compiler options
|
2020-03-22 17:35:07 +01:00
|
|
|
target_compile_definitions(Sqrat PUBLIC SCRAT_USE_EXCEPTIONS=1 SCRAT_USE_CXX11_OPTIMIZATIONS=1)
|
2020-03-21 20:39:01 +01:00
|
|
|
# Set specific compiler options
|
|
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
|
|
#target_compile_options(Sqrat PRIVATE -w
|
|
|
|
#)
|
|
|
|
endif()
|
|
|
|
# Library includes
|
2020-03-22 17:35:07 +01:00
|
|
|
target_include_directories(Sqrat PUBLIC ${CMAKE_CURRENT_LIST_DIR})
|
|
|
|
target_include_directories(Sqrat PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include)
|
2020-03-21 20:39:01 +01:00
|
|
|
# Link to required libraries
|
2020-03-22 17:35:07 +01:00
|
|
|
target_link_libraries(Sqrat PUBLIC Squirrel)
|