msh-console/msh-console-library/CMakeLists.txt

22 lines
755 B
CMake

# msh-console dynamic library by praticamentetilde (Claudio Maggioni)
# licensed with "The Unlicense"
project(msh-console-library)
cmake_minimum_required(VERSION 2.8)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -lpopt")
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})