I am using CMAKE (Android) to build several static and shared libraries. I have one CMakelists.txt file which builds all the shared and static libraries.
Right now I have specified C and C++ compiler flags that apply to all the libraries.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpermissive -fno-elide-constructors -DHAVE_POLL -DANDROID -DNO_SSL_DL -DUSE_IPV6 mfloat-abi=softfp -mfpu=neon")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++14 -fpermissive -fno-elide-constructors -DHAVE_POLL -DANDROID -DNO_SSL_DL -DUSE_IPV6 mfloat-abi=softfp -mfpu=neon")
However, I have a need to specify different sets of C flags and CXX flags for each library that I am building. So for lib1.so I have one set of C and CXX flags and for lib2.so I have another set of C and CXX flags.
I think I can use set_target_properties but I am not sure how and I wasn't able to find an example that shows me how to use set_target_properties to set the C and C++ compiler flags for a library.