We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ad612d commit d2da574Copy full SHA for d2da574
CMakeLists.txt
@@ -1,9 +1,20 @@
1
PROJECT(wingetopt)
2
cmake_minimum_required(VERSION 2.8)
3
4
+option(BUILD_SHARED_LIBS "Build the shared library" OFF)
5
+
6
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
-add_library(wingetopt STATIC src/getopt.c src/getopt.h)
7
8
+if(BUILD_SHARED_LIBS)
9
+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
10
+endif()
11
12
+add_library(wingetopt src/getopt.c src/getopt.h)
13
14
install(FILES src/getopt.h DESTINATION include)
-install(TARGETS wingetopt LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
15
16
+install(TARGETS wingetopt
17
+ RUNTIME DESTINATION bin
18
+ LIBRARY DESTINATION lib
19
+ ARCHIVE DESTINATION lib)
20
0 commit comments