vcpkg/ports/duktape/CMakeLists.txt

24 lines
558 B
CMake
Raw Normal View History

cmake_minimum_required(VERSION 3.14)
project (duktape)
2017-07-15 02:37:25 +08:00
file(GLOB_RECURSE DUKTAPE_SOURCES "src/*.c")
file(GLOB_RECURSE DUKTAPE_HEADERS "src/*.h")
2017-07-15 02:37:25 +08:00
if (BUILD_SHARED_LIBS)
2017-07-15 02:37:25 +08:00
add_definitions(-DDUK_F_DLL_BUILD)
endif ()
include_directories("src/")
add_library(duktape ${DUKTAPE_SOURCES} ${DUKTAPE_HEADERS})
2017-07-15 02:37:25 +08:00
set_target_properties("duktape" PROPERTIES PUBLIC_HEADER "${DUKTAPE_HEADERS}")
install(TARGETS duktape
EXPORT duktape-targets
2017-07-15 02:37:25 +08:00
ARCHIVE DESTINATION "lib"
RUNTIME DESTINATION "bin"
PUBLIC_HEADER DESTINATION "include")