I am trying to learn Core Foundation with C/C++. I use JetBrains CLion that uses CMAKE.
The problem is - I dunno how to include proper static libraries in C/C++ Make
Finally resolved.
Thanks to this resource: http://raycast.net/clion-multiple-binaries
This is how my CMAKE file looks like and everything links:
cmake_minimum_required(VERSION 2.8.4)
project(test001)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(SOURCE_FILES main.cpp)
find_library(corefoundation_lib CoreFoundation)
find_library(cfnetwork_lib CFNetwork)
set(frameworks
${cfnetwork_lib}
${corefoundation_lib})
add_executable(test001 ${SOURCE_FILES})
target_link_libraries(test001 ${frameworks})
I'm not 100% sure if this is what you ment but you link C static libraries by giving -llibrary flag to your compiler where the name of the library file is liblibrary.a. If the library isn't in some default library location (idk what it is for mac) you can specify the path with -L flag.