Przeglądaj źródła

Add initial CMake installation support

Daniele Bartolini 12 lat temu
rodzic
commit
1f525d4134

+ 1 - 1
CMakeLists.txt

@@ -69,7 +69,7 @@ if (CROWN_BUILD_TESTS)
 	add_subdirectory(tests)
 endif (CROWN_BUILD_TESTS)
 
-add_subdirectory(third/luajit)
+#add_subdirectory(third/luajit)
 
 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/src/Config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/src/Config.h)
 

+ 11 - 7
samples/CMakeLists.txt

@@ -6,15 +6,19 @@ link_directories(${CROWN_BINARY_DIR})
 
 link_libraries(GLU pthread)
 add_executable(terrain terrain/terrain.cpp)
-add_executable(texturing texturing/texturing.cpp)
-add_executable(textrenderer textrenderer/textrenderer.cpp)
-add_executable(collision collision/collision.cpp)
+#add_executable(texturing texturing/texturing.cpp)
+#add_executable(textrenderer textrenderer/textrenderer.cpp)
+#add_executable(collision collision/collision.cpp)
 add_executable(json json/json.cpp)
 
 target_link_libraries(terrain crown)
-target_link_libraries(texturing crown)
-target_link_libraries(textrenderer crown)
-target_link_libraries(collision crown)
+#target_link_libraries(texturing crown)
+#target_link_libraries(textrenderer crown)
+#target_link_libraries(collision crown)
 target_link_libraries(json crown)
 
-
+install (TARGETS terrain DESTINATION bin)
+#install (TARGETS texturing DESTINATION bin)
+#install (TARGETS textrenderer DESTINATION bin)
+#install (TARGETS collision DESTINATION bin)
+install (TARGETS json DESTINATION bin)

+ 2 - 0
src/CMakeLists.txt

@@ -295,3 +295,5 @@ if (WINDOWS)
 target_link_libraries(crown crown-win)
 endif (WINDOWS)
 
+install (TARGETS crown DESTINATION lib)
+

+ 1 - 0
src/os/linux/CMakeLists.txt

@@ -23,3 +23,4 @@ add_library(crown-linux STATIC ${LINUX_SRC} ${LINUX_HEADERS})
 
 target_link_libraries(crown-linux crown)
 
+install (TARGETS crown-linux DESTINATION lib)

+ 1 - 0
src/renderers/gl/CMakeLists.txt

@@ -24,3 +24,4 @@ add_library(crown-gl STATIC ${GL_SRC} ${GL_HEADERS})
 
 target_link_libraries(crown-gl crown)
 
+install (TARGETS crown-gl DESTINATION lib)

+ 1 - 0
src/renderers/gles/CMakeLists.txt

@@ -22,3 +22,4 @@ add_library(crown-gles STATIC ${GLES_SRC} ${GLES_HEADERS})
 
 target_link_libraries(crown-gles crown)
 
+install (TARGETS crown-gles DESTINATION lib)

+ 3 - 0
tools/CMakeLists.txt

@@ -23,3 +23,6 @@ include_directories(${INCLUDES} ${GTKMM_INCLUDE_DIRS})
 add_subdirectory(compilers)
 add_subdirectory(editors/world-editor)
 
+install (FILES ${PROJECT_SOURCE_DIR}/compilers/resource-compiler.py DESTINATION bin)
+install (FILES ${PROJECT_SOURCE_DIR}/editors/resource-browser/resource-browser.py DESTINATION bin)
+

+ 5 - 1
tools/compilers/CMakeLists.txt

@@ -22,4 +22,8 @@ target_link_libraries(resource-hash crown)
 
 add_subdirectory(txt)
 add_subdirectory(tga)
-add_subdirectory(lua)
+#add_subdirectory(lua)
+
+install (TARGETS crown-compiler-utils DESTINATION lib)
+install (TARGETS resource-linker DESTINATION bin)
+install (TARGETS resource-hash DESTINATION bin)

+ 3 - 1
tools/compilers/lua/CMakeLists.txt

@@ -10,4 +10,6 @@ set (HEADERS
 )
 
 add_executable(lua-compiler ${SRC} ${HEADERS})
-target_link_libraries(lua-compiler crown-compiler-utils crown-luajit)
+target_link_libraries(lua-compiler crown-compiler-utils crown-luajit)
+
+install (TARGETS lua-compiler DESTINATION bin)

+ 1 - 0
tools/compilers/tga/CMakeLists.txt

@@ -12,3 +12,4 @@ set (HEADERS
 add_executable(tga-compiler ${SRC} ${HEADERS})
 target_link_libraries(tga-compiler crown-compiler-utils)
 
+install (TARGETS tga-compiler DESTINATION bin)

+ 1 - 0
tools/compilers/txt/CMakeLists.txt

@@ -13,3 +13,4 @@ set (HEADERS
 add_executable(txt-compiler ${SRC} ${HEADERS})
 target_link_libraries(txt-compiler crown-compiler-utils)
 
+install (TARGETS txt-compiler DESTINATION bin)