2016-03-16 20:15:24 +00:00
|
|
|
# msh-console dynamic library by praticamentetilde (Claudio Maggioni)
|
|
|
|
# licensed with "The Unlicense"
|
2016-04-02 14:28:03 +00:00
|
|
|
|
2016-03-16 20:15:24 +00:00
|
|
|
project(msh-console-library)
|
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
|
2016-04-02 14:28:03 +00:00
|
|
|
set(compilable OFF)
|
|
|
|
if(${compilable})
|
|
|
|
SET(CMAKE_CXX_FLAGS "-std=c++11")
|
|
|
|
FILE(GLOB sources *.cpp)
|
|
|
|
FILE(GLOB headers *.h)
|
|
|
|
|
|
|
|
set(lib OFF)
|
|
|
|
if(${lib})
|
|
|
|
MESSAGE( STATUS "Building .so.1")
|
|
|
|
#compile the library
|
|
|
|
# Create a library which includes the source listed.
|
|
|
|
# The extension is already found. Any number of sources could be listed here.
|
|
|
|
list(REMOVE_ITEM SRC_LIST ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
|
|
|
|
add_library (mshconsole SHARED ${SRC_LIST})
|
|
|
|
else(${lib})
|
|
|
|
MESSAGE( STATUS "Building exec (debug only)")
|
|
|
|
add_executable(${PROJECT_NAME} ${sources} ${headers})
|
|
|
|
endif(${lib})
|
|
|
|
endif(${compilable})
|