Fix cmake for OSX

This commit is contained in:
Dawid Drozd 2017-09-01 16:15:31 +02:00
parent 7a48102d0b
commit a936e3ecd2

View File

@ -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()