Small CMake improvements
This commit is contained in:
parent
2ffd1a421e
commit
bbd5b81de9
8 changed files with 19 additions and 22 deletions
|
@ -10,5 +10,4 @@ target_link_libraries(Audio PRIVATE
|
||||||
opusfile
|
opusfile
|
||||||
portaudio_static
|
portaudio_static
|
||||||
Core)
|
Core)
|
||||||
target_compile_features(Audio PUBLIC cxx_std_17)
|
set_engine_properties(Audio)
|
||||||
set_target_properties(Audio PROPERTIES CXX_EXTENSIONS OFF)
|
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
if(TARGET BulletDynamics)
|
|
||||||
set(BULLET_LIBRARIES BulletDynamics BulletCollision LinearMath)
|
|
||||||
set(BULLET_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/_deps/bullet-src/src)
|
|
||||||
else()
|
|
||||||
find_package(Bullet REQUIRED)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(SRC
|
set(SRC
|
||||||
include/engine.hpp
|
include/engine.hpp
|
||||||
include/app.hpp
|
include/app.hpp
|
||||||
|
@ -41,7 +34,7 @@ add_library(Core STATIC ${SRC})
|
||||||
target_include_directories(Core PUBLIC
|
target_include_directories(Core PUBLIC
|
||||||
include)
|
include)
|
||||||
target_include_directories(Core SYSTEM PUBLIC
|
target_include_directories(Core SYSTEM PUBLIC
|
||||||
${BULLET_INCLUDE_DIRS})
|
${CMAKE_BINARY_DIR}/_deps/bullet-src/src)
|
||||||
target_link_libraries(Core PUBLIC
|
target_link_libraries(Core PUBLIC
|
||||||
Utility
|
Utility
|
||||||
GFX
|
GFX
|
||||||
|
@ -53,5 +46,7 @@ target_link_libraries(Core PUBLIC
|
||||||
${EXTRA_LIBRARIES}
|
${EXTRA_LIBRARIES}
|
||||||
Asset
|
Asset
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${BULLET_LIBRARIES})
|
BulletDynamics
|
||||||
|
BulletCollision
|
||||||
|
LinearMath)
|
||||||
set_engine_properties(Core)
|
set_engine_properties(Core)
|
||||||
|
|
|
@ -45,3 +45,7 @@ file::Path file::get_domain_path(const Domain domain) {
|
||||||
file::Path parent_domain(const file::Path path) {
|
file::Path parent_domain(const file::Path path) {
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file::Path file::get_relative_path(const Domain domain, const Path path) {
|
||||||
|
// unimplemented
|
||||||
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
set(HEADERS
|
set(SRC
|
||||||
include/gfx_metal.hpp
|
include/gfx_metal.hpp
|
||||||
|
|
||||||
|
src/gfx_metal.mm
|
||||||
src/gfx_metal_buffer.hpp
|
src/gfx_metal_buffer.hpp
|
||||||
src/gfx_metal_pipeline.hpp
|
src/gfx_metal_pipeline.hpp
|
||||||
src/gfx_metal_texture.hpp
|
src/gfx_metal_texture.hpp
|
||||||
|
@ -8,8 +10,7 @@ set(HEADERS
|
||||||
src/gfx_metal_sampler.hpp)
|
src/gfx_metal_sampler.hpp)
|
||||||
|
|
||||||
add_library(GFXMetal STATIC
|
add_library(GFXMetal STATIC
|
||||||
src/gfx_metal.mm
|
${SRC})
|
||||||
${HEADERS})
|
|
||||||
|
|
||||||
set_target_properties(GFXMetal PROPERTIES
|
set_target_properties(GFXMetal PROPERTIES
|
||||||
FRAMEWORK TRUE
|
FRAMEWORK TRUE
|
||||||
|
|
|
@ -4,6 +4,5 @@ set(SRC
|
||||||
|
|
||||||
add_library(Log STATIC ${SRC})
|
add_library(Log STATIC ${SRC})
|
||||||
target_include_directories(Log PUBLIC include)
|
target_include_directories(Log PUBLIC include)
|
||||||
target_compile_features(Log PUBLIC cxx_std_17)
|
|
||||||
set_target_properties(Log PROPERTIES CXX_EXTENSIONS OFF)
|
|
||||||
target_link_libraries(Log PRIVATE Utility)
|
target_link_libraries(Log PRIVATE Utility)
|
||||||
|
set_engine_properties(Log)
|
||||||
|
|
|
@ -11,5 +11,4 @@ set(SRC
|
||||||
|
|
||||||
add_library(Math STATIC ${SRC})
|
add_library(Math STATIC ${SRC})
|
||||||
target_include_directories(Math PUBLIC include)
|
target_include_directories(Math PUBLIC include)
|
||||||
target_compile_features(Math PUBLIC cxx_std_17)
|
set_engine_properties(Math)
|
||||||
set_target_properties(Math PROPERTIES CXX_EXTENSIONS OFF)
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
add_library(EditorCommon
|
set(SRC
|
||||||
include/commoneditor.hpp
|
include/commoneditor.hpp
|
||||||
include/debugpass.hpp
|
include/debugpass.hpp
|
||||||
include/undostack.hpp
|
include/undostack.hpp
|
||||||
|
@ -6,10 +6,11 @@ add_library(EditorCommon
|
||||||
src/commoneditor.cpp
|
src/commoneditor.cpp
|
||||||
src/debugpass.cpp
|
src/debugpass.cpp
|
||||||
src/undostack.cpp)
|
src/undostack.cpp)
|
||||||
|
|
||||||
|
add_library(EditorCommon ${SRC})
|
||||||
target_include_directories(EditorCommon PUBLIC include)
|
target_include_directories(EditorCommon PUBLIC include)
|
||||||
target_link_libraries(EditorCommon PUBLIC
|
target_link_libraries(EditorCommon PUBLIC
|
||||||
Renderer
|
Renderer
|
||||||
imgui
|
imgui
|
||||||
Core)
|
Core)
|
||||||
set_target_properties(EditorCommon PROPERTIES
|
set_engine_properties(EditorCommon)
|
||||||
CXX_STANDARD 17)
|
|
||||||
|
|
|
@ -16,5 +16,4 @@ target_include_directories(ModelCompiler PUBLIC
|
||||||
include
|
include
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${ASSIMP_INCLUDE_DIRS})
|
${ASSIMP_INCLUDE_DIRS})
|
||||||
add_dependencies(ModelCompiler BuildShaders)
|
|
||||||
set_engine_properties(ModelCompiler)
|
set_engine_properties(ModelCompiler)
|
||||||
|
|
Reference in a new issue