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