Skip to content

Instantly share code, notes, and snippets.

@sepfy
Created August 18, 2020 07:09
Show Gist options
  • Save sepfy/420a8429847e672ddc22b19a3e135061 to your computer and use it in GitHub Desktop.
Save sepfy/420a8429847e672ddc22b19a3e135061 to your computer and use it in GitHub Desktop.
cmake_minimum_required(VERSION 3.1)
project(samples)
add_subdirectory(func)
add_executable(main main.c)
# Install target
install(TARGETS main
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/
)
# Link libraries
include_directories(${func_SOURCE_DIR}/)
add_executable(main_func main_func.c)
target_link_libraries(main_func func pthread)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment