Skip to content

Instantly share code, notes, and snippets.

@szechyjs
Created July 5, 2013 20:21
Show Gist options
  • Save szechyjs/5936995 to your computer and use it in GitHub Desktop.
Save szechyjs/5936995 to your computer and use it in GitHub Desktop.
mbelib cmake file
project(mbe)
cmake_minimum_required(VERSION 2.6)
FILE(GLOB SRCS *.c)
include_directories("${PROJECT_SOURCE_DIR}")
ADD_LIBRARY(mbe-static STATIC ${SRCS})
ADD_LIBRARY(mbe-shared SHARED ${SRCS})
TARGET_LINK_LIBRARIES(mbe-static m)
TARGET_LINK_LIBRARIES(mbe-shared m)
install(TARGETS mbe-static mbe-shared DESTINATION lib)
set_target_properties(mbe-static mbe-shared PROPERTIES OUTPUT_NAME mbe)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment