Skip to content
Permalink
Browse files

Clean up CMakeLists.txt files.

  • Loading branch information...
andreduvoisin committed Mar 29, 2019
1 parent 0e8e74b commit 330581c63f5b5964f5708cc3208ac6596df9b05c
Showing with 20 additions and 24 deletions.
  1. +4 −5 asset-converter/CMakeLists.txt
  2. +12 −13 engine/CMakeLists.txt
  3. +4 −6 ui/CMakeLists.txt
@@ -4,18 +4,17 @@ add_executable(CompositeAssetConverter ${ASSET_CONVERTER_SRC_FILES})
source_group(TREE ${CMAKE_SOURCE_DIR} FILES ${ASSET_CONVERTER_SRC_FILES})

target_link_libraries(CompositeAssetConverter PRIVATE FBXSDK GLM STB)

target_include_directories(CompositeAssetConverter PRIVATE ${ASSET_CONVERTER_SRC_DIR} ${ENGINE_SRC_DIR})

if(OS_WINDOWS)
target_compile_options(CompositeAssetConverter PRIVATE /W3 /WX)
endif()

install(
TARGETS CompositeAssetConverter
RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
)

if(OS_WINDOWS)
target_compile_options(CompositeAssetConverter PRIVATE /W3 /WX)

# TODO: ONLY FOR DEBUG BUILDS
install(
FILES $<TARGET_PDB_FILE:CompositeAssetConverter>
DESTINATION "${CMAKE_INSTALL_PREFIX}"
@@ -4,27 +4,18 @@ add_executable(CompositeEngine MACOSX_BUNDLE ${ENGINE_SRC_FILES})
source_group(TREE ${CMAKE_SOURCE_DIR} FILES ${ENGINE_SRC_FILES})

add_dependencies(CompositeEngine CompositeCefSubprocess)

target_link_libraries(CompositeEngine PRIVATE CEF GLEW GLM OpenGL RapidJSON SDL)

target_include_directories(CompositeEngine PRIVATE ${ENGINE_SRC_DIR} ${UI_SRC_DIR})

if(OS_WINDOWS)
target_compile_options(CompositeEngine PRIVATE /W3 /WX)
elseif(OS_MACOSX)
# TODO: ONLY FOR DEBUG BUILDS
target_compile_options(CompositeEngine PRIVATE -g)

find_library(CORE_FOUNDATION_LIBRARY CoreFoundation)
target_link_libraries(CompositeEngine PRIVATE ${CORE_FOUNDATION_LIBRARY})
endif()

install(
TARGETS CompositeEngine
RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
BUNDLE DESTINATION "${CMAKE_INSTALL_PREFIX}"
)

if(OS_WINDOWS)
target_compile_options(CompositeEngine PRIVATE /W3 /WX)

install(
FILES $<TARGET_PDB_FILE:CompositeEngine>
DESTINATION "${CMAKE_INSTALL_PREFIX}"
@@ -42,7 +33,15 @@ if(OS_WINDOWS)
DIRECTORY "${CMAKE_SOURCE_DIR}/assets"
DESTINATION "${CMAKE_INSTALL_PREFIX}"
)
elseif(OS_MACOSX)
endif()

if(OS_MACOSX)
# TODO: ONLY FOR DEBUG BUILDS
target_compile_options(CompositeEngine PRIVATE -g)

find_library(CORE_FOUNDATION_LIBRARY CoreFoundation)
target_link_libraries(CompositeEngine PRIVATE ${CORE_FOUNDATION_LIBRARY})

install(
DIRECTORY "${CMAKE_SOURCE_DIR}/engine/graphics/shaders"
DESTINATION "${CMAKE_INSTALL_PREFIX}/CompositeEngine.app/Contents/Resources"
@@ -1,22 +1,20 @@

add_executable(CompositeCefSubprocess ${CEF_SUBPROCESS_SRC_FILES})

source_group(TREE ${CMAKE_SOURCE_DIR} FILES ${CEF_SUBPROCESS_SRC_FILES})

target_link_libraries(CompositeCefSubprocess PRIVATE CEF)

target_include_directories(CompositeCefSubprocess PRIVATE ${CEF_SUBPROCESS_SRC_DIR})

if(OS_WINDOWS)
target_compile_options(CompositeCefSubprocess PRIVATE /W3 /WX)
endif()

install(
TARGETS CompositeCefSubprocess
RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
BUNDLE DESTINATION "${CMAKE_INSTALL_PREFIX}"
)

if(OS_WINDOWS)
target_compile_options(CompositeCefSubprocess PRIVATE /W3 /WX)

# TODO: ONLY FOR DEBUG BUILDS
install(
FILES $<TARGET_PDB_FILE:CompositeCefSubprocess>
DESTINATION "${CMAKE_INSTALL_PREFIX}"

0 comments on commit 330581c

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