crioux__turbo-linecount/CMakeLists.txt

27 lines
740 B
CMake
Raw Normal View History

2015-12-12 20:35:58 +00:00
CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0)
PROJECT (turbo-linecount)
2015-12-12 08:44:11 +00:00
2015-12-12 18:42:44 +00:00
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()
2015-12-12 20:35:58 +00:00
SET(CMAKE_CXX_FLAGS_RELEASE "-O3")
2015-12-12 18:42:44 +00:00
SET(CMAKE_C_FLAGS_RELEASE "-O3")
ENDIF()
2015-12-12 20:35:58 +00:00
ADD_LIBRARY (linecount SHARED src/linecount.cpp src/linecount.h)
ADD_LIBRARY (linecount_static STATIC src/linecount.cpp src/linecount.h)
ADD_EXECUTABLE (lc src/main.cpp)
2015-12-12 18:42:44 +00:00
TARGET_LINK_LIBRARIES (lc linecount_static)
2015-12-12 18:42:44 +00:00
INSTALL(TARGETS lc
DESTINATION "bin"
)
2015-12-12 18:42:44 +00:00
INSTALL(TARGETS linecount linecount_static
DESTINATION "lib"
)
2015-12-12 18:42:44 +00:00
INSTALL(FILES linecount.h
DESTINATION "include"
)