-
Notifications
You must be signed in to change notification settings - Fork 948
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update CMakeLists.txt to fix vcpkg issues
- Loading branch information
Showing
10 changed files
with
91 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
set(CMAKE_C_FLAGS -std=gnu99) | ||
file(GLOB evmc_SRCS *.cc | ||
*.h | ||
${PROJECT_SOURCE_DIR}/3rdparty/libhashkit/*.c) | ||
file(GLOB evmc_PUBLIC_HEADERS *.h) | ||
|
||
add_library(evmc_static STATIC ${evmc_SRCS}) | ||
target_link_libraries(evmc_static ${LIBRARIES}) | ||
|
||
if (UNIX) | ||
add_library(evmc SHARED ${evmc_SRCS}) | ||
target_link_libraries(evmc ${LIBRARIES}) | ||
|
||
set (CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") | ||
include (utils) | ||
include (packages) | ||
set_target_properties ( | ||
evmc evnsq PROPERTIES | ||
VERSION "${PACKAGE_VERSION}" | ||
SOVERSION "${PACKAGE_SOVERSION}" | ||
) | ||
|
||
install ( | ||
TARGETS evmc | ||
LIBRARY DESTINATION lib | ||
ARCHIVE DESTINATION lib) | ||
endif (UNIX) | ||
|
||
install ( | ||
TARGETS evmc_static | ||
LIBRARY DESTINATION lib | ||
ARCHIVE DESTINATION lib) | ||
install (FILES ${evmc_PUBLIC_HEADERS} DESTINATION "include/evmc") | ||
|
||
|
||
if (NOT EVPP_VCPKG_BUILD) | ||
add_subdirectory(test) | ||
endif () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
add_executable(evmc_test mcpool_test.cc) | ||
target_link_libraries(evmc_test evmc_static ${LIBRARIES}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,35 @@ | ||
|
||
# evnsq | ||
file(GLOB evnsq_SRCS *.cc evnsq/*.h) | ||
file(GLOB evnsq_SRCS *.cc *.h) | ||
file(GLOB evnsq_PUBLIC_HEADERS *.h) | ||
|
||
add_library(evnsq SHARED ${evnsq_SRCS}) | ||
target_link_libraries(evnsq ${LIBRARIES}) | ||
|
||
add_library(evnsq_static STATIC ${evnsq_SRCS}) | ||
target_link_libraries(evnsq_static ${LIBRARIES}) | ||
|
||
#---------------------------------------- | ||
# install | ||
if (UNIX) | ||
add_library(evnsq SHARED ${evnsq_SRCS}) | ||
target_link_libraries(evnsq ${LIBRARIES}) | ||
|
||
set (CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") | ||
include (utils) | ||
include (packages) | ||
set_target_properties ( | ||
evnsq PROPERTIES | ||
VERSION "${PACKAGE_VERSION}" | ||
SOVERSION "${PACKAGE_SOVERSION}" | ||
) | ||
|
||
install ( | ||
TARGETS evnsq | ||
LIBRARY DESTINATION lib | ||
ARCHIVE DESTINATION lib) | ||
endif (UNIX) | ||
|
||
install ( | ||
TARGETS evnsq evnsq_static | ||
TARGETS evnsq_static | ||
LIBRARY DESTINATION lib | ||
ARCHIVE DESTINATION lib) | ||
|
||
install (FILES ${evnsq_PUBLIC_HEADERS} DESTINATION "include/evnsq") | ||
|
||
|
||
|
||
#---------------------------------------- | ||
# unit tests | ||
add_executable(evnsq_tail evnsqtail/main.cc) | ||
target_link_libraries(evnsq_tail evnsq_static ${LIBRARIES}) | ||
|
||
|
||
set (unittest_evnsq_producer_with_auth_SRCS test/producer_with_auth/main.cc) | ||
if (WIN32) | ||
list (APPEND unittest_evnsq_producer_with_auth_SRCS ${PROJECT_SOURCE_DIR}/3rdparty/win32code/getopt/getopt.c) | ||
list (APPEND unittest_evnsq_producer_with_auth_SRCS ${PROJECT_SOURCE_DIR}/3rdparty/win32code/getopt/getopt_long.c) | ||
endif (WIN32) | ||
|
||
add_executable(unittest_evnsq_producer_with_auth ${unittest_evnsq_producer_with_auth_SRCS}) | ||
target_link_libraries(unittest_evnsq_producer_with_auth evnsq_static ${LIBRARIES}) | ||
|
||
if (NOT EVPP_VCPKG_BUILD) | ||
add_subdirectory(evnsqtail) | ||
add_subdirectory(test) | ||
endif () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
add_executable(evnsq_tail main.cc) | ||
target_link_libraries(evnsq_tail evnsq_static ${LIBRARIES}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
add_subdirectory(producer_with_auth) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
set (unittest_evnsq_producer_with_auth_SRCS main.cc) | ||
if (WIN32) | ||
list (APPEND unittest_evnsq_producer_with_auth_SRCS ${PROJECT_SOURCE_DIR}/3rdparty/win32code/getopt/getopt.c) | ||
list (APPEND unittest_evnsq_producer_with_auth_SRCS ${PROJECT_SOURCE_DIR}/3rdparty/win32code/getopt/getopt_long.c) | ||
endif (WIN32) | ||
|
||
add_executable(unittest_evnsq_producer_with_auth ${unittest_evnsq_producer_with_auth_SRCS}) | ||
target_link_libraries(unittest_evnsq_producer_with_auth evnsq_static ${LIBRARIES}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters