Skip to content

Instantly share code, notes, and snippets.

@vaiorabbit
Created June 19, 2021 11:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vaiorabbit/1a66207e49b593b65c67e3ab91cff1ca to your computer and use it in GitHub Desktop.
Save vaiorabbit/1a66207e49b593b65c67e3ab91cff1ca to your computer and use it in GitHub Desktop.
# CMakeLists for pocketlang (https://github.com/ThakeeNathees/pocketlang)
# CMakeLists for pocketlang (https://github.com/ThakeeNathees/pocketlang)
# - put this file in cli/ directory
file( GLOB POCKETCLI_HDRS "${CMAKE_CURRENT_LIST_DIR}/*.h" )
file( GLOB POCKETCLI_SRCS "${CMAKE_CURRENT_LIST_DIR}/*.c" )
add_executable(pocketcli ${POCKETCLI_SRCS} ${POCKETCLI_HDRS})
target_include_directories(pocketcli
PUBLIC ${CMAKE_CURRENT_LIST_DIR}/../src/include
)
target_link_libraries(pocketcli pocket)
# CMakeLists for pocketlang (https://github.com/ThakeeNathees/pocketlang)
# - put this file in root directory
cmake_minimum_required( VERSION 3.0 )
project( pocket )
file( GLOB POCKET_CORE_HDRS "${CMAKE_CURRENT_LIST_DIR}/src/include/*.h" )
file( GLOB POCKET_CORE_SRCS "${CMAKE_CURRENT_LIST_DIR}/src/*.c" "${CMAKE_CURRENT_LIST_DIR}/src/*.h" )
add_library( pocket ${POCKET_CORE_SRCS} ${POCKET_CORE_HDRS} )
include_directories( ${CMAKE_CURRENT_LIST_DIR}/src/include )
source_group( Public FILES ${POCKET_CORE_HDRS} )
source_group( Private FILES ${POCKET_CORE_SRCS} )
add_subdirectory( cli )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment