| file(GLOB_RECURSE sources ../src/*.cpp) |
| # Add all the headers to the project for IDEs. |
| file(GLOB_RECURSE headers ../include/*) |
| # Force them all into the headers dir on MSVC, otherwise they end up at |
| # project scope because they don't have extensions. |
| source_group("Header Files" FILES ${headers}) |
| if (LIBCXX_ENABLE_SHARED) |
| append_if(libraries LIBCXX_HAS_PTHREAD_LIB pthread) |
| append_if(libraries LIBCXX_HAS_C_LIB c) |
| append_if(libraries LIBCXX_HAS_M_LIB m) |
| append_if(libraries LIBCXX_HAS_GCC_S_LIB gcc_s) |
| target_link_libraries(cxx ${libraries}) |
| append_if(compile_flags LIBCXX_HAS_FPIC_FLAG -fPIC) |
| append_if(link_flags LIBCXX_HAS_NODEFAULTLIBS_FLAG -nodefaultlibs) |
| set_target_properties(cxx |
| COMPILE_FLAGS "${compile_flags}" |
| LINK_FLAGS "${link_flags}" |
| install(DIRECTORY ../include/ |
| DESTINATION include/c++/v1 |