You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
765 B

9 years ago
CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0)
PROJECT (turbo-linecount)
9 years ago
IF(MSVC)
SET(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "limited configs" FORCE)
SET(CMAKE_CXX_FLAGS_RELEASE "/Ox /Ob2")
SET(CMAKE_C_FLAGS_RELEASE "/Ox /Ob2")
ELSE()
9 years ago
SET(CMAKE_CXX_FLAGS_RELEASE "-O3")
9 years ago
SET(CMAKE_C_FLAGS_RELEASE "-O3")
ENDIF()
9 years ago
ADD_LIBRARY (linecount SHARED src/turbo_linecount.cpp src/turbo_linecount.h)
ADD_LIBRARY (linecount_static STATIC src/turbo_linecount.cpp src/turbo_linecount.h)
9 years ago
ADD_EXECUTABLE (lc src/main.cpp)
9 years ago
TARGET_LINK_LIBRARIES (lc linecount_static)
9 years ago
INSTALL(TARGETS lc
DESTINATION "bin"
)
9 years ago
INSTALL(TARGETS linecount linecount_static
DESTINATION "lib"
)
9 years ago
INSTALL(FILES linecount.h
DESTINATION "include"
)