Skip to content

Commit

Permalink
Switch to the new lua_sandbox package
Browse files Browse the repository at this point in the history
  • Loading branch information
trink committed Apr 14, 2016
1 parent 524bb60 commit 1e55313
Show file tree
Hide file tree
Showing 5 changed files with 134 additions and 130 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Expand Up @@ -7,12 +7,11 @@ project(lpeg_tester)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Lua Parsing Expression Grammar Tester")
set(CPACK_PACKAGE_VERSION_MAJOR 1)
set(CPACK_PACKAGE_VERSION_MINOR 0)
set(CPACK_PACKAGE_VERSION_PATCH 10)
set(CPACK_PACKAGE_VERSION_PATCH 12)

set(PROJECT_PATH "${CMAKE_BINARY_DIR}/${PROJECT_NAME}")
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
include(trink)
include(externals)

if(CMAKE_HOST_UNIX)
find_library(PTHREAD_LIBRARY pthread)
Expand All @@ -30,6 +29,7 @@ if(CMAKE_HOST_UNIX)
${LIBZ_LIBRARY})
endif()

find_package(luasandbox 0.17.1 REQUIRED CONFIG)
find_package(Boost 1.55.0 REQUIRED
date_time
filesystem
Expand All @@ -46,10 +46,10 @@ include_directories(${Wt_INCLUDE_DIR})
include_directories("${PROJECT_PATH}/include")

add_subdirectory(src)
install(FILES ${LUA_SANDBOX_LIBRARIES} DESTINATION lib)
install(DIRECTORY resource_bundle DESTINATION lpeg_tester)
install(DIRECTORY resources DESTINATION lpeg_tester)
install(DIRECTORY share DESTINATION lpeg_tester)
install(DIRECTORY "${CMAKE_BINARY_DIR}/ep_base/Source/lua_sandbox/modules/" DESTINATION lpeg_tester/modules)
install(FILES lpeg_tester_config.xml DESTINATION lpeg_tester)
if(WIN32)
install(PROGRAMS run.bat DESTINATION lpeg_tester)
Expand Down
17 changes: 0 additions & 17 deletions cmake/externals.cmake

This file was deleted.

2 changes: 2 additions & 0 deletions resources/lpeg_tester.css
Expand Up @@ -4,6 +4,8 @@ background: white;

textarea {
width: 98%;
font-family: monospace;
font-size: .8em;
}

.page {
Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Expand Up @@ -9,13 +9,13 @@ set(LPEG_TESTER_SRC
if (Wt_CONNECTOR STREQUAL "isapi")
set(WT_CONFIG "c:/witty/lpeg_tester_config.xml")
add_library(lpeg_tester SHARED ${LPEG_TESTER_SRC})
target_link_libraries(lpeg_tester ${LUA_SANDBOX_LIBRARIES} ${Wt_LIBRARIES} ${Boost_LIBRARIES} ws2_32.lib wldap32.lib)
target_link_libraries(lpeg_tester ${LUASANDBOX_LIBRARIES} ${Wt_LIBRARIES} ${Boost_LIBRARIES} ws2_32.lib wldap32.lib)
set_target_properties(lpeg_tester PROPERTIES LINK_FLAGS "/EXPORT:HttpExtensionProc /EXPORT:GetExtensionVersion /EXPORT:TerminateExtension")

install(TARGETS tt DESTINATION bin)
else()
add_executable(lpeg_tester ${LPEG_TESTER_SRC})
target_link_libraries(lpeg_tester ${LUA_SANDBOX_LIBRARIES} ${Wt_LIBRARIES} ${Boost_LIBRARIES})
target_link_libraries(lpeg_tester ${LUASANDBOX_LIBRARIES} ${Wt_LIBRARIES} ${Boost_LIBRARIES})
if(CMAKE_HOST_UNIX)
target_link_libraries(lpeg_tester ${UNIX_LIBRARIES})
else()
Expand Down

0 comments on commit 1e55313

Please sign in to comment.