Skip to content

Instantly share code, notes, and snippets.

@Warwolt
Created March 12, 2020 16:11
Show Gist options
  • Save Warwolt/ba90c3a9291c307449836706a818f176 to your computer and use it in GitHub Desktop.
Save Warwolt/ba90c3a9291c307449836706a818f176 to your computer and use it in GitHub Desktop.
cmake_minimum_required(VERSION 3.16)
project(HelloStaticLib)
add_library(hellolib STATIC hello.cpp)
add_executable(hello main.cpp)
target_link_libraries(${CMAKE_SOURCE_DIR}/hellolib.a) # complains about hellolib.a not being built by us
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment