2022-06-04 00:13:55 +02:00
|
|
|
cmake_minimum_required(VERSION 3.14)
|
|
|
|
|
|
|
|
project(getopt-win32 C)
|
|
|
|
|
|
|
|
if(BUILD_SHARED_LIBS)
|
|
|
|
add_definitions(-DEXPORTS_GETOPT)
|
|
|
|
else()
|
|
|
|
add_definitions(-DSTATIC_GETOPT)
|
|
|
|
endif()
|
2022-12-09 20:30:15 -03:00
|
|
|
|
2022-06-04 00:13:55 +02:00
|
|
|
add_library(getopt getopt.c)
|
2022-12-09 20:30:15 -03:00
|
|
|
|
|
|
|
install(
|
|
|
|
TARGETS getopt
|
|
|
|
EXPORT unofficial-getopt-win32
|
|
|
|
RUNTIME DESTINATION bin
|
|
|
|
LIBRARY DESTINATION lib
|
|
|
|
ARCHIVE DESTINATION lib
|
2022-12-20 14:21:39 -03:00
|
|
|
INCLUDES DESTINATION include
|
2022-12-09 20:30:15 -03:00
|
|
|
)
|
|
|
|
|
|
|
|
install(
|
|
|
|
EXPORT unofficial-getopt-win32
|
|
|
|
NAMESPACE unofficial::getopt-win32::
|
|
|
|
DESTINATION share/unofficial-getopt-win32
|
|
|
|
FILE unofficial-getopt-win32-config.cmake
|
|
|
|
)
|