You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
600 B
25 lines
600 B
# ------------------------------------------ |
|
# User config between these lines |
|
|
|
# Set project name |
|
set(EXAMPLE "repl") |
|
|
|
# ------------------------------------------ |
|
|
|
project(${EXAMPLE} CXX) |
|
|
|
# Define game source files |
|
file(GLOB_RECURSE EXAMPLE_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp") |
|
|
|
add_executable(${EXAMPLE} ${EXAMPLE_SOURCES}) |
|
target_include_directories(${EXAMPLE} PRIVATE |
|
"src") |
|
target_link_libraries(${EXAMPLE} ${PROJECT}) |
|
|
|
# ------------------------------------------ |
|
|
|
# Add 'make run' target |
|
add_custom_target(run |
|
COMMAND ${EXAMPLE} -c |
|
DEPENDS ${PROJECT} |
|
WORKING_DIRECTORY "..")
|
|
|