vcpkg/ports/getopt-win32/CMakeLists.txt
Cheney Wang 25663f218c
[vcpkg baseline][ideviceinstaller] Fixing error LNK2005 when argtable2 installed before ideviceinstaller (#28459)
* [ideviceinstaller] Add support !static

* Modify port-version

* x-add-version

* Add getopt as a dependence of argtable2

* Use version

* x-add-version

* Remove space

* Add license

* Fix format error

* x-add-version

* update version

* fix argtable3

* x-add-version

* fix argtable3

* version

* fix gdcm

* format portfile.cmake

* update version

* format vcpkg.json

* x-add-version

* format portfile.cmake

* x-add-version

* Update license

* x-add-version

* Again

* Mistake

Co-authored-by: Lily Wang <494550702@qq.com>
Co-authored-by: Lily Wang <94091114+LilyWangLL@users.noreply.github.com>
2022-12-28 13:07:26 -08:00

30 lines
672 B
CMake

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
)