2017-07-15 04:36:48 +08:00
|
|
|
project (duktape)
|
2017-07-15 02:37:25 +08:00
|
|
|
|
2019-05-03 13:57:43 +08:00
|
|
|
file(GLOB_RECURSE DUKTAPE_SOURCES "src/*.c")
|
|
|
|
file(GLOB_RECURSE DUKTAPE_HEADERS "src/*.h")
|
2017-07-15 02:37:25 +08:00
|
|
|
|
2017-07-15 04:36:48 +08:00
|
|
|
if (BUILD_SHARED_LIBS)
|
2017-07-15 02:37:25 +08:00
|
|
|
add_definitions(-DDUK_F_DLL_BUILD)
|
|
|
|
endif ()
|
|
|
|
|
2019-05-03 13:57:43 +08:00
|
|
|
include_directories("src/")
|
|
|
|
|
2017-07-15 04:36:48 +08:00
|
|
|
add_library(duktape ${DUKTAPE_SOURCES} ${DUKTAPE_HEADERS})
|
2017-07-15 02:37:25 +08:00
|
|
|
|
2017-07-15 04:36:48 +08:00
|
|
|
set_target_properties("duktape" PROPERTIES PUBLIC_HEADER "${DUKTAPE_HEADERS}")
|
|
|
|
|
|
|
|
install(TARGETS duktape
|
2019-05-03 13:57:43 +08:00
|
|
|
EXPORT duktape-targets
|
2017-07-15 02:37:25 +08:00
|
|
|
ARCHIVE DESTINATION "lib"
|
|
|
|
RUNTIME DESTINATION "bin"
|
|
|
|
PUBLIC_HEADER DESTINATION "include")
|
2019-05-03 13:57:43 +08:00
|
|
|
|