Skip to content
Permalink
Browse files

dynamic and static builds of nuklear library using prebuild.sh

  • Loading branch information
drug007 committed Jun 19, 2019
1 parent 3487845 commit 333d9ce48c322d2716f327e99a9a4384988cc7d4
Showing with 33 additions and 5 deletions.
  1. +3 −1 .gitignore
  2. +14 −4 c/CMakeLists.txt
  3. +1 −0 demo/.gitignore
  4. +1 −0 include/.gitignore
  5. +14 −0 prebuild.sh
@@ -5,4 +5,6 @@ nuklear/*
.exe
.dll
.vs
.sln
.sln
build
include
@@ -1,9 +1,19 @@
cmake_minimum_required(VERSION 3.0)

project(nuklear VERSION 4.00.2 DESCRIPTION "Nuklear GUI library")
project(nuklear VERSION 4.00.2 DESCRIPTION "Nuklear GUI library")
project(nuklear_static VERSION 4.00.2 DESCRIPTION "Nuklear GUI library")

add_library(nuklear SHARED nuklear.c)
add_library(nuklear SHARED nuklear.c)
add_library(nuklear_static STATIC nuklear.c)

set_target_properties(nuklear PROPERTIES VERSION ${PROJECT_VERSION})
set_target_properties(nuklear PROPERTIES VERSION ${PROJECT_VERSION})
set_target_properties(nuklear_static PROPERTIES VERSION ${PROJECT_VERSION})

set_target_properties(nuklear PROPERTIES PUBLIC_HEADER nuklear.h)
set_target_properties(nuklear PROPERTIES PUBLIC_HEADER nuklear.h)
# shared and static version have the same header file so do not install it twice
# set_target_properties(nuklear_static PROPERTIES PUBLIC_HEADER nuklear.h1)

install(TARGETS nuklear nuklear_static
LIBRARY DESTINATION ${CMAKE_SOURCE_DIR}/../lib
ARCHIVE DESTINATION ${CMAKE_SOURCE_DIR}/../lib
PUBLIC_HEADER DESTINATION ${CMAKE_SOURCE_DIR}/../include)
@@ -0,0 +1 @@
/nuklear-demo
@@ -0,0 +1 @@
/nuklear.h
@@ -0,0 +1,14 @@
#!/bin/bash -e

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

cd ${DIR}
install -d build
cd build
cmake ../c

PROC_COUNT=`getconf _NPROCESSORS_ONLN`

make -j${PROC_COUNT} install

echo "Done"

0 comments on commit 333d9ce

Please sign in to comment.
You can’t perform that action at this time.