no message
parent
a31f56e7b8
commit
e859f107ef
|
@ -1,8 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.11)
|
||||
message( "current compiler " ${CMAKE_CXX_COMPILER_ID})
|
||||
message("current CXX compiler is " ${CMAKE_CXX_COMPILER})
|
||||
message("current X compiler is " ${CMAKE_CXX_COMPILER})
|
||||
message("current make is " ${CMAKE_MAKE_PROGRAM})
|
||||
enable_language(CXX)
|
||||
project(generallib)
|
||||
add_subdirectory(general)
|
||||
|
@ -11,15 +7,15 @@ find_package(libevent REQUIRED)
|
|||
set(EVENT__HAVE_LIBEVENT 1)
|
||||
|
||||
message(STATUS "libevent include: " ${libevent_INCLUDE_DIR})
|
||||
message(STATUS "libevent lib: ${libevent_LIBRARIES}")
|
||||
message(STATUS "libevent lib Dirs: ${libevent_LIB_DIRS}")
|
||||
message(STATUS "library files : " )
|
||||
message(STATUS $<TARGET_OBJECTS:General> )
|
||||
message(STATUS "libevent lib: " ${libevent_LIBRARIES})
|
||||
message(STATUS "libevent lib Dirs: " ${libevent_LIB_DIRS})
|
||||
|
||||
SET(SRC_SDK sdk_main.c test/src/heapsort/main.c)#生成动态库需要至少包含一个源文件
|
||||
add_library(generallib STATIC $<TARGET_OBJECTS:General> ${SRC_SDK})
|
||||
|
||||
message("CMAKE_BINARY_DIR is " ${CMAKE_BINARY_DIR})
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/libd)
|
||||
link_directories(general/third/lib)
|
||||
link_directories(${libevent_LIB_DIRS})
|
||||
set_target_properties(generallib PROPERTIES LINKER_LANGUAGE CXX)
|
||||
target_link_libraries(generallib public
|
||||
-Wl,--whole-archive
|
||||
|
|
Loading…
Reference in New Issue