aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/getopt-win32/CMakeLists.txt
blob: 5bf9b11c8d48de96bfcd49438c63cca6875d651e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
cmake_minimum_required(VERSION 3.14)

project(getopt-win32 C)

if(BUILD_SHARED_LIBS)
    add_definitions(-DEXPORTS_GETOPT)
else()
    add_definitions(-DSTATIC_GETOPT)
endif()

add_library(getopt getopt.c)

TARGET_INCLUDE_DIRECTORIES(getopt INTERFACE $<INSTALL_INTERFACE:include>)

install(
    TARGETS getopt
    EXPORT unofficial-getopt-win32
    RUNTIME DESTINATION bin
    LIBRARY DESTINATION lib
    ARCHIVE DESTINATION lib
    INCLUDES DESTINATION include
)

install(
    EXPORT unofficial-getopt-win32
    NAMESPACE unofficial::getopt-win32::
    DESTINATION share/unofficial-getopt-win32
    FILE unofficial-getopt-win32-config.cmake
)