mirror of
https://github.com/gelldur/EventBus.git
synced 2025-01-14 01:07:59 +08:00
Fix cmake for OSX
This commit is contained in:
parent
7a48102d0b
commit
a936e3ecd2
@ -1,5 +1,7 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.2 FATAL_ERROR)
|
||||
|
||||
OPTION(PERFORMANCE "Enable/Disable performance subdirectory" OFF)
|
||||
|
||||
# BUILD_SHARED_LIBS can controll build type!
|
||||
PROJECT(EventBus
|
||||
VERSION 2.1.2
|
||||
@ -27,9 +29,12 @@ SET_TARGET_PROPERTIES(EventBus PROPERTIES
|
||||
CXX_STANDARD 14
|
||||
)
|
||||
|
||||
#TARGET_COMPILE_FEATURES(EventBus
|
||||
# PUBLIC cxx_auto_type cxx_variadic_templates
|
||||
# )
|
||||
MESSAGE(${CMAKE_CXX_COMPILER_ID})
|
||||
IF(NOT CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||
TARGET_COMPILE_FEATURES(EventBus
|
||||
PUBLIC cxx_auto_type
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
INSTALL(TARGETS EventBus EXPORT EventBusConfig
|
||||
ARCHIVE DESTINATION lib/
|
||||
@ -45,6 +50,9 @@ INSTALL(EXPORT EventBusConfig
|
||||
EXPORT(TARGETS EventBus FILE EventBusConfig.cmake)
|
||||
|
||||
|
||||
#ENABLE_TESTING()
|
||||
#ADD_SUBDIRECTORY(test/)
|
||||
#ADD_SUBDIRECTORY(performance/)
|
||||
ENABLE_TESTING()
|
||||
ADD_SUBDIRECTORY(test/)
|
||||
|
||||
IF(PERFORMANCE)
|
||||
ADD_SUBDIRECTORY(performance/)
|
||||
ENDIF()
|
||||
|
Loading…
x
Reference in New Issue
Block a user