Skip to content

Instantly share code, notes, and snippets.

@chriskilding
Created August 12, 2013 11:03
Show Gist options
  • Save chriskilding/6209951 to your computer and use it in GitHub Desktop.
Save chriskilding/6209951 to your computer and use it in GitHub Desktop.
CMake script for the cJSON library (http://sourceforge.net/projects/cjson/)
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project(cJSON)
add_library(cJSON SHARED cJSON.c)
set_target_properties(cJSON PROPERTIES LINKER_LANGUAGE C)
install(TARGETS cJSON
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
)
install(FILES cJSON.h
DESTINATION include
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment