cmake_minimum_required (VERSION 3.5)
project (script CXX)

if(ENABLE_NLS)
	find_package (Intl REQUIRED)
endif()

file(GLOB HEADERS "*.h")
file(GLOB SRC "*.cpp")

add_library(script STATIC ${HEADERS} ${SRC})
set_property(TARGET script PROPERTY FOLDER "lib")
if(WZ_TARGET_ADDITIONAL_PROPERTIES)
	SET_TARGET_PROPERTIES(script PROPERTIES ${WZ_TARGET_ADDITIONAL_PROPERTIES})
endif()
target_link_libraries(script PRIVATE framework)
if(ENABLE_NLS)
	target_include_directories(script PRIVATE "${Intl_INCLUDE_DIRS}")
	target_link_libraries(script PRIVATE ${Intl_LIBRARIES})
endif()
target_compile_definitions(script PRIVATE "YY_NO_UNISTD_H")
