diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2019-10-15 10:12:05 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-15 10:12:05 -0300 |
commit | 2534540198bdaa7747e249e9325d0e5e1076cbd8 (patch) | |
tree | 6e4a31084a0bb7fc0bf7b20b967ec7c0658d8b97 | |
parent | e11b3a1cda3f7c699b1e2360dec8de0f22ba91ac (diff) | |
download | PSP.git-2534540198bdaa7747e249e9325d0e5e1076cbd8.tar.gz PSP.git-2534540198bdaa7747e249e9325d0e5e1076cbd8.tar.xz PSP.git-2534540198bdaa7747e249e9325d0e5e1076cbd8.zip |
Create CMakeLists.txt
-rw-r--r-- | CMakeLists.txt | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..4416649 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required(VERSION 3.9.0) +SET(PROJECT_NAME "PSP-UFU") +project(${PROJECT_NAME}) +set(default_build_type "Release") + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +if(NOT CMAKE_BUILD_TYPE) + message(STATUS "Setting build type to '${default_build_type}' as none was specified.") + set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE + STRING "Choose the type of build." FORCE) +endif() + +if(MSVC) + add_definitions(/MP) +endif() + +if(MSVC AND NOT WXSOURCE) + include(${CMAKE_SOURCE_DIR}/winmsvc.cmake) +else() + find_package(wxWidgets REQUIRED COMPONENTS net core base) + include(${wxWidgets_USE_FILE}) +endif() +message(STATUS "CMAKE_BUILD_TYPE:${CMAKE_BUILD_TYPE}") +file(GLOB helloworld_SRC + "*.h" + "*.cpp" +) +add_executable(${PROJECT_NAME} WIN32 ${helloworld_SRC}) +target_link_libraries(${PROJECT_NAME} ${wxWidgets_LIBRARIES}) + +if(MSVC) +add_custom_command( + TARGET ${PROJECT_NAME} + POST_BUILD + COMMAND "mt.exe" -manifest \"${CMAKE_CURRENT_SOURCE_DIR}\\dpiawarescaleing.manifest\" -inputresource:\"$<TARGET_FILE:${PROJECT_NAME}>\"\;\#1 -outputresource:\"$<TARGET_FILE:${PROJECT_NAME}>\"\;\#1 + COMMENT "Adding display aware manifest..." +) +endif() |