?login_element?
?pathlinks? – Rev 1198
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| Download
##############################################################
#
# CMakeLists.txt - created by Cizo2000 <cizo2000@gmail.com>
#
##############################################################
set(CMAKE_MODULE_PATH
${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules
${CMAKE_MODULE_PATH})
set(MY_LUA_INCLUDE_DIR
"lua5.1")
set(MY_LUA_LIBRARY
"lua5.1")
set(MY_TOLUA++_INCLUDE_DIR
"tolua++")
set(MY_TOLUA++_LIBRARY
"tolua++")
sjasm/devices.cpp
sjasm/directives.cpp
sjasm/io_nex.cpp
sjasm/io_snapshots.cpp
sjasm/io_tape.cpp
sjasm/io_trd.cpp
sjasm/parser.cpp
sjasm/reader.cpp
sjasm/sjasm.cpp
sjasm/sjio.cpp
sjasm/support.cpp
sjasm/tables.cpp
sjasm/z80.cpp
crc32c/crc32c.cpp
)
set(CMAKE_CXX_STANDARD 14
)
set(CMAKE_CXX_STANDARD_REQUIRED
ON)
set(CMAKE_CXX_EXTENSIONS
ON)
set(CMAKE_C_FLAGS_DEBUG
"${CMAKE_C_FLAGS_DEBUG} -Wall -pedantic")
set(CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} -Wall -pedantic")
set(CMAKE_C_FLAGS_RELEASE
"${CMAKE_C_FLAGS_RELEASE} -s")
set(CMAKE_CXX_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} -s")
option(ENABLE_LUA
"Enable LUA scripting support" ON)
option(SYSTEM_LUA
"Use system LUA and Tolua++ package" OFF)
message(STATUS "Looking for Lua and Tolua++")
message(STATUS "Looking for Tolua++")
message(STATUS "Looking for Tolua++ - found")
message(STATUS "Looking for Tolua++ - using local")
set(TOLUA++_LIBRARY
${MY_TOLUA++_LIBRARY})
set(TOLUA++_INCLUDE_DIR
${MY_TOLUA++_INCLUDE_DIR})
target_include_directories(${MY_TOLUA++_LIBRARY} PUBLIC
${TOLUA++_INCLUDE_DIR}
)
message(STATUS "Looking for Lua 5.1")
message(STATUS "Looking for Lua 5.1 - found: ${LUA_LIBRARIES}")
message(STATUS "Looking for Lua 5.1 - using local")
set(LUA_LIBRARY
${MY_LUA_LIBRARY})
set(LUA_INCLUDE_DIR
${MY_LUA_INCLUDE_DIR})
target_include_directories(${MY_LUA_LIBRARY} PUBLIC
${LUA_INCLUDE_DIR}
)
sjasm/lua_lpack.c
sjasm/lua_sjasm.cpp
)
if( ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
${PROJECT_NAME}
${LUA_LIBRARY}
${TOLUA++_LIBRARY}
)
${PROJECT_NAME}
${LIBDL_LIBRARIES}
)
RUNTIME DESTINATION bin)
add_custom_target(tests
COMMAND "EXE=${CMAKE_BINARY_DIR}/${PROJECT_NAME}" ${BASH_PROGRAM} "${CMAKE_SOURCE_DIR}/ContinuousIntegration/test_folder_tests.sh"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
DEPENDS ${PROJECT_NAME})
add_custom_target(examples
COMMAND "EXE=${CMAKE_BINARY_DIR}/${PROJECT_NAME}" ${BASH_PROGRAM} "${CMAKE_SOURCE_DIR}/ContinuousIntegration/test_folder_examples.sh"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
DEPENDS ${PROJECT_NAME})