Skip to content

Commit

Permalink
Merge pull request #108 from SunBeau/main
Browse files Browse the repository at this point in the history
Improve CMakeLists.txt: support "make install"
  • Loading branch information
wolkykim authored Mar 26, 2024
2 parents 4ba0ee4 + 5abc79e commit 470d496
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
PROJECT(qlibc C)

SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")

SET(CMAKE_THREAD_PREFER_PTHREAD True)
FIND_PACKAGE(Threads REQUIRED)

Expand Down Expand Up @@ -93,3 +95,8 @@ TARGET_LINK_LIBRARIES(qlibc PRIVATE ${CMAKE_THREAD_LIBS_INIT})
TARGET_LINK_LIBRARIES(qlibcext-static PRIVATE ${CMAKE_THREAD_LIBS_INIT})
TARGET_LINK_LIBRARIES(qlibcext PUBLIC qlibc)

INSTALL(DIRECTORY ${qlibc_SOURCE_DIR}/include/qlibc DESTINATION include)
INSTALL(TARGETS qlibc LIBRARY DESTINATION lib)
INSTALL(TARGETS qlibc-static LIBRARY DESTINATION lib)
INSTALL(TARGETS qlibcext LIBRARY DESTINATION lib)
INSTALL(TARGETS qlibcext-static LIBRARY DESTINATION lib)

0 comments on commit 470d496

Please sign in to comment.