1 check_cxx_source_compiles("
5 int fvla (int m, int * c)
11 int main(int, char * []) { return 0; }
19 target_compile_definitions(FLAC++
20 PRIVATE $<$<BOOL:${BUILD_SHARED_LIBS}>:FLACPP_API_EXPORTS>
21 PUBLIC $<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:FLAC__NO_DLL>)
23 target_compile_definitions(FLAC++ PRIVATE $<$<BOOL:${BUILD_SHARED_LIBS}>:FLAC__USE_VISIBILITY_ATTR>)
25 target_include_directories(FLAC++ INTERFACE
26 "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
27 "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
28 target_link_libraries(FLAC++ PUBLIC FLAC)
30 set_target_properties(FLAC++ PROPERTIES
34 set_target_properties(FLAC++ PROPERTIES CXX_VISIBILITY_PRESET hidden)
38 install(TARGETS FLAC++ EXPORT targets
39 ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}/"
40 LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/"
41 RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}/")
43 if(INSTALL_PKGCONFIG_MODULES)
44 set(prefix "${CMAKE_INSTALL_PREFIX}")
45 set(exec_prefix "${CMAKE_INSTALL_PREFIX}")
46 set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}")
47 set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
48 configure_file(flac++.pc.in flac++.pc @ONLY)
49 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/flac++.pc"
50 DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")