Skip to content

Commit

Permalink
Add options to build PIE
Browse files Browse the repository at this point in the history
  • Loading branch information
depau committed Aug 17, 2018
1 parent 9f7d9f4 commit fd3763b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
cmake_minimum_required(VERSION 3.4)

project(dmg2img)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
add_compile_options(-fPIE)
set(CMAKE_C_STANDARD 11)

project(dmg2img)
include_directories(src)
add_executable(dmg2img
src/adc.c
Expand All @@ -20,10 +21,7 @@ target_link_libraries(dmg2img z bz2)


project(vfdecrypt)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
set(CMAKE_C_STANDARD 11)

add_compile_options(-fPIE)
include_directories(src)
add_executable(vfdecrypt
src/vfdecrypt.c
Expand Down

0 comments on commit fd3763b

Please sign in to comment.