2019-04-21 11:22:48 +02:00
|
|
|
option(FORT_HAVE_WCHAR "Enable wchar support" ON)
|
|
|
|
|
|
|
|
add_library(fort
|
|
|
|
fort.c)
|
|
|
|
|
|
|
|
target_include_directories(fort
|
|
|
|
PUBLIC
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
)
|
|
|
|
|
2019-05-22 21:42:52 +02:00
|
|
|
set_target_properties(fort
|
2019-05-26 09:13:58 +02:00
|
|
|
PROPERTIES VERSION ${libfort_VERSION}
|
|
|
|
SOVERSION ${libfort_SOVERSION})
|
2019-05-22 21:42:52 +02:00
|
|
|
|
2019-04-21 11:22:48 +02:00
|
|
|
if(FORT_HAVE_WCHAR)
|
|
|
|
target_compile_definitions(fort
|
|
|
|
PRIVATE
|
|
|
|
-DFT_CONGIG_HAVE_WCHAR
|
|
|
|
)
|
|
|
|
endif()
|
2019-05-22 22:20:33 +02:00
|
|
|
|
|
|
|
|
|
|
|
include(GNUInstallDirs)
|
|
|
|
install(
|
|
|
|
TARGETS
|
|
|
|
fort
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
)
|
|
|
|
|
2019-05-26 09:40:58 +02:00
|
|
|
install(FILES fort.h fort.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
2019-05-26 09:13:58 +02:00
|
|
|
|
|
|
|
configure_file(libfort.pc.in libfort.pc @ONLY)
|
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libfort.pc DESTINATION lib/pkgconfig)
|