Skip to content

Commit

Permalink
Exclude chkjson from ALL; Add tests target for json_verifier;
Browse files Browse the repository at this point in the history
  • Loading branch information
brezerk committed Apr 13, 2015
1 parent cb85665 commit 6024c65
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
13 changes: 13 additions & 0 deletions lua/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@ set(CATACLYSM_DDA_LUA_SOURCES
${CMAKE_SOURCE_DIR}/lua/autoexec.lua
)

add_custom_target (
tests
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)

add_custom_command (
TARGET tests
PRE_BUILD
COMMAND ${LUA_BINARY} lua/json_verifier.lua
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)


IF(RELEASE)
install(FILES ${CATACLYSM_DDA_LUA_SOURCES} DESTINATION ${DATA_PREFIX}/lua)
ENDIF(RELEASE)
2 changes: 1 addition & 1 deletion src/chkjson/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ SET (CHKJSON_HEADERS
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/chkjson )

# Add the actual executable
ADD_EXECUTABLE(chkjson ${CHKJSON_SOURCES} ${CHKJSON_HEADERS})
ADD_EXECUTABLE(chkjson EXCLUDE_FROM_ALL ${CHKJSON_SOURCES} ${CHKJSON_HEADERS})
7 changes: 6 additions & 1 deletion src/lua/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ ENDIF(NOT LUA_FOUND)

ADD_DEFINITIONS(-DLUA)

add_custom_target (
lua_bindings
ALL
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)

ADD_CUSTOM_COMMAND (
TARGET lua_bindings PRE_BUILD
COMMAND ${LUA_BINARY} generate_bindings.lua
BYPRODUCTS ${CMAKE_SOURCE_DIR}/src/lua/catabindings.cpp
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/lua
)

0 comments on commit 6024c65

Please sign in to comment.