mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-12 12:48:30 +01:00
add CMake
This commit is contained in:
29
CMakeLists.txt
Normal file
29
CMakeLists.txt
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
Project(cimgui)
|
||||||
|
cmake_minimum_required(VERSION 2.8)
|
||||||
|
|
||||||
|
#general settings
|
||||||
|
include_directories(imgui)
|
||||||
|
add_definitions("-DIMGUI_DISABLE_OBSOLETE_FUNCTIONS=1")
|
||||||
|
|
||||||
|
include_directories(generator/generated)
|
||||||
|
set(IMGUI_SOURCES ./generator/generated/cimgui_auto.cpp ./imgui/imgui.cpp ./imgui/imgui_draw.cpp ./imgui/imgui_demo.cpp)
|
||||||
|
|
||||||
|
set(IMGUI_LIBRARIES )
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
add_definitions("-DIMGUI_IMPL_API=extern \"C\" __declspec\(dllexport\)")
|
||||||
|
else(WIN32)
|
||||||
|
add_definitions("-DIMGUI_IMPL_API=extern \"C\" ")
|
||||||
|
endif(WIN32)
|
||||||
|
|
||||||
|
|
||||||
|
#add library and link
|
||||||
|
add_library(cimgui SHARED ${IMGUI_SOURCES})
|
||||||
|
target_link_libraries(cimgui ${IMGUI_LIBRARIES})
|
||||||
|
|
||||||
|
#install
|
||||||
|
install(TARGETS cimgui
|
||||||
|
RUNTIME DESTINATION .
|
||||||
|
LIBRARY DESTINATION .
|
||||||
|
#ARCHIVE DESTINATION lib
|
||||||
|
)
|
Reference in New Issue
Block a user