mirror of
				https://github.com/CPunch/Laika.git
				synced 2025-10-31 02:20:21 +00:00 
			
		
		
		
	- VMBoxGen is built before shared lib - VMBoxGen has no reliance on the shared lib, just the config file - main config was moved to the root cmakelists
		
			
				
	
	
		
			24 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			CMake
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			CMake
		
	
	
	
	
	
| cmake_minimum_required(VERSION 3.16)
 | |
| 
 | |
| set(LIB_INCLUDEDIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
 | |
| 
 | |
| project(LaikaLib VERSION ${LAIKA_VERSION_MAJOR}.${LAIKA_VERSION_MINOR})
 | |
| 
 | |
| # Put CMake targets (ALL_BUILD/ZERO_CHECK) into a folder
 | |
| set_property(GLOBAL PROPERTY USE_FOLDERS ON)
 | |
| 
 | |
| # compile LaikaLib library
 | |
| file(GLOB_RECURSE LIBSOURCE ${CMAKE_CURRENT_SOURCE_DIR}/src/**.c ${CMAKE_CURRENT_SOURCE_DIR}/vendor/**.c)
 | |
| file(GLOB_RECURSE LIBHEADERS ${CMAKE_CURRENT_SOURCE_DIR}/include/**.h)
 | |
| add_library(LaikaLib STATIC ${LIBSOURCE} ${LIBHEADERS})
 | |
| target_link_libraries(LaikaLib PUBLIC sodium)
 | |
| 
 | |
| # add the version definitions and the 'DEBUG' preprocessor definition if we're compiling as Debug
 | |
| target_compile_definitions(LaikaLib PUBLIC "$<$<CONFIG:Debug>:DEBUG>")
 | |
| 
 | |
| # add include directory
 | |
| target_include_directories(LaikaLib PUBLIC ${LIB_INCLUDEDIR} ${CMAKE_CURRENT_SOURCE_DIR}/libsodium/libsodium/src/libsodium/include)
 | |
| 
 | |
| # set library name
 | |
| set_target_properties(LaikaLib PROPERTIES OUTPUT_NAME laika-${LAIKA_VERSION_MAJOR}.${LAIKA_VERSION_MINOR})
 |