?login_element?
?pathlinks? – Rev 1537
Rev 539 |
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.4")
set(MY_LUA_LIBRARY
"lua5.4")
set(LUABRIDGE_DIR
"LuaBridge/Source")
set(UNIT_TESTS_DIR
"cpp-src-tests")
set(UNITTESTPP_DIR
"unittest-cpp")
sjasm/devices.cpp
sjasm/directives.cpp
sjasm/io_cpc.cpp
sjasm/io_err.cpp
sjasm/io_nex.cpp
sjasm/io_snapshots.cpp
sjasm/io_tape.cpp
sjasm/io_trd.cpp
sjasm/io_tzx.cpp
sjasm/lua_sjasm.cpp
sjasm/parser.cpp
sjasm/reader.cpp
sjasm/relocate.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 package" OFF)
option(ADD_UNIT_TESTS
"Add unit tests into binary" OFF)
${SOURCES}
${UT_SRCS}
)
message(STATUS "Looking for Lua 5.4")
message(STATUS "Looking for Lua 5.4 - found: ${LUA_LIBRARIES}")
message(STATUS "Looking for Lua 5.4 - 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}
)
if( ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(RESOURCES sjasmwin32/sjasmplus.rc
)
${PROJECT_NAME}
${LUA_LIBRARY}
LuaBridge
)
${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})