Fixes for binary directory generation
This commit is contained in:
parent
b6191dc330
commit
1c86aedb21
|
@ -27,6 +27,7 @@ Makefile*
|
|||
|
||||
# QtCreator
|
||||
*.autosave
|
||||
CMakeLists.txt.user
|
||||
|
||||
#QtCtreator Qml
|
||||
*.qmlproject.user
|
||||
|
@ -36,9 +37,6 @@ Makefile*
|
|||
.dew/*
|
||||
|
||||
# PrimeWorldEditor files
|
||||
bin/*.log
|
||||
bin/dump/*
|
||||
bin/PrimeWorldEditor.exe
|
||||
bin/PrimeWorldEditor-debug.exe
|
||||
bin/*
|
||||
bin-debug/*
|
||||
build/*
|
||||
externals/*
|
|
@ -12,10 +12,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Binaries)
|
|||
|
||||
if (WIN32)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_SOURCE_DIR}/bin-debug)
|
||||
endif()
|
||||
|
||||
add_subdirectory(src/Core)
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
"url": "https://github.com/AxioDL/nod",
|
||||
"type": "git",
|
||||
"head": "master",
|
||||
"ref": "01237372e17e4470e002efbe100c81ed804eeea3"
|
||||
"ref": "4dd0375cae9557a1881d56f722e20557075a9d93"
|
||||
},
|
||||
{
|
||||
"name": "CodeGen",
|
||||
|
|
|
@ -32,12 +32,6 @@ target_include_directories(pwe_core
|
|||
OpenGL
|
||||
)
|
||||
|
||||
target_link_directories(
|
||||
pwe_core
|
||||
PRIVATE
|
||||
${ASSIMP_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
pwe_core
|
||||
libcommon::libcommon
|
||||
|
@ -46,8 +40,8 @@ target_link_libraries(
|
|||
lzokay::lzokay
|
||||
OpenGL::GL
|
||||
codegen::codegen
|
||||
"${ZLIB_LIBRARY}"
|
||||
${ASSIMP_LIBRARIES}
|
||||
assimp::assimp
|
||||
${ZLIB_LIBRARY}
|
||||
)
|
||||
|
||||
target_compile_definitions(
|
||||
|
|
|
@ -59,7 +59,7 @@ find_package(Qt5 COMPONENTS Core Widgets ${QT_PLATFORM_COMPONENTS} REQUIRED)
|
|||
find_package(assimp CONFIG REQUIRED)
|
||||
|
||||
# AssImp's cmake config is pretty awful. It doesn't include necesary libraries. Hopefully this can be fixed later.
|
||||
find_library(IIRXML_LIBRARY IrrXMLd IrrXML)
|
||||
find_library(IIRXML_LIBRARY NAMES IrrXMLd IrrXML)
|
||||
|
||||
file(GLOB_RECURSE source_files
|
||||
"*.cpp"
|
||||
|
@ -69,21 +69,16 @@ file(GLOB_RECURSE source_files
|
|||
|
||||
add_executable(pwe_editor ${source_files})
|
||||
|
||||
target_compile_features(pwe_editor PRIVATE cxx_std_17)
|
||||
set_target_properties(pwe_editor PROPERTIES OUTPUT_NAME PrimeWorldEditor DEBUG_POSTFIX -debug)
|
||||
|
||||
target_link_directories(
|
||||
pwe_editor
|
||||
PRIVATE
|
||||
${ASSIMP_LIBRARY_DIRS}
|
||||
)
|
||||
target_compile_features(pwe_editor PRIVATE cxx_std_17)
|
||||
|
||||
target_link_libraries(
|
||||
pwe_editor
|
||||
pwe_core
|
||||
Qt5::Widgets
|
||||
${QT_PLATFORM_COMPONENTS_LIBS}
|
||||
${ASSIMP_LIBRARIES}
|
||||
"${IIRXML_LIBRARY}"
|
||||
${IIRXML_LIBRARY}
|
||||
)
|
||||
|
||||
# TODO: These should be drive by CI if CI ever becomes a thing for PWE.
|
||||
|
@ -108,7 +103,8 @@ if (WIN32)
|
|||
endif()
|
||||
|
||||
# run windeployqt to gather necessary .dlls
|
||||
add_custom_command(TARGET pwe_editor POST_BUILD COMMAND ${WINDEPLOYQT_PROGRAM} ARGS $<TARGET_FILE:pwe_editor>)
|
||||
add_custom_command(TARGET pwe_editor POST_BUILD COMMAND ${WINDEPLOYQT_PROGRAM} ARGS
|
||||
--no-angle --no-opengl-sw $<TARGET_FILE:pwe_editor>)
|
||||
|
||||
# copy bin directory of dew prefix
|
||||
add_custom_command(TARGET pwe_editor POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_directory
|
||||
|
|
Loading…
Reference in New Issue